changeset 3971:1631a3dee8fc

Merge
author andrew
date Wed, 20 Apr 2011 04:38:36 +0100
parents 6753b79d7bb5 (current diff) 29296ea6529a (diff)
children 8ae719dd77c0
files .hgtags make/com/sun/xml/Makefile make/common/Defs-linux.gmk make/common/Modules.gmk make/common/shared/Defs-versions.gmk make/common/shared/Defs.gmk make/common/shared/Platform.gmk make/common/shared/Sanity.gmk make/docs/Makefile make/java/dyn/Makefile make/java/java/FILES_java.gmk make/java/jli/Makefile make/java/nio/mxbean/Makefile make/java/redist/Makefile make/modules/Makefile make/modules/bootmodule.roots make/modules/jdk7.depconfig make/modules/modules.config make/modules/modules.group make/modules/optional.depconfig make/modules/tools/Makefile make/modules/tools/build.xml make/modules/tools/nbproject/project.properties make/modules/tools/nbproject/project.xml make/modules/tools/src/com/sun/classanalyzer/AnnotatedDependency.java make/modules/tools/src/com/sun/classanalyzer/AnnotationParser.java make/modules/tools/src/com/sun/classanalyzer/BootAnalyzer.java make/modules/tools/src/com/sun/classanalyzer/CheckDeps.java make/modules/tools/src/com/sun/classanalyzer/ClassAnalyzer.java make/modules/tools/src/com/sun/classanalyzer/ClassFileParser.java make/modules/tools/src/com/sun/classanalyzer/ClassPath.java make/modules/tools/src/com/sun/classanalyzer/CodeAttributeParser.java make/modules/tools/src/com/sun/classanalyzer/ConstantPoolAnalyzer.java make/modules/tools/src/com/sun/classanalyzer/ConstantPoolParser.java make/modules/tools/src/com/sun/classanalyzer/DependencyConfig.java make/modules/tools/src/com/sun/classanalyzer/Klass.java make/modules/tools/src/com/sun/classanalyzer/Module.java make/modules/tools/src/com/sun/classanalyzer/ModuleConfig.java make/modules/tools/src/com/sun/classanalyzer/ResolutionInfo.java make/modules/tools/src/com/sun/classanalyzer/ResourceFile.java make/modules/tools/src/com/sun/classanalyzer/ShowDeps.java make/sun/net/FILES_java.gmk src/share/classes/com/sun/jndi/ldap/Connection.java src/share/classes/com/sun/jndi/ldap/LdapCtx.java src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java src/share/classes/java/awt/Component.java src/share/classes/java/awt/Font.java src/share/classes/java/awt/color/ICC_Profile.java src/share/classes/java/beans/Introspector.java src/share/classes/java/dyn/CallSite.java src/share/classes/java/dyn/ClassValue.java src/share/classes/java/dyn/ConstantCallSite.java src/share/classes/java/dyn/InvokeDynamic.java src/share/classes/java/dyn/InvokeDynamicBootstrapError.java src/share/classes/java/dyn/Linkage.java src/share/classes/java/dyn/MethodHandle.java src/share/classes/java/dyn/MethodHandles.java src/share/classes/java/dyn/MethodType.java src/share/classes/java/dyn/MethodTypeForm.java src/share/classes/java/dyn/MutableCallSite.java src/share/classes/java/dyn/NoAccessException.java src/share/classes/java/dyn/Switcher.java src/share/classes/java/dyn/VolatileCallSite.java src/share/classes/java/dyn/WrongMethodTypeException.java src/share/classes/java/dyn/package-info.java src/share/classes/java/lang/ClassLoader.java src/share/classes/java/lang/System.java src/share/classes/javax/swing/JComponent.java src/share/classes/javax/swing/SwingUtilities.java src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java src/share/classes/org/relaxng/datatype/Datatype.java src/share/classes/org/relaxng/datatype/DatatypeBuilder.java src/share/classes/org/relaxng/datatype/DatatypeException.java src/share/classes/org/relaxng/datatype/DatatypeLibrary.java src/share/classes/org/relaxng/datatype/DatatypeLibraryFactory.java src/share/classes/org/relaxng/datatype/DatatypeStreamingValidator.java src/share/classes/org/relaxng/datatype/ValidationContext.java src/share/classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java src/share/classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java src/share/classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java src/share/classes/sun/dyn/Access.java src/share/classes/sun/dyn/AdapterMethodHandle.java src/share/classes/sun/dyn/BoundMethodHandle.java src/share/classes/sun/dyn/CallSiteImpl.java src/share/classes/sun/dyn/DirectMethodHandle.java src/share/classes/sun/dyn/FilterGeneric.java src/share/classes/sun/dyn/FilterOneArgument.java src/share/classes/sun/dyn/FromGeneric.java src/share/classes/sun/dyn/InvokeGeneric.java src/share/classes/sun/dyn/Invokers.java src/share/classes/sun/dyn/MemberName.java src/share/classes/sun/dyn/MethodHandleImpl.java src/share/classes/sun/dyn/MethodHandleNatives.java src/share/classes/sun/dyn/MethodTypeImpl.java src/share/classes/sun/dyn/SpreadGeneric.java src/share/classes/sun/dyn/ToGeneric.java src/share/classes/sun/dyn/anon/AnonymousClassLoader.java src/share/classes/sun/dyn/anon/ConstantPoolParser.java src/share/classes/sun/dyn/anon/ConstantPoolPatch.java src/share/classes/sun/dyn/anon/ConstantPoolVisitor.java src/share/classes/sun/dyn/anon/InvalidConstantPoolFormatException.java src/share/classes/sun/dyn/empty/Empty.java src/share/classes/sun/dyn/package-info.java src/share/classes/sun/dyn/util/BytecodeDescriptor.java src/share/classes/sun/dyn/util/BytecodeName.java src/share/classes/sun/dyn/util/ValueConversions.java src/share/classes/sun/dyn/util/VerifyAccess.java src/share/classes/sun/dyn/util/VerifyType.java src/share/classes/sun/dyn/util/Wrapper.java src/share/classes/sun/dyn/util/package-info.java src/share/classes/sun/font/TrueTypeFont.java src/share/classes/sun/font/Type1Font.java src/share/classes/sun/java2d/pisces/Stroker.java src/share/classes/sun/misc/BootClassLoaderHook.java src/share/classes/sun/misc/JavaSecurityCodeSignerAccess.java src/share/classes/sun/misc/SharedSecrets.java src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java src/share/classes/sun/nio/ch/DatagramChannelImpl.java src/share/classes/sun/nio/ch/Net.java src/share/classes/sun/security/provider/certpath/ForwardBuilder.java src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java src/share/lib/security/java.security src/share/lib/security/java.security-solaris src/share/lib/security/java.security-windows src/share/native/com/sun/java/util/jar/pack/unpack.cpp src/share/native/sun/awt/image/jpeg/imageioJPEG.c src/solaris/bin/ergo_sparc.c src/solaris/bin/ergo_zero.c src/solaris/classes/sun/nio/fs/LinuxFileSystem.java src/solaris/native/sun/awt/awt_GraphicsEnv.c test/java/dyn/ClassValueTest.java test/java/dyn/InvokeDynamicPrintArgs.java test/java/dyn/InvokeGenericTest.java test/java/dyn/JavaDocExamplesTest.java test/java/dyn/MethodHandlesTest.java test/java/dyn/indify/Indify.java test/java/lang/Thread/StopBeforeStart.java test/sun/misc/BootClassLoaderHook/TestHook.java
diffstat 739 files changed, 62031 insertions(+), 43704 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Nov 01 11:32:50 2010 -0400
+++ b/.hgtags	Wed Apr 20 04:38:36 2011 +0100
@@ -106,3 +106,10 @@
 29e09de1d0b4f84faea114cf10b3ec08b59acc4e jdk7-b127
 f08682e23279d6cccbdcafda1eb0647ba4900874 jdk7-b128
 14cd5d54a8d0b9c368d60ea83a066735b9931015 jdk7-b129
+bdc069d3f9101f89ec3f81c2950ee2d68fa846d3 jdk7-b130
+8ac52c85f9e91336dc00b52ef90b42eecf3230b3 jdk7-b131
+6bbc7a4734952ae7604578f270e1566639fa8752 jdk7-b132
+5e5f68a01d12a4432172f384d5201f3a05254493 jdk7-b133
+554adcfb615e63e62af530b1c10fcf7813a75b26 jdk7-b134
+d8ced728159fbb2caa8b6adb477fd8efdbbdf179 jdk7-b135
+aa13e7702cd9d8aca9aa38f1227f966990866944 jdk7-b136
--- a/LICENSE	Mon Nov 01 11:32:50 2010 -0400
+++ b/LICENSE	Wed Apr 20 04:38:36 2011 +0100
@@ -325,11 +325,11 @@
 
 "CLASSPATH" EXCEPTION TO THE GPL
 
-Certain source files distributed by Sun Microsystems, Inc.  are subject to
-the following clarification and special exception to the GPL, but only where
-Sun has expressly included in the particular source file's header the words
-"Sun designates this particular file as subject to the "Classpath" exception
-as provided by Sun in the LICENSE file that accompanied this code."
+Certain source files distributed by Oracle America and/or its affiliates are
+subject to the following clarification and special exception to the GPL, but
+only where Oracle has expressly included in the particular source file's header
+the words "Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the LICENSE file that accompanied this code."
 
     Linking this library statically or dynamically with other modules is making
     a combined work based on this library.  Thus, the terms and conditions of
--- a/make/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -74,7 +74,6 @@
 import_product    -- copy in the product components \n\
 import_fastdebug  -- copy in the fastdebug components \n\
 import_debug      -- copy in the debug components \n\
-modules           -- build the jdk and jre module images (experimental) \n\
 create_links      -- create softlinks in Solaris 32bit build to 64bit dirs \n\
 "
 
@@ -261,7 +260,6 @@
 # Release engineering targets.
 #
 include $(BUILDDIR)/common/Release.gmk
-include $(BUILDDIR)/common/Modules.gmk
 
 #
 # Cscope targets.
--- a/make/com/sun/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2011, 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
@@ -44,7 +44,7 @@
 SUBDIRS_management = jmx
 SUBDIRS_desktop    = image
 SUBDIRS_enterprise = crypto/provider jndi \
-                     org xml rowset net/httpserver
+                     org rowset net/httpserver
 SUBDIRS_misc       = $(SCRIPT_SUBDIR) tracing servicetag nio demo
 
 # Omit mirror since it's built with the apt tool.
--- a/make/com/sun/crypto/provider/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/crypto/provider/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -249,7 +249,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
 endif
-	$(install-non-module-file)
+	$(install-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/make/com/sun/java/pack/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/java/pack/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = pack200
 PACKAGE = com.sun.java.util.jar.pack
 LIBRARY = unpack
 PRODUCT = sun
@@ -156,7 +155,6 @@
 endif
 	$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
 	@$(call binary_file_verification,$@)
-	$(install-module-file)
 
 ifeq ($(PLATFORM), windows) 
 $(RES):: $(VERSIONINFO_RESOURCE)
--- a/make/com/sun/java/pack/prop/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/java/pack/prop/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 # to a collision of rules with Classes.gmk and Library.gmk
 
 BUILDDIR = ../../../../..
-MODULE  = pack200
 PACKAGE = com.sun.java.util.jar.pack
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/cosnaming/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/jndi/cosnaming/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = jndi-cosnaming
 PACKAGE = com.sun.jndi.cosnaming
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/dns/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/jndi/dns/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = jndi-dns
 PACKAGE = com.sun.jndi.dns
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/ldap/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/jndi/ldap/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = jndi-ldap
 PACKAGE = com.sun.jndi.ldap
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/rmi/registry/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/jndi/rmi/registry/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../../..
-MODULE  = jndi-rmiregistry
 PACKAGE = com.sun.jndi.rmi.registry
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/nio/sctp/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/nio/sctp/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = sctp
 PACKAGE = com.sun.nio.sctp
 LIBRARY = sctp
 PRODUCT = sun
--- a/make/com/sun/org/apache/xml/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/org/apache/xml/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../../..
-MODULE  = security-xmldsig
 PACKAGE = com.sun.org.apache.xml
 PRODUCT = xml
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/rowset/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/rowset/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = jdbc-enterprise
 PACKAGE = com.sun.rowset
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/script/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/script/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -25,7 +25,6 @@
 
 
 BUILDDIR = ../../..
-MODULE  = scripting-rhino
 PACKAGE = com.sun.script
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/security/auth/module/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/security/auth/module/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -26,7 +26,6 @@
 # Makefile for building auth modules.
 
 BUILDDIR = ../../../../..
-MODULE  = security-auth
 PACKAGE = com.sun.security.auth.module
 PRODUCT = sun
 
--- a/make/com/sun/servicetag/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/servicetag/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,6 @@
 # questions.
 
 BUILDDIR = ../../..
-MODULE  = servicetag
 PACKAGE = com.sun.servicetag
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/tools/attach/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/com/sun/tools/attach/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -25,7 +25,6 @@
 
 
 BUILDDIR = ../../../..
-MODULE  = attach
 PACKAGE = com.sun.tools.attach
 LIBRARY = attach
 PRODUCT = sun
@@ -66,8 +65,7 @@
 	@$(MKDIR) -p $(@D)
 	@$(RM) $@
 	@$(CAT) $< | $(SED) -e "s/^#\[$(PLATFORM)\]//" > $@
-	@$(install-module-file)
-                                                                                                
+
 .PHONY: copy-files
 
 
--- a/make/com/sun/xml/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 2005, 2006, 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.
-#
-
-#
-# Makefile for building packages under javax.xml
-#
-
-BUILDDIR = ../../..
-PACKAGE = com.sun.xml
-PRODUCT = xml
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Files to compile
-#
-AUTO_FILES_JAVA_DIRS = com/sun/activation \
-		       org/relaxng/datatype
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
--- a/make/common/Defs-linux.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Defs-linux.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2011, 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
@@ -107,6 +107,8 @@
 LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
 CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
 LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
+CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
 ifeq ($(ZERO_BUILD), true)
   CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
   ifeq ($(ZERO_ENDIANNESS), little)
@@ -143,11 +145,9 @@
 #
 # Misc compiler options
 #
-ifeq ($(ARCH),ppc)
-  CFLAGS_COMMON   = -fsigned-char
-else # ARCH
+ifneq ($(ARCH),ppc)
   CFLAGS_COMMON   = -fno-strict-aliasing
-endif # ARCH
+endif 
 PIC_CODE_LARGE = -fPIC
 PIC_CODE_SMALL = -fpic
 GLOBAL_KPIC = $(PIC_CODE_LARGE)
@@ -219,8 +219,19 @@
   #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
   #   Try: 'readelf -d lib*.so' to see these settings in a library.
   #
-  LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
-  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
+  Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin
+  Z_ORIGIN_FLAG/i586  = -Xlinker -z -Xlinker origin
+  Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin 
+  Z_ORIGIN_FLAG/ia64  = -Xlinker -z -Xlinker origin
+  Z_ORIGIN_FLAG/arm   = 
+  Z_ORIGIN_FLAG/ppc   =
+  Z_ORIGIN_FLAG/zero  = -Xlinker -z -Xlinker origin
+
+  LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY))
+
+  LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN
+  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%)
+
 endif
 
 EXTRA_LIBS += -lc
@@ -315,7 +326,6 @@
 override LIBTHREAD               =
 override MOOT_PRIORITIES         = true
 override NO_INTERRUPTIBLE_IO     = true
-override OPENWIN_HOME            = /usr/X11R6
 ifeq ($(ARCH), amd64)
 override OPENWIN_LIB             = $(OPENWIN_HOME)/lib64
 else
@@ -359,3 +369,9 @@
   INCLUDE_SA = true
 endif
 
+ifdef CROSS_COMPILE_ARCH
+  # X11 headers are not under /usr/include
+  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
+  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
+  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
+endif
--- a/make/common/Defs-windows.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Defs-windows.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -68,40 +68,10 @@
 # The following DLL's are considered MS runtime libraries and should
 #     not to be REBASEd, see deploy/make/common/Release.gmk.
 #     msvcr*.dll: Microsoft runtimes
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifeq ($(COMPILER_VERSION), VS2003)
-    MSVCRNN_DLL = msvcr71.dll
-    MSVCPNN_DLL = msvcp71.dll
-    MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
-  endif
-  ifeq ($(COMPILER_VERSION), VS2005)
-    MSVCRNN_DLL = msvcr80.dll
-    MSVCPNN_DLL = msvcp80.dll
-    MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
-  endif
-  ifeq ($(COMPILER_VERSION), VS2008)
-    MSVCRNN_DLL = msvcr90.dll
-    MSVCPNN_DLL = msvcp90.dll
-    MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
-  endif
-  ifeq ($(COMPILER_VERSION), VS2010)
-    MSVCRNN_DLL = msvcr100.dll
-    MSVCPNN_DLL = msvcp100.dll
-    MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
-  endif
-endif
-
-ifeq ($(ARCH_DATA_MODEL), 64)
-  ifeq ($(COMPILER_VERSION), VS2008)
-    MSVCRNN_DLL = msvcr90.dll
-    MSVCPNN_DLL = msvcp90.dll
-    MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
-  endif
-  ifeq ($(COMPILER_VERSION), VS2010)
-    MSVCRNN_DLL = msvcr100.dll
-    MSVCPNN_DLL = msvcp100.dll
-    MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
-  endif
+ifeq ($(COMPILER_VERSION), VS2010)
+  MSVCRNN_DLL = msvcr100.dll
+  MSVCPNN_DLL = msvcp100.dll
+  MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
 endif
 
 EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
@@ -124,109 +94,31 @@
 endif
 
 ifeq ($(CC_VERSION),msvc)
-  # Visual Studio .NET 2003 or VS2003 compiler option definitions:
+  # Visual Studio compiler option definitions:
   #   -O1      Favors reduced size over speed (-Og     -Os -Oy -Ob2 -Gs -GF -Gy)
   #   -O2      Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
-  #   -Ox      Full optimization (use -O2)    (-Og -Oi -Ot -Oy -Ob2)
-  #              (Removed in Visual Studio 2005 or VS2005)
   #   -Ob2     More aggressive inlining
   #   -Og      Global optimizations
   #   -Oi      Replace some functions with intrinsic or special forms
-  #   -Op      Improve floating point calculations (disables some optimizations)
-  #              (Replaced with -fp:precise in VS2005, /Op is default now)
+  #   -fp:precise (should be the default)
+  #            Improve floating point calculations (disables some optimizations)
   #   -Os      Favor small code
   #   -Ot      Favor faster code
   #   -Oy      Frame pointer omission
-  #   -GB      Optimize for pentium (old VC6 option?)
-  #   -G6      VS2003 version of -GB?
+  #   -G6      Used to be -GB?
   #   -GF      Pool strings in read-only memory
   #   -Gf      Pool strings in read-write memory (the default)
   #   -Gs      Controls stack probess
-  #   -GS      Adds buffer overflow checks on stacks
-  #              (Default in VS2005)
-  #   -GX      Enables exception handling 
-  #              (Replaced with /EHsc in VS2005)
+  #   -GS      Adds buffer overflow checks on stacks (the default)
+  #   -EHsc    Enables exception handling 
   #   -Gy      Function level linking only
   #
-  # NOTE: With VC6, -Ox included -Gs.
-  # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2.
-  # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF.
-  #
 
   CC_OPT/NONE    = -Od
   CC_OPT/LOWER   = -O2
   CC_OPT/HIGHER  = -O3
   CC_OPT/HIGHEST = -O3
   
-  ifeq ($(COMPILER_VERSION), VC6)
-    # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built)
-    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-    AUTOMATIC_PCH_OPTION =
-    GX_OPTION = -GX
-    GZ_OPTION = -GZ
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      CC_OPT/HIGHEST = -Ox -Gy -Os -GB
-      CC_OPT/HIGHER  = -Ox -Gy -Os -GB
-      CC_OPT/LOWER   = -Ox -Gy -Os -GB
-    else
-      CC_OPT/HIGHEST = -Ox -Gy -Op
-      CC_OPT/HIGHER  = -Ox -Gy -Op
-      CC_OPT/LOWER   = -Ox -Gy -Op
-    endif
-  endif
-  
-  ifeq ($(COMPILER_VERSION), VS2003)
-    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-    AUTOMATIC_PCH_OPTION = -YX
-    # Also known as VC7 compiler
-    GX_OPTION = -GX
-    GZ_OPTION = -GZ
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      # Lowered opt level to try and reduce footprint, dll size especially.
-      #     Was: CC_OPT/HIGHEST = -O2 -G6
-      #     Was: CC_OPT/HIGHER  = -O2
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    else
-      CC_OPT/HIGHEST = -O2 -Op
-      CC_OPT/HIGHER  = -O2 -Op
-      CC_OPT/LOWER   = -O1 -Op
-    endif
-  endif
-  
-  ifeq ($(COMPILER_VERSION), VS2005)
-    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-    AUTOMATIC_PCH_OPTION =
-    # VS2005 compiler, only with Platform SDK right now?
-    GX_OPTION = -EHsc
-    GZ_OPTION = -RTC1
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    else
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    endif
-  endif
-  ifeq ($(COMPILER_VERSION), VS2008)
-    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-    AUTOMATIC_PCH_OPTION =
-    GX_OPTION = -EHsc
-    GZ_OPTION = -RTC1
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    else
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    endif
-  endif
-
   ifeq ($(COMPILER_VERSION), VS2010)
     # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
     AUTOMATIC_PCH_OPTION =
@@ -256,7 +148,7 @@
 
 # Select the runtime support library carefully, need to be consistent
 #
-# VS2003 compiler option definitions:
+# Visual Studio Runtime compiler option definitions:
 #   -MD        Use dynamic multi-threaded runtime library
 #   -MDd       Use debug version (don't use, doesn't mix with -MD DLL's)
 #   -MT        Use static multi-threaded runtime library (-ML is going away)
@@ -265,12 +157,9 @@
 #
 #      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcpnn.dll
 #
-# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
-ifeq ($(MS_RUNTIME_STATIC),true)
-  ifeq ($(COMPILER_VERSION), VS2003)
-    MS_RUNTIME_OPTION=-MT
-  endif
-else
+# If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer
+#     supported by VS2010
+ifneq ($(MS_RUNTIME_STATIC),true)
   MS_RUNTIME_OPTION=-MD
 endif
 # The _DEBUG macro option (changes things like malloc to use debug version)
@@ -302,7 +191,7 @@
 MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
 
 ifeq ($(CC_VERSION),msvc)
-  # VS2003 compiler option definitions:
+  # Visual Studio compiler option definitions:
   #   -Zi      Cause *.pdb file to be created, full debug information
   #   -Z7      Full debug inside the .obj, no .pdb
   #   -Zd      Basic debug, no local variables? In the .obj
@@ -317,31 +206,10 @@
   CFLAGS_OPT      = $(CC_OPT)
   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
 
-  # REMIND: I don't see where CFLAGS_VS2005 is used. I suspect its
-  # pulled in as a combined "CFLAGS_$(COMPILER_VERSION)" string
-  # but the lack of this isn't causing any apparent build problems
-  # with VS 2010 but it could be causing compiler warnings.
-  # For now, I  will add it for all cases :
   CFLAGS_VS2010 += -Zc:wchar_t-
-  #
-  # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
-  # by default. However, we expect the wchar_t to be a typedef to the
-  # unsigned short data type. The -Zc:wchar_t- option restores the old
-  # behavior (as seen in VS2003) to avoid massive code modifications.
-  # When/if our code will be "C/C++ Standard"-compliant (at least in the area
-  # of handling the wchar_t type), the option won't be necessary.
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    CFLAGS_VS2005 += -Zc:wchar_t-
-  else
-    # The 64bit Platform SDK we use (April 2005) doesn't like this option
-    ifneq ($(CC_VER), 14.00.40310.41)
-      CFLAGS_VS2005 += -Zc:wchar_t-
-    endif
-  endif
 
   # All builds get the same runtime setting
   CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
-  
 
   LDEBUG = /debug
   
@@ -350,16 +218,10 @@
     LDEBUG += /pdb:NONE
   endif
   
-  # The new Platform SDK and VS2005 has /GS as a default and requires 
-  #    bufferoverflowU.lib on the link command line, otherwise 
-  #    we get missing __security_check_cookie externals at link time. 
-  BUFFEROVERFLOWLIB = bufferoverflowU.lib
-  # Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
-  LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
-
-  # VS2008 has bufferoverflow baked in:
-  LFLAGS_VS2008 = 
-  LFLAGS_VS2010 = 
+  # VS2010, always need safe exception handlers, not needed on 64bit
+  ifeq ($(ARCH_DATA_MODEL), 32)
+    LFLAGS_VS2010 +=  -SAFESEH
+  endif
 
   # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
   BASELFLAGS = -nologo /opt:REF /incremental:no
--- a/make/common/Defs.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Defs.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2011, 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
@@ -116,6 +116,36 @@
 include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk
 
 #
+# Cross-compilation Settings
+#
+ifdef CROSS_COMPILE_ARCH
+  # Can't run the tools we just built
+  USE_ONLY_BOOTDIR_TOOLS = true
+
+  # When cross-compiling CC generates code for the target, but
+  # some parts of the build generate C code that has to be compiled
+  # and executed on the build host - HOST_CC is the 'local' compiler.
+  # For linux the default is /usr/bin/gcc; other platforms need to
+  # set it explicitly
+  ifeq ($(PLATFORM), linux)
+    ifndef HOST_CC
+      HOST_CC = $(USRBIN_PATH)gcc
+    endif
+  endif
+else
+  # Must set HOST_CC if not already set
+  ifndef HOST_CC
+    HOST_CC = $(CC)
+  endif
+endif
+
+# Reset the VM name for client-only builds
+ifdef BUILD_CLIENT_ONLY
+  VM_NAME = client
+endif
+
+
+#
 # Freetype logic is applicable to OpenJDK only
 #
 ifdef OPENJDK
@@ -224,9 +254,6 @@
 # for generated class files
 CLASSBINDIR         = $(OUTPUTDIR)/classes
 DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
-# for modules
-MODULES_DIR         = $(OUTPUTDIR)/modules
-ABS_MODULES_DIR     = $(ABS_OUTPUTDIR)/modules
 # for generated tool class files
 BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
 # for build tool jar files
@@ -297,22 +324,6 @@
   endif
 endif
 
-#
-# Build units may or may not define MODULE.  Default to "other".
-#
-# MODULE variable defines the lowest-level module name that
-# might or might not be the name of the modules created in
-# the modules build (see make/modules/modules.config and
-# modules.group).
-#
-MODULES_TEMPDIR     = $(OUTPUTDIR)/tmp/modules
-ABS_MODULES_TEMPDIR = $(ABS_OUTPUTDIR)/tmp/modules
-
-ifndef MODULE
-  MODULE = other
-endif
-override MODULE_DEST_DIR = $(MODULES_TEMPDIR)/$(MODULE)
-
 # the use of += above makes a space separated list which we need to 
 # remove for filespecs.
 #
@@ -353,8 +364,7 @@
 
 INCLUDES = -I. -I$(CLASSHDRDIR) \
 	$(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
-OTHER_CPPFLAGS = $(INCLUDES)
-
+OTHER_CPPFLAGS += $(INCLUDES)
 
 #
 # vpaths.  These are the default locations searched for source files.
@@ -422,52 +432,13 @@
 #
 include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
 
-#
-# Macros to find the module that $@ belongs to
-#
-
 UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
-MODULE_PATH_PATTERN = -e 's%.*\/classes\/%classes\/%' \
-		      -e 's%.*\/$(UNIQUE_PATH_PATTERN)\/%classes\/%' \
-		      -e 's%.*\/lib\/%lib\/%' \
-	              -e 's%.*\/bin\/%bin\/%' \
-	              -e 's%.*\/include\/%include\/%' \
-		      -e 's%.*\/demo\/%demo\/%' \
-		      -e 's%.*\/sample\/%sample\/%'
-
-# Install a file to its module
-define install-module-file
-dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
-$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
-$(CP) -f $@ $(MODULE_DEST_DIR)/$$dest
-endef
-
-# Install all files from the directory to its module
-define install-module-dir
-dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
-$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
-$(CP) -rf $(@D)/* $(MODULE_DEST_DIR)/$$dest
-endef
-
-# chmod the file in its module
-define chmod-module-file
-dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
-$(CHMOD) $1 $(MODULE_DEST_DIR)/$$dest
-endef
-
-# install a sym link in its module
-define install-module-sym-link
-dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
-$(LN) -sf $1 $(MODULE_DEST_DIR)/$$dest
-endef
-
 
 # Run MAKE $@ for a launcher:
 #   $(call make-launcher, name, mainclass, java-args, main-args)
 define make-launcher
 $(CD) $(BUILDDIR)/launchers && \
 $(MAKE) -f Makefile.launcher \
-        MODULE=$(MODULE) \
         PROGRAM=$(strip $1) \
         MAIN_CLASS=$(strip $2) \
         MAIN_JAVA_ARGS="$(strip $3)" \
@@ -488,28 +459,18 @@
 define install-file
 $(prep-target)
 $(CP) $< $@
-@$(install-module-file)
 endef
 
 define chmod-file
 $(CHMOD) $1 $@
-@$(call chmod-module-file, $1)
 endef
 
 define install-sym-link
 $(LN) -s $1 $@
-@$(call install-module-sym-link, $1)
-endef
-
-#
-# Marcos for files not belonging to any module 
-define install-non-module-file
-$(prep-target)
-$(CP) $< $@
 endef
 
 define install-manifest-file
-$(install-non-module-file)
+$(install-file)
 endef
 
 # Cleanup rule for after debug java run (hotspot.log file is left around)
@@ -534,9 +495,11 @@
 #
 # Tool flags
 #
+# EXTRA_CFLAGS are used to define cross-compilation options
+#
 ASFLAGS         = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
-CFLAGS          = $(CFLAGS_$(VARIANT)/BYFILE)   $(CFLAGS_COMMON) $(OTHER_CFLAGS)
-CXXFLAGS        = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+CFLAGS          = $(CFLAGS_$(VARIANT)/BYFILE)   $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(EXTRA_CFLAGS)
+CXXFLAGS        = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(EXTRA_CFLAGS)
 CPPFLAGS        = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
 		  $(DEFINES) $(OPTIONS:%=-D%)
 LDFLAGS         = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
@@ -556,6 +519,10 @@
   COPYRIGHT_YEAR := $(shell $(DATE) '+%Y')
 endif
 
+ifndef OPENJDK
+include $(JDK_TOPDIR)/make/closed/common/Defs.gmk
+endif
+
 # Install of imported file (JDK_IMPORT_PATH, or some other external location)
 define install-importonly-file
 @$(ECHO) "ASSEMBLY_IMPORT: $@"
@@ -577,7 +544,6 @@
 
 define install-import-file
 $(install-importonly-file)
-@$(install-module-file)
 endef
 
 .PHONY: all build clean clobber
--- a/make/common/Demo.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Demo.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -25,8 +25,6 @@
 
 # JDK Demo building jar file.
   
-MODULE = demos
-
 # Some names are defined with LIBRARY inside the Defs.gmk file
 LIBRARY=$(DEMONAME)
 OBJDIR=$(TEMPDIR)/$(DEMONAME)
@@ -120,8 +118,11 @@
 DEMO_ALL_NATIVE_SOURCES += $(filter %.hpp,$(DEMO_ALL_FILES))
 
 # If we have java sources, then define the jar file we will create
+ifndef DEMO_JAR_NAME
+  DEMO_JAR_NAME = $(DEMONAME).jar
+endif
 ifneq ($(strip $(DEMO_JAVA_SOURCES)),)
-  DEMO_JAR            = $(DEMO_DESTDIR)/$(DEMONAME).jar
+  DEMO_JAR            = $(DEMO_DESTDIR)/$(DEMO_JAR_NAME)
 endif
 
 # If we have native sources, define the native library we will create
@@ -254,6 +255,17 @@
 	$(MKDIR) -p $(DEMO_JAR_IMAGE)
 	$(JAVAC_CMD) -d $(DEMO_JAR_IMAGE) -sourcepath $(DEMO_BUILD_SRCDIR) \
 	    @$(DEMO_JAVAC_INPUT)
+  ifeq ($(DEMO_INCL_SRC),true)
+	$(CP) $(DEMO_JAVA_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%) $(DEMO_JAR_IMAGE)
+  endif
+  ifeq ($(DEMO_ONLY_SRC),true)
+	$(RM) -r $(DEMO_JAR_IMAGE)
+	$(MKDIR) -p $(DEMO_JAR_IMAGE)
+	$(CP) -r $(DEMO_BUILD_SRCDIR)/* $(DEMO_JAR_IMAGE)
+    ifneq ($(DEMO_TOPFILES),)
+	$(CP) $(DEMO_ROOT)/$(DEMO_TOPFILES) $(DEMO_JAR_IMAGE)
+    endif
+  endif
 	$(BOOT_JAR_CMD) -cfm $@ $(DEMO_MANIFEST) \
 	     -C $(DEMO_JAR_IMAGE) . \
 	     $(BOOT_JAR_JFLAGS)
@@ -326,9 +338,9 @@
 ifdef DEMO_IS_APPLET
 	@$(ECHO) "Expanding jar file into demos area at $(DEMO_DESTDIR)"
 	( $(CD) $(DEMO_DESTDIR) && \
-	  $(BOOT_JAR_CMD) -xfv $(DEMONAME).jar \
+	  $(BOOT_JAR_CMD) -xfv $(DEMO_JAR_NAME) \
 	     $(BOOT_JAR_JFLAGS) && \
-	  $(RM) -r META-INF $(DEMONAME).jar  && \
+	  $(RM) -r META-INF $(DEMO_JAR_NAME) && \
 	  $(java-vm-cleanup) )
 	@( $(CD) $(DEMO_DESTDIR) && $(java-vm-cleanup) )
 	@$(ECHO) "Expanding source into demos area at $(DEMO_DESTDIR)"
--- a/make/common/Library.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Library.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -168,18 +168,9 @@
 	  $(OTHER_LCF) $(JAVALIB) $(LDLIBS)
 	$(CP) $(OBJDIR)/$(@F) $@
 	@$(call binary_file_verification,$@)
-	$(install-module-file)
 	$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
 	$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
 
-$(ACTUAL_LIBRARY):: $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).map $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).pdb
-
-$(ACTUAL_LIBRARY_DIR)/%.map: FORCE
-	$(install-module-file)
-
-$(ACTUAL_LIBRARY_DIR)/%.pdb: FORCE
-	$(install-module-file)
-
 endif # LIBRARY
 
 $(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
@@ -235,7 +226,6 @@
 else # LIBRARY
 	$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
 	@$(call binary_file_verification,$@)
-	$(install-module-file)
 ifeq ($(WRITE_LIBVERSION),true)
 	$(MCS) -d -a "$(FULL_VERSION)" $@
 endif # WRITE_LIBVERSION
--- a/make/common/Modules.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,454 +0,0 @@
-#
-# Copyright (c) 2009, 2010, 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.
-#
-
-JDK_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jdk-module-image
-JRE_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jre-module-image
-
-#
-# modules   Target to build jdk and jre module image
-#
-#           There is one jar file per module containing classes only.
-#           All module jars are currently placed under jre/lib directory.
-#
-# Open issues that need further investigation:
-# 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
-#    module.  META-INF/services file is not installed.
-# 2. Signed jars
-#    For JDK build, signed jars are copied to the build.
-#    All jars in the module image are unsigned.
-
-MODULE_IMAGEBINDIR = bin
-
-#
-# Targets.
-#
-INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre
-INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk
-ifeq ($(PLATFORM), solaris)
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre-sol64
-    INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk-sol64
-  endif
-endif
-
-modules modules-clobber \
-initial-module-image-jre initial-module-image-jdk \
-initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \
-trim-module-image-jre trim-module-image-jdk \
-process-module-image-jre process-module-image-jdk ::
-	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-
-# Order is important here, trim jre after jdk image is created
-modules:: gen-modules \
-	 sanity-module-images post-sanity-module-images  \
-	 $(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \
-	 trim-module-image-jre trim-module-image-jdk \
-	 process-module-image-jre process-module-image-jdk
-
-# Don't use these
-module-image-jre:: initial-module-image-jre trim-module-image-jre process-module-image-jre
-module-image-jdk:: initial-module-image-jdk trim-module-image-jdk process-module-image-jdk
-
-#
-# Paths to these files we need
-JDK_MODULE_DOCFILES   = $(IMAGE_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%)
-JRE_MODULE_DOCFILES   = $(IMAGE_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%)
-
-###### RULES
-
-# JDK files
-$(JDK_MODULE_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
-	$(process-doc-file)
-
-# JRE files 
-$(JRE_MODULE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
-	$(process-doc-file)
-ifeq ($(PLATFORM), windows)
-$(JRE_MODULE_IMAGE_DIR)/README.txt: $(SHARE_JRE_DOC_SRC)/README
-	$(process-doc-file)
-endif
-
-######################################################
-# JRE Image
-######################################################
-
-MODULES_LIST = $(MODULES_TEMPDIR)/classlist/modules.list
-
-# Modules in the jre/lib/security directory
-POLICY_MODULES = US_export_policy local_policy
-
-# Modules in the modules/ext directory
-EXT_MODULES = localedata security-sunec security-sunjce
-
-# Build PKCS#11 on all platforms except 64-bit Windows.
-PKCS11 = security-sunpkcs11
-ifeq ($(ARCH_DATA_MODEL), 64)
-  ifeq ($(PLATFORM), windows)
-    PKCS11 =
-  endif
-endif
-
-EXT_MODULES += $(PKCS11)
-
-# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
-ifeq ($(PLATFORM), windows)
-  ifneq ($(ARCH_DATA_MODEL), 64)
-    EXT_MODULES += security-sunmscapi
-  endif
-endif
-
-# Modules for JDK only
-JDK_MODULES = tools
-
-gen-modules:
-	$(CD) modules; $(MAKE) all
-
-initial-module-image-jre-setup:
-	$(RM) -r $(JRE_MODULE_IMAGE_DIR)
-	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)
-
-# 64-bit solaris jre image contains only the 64-bit add-on files.
-initial-module-image-jre-sol64:: initial-module-image-jre-setup
-	@# Use tar instead of cp to preserve the symbolic links
-	for dir in bin lib ; do \
-	  ( $(CD) $(OUTPUTDIR) && \
-		$(TAR) cf - `$(FIND) $$dir -name '$(ARCH)' -print` | \
-		($(CD) $(JRE_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \
-	done
-	@# Remove some files from the jre area
-	for t in $(NOTJRETOOLS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
-	done
-	$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl'`
-	$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl'`
-
-# Construct an initial jre image (initial jdk jre) no trimming or stripping
-initial-module-image-jre:: initial-module-image-jre-setup \
-		    $(JRE_MODULE_DOCFILES) \
-		    $(BUILDMETAINDEX_JARFILE)
-	@# Copy in bin directory
-	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
-	@# CTE plugin security change require new empty directory lib/applet
-	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/applet
-	@# Copy files but not .jar in lib directory 
-	$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(EGREP) -v ".jar$$" | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
-	@#
-	@# copy modules to jre/lib
-	@#
-	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
-	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib ; \
-	done
-	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/ext
-	for m in $(EXT_MODULES) ; do \
-           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/ext ; \
-        done
-	for m in $(POLICY_MODULES) ; do \
-           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/security; \
-        done
-	@# Remove jdk modules
-	for m in $(JDK_MODULES) ; do \
-           $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar ; \
-        done
-
-	@# Make sure all directories are read/execute for everyone
-	$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d`
-	@# Remove some files from the jre area
-	for t in $(NOTJRETOOLS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
-	done
-	@# Remove orb.idl and ir.idl from jre
-	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl' -exec $(RM) \{} \;
-	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl' -exec $(RM) \{} \;
-	@# Generate meta-index to make boot and extension class loaders lazier
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \
-	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
-		-o meta-index *.jar
-	@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && $(java-vm-cleanup)
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && \
-	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
-		-o meta-index *.jar
-	@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
-ifeq ($(PLATFORM), windows)
-	@# Remove certain *.lib files
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \
-            $(RM) java.$(LIB_SUFFIX) jvm.$(LIB_SUFFIX) \
-                  awt.$(LIB_SUFFIX) jawt.$(LIB_SUFFIX)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	@# The Java Kernel JRE image ships with a special VM.  It is not included
-	@# in the full JRE image, so remove it.  Also, is it only for 32-bit windows.
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/bin && $(RM) -r kernel
-  endif
-endif # Windows
-ifneq ($(PLATFORM), windows)
-	$(call copy-man-pages,$(JRE_MODULE_IMAGE_DIR),$(JRE_MAN_PAGES))
-endif # !windows
-
-# Trim out any extra files not for the jre shipment but wanted in the jdk jre.
-#   (Note the jdk WILL want the jre image before this trimming)
-#   Removes server VM on Windows 32bit.
-#   Remove certain shared libraries that should not be in the jre image
-#      but should be in the jdk jre image.
-trim-module-image-jre::
-ifeq ($(PLATFORM), windows)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	$(RM) -r $(JRE_MODULE_IMAGE_DIR)/bin/server
-  endif
-  ifdef NOTJRE_SHARED_LIBS
-	for l in $(NOTJRE_SHARED_LIBS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin/$$l ; \
-	done ;
-  endif
-else # PLATFORM
-  ifdef NOTJRE_SHARED_LIBS
-	for l in $(NOTJRE_SHARED_LIBS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$(LIBARCH)/$$l ; \
-	done ;
-  endif
-endif # PLATFORM
-
-# Get list of all Elf files in the jre
-JRE_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jre-elf-files.list
-$(JRE_MODULE_ELF_LIST):
-	@$(prep-target)
-ifneq ($(PLATFORM), windows)
-	$(RM) $@
-	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -type f -name \*.$(LIB_SUFFIX) >> $@
-	$(FILE) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-endif
-
-# Post process the image (strips and mcs on Elf files we are shipping)
-#   (Note the jdk WILL want the jre image before this processing)
-process-module-image-jre:: $(JRE_MODULE_ELF_LIST)
-ifneq ($(POST_STRIP_PROCESS), )
-	for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
-	  $(POST_STRIP_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-ifneq ($(POST_MCS_PROCESS), )
-	for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
-	  $(POST_MCS_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-	$(RM) $(JRE_MODULE_ELF_LIST)
-
-######################################################
-# JDK Image
-######################################################
-# Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
-
-initial-module-image-jdk-setup:
-	$(RM) -r $(JDK_MODULE_IMAGE_DIR)
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/jre
-	($(CD) $(JRE_MODULE_IMAGE_DIR) && $(FIND) . -depth -print \
-	      | $(CPIO) -pdum $(JDK_MODULE_IMAGE_DIR)/jre )
-	$(RM) -rf $(JDK_MODULE_IMAGE_DIR)/jre/man
-	$(CHMOD) a+rx `$(FIND) $(JDK_MODULE_IMAGE_DIR) -type d`
-
-initial-module-image-jdk64-bindemos:
-	for dir in bin demo ; do \
-	  ( $(CD) $(OUTPUTDIR) && \
-		$(TAR) cf - `$(FIND) $$dir -name '$(LIBARCH)' -print` | \
-		($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \
-        done
-
-# Solaris 64 bit image is special
-initial-module-image-jdk-sol64:: initial-module-image-jdk-setup \
-			  initial-module-image-jdk64-bindemos
-
-# DB files to add
-ifeq ($(OPENJDK),true)
-
-initial-module-image-jdk-db:
-
-else
-
-# Create the list of db *.zip files to bundle with jdk
-ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
-DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
-
-initial-module-image-jdk-db: $(DB_ZIP_LIST)
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/db
-	for d in $(DB_ZIP_LIST); do \
-          ($(CD) $(JDK_MODULE_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
-	done
-
-endif
-
-# Standard jdk image
-initial-module-image-jdk:: initial-module-image-jdk-setup \
-		    initial-module-image-jdk-db \
-		    $(JDK_MODULE_DOCFILES)
-	$(MKDIR) $(JDK_MODULE_IMAGE_DIR)/lib
-	@#
-	@# copy jdk modules to jdk/lib
-	@#
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
-	for m in $(JDK_MODULES) ; do \
-	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \
-        done
-  ifeq ($(PLATFORM), windows)
-	@#
-	@# lib/
-	@#
-	$(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib
-	$(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib
-	@#
-	@# bin/
-	@#
-	@# copy all EXE files and only certain DLL files from BINDIR
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/bin
-	$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-	$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-    ifeq ($(COMPILER_VERSION), VS2010)
-	$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-    endif
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      ifeq ($(COMPILER_VERSION), VS2003)
-	$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-      endif
-    endif
-  else # PLATFORM
-	@#
-	@# bin/
-	@#
-	($(CD) $(BINDIR)/.. && $(TAR) cf - \
-	    `$(FIND) bin \( -type f -o -type l \) -print `) | \
-	    ($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -)
-  endif # PLATFORM
-	@#
-	@# lib/ct.sym
-	@#
-	$(MKDIR) -p $(OUTPUTDIR)/symbols/META-INF/sym
-	$(JAVAC_CMD) -XDprocess.packages -proc:only \
-	    -processor com.sun.tools.javac.sym.CreateSymbols \
-	    -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
-	    -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
-	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS)
-	$(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \
-	    -C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-	$(CP) $(LIBDIR)/ct.sym $(JDK_MODULE_IMAGE_DIR)/lib/ct.sym
-	@#
-	@# CORBA supported orb.idl and ir.idl should be copied to lib
-	@#
-	$(CP) $(LIBDIR)/orb.idl $(JDK_MODULE_IMAGE_DIR)/lib/orb.idl
-	$(CP) $(LIBDIR)/ir.idl $(JDK_MODULE_IMAGE_DIR)/lib/ir.idl
-  ifeq ($(PLATFORM), linux)
-	@#
-	@# on Linux copy jexec from jre/lib to /lib
-	@#
-	$(CP) $(LIBDIR)/jexec $(JDK_MODULE_IMAGE_DIR)/lib/jexec
-  endif # PLATFORM
-	@#
-	@# demo, include
-	@#
-	$(CP) -r -f $(DEMODIR) $(JDK_MODULE_IMAGE_DIR)
-	$(CP) -r -f $(SAMPLEDIR) $(JDK_MODULE_IMAGE_DIR)
-	$(CP) -r $(INCLUDEDIR) $(JDK_MODULE_IMAGE_DIR)
-	@#
-	@# Swing BeanInfo generation
-	@#
-	$(CD) javax/swing/beaninfo && $(MAKE) JDK_IMAGE_DIR=$(JDK_MODULE_IMAGE_DIR) swing-1.2-beans
-ifneq ($(PLATFORM), windows)
-	$(call copy-man-pages,$(JDK_MODULE_IMAGE_DIR),$(JDK_MAN_PAGES))
-endif # !windows
-
-# Trim out files we don't want to ship
-trim-module-image-jdk::
-	@# Remove tools that should not be part of SDK.
-	for t in $(NOTJDKTOOLS); do \
-	    $(RM) $(JDK_MODULE_IMAGE_DIR)/bin/$${t}$(EXE_SUFFIX); \
-	done
-
-# Get list of Elf files in the jdk
-JDK_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jdk-elf-files.list
-$(JDK_MODULE_ELF_LIST):
-	@$(prep-target)
-ifneq ($(PLATFORM), windows)
-	$(RM) $@
-	$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/lib -type f -name \*.$(LIB_SUFFIX) >> $@
-	$(FILE) `$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-	file `$(FIND) $(JDK_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-endif
-
-# Post process the image (strips and mcs on files we are shipping)
-process-module-image-jdk:: $(JDK_MODULE_ELF_LIST)
-ifneq ($(POST_STRIP_PROCESS), )
-	for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
-	  $(POST_STRIP_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-ifneq ($(POST_MCS_PROCESS), )
-	for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
-	  $(POST_MCS_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-	$(RM) $(JDK_MODULE_ELF_LIST)
-
-######################################################
-# clobber
-######################################################
-modules-clobber::
-	$(RM) -r $(JDK_MODULE_IMAGE_DIR)
-	$(RM) -r $(JRE_MODULE_IMAGE_DIR)
-
-#
-# TODO - nop for now
-sanity-module-images post-sanity-module-images:
-
-modules modules-clobber::
-	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
-	@$(java-vm-cleanup)
-
-.PHONY: modules module-image-jre module-image-jdk \
-	initial-module-image-jre initial-module-image-jdk \
-	initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \
-        initial-module-image-jdk-setup \
-	initial-module-image-jdk-db \
-        initial-module-image-jdk64-bindemos \
-        initial-module-image-jre-setup \
-	trim-module-image-jre trim-module-image-jdk \
-	process-module-image-jre process-module-image-jdk \
-	install-previous-jre install-previous-jdk \
-	modules-clobber
-
-# Force rule
-FRC:
-
--- a/make/common/Program.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Program.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -83,7 +83,7 @@
 	endif
     endif
     ifeq ($(PLATFORM), linux)
-	LDFLAGS += -Wl,-z -Wl,origin
+	LDFLAGS += $(LDFLAG_Z_ORIGIN)
 	LDFLAGS += -Wl,--allow-shlib-undefined
 	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
 	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli
@@ -186,7 +186,6 @@
 	$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
 	    $(FILES_o) $(THREADLIBS) $(LDLIBS)
 	@$(call binary_file_verification,$@)
-	$(install-module-file)
 
 endif # PLATFORM
 
--- a/make/common/Release.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Release.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2011, 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
@@ -54,15 +54,13 @@
                         com.sun.java.swing.plaf.motif    \
                         com.sun.java.swing.plaf.gtk
 
-# This is a stopgap until 6839872 is fixed.
-EXCLUDE_PROPWARN_PKGS += sun.dyn
-
 #
 # Include the exported private packages in ct.sym.
 # This is an interim solution until the ct.sym is replaced
-# with a new module system (being discussed for JDK 7).
+# with a new module system (being discussed for JDK 8).
 #
-EXPORTED_PRIVATE_PKGS = com.sun.servicetag
+EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
+                        com.oracle.net
 
 # 64-bit solaris has a few special cases. We define the variable
 # SOLARIS64 for use in this Makefile to easily test those cases
@@ -85,9 +83,8 @@
   IMAGE_DOCLIST_JDK = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
   IMAGE_DOCLIST_JRE = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
 else
-  # Where to find these files
-  SHARE_JDK_DOC_SRC = $(CLOSED_SHARE_SRC)/doc/jdk
-  SHARE_JRE_DOC_SRC = $(CLOSED_SHARE_SRC)/doc/jre
+  # make/closed/common/Defs.gmk for closed location of SHARE_JDK_DOC_SRC
+
   IMAGE_DOCLIST_JDK = COPYRIGHT README.html  THIRDPARTYLICENSEREADME.txt
   IMAGE_DOCLIST_JRE = COPYRIGHT Welcome.html THIRDPARTYLICENSEREADME.txt
   ifeq ($(PLATFORM), windows)
@@ -124,7 +121,7 @@
 	tnameserv.1     \
 	unpack200.1
 
-ifeq ($(ARCH_DATA_MODEL),32)
+ifndef OPENJDK
   JRE_MAN_PAGES += javaws.1
 endif
 
@@ -911,11 +908,6 @@
     ifeq ($(COMPILER_VERSION), VS2010)
 	$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
     endif
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      ifeq ($(COMPILER_VERSION), VS2003)
-	$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
-      endif
-    endif
   else # PLATFORM
 	@#
 	@# bin/
@@ -1098,7 +1090,7 @@
 
 # Common way to emit a line into the release or info file
 define info-file-item # name value
-$(PRINTF) "%s=\"%s\"\n" $1 $2 >> $@
+$(PRINTF) '%s="%s"\n' $1 $2 >> $@
 endef
 
 # Values to emit
--- a/make/common/Sanity.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Sanity.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -71,8 +71,7 @@
     sane-cacerts \
     sane-ant_version \
     sane-zip_version \
-    sane-msvcrt_path \
-    sane-build_modules
+    sane-msvcrt_path
 
 # The rules sanity-* have a one-to-one correspondence with the major targets
 # Each sanity-* rule should have no body to ensure that the post-sanity-* is the
--- a/make/common/Subdirs.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/Subdirs.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -40,9 +40,6 @@
 #
 # By default, subdirs specified in the SUBDIRS and all SUBDIRS_* 
 # variables will be built.
-# 
-# BUILD_MODULES variable can be used to specify one or more groups
-# to be built (BUILD_MODULES=all will build all groups).
 #
 # Variables of the currently supported groups are:
 #  SUBDIRS_desktop    
@@ -53,15 +50,12 @@
 # 
 # Change to the above list also need to update 
 # make/common/shared/Sanity.gmk.  NOTE: this list is subject
-# to change till the JDK 7 SE profiles/modules are finalized.
+# to change.
 # 
 # Eventually we want to restructure the make directory
 # according to these grouping (e.g. make/desktop/...) and
 # the SUBDIRS_<group> variables would not be needed.
 # 
-# To build the desktop and tools groups only, you can do:
-# gnumake BUILD_MODULES="desktop tools" ...
-# 
 
 # Iterate the subdirectories specified in $1.
 # - cd into each subdir and make them
@@ -96,77 +90,51 @@
 
 #
 # Iterate the list specified in SUBDIRS_<group> only if
-# SUBDIRS_<group> is set and <group> or "all" is specified
-# in the BUILD_MODULES variable
+# SUBDIRS_<group> is set.
 #
 ifdef SUBDIRS_desktop 
-  ifneq (,$(findstring desktop, $(BUILD_MODULES)))
-      define subdirs-desktop-loop
-         @$(call subdirs-group-loop,SUBDIRS_desktop)
-      endef
-  else
-    define subdirs-desktop-loop
-    endef
-  endif
+  define subdirs-desktop-loop
+      @$(call subdirs-group-loop,SUBDIRS_desktop)
+  endef
 else   
   define subdirs-desktop-loop
   endef
 endif   # SUBDIRS_desktop 
 
 ifdef SUBDIRS_enterprise 
-  ifneq (,$(findstring enterprise, $(BUILD_MODULES)))
-      define subdirs-enterprise-loop
-         @$(call subdirs-group-loop,SUBDIRS_enterprise)
-      endef
-  else
-    define subdirs-enterprise-loop
-    endef
-  endif
+  define subdirs-enterprise-loop
+      @$(call subdirs-group-loop,SUBDIRS_enterprise)
+  endef
 else   
 define subdirs-enterprise-loop
 endef
 endif   # SUBDIRS_enterprise 
 
 ifdef SUBDIRS_management 
-  ifneq (,$(findstring management, $(BUILD_MODULES)))
-      define subdirs-management-loop
-         @$(call subdirs-group-loop,SUBDIRS_management)
-      endef
-  else
-    define subdirs-management-loop
-    endef
-  endif
+  define subdirs-management-loop
+      @$(call subdirs-group-loop,SUBDIRS_management)
+  endef
 else   
-define subdirs-management-loop
-endef
+  define subdirs-management-loop
+  endef
 endif   # SUBDIRS_management 
 
 ifdef SUBDIRS_misc 
-  ifneq (,$(findstring misc, $(BUILD_MODULES)))
-      define subdirs-misc-loop
-         @$(call subdirs-group-loop,SUBDIRS_misc)
-      endef
-  else
-    define subdirs-misc-loop
-    endef
-  endif
+  define subdirs-misc-loop
+      @$(call subdirs-group-loop,SUBDIRS_misc)
+  endef
 else   
-define subdirs-misc-loop
-endef
+  define subdirs-misc-loop
+  endef
 endif   # SUBDIRS_misc 
 
 ifdef SUBDIRS_tools 
-  ifneq (,$(findstring tools, $(BUILD_MODULES)))
-      define subdirs-tools-loop
-         @$(call subdirs-group-loop,SUBDIRS_tools)
-      endef
-  else
-    define subdirs-tools-loop
-    endef
-  endif
+  define subdirs-tools-loop
+      @$(call subdirs-group-loop,SUBDIRS_tools)
+  endef
 else   
-define subdirs-tools-loop
-endef
+  define subdirs-tools-loop
+  endef
 endif   # SUBDIRS_tools 
 
 #
@@ -175,30 +143,6 @@
 SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \
 	      $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools)
 
-ifndef BUILD_MODULES
-define SUBDIRS-loop
-  @$(call subdirs-group-loop,SUBDIRS_all)
-endef
-
-else
-
-ifneq (,$(findstring all, $(BUILD_MODULES)))
 define SUBDIRS-loop
   @$(call subdirs-group-loop,SUBDIRS_all)
 endef
-
-else # BUILD_MODULES set 
-#
-# Iterate SUBDIRS and the groups specified in BUILD_MODULES
-#
-define SUBDIRS-loop
-  @$(call subdirs-group-loop,SUBDIRS)
-  @$(subdirs-desktop-loop)
-  @$(subdirs-enterprise-loop)
-  @$(subdirs-management-loop)
-  @$(subdirs-misc-loop)
-  @$(subdirs-tools-loop)
-endef
-
-endif
-endif # BUILD_MODULES
--- a/make/common/internal/Defs-jaxws.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/internal/Defs-jaxws.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2011, 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
@@ -55,6 +55,7 @@
      com/sun/tools/internal/xjc \
      com/sun/tools/internal/ws \
      com/sun/tools/internal/jxc \
+     org/relaxng \
      META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory \
-     META-INF/services/com.sun.tools.xjc.Plugin
+     META-INF/services/com.sun.tools.internal.xjc.Plugin
 
--- a/make/common/shared/Compiler-msvc.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Compiler-msvc.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -47,82 +47,8 @@
   # Compiler version and type (Always get word after "Version")
   CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
 
-  # The MSDEVTOOLS_PATH is for older compilers, place for rc, mt, etc.
-  _OTHER_TOOLS_PATH = $(MSDEVTOOLS_PATH)
-
-  # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
-    ifeq ($(CC_MAJORVER), 13)
-      # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
-      COMPILER_NAME=Visual Studio .NET 2003 Professional C++
-      COMPILER_VERSION=VS2003
-      RC         = $(_OTHER_TOOLS_PATH)rc
-      REBASE     = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
-      MTL        = $(COMPILER_PATH)../../Common7/Tools/Bin/midl
-    endif
-    ifeq ($(CC_MAJORVER), 14)
-      COMPILER_NAME=Visual Studio 8
-      COMPILER_VERSION=VS2005
-      RC         = $(_OTHER_TOOLS_PATH)rc
-      REBASE     = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
-      MTL        = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
-      MT         = $(_OTHER_TOOLS_PATH)/mt
-    endif
-    ifeq ($(CC_MAJORVER), 15)
-      COMPILER_NAME=Visual Studio 9
-      COMPILER_VERSION=VS2008
-      RC         = $(_OTHER_TOOLS_PATH)rc
-      #rebase and midl moved out of Visual Studio into the SDK:
-      REBASE     = $(_OTHER_TOOLS_PATH)/rebase
-      MTL        = $(_OTHER_TOOLS_PATH)/midl.exe
-      MT         = $(_OTHER_TOOLS_PATH)mt
-    endif
-  else
-    # else ARCH_DATA_MODEL is 64
-    LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
-    CC_MINORVER :=$(call MinorVersion,$(CC_VER))
-    CC_MICROVER :=$(call MicroVersion,$(CC_VER))
-    ifeq ($(CC_MAJORVER), 13)
-      ifeq ($(ARCH), ia64)
-        # This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7
-        COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition
-        COMPILER_VERSION=VS2003
-        RC = $(_OTHER_TOOLS_PATH)rc
-      endif
-    endif
-    ifeq ($(CC_MAJORVER), 14)
-      ifeq ($(ARCH), amd64)
-        #rebase and midl moved out of Visual Studio into the SDK:
-        RC         = $(_OTHER_TOOLS_PATH)/rc
-        REBASE     = $(_OTHER_TOOLS_PATH)/rebase
-        MTL        = $(_OTHER_TOOLS_PATH)/midl.exe
-        ifeq ($(CC_MICROVER), 30701)
-          # This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701
-	  # WARNING: it says 14, but it is such an early build it doesn't
-	  #          have all the VS2005 compiler option changes, so treat
-	  #          this like a VS2003 compiler.
-          COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition
-          COMPILER_VERSION=VS2003
-        else
-          # This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39
-	  COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830)
-          COMPILER_VERSION=VS2005
-        endif
-      else
-        REBASE         = $(COMPILER_PATH)../rebase
-      endif
-    endif
-    ifeq ($(CC_MAJORVER), 15)
-      COMPILER_NAME=Microsoft Windows SDK with Visual Studio 9 (6001.18000.367)
-      COMPILER_VERSION=VS2008
-      RC = $(MSSDK61)/Bin/X64/rc.exe
-      MT = $(MSSDK61)/Bin/X64/mt.exe
-      MTL = $(MSSDK61)/Bin/X64/midl.exe
-    endif
-  endif
+  LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
+  CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
   
   # The VS2010 compiler is the same one used on both 32bit and 64bit
   ifeq ($(CC_MAJORVER), 16)
@@ -153,6 +79,9 @@
   ifndef COMPILER_VERSION
     COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here)
   endif
+  ifneq ($(COMPILER_VERSION),VS2010)
+    COMPILER_VERSION := $(error COMPILER_VERSION must be VS2010)
+  endif
   
   # Shared library generation flag
   SHARED_LIBRARY_FLAG = -LD
--- a/make/common/shared/Defs-java.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-java.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2011, 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
@@ -45,7 +45,7 @@
   JAVA_MEM_FLAGS   += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
 endif
 
-# 
+#
 # All java tools (javac, javah, and javadoc) run faster with certain java
 #    options, this macro should be used with all these tools.
 #    In particular, the client VM makes these tools run faster when
@@ -122,6 +122,17 @@
   JAVACFLAGS  += -Werror
 endif
 
+#
+# Some licensees do not get the Security Source bundles.  We will
+# fall back on the prebuilt jce.jar so that we can do a best
+# attempt at building.  If sources exist, we always want to
+# build/use the most recent source instead of an older jce.jar, whether
+# built implicitly/explicitly.
+#
+ifeq ($(wildcard $(SHARE_SRC)/classes/javax/crypto/Cipher.java),)
+  JCEFLAGS = $(CLASSPATH_SEPARATOR)$(LIBDIR)/jce.jar
+endif
+
 # Add the source level
 SOURCE_LANGUAGE_VERSION = 7
 LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
@@ -132,11 +143,11 @@
 CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
 JAVACFLAGS  += $(CLASS_VERSION)
 JAVACFLAGS  += -encoding ascii
-JAVACFLAGS  += "-Xbootclasspath:$(CLASSBINDIR)"
+JAVACFLAGS  += "-Xbootclasspath:$(CLASSBINDIR)$(JCEFLAGS)"
 JAVACFLAGS  += $(OTHER_JAVACFLAGS)
 
 # Needed for javah
-JAVAHFLAGS += -bootclasspath $(CLASSBINDIR)
+JAVAHFLAGS += -bootclasspath "$(CLASSBINDIR)$(JCEFLAGS)"
 
 # Needed for javadoc to ensure it builds documentation
 # against the newly built classes
--- a/make/common/shared/Defs-javadoc.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-javadoc.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -61,33 +61,11 @@
 EMPTY:=
 SPACE:=$(EMPTY) $(EMPTY)
 COPYRIGHT_SYMBOL = &\#x00a9;
-# Macros to handle the optional empty args.
+# Macro to construct the copyright line
 #   (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
-define OptionalCopyrightUrl # url
-$(shell \
-  if [ "$1" != "" ] ; then \
-    printf "<a href=\"%s\">Copyright</a>" "$1"; \
-  else \
-    printf "Copyright"; \
-  fi)
-endef
-define OptionalCopyrightFirstYear # year
-$(shell \
-  if [ "$1" != "" ] ; then \
-    printf "%s," "$1";\
-  fi)
-endef
-define OptionalCompanyAddress # address
-$(shell \
-  if [ "$1" != "" ] ; then \
-    printf "%s" "$1";\
-  fi)
-endef
 define CopyrightLine # optionalurl optionalfirstyear optionaladdress
-$(call OptionalCopyrightUrl,$1) $(COPYRIGHT_SYMBOL)\
-$(call OptionalCopyrightFirstYear,$2) $(COPYRIGHT_YEAR),\
-$(COMPANY_NAME).\
-$(call OptionalCompanyAddress,$3)\
-All rights reserved.
+$(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \
+$(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\
+$(FULL_COMPANY_NAME). $3 All rights reserved.
 endef
 
--- a/make/common/shared/Defs-linux.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-linux.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -102,6 +102,14 @@
   COMPILER_PATH  =/usr/bin/
 endif
 
+# OPENWIN_HOME: path to where the X11 environment is installed.
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq ($(ALT_OPENWIN_HOME),)
+  OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
+else
+  OPENWIN_HOME  =/usr/X11R6/
+endif
+
 # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
 ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
@@ -179,13 +187,20 @@
 
 # Special define for checking the binaries
 
+# Debug builds should downgrade warnings to just info
+MAPFILE_WARNING-DBG=INFO
+MAPFILE_WARNING-OPT=WARNING
+MAPFILE_WARNING-=WARNING
+MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
+
 # Macro to check it's input file for banned dependencies and verify the
 #   binary built properly. Relies on process exit code.
+ifndef CROSS_COMPILE_ARCH
 define binary_file_verification # binary_file
 ( \
   $(ECHO) "Checking for mapfile use in: $1" && \
   if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "WARNING: File was not built with a mapfile: $1"; \
+    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
   fi && \
   $(ECHO) "Library loads for: $1" && \
   $(LDD) $1 && \
@@ -193,4 +208,11 @@
   ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
 )
 endef
+else
+define binary_file_verification 
+( \
+  $(ECHO) "Skipping binary file verification for cross-compile build" \
+)
+endef
+endif
 
--- a/make/common/shared/Defs-solaris.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-solaris.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -188,13 +188,20 @@
 
 # Special define for checking the binaries
 
+# Debug builds should downgrade warnings to just info
+MAPFILE_WARNING-DBG=INFO
+MAPFILE_WARNING-OPT=WARNING
+MAPFILE_WARNING-=WARNING
+MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
+
 # Macro to check it's input file for banned dependencies and verify the
 #   binary built properly. Relies on process exit code.
+ifndef CROSS_COMPILE_ARCH
 define binary_file_verification # binary_file
 ( \
   $(ECHO) "Checking for mapfile use in: $1" && \
   if [ "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "WARNING: File was not built with a mapfile: $1"; \
+    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
   fi && \
   $(ECHO) "Library loads for: $1" && \
   $(LDD) $1 && \
@@ -202,4 +209,11 @@
   ( $(DUMP) -L -v $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
 )
 endef
+else
+define binary_file_verification 
+( \
+  $(ECHO) "Skipping binary file verification for cross-compile build" \
+)
+endef
+endif
 
--- a/make/common/shared/Defs-utils.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-utils.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -68,9 +68,23 @@
 endif
 
 # Utilities
+ifdef CROSS_COMPILE_ARCH
+  AR             = $(COMPILER_PATH)ar
+  AS             = $(COMPILER_PATH)as
+  LD             = $(COMPILER_PATH)ld
+  MCS            = $(COMPILER_PATH)mcs
+  NM             = $(COMPILER_PATH)nm
+  STRIP          = $(COMPILER_PATH)strip
+else
+  AR             = $(UTILS_CCS_BIN_PATH)ar
+  AS             = $(UTILS_CCS_BIN_PATH)as
+  LD             = $(UTILS_CCS_BIN_PATH)ld
+  MCS            = $(UTILS_CCS_BIN_PATH)mcs
+  NM             = $(UTILS_CCS_BIN_PATH)nm
+  STRIP          = $(UTILS_CCS_BIN_PATH)strip
+endif
+
 ADB            = $(UTILS_COMMAND_PATH)adb
-AR             = $(UTILS_CCS_BIN_PATH)ar
-AS             = $(UTILS_CCS_BIN_PATH)as
 BASENAME       = $(UTILS_COMMAND_PATH)basename
 BZIP2          = $(UTILS_COMMAND_PATH)bzip2
 CAT            = $(UTILS_COMMAND_PATH)cat
@@ -99,23 +113,19 @@
 ID             = $(UTILS_COMMAND_PATH)id
 ISAINFO        = $(UTILS_COMMAND_PATH)isainfo
 KSH            = $(UTILS_COMMAND_PATH)ksh
-LD             = $(UTILS_CCS_BIN_PATH)ld
 LDD            = $(UTILS_USR_BIN_PATH)ldd
 LEX            = $(UTILS_CCS_BIN_PATH)lex
 LN             = $(UTILS_COMMAND_PATH)ln
 LS             = $(UTILS_COMMAND_PATH)ls
-MCS            = $(UTILS_CCS_BIN_PATH)mcs
 M4             = $(UTILS_CCS_BIN_PATH)m4
 MKDIR          = $(UTILS_COMMAND_PATH)mkdir
 MKSINFO        = $(UTILS_COMMAND_PATH)mksinfo
 MSGFMT         = $(UTILS_USR_BIN_PATH)msgfmt
 MV             = $(UTILS_COMMAND_PATH)mv
 NAWK           = $(UTILS_USR_BIN_PATH)nawk
-NM             = $(UTILS_CCS_BIN_PATH)nm
 PKGMK          = $(UTILS_COMMAND_PATH)pkgmk
 PRINTF         = $(UTILS_USR_BIN_PATH)printf
 PWD            = $(UTILS_COMMAND_PATH)pwd
-RC             = $(UTILS_COMMAND_PATH)rc
 READELF        = $(UTILS_USR_BIN_PATH)readelf
 RMDIR          = $(UTILS_COMMAND_PATH)rmdir
 RPM            = $(UTILS_COMMAND_PATH)rpm
@@ -124,7 +134,6 @@
 SH             = $(UTILS_COMMAND_PATH)sh
 SHOWREV        = $(UTILS_USR_BIN_PATH)showrev
 SORT           = $(UTILS_COMMAND_PATH)sort
-STRIP          = $(UTILS_CCS_BIN_PATH)strip
 TAIL           = $(UTILS_USR_BIN_PATH)tail
 TAR            = $(UTILS_COMMAND_PATH)tar
 TEST           = $(UTILS_USR_BIN_PATH)test
@@ -135,6 +144,7 @@
 UNIQ           = $(UTILS_USR_BIN_PATH)uniq
 UNZIP          = $(UTILS_USR_BIN_PATH)unzip
 UNZIPSFX       = $(UTILS_DEVTOOL_PATH)unzipsfx
+XARGS          = $(UTILS_USR_BIN_PATH)xargs
 WC             = $(UTILS_USR_BIN_PATH)wc
 WHICH          = $(UTILS_USR_BIN_PATH)which
 YACC           = $(UTILS_CCS_BIN_PATH)yacc
@@ -186,14 +196,16 @@
   # Intrinsic unix command, with backslash-escaped character interpretation
   ECHO           = /bin/echo -e
   # These are really in UTILS_USR_BIN_PATH on Linux
-  AR             = $(UTILS_USR_BIN_PATH)ar
-  AS             = $(UTILS_USR_BIN_PATH)as
-  LD             = $(UTILS_USR_BIN_PATH)ld
+  ifndef CROSS_COMPILE_ARCH
+    AR             = $(UTILS_USR_BIN_PATH)ar
+    AS             = $(UTILS_USR_BIN_PATH)as
+    LD             = $(UTILS_USR_BIN_PATH)ld
+    MCS            = $(UTILS_USR_BIN_PATH)mcs
+    NM             = $(UTILS_USR_BIN_PATH)nm
+    STRIP          = $(UTILS_USR_BIN_PATH)strip
+  endif
   LEX            = $(UTILS_USR_BIN_PATH)lex
-  MCS            = $(UTILS_USR_BIN_PATH)mcs
   M4             = $(UTILS_USR_BIN_PATH)m4
-  NM             = $(UTILS_USR_BIN_PATH)nm
-  STRIP          = $(UTILS_USR_BIN_PATH)strip
   YACC           = $(UTILS_USR_BIN_PATH)yacc
 endif
 
--- a/make/common/shared/Defs-versions.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-versions.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2011, 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
@@ -138,11 +138,15 @@
   endif
   REQUIRED_COMPILER_NAME      = Sun Studio 12 Update 1
   REQUIRED_COMPILER_VERSION   = SS12u1
-  ifeq ($(CC_VERSION),sun)
-    REQUIRED_CC_VER           = 5.10
-  endif
-  ifeq ($(CC_VERSION),gcc)
-    REQUIRED_CC_VER           = 3.4.3
+  # Cross-compilation compiler versions are target specific
+  # so don't set a required version if cross-compiling
+  ifndef CROSS_COMPILE_ARCH
+    ifeq ($(CC_VERSION),sun)
+      REQUIRED_CC_VER           = 5.10
+    endif
+    ifeq ($(CC_VERSION),gcc)
+      REQUIRED_CC_VER           = 3.4.3
+    endif
   endif
   REQUIRED_GCC_VER            = 2.95.2
 endif
@@ -158,11 +162,15 @@
   REQUIRED_COMPILER_NAME      = GCC4
   REQUIRED_COMPILER_VERSION   = GCC4
   REQUIRED_GCC_VER            = 2.95
-  ifeq ($(CC_VERSION),gcc)
-    REQUIRED_CC_VER           = 4.3.0
-  endif
-  ifeq ($(CC_VERSION),sun)
-    REQUIRED_CC_VER           = 5.10
+  # Cross-compilation compiler versions are target specific
+  # so don't set a required version if cross-compiling
+  ifndef CROSS_COMPILE_ARCH
+    ifeq ($(CC_VERSION),gcc)
+      REQUIRED_CC_VER           = 4.3.0
+    endif
+    ifeq ($(CC_VERSION),sun)
+      REQUIRED_CC_VER           = 5.10
+    endif
   endif
 endif
 
@@ -182,25 +190,10 @@
   REQUIRED_FREE_SPACE         = 500000
   REQUIRED_DXSDK_VER          = 0x0900
   ifeq ($(CC_VERSION),msvc)
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      REQUIRED_COMPILER_NAME    = Visual Studio 10
-      REQUIRED_COMPILER_VERSION = VS2010
-      REQUIRED_CC_VER           = 16.00.30319.01
-      REQUIRED_LINK_VER         = 10.00.30319.01
-    else
-      ifeq ($(ARCH), ia64)
-        REQUIRED_COMPILER_NAME    = Microsoft Platform SDK - November 2001 Edition
-        REQUIRED_COMPILER_VERSION = VS2003
-        REQUIRED_CC_VER           = 13.00.9337.7
-        REQUIRED_LINK_VER         = 7.00.9337.7
-      endif
-      ifeq ($(ARCH), amd64)
-        REQUIRED_COMPILER_NAME    = Visual Studio 10
-        REQUIRED_COMPILER_VERSION = VS2010
-        REQUIRED_CC_VER           = 16.00.30319.01
-        REQUIRED_LINK_VER         = 10.00.30319.01
-      endif
-    endif
+    REQUIRED_COMPILER_NAME    = Visual Studio 10
+    REQUIRED_COMPILER_VERSION = VS2010
+    REQUIRED_CC_VER           = 16.00.30319.01
+    REQUIRED_LINK_VER         = 10.00.30319.01
   endif
   ifeq ($(CC_VERSION),gcc)
     REQUIRED_CC_VER           = 3.4.3
--- a/make/common/shared/Defs-windows.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs-windows.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -333,136 +333,26 @@
   export WINDOWSSDKDIR
 endif
 
-# Setup for VS2010 is simple, others logic is historic
-ifeq ($(VS2010_EXISTS),true)
-  
-  # VS2010 Compiler root directory
-  _msvc_dir :=$(VS100COMNTOOLS)/../../Vc
-  # SDK root directory
-  _ms_sdk   :=$(WINDOWSSDKDIR)
-  # Compiler bin directory and redist directory
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    _compiler_bin :=$(_msvc_dir)/Bin
-    _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT)
-  endif
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    _compiler_bin :=$(_msvc_dir)/bin/amd64
-    _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x64/Microsoft.VC100.CRT)
-  endif
-  ifeq ($(_redist_sdk),)
-    _redist_sdk   :=$(_system_root)/system32
-  endif
-
-else # Not VS2010
-
-  # Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
-  ifeq ($(ARCH_DATA_MODEL), 32)
+ifneq ($(VS2010_EXISTS),true)
+  x:=$(error ERROR: No VS2010 found on system.)
+endif 
 
-    # Try looking in MSVCDIR or MSVCDir area first 
-    # (set by vcvars32.bat for VC .NET, not defined in the VC 2008/2010)
-    ifdef MSVCDIR
-      xMSVCDIR  :="$(subst \,/,$(MSVCDIR))"
-      _msvc_dir :=$(call FullPath,$(xMSVCDIR))
-    else
-      ifdef MSVCDir
-        xMSVCDIR  :="$(subst \,/,$(MSVCDir))"
-        _msvc_dir :=$(call FullPath,$(xMSVCDIR))
-      endif
-    endif
-    # If we still don't have it, look for VSnnCOMNTOOLS (newest first),
-    # set by installer?
-    ifeq ($(_msvc_dir),)
-      ifdef VS90COMNTOOLS  # /Common/Tools directory, use ../../Vc
-        xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))"
-        _vs90tools     :=$(call FullPath,$(xVS90COMNTOOLS))
-      endif
-      ifneq ($(_vs90tools),)
-        _msvc_dir   :=$(_vs90tools)/../../Vc
-      else
-        ifdef VS80COMNTOOLS  # /Common/Tools directory, use ../../Vc
-          xVS80COMNTOOLS :="$(subst \,/,$(VS80COMNTOOLS))"
-          _vs80tools     :=$(call FullPath,$(xVS80COMNTOOLS))
-        endif
-        ifneq ($(_vs80tools),)
-          _msvc_dir   :=$(_vs80tools)/../../Vc
-        else
-          ifdef VS71COMNTOOLS  # /Common/Tools directory, use ../../Vc7
-            xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
-            _vs71tools     :=$(call FullPath,$(xVS71COMNTOOLS))
-          endif
-          ifneq ($(_vs71tools),)
-            _msvc_dir   :=$(_vs71tools)/../../Vc7
-          endif
-        endif
-      endif
-    endif
-  
-    ifneq ($(_msvc_dir),)
-      _compiler_bin :=$(_msvc_dir)/Bin
-      # Assume PlatformSDK is in VS71 (will be empty if VS90)
-      _ms_sdk       :=$(call FullPath,$(_msvc_dir)/PlatformSDK)
-      _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC90.CRT)
-      ifeq ($(_redist_sdk),)
-        _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC80.CRT)
-        ifeq ($(_redist_sdk),)
-          _redist_sdk   :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin)
-        endif
-      endif
-    endif
-  endif
-
-  # The Microsoft Platform SDK installed by itself
-  ifneq ($(_program_files),)
-    _PSDK :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
-    _psdk :=$(call FullPath,$(xMSSDK61))
-    ifeq ($(_psdk),)
-      xPSDK  :="$(_program_files)/Microsoft Platform SDK"
-      _psdk  :=$(call FullPath,$(xPSDK))
-      ifeq ($(_psdk),)
-        xPSDK  :="$(_program_files)/Microsoft SDK"
-        _psdk :=$(call FullPath,$(xMSSDK))
-      endif
-    endif
-  endif
-
-  # If no SDK found yet, look in other places
-  ifeq ($(_ms_sdk),)
-    ifdef MSSDK
-    xMSSDK  :="$(subst \,/,$(MSSDK))"
-    _ms_sdk :=$(call FullPath,$(xMSSDK))
-  else
-    ifdef MSSdk
-      xMSSDK  :="$(subst \,/,$(MSSdk))"
-      _ms_sdk :=$(call FullPath,$(xMSSDK))
-    else
-        _ms_sdk :=$(_psdk)
-      endif
-    endif
-  endif
-  
-  # Compilers for 64bit may be from the free SDK, or Visual Studio Professional.
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/"
-    VS2008 :=$(call FullPath,$(xVS2008))
-    ifneq ($(VS2008),)
-      _compiler_bin :=$(VS2008)/VC/Bin/$(ARCH)
-      xMSSDK61      :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
-      MSSDK61       :=$(call FullPath,$(xMSSDK61))
-      _redist_sdk   :=$(VS2008)/VC/redist/x64/Microsoft.VC90.CRT
-    else
-      ifneq ($(_ms_sdk),)
-        ifeq ($(ARCH), ia64)
-          _compiler_bin :=$(_ms_sdk)/Bin/Win64
-        endif
-        ifeq ($(ARCH), amd64)
-          _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
-          _redist_sdk   :=$(_ms_sdk)/redist/win64/AMD64
-        endif
-      endif
-    endif
-  endif
-
-endif # VS2010_EXISTS
+# VS2010 Compiler root directory
+_msvc_dir :=$(VS100COMNTOOLS)/../../Vc
+# SDK root directory
+_ms_sdk   :=$(WINDOWSSDKDIR)
+# Compiler bin directory and redist directory
+ifeq ($(ARCH_DATA_MODEL), 32)
+  _compiler_bin :=$(_msvc_dir)/Bin
+  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT)
+endif
+ifeq ($(ARCH_DATA_MODEL), 64)
+  _compiler_bin :=$(_msvc_dir)/bin/amd64
+  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x64/Microsoft.VC100.CRT)
+endif
+ifeq ($(_redist_sdk),)
+  _redist_sdk   :=$(_system_root)/system32
+endif
 
 # Location on system where jdk installs might be
 ifneq ($(_program_files),)
@@ -566,20 +456,8 @@
   _BOOTDIR3  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
 endif
 
-# 32bit always needs the MSVCRNN runtime, 64bit does when using VS2008
-ifeq ($(ARCH_DATA_MODEL), 32)
-  _NEEDS_MSVCRNN = true
-else
-  ifeq ($(VS2010_EXISTS),true)
-    _NEEDS_MSVCRNN = true
-  else 
-    ifneq ($(VS2008),)
-      _NEEDS_MSVCRNN = true
-    else
-      _NEEDS_MSVCRNN = false
-    endif
-  endif
-endif
+# Everybody needs the MSVCRNN runtime starting with VS2010
+_NEEDS_MSVCRNN = true
 
 ifeq ($(_NEEDS_MSVCRNN), true)
   # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
@@ -758,8 +636,6 @@
 
 # Special define for checking the binaries
 
-ifeq ($(VS2010_EXISTS),true)
-
 # All windows dll and exe files should have been built with /NXCOMPAT
 #   and be setup for dynamic base addresses.
 #   In addition, we should not be dependent on certain dll files that
@@ -772,9 +648,20 @@
   BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
 endif
 
-# Macro to check it's input file for banned dependencies and verify the
-#   binary was built properly. Relies on process exit code.
-define binary_file_verification # binary_file
+# Check for /safeseh (only used on 32bit)
+define binary_file_safeseh_verification # binary_file
+( \
+  $(ECHO) "Checking for /SAFESEH usage in: $1" && \
+  if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
+    $(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
+    $(DUMPBIN) /loadconfig $1 ; \
+    exit 6 ; \
+  fi ; \
+)
+endef
+
+# Check for /NXCOMPAT usage
+define binary_file_nxcompat_verification # binary_file
 ( \
   $(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
   if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
@@ -782,12 +669,24 @@
     $(DUMPBIN) /headers $1 ; \
     exit 7 ; \
   fi ; \
+)
+endef
+
+# Check for /DYNAMICBASE usage
+define binary_file_dynamicbase_verification # binary_file
+( \
   $(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
   if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
     $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
     $(DUMPBIN) /headers $1 ; \
     exit 8 ; \
   fi ; \
+)
+endef
+
+# Check for banned dll usage
+define binary_file_dll_verification # binary_file
+( \
   $(ECHO) "Checking for banned dependencies in: $1" && \
   if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
     $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
@@ -797,12 +696,24 @@
 )
 endef
 
+# Macro to check it's input file for properly built executables.
+#   Relies on process exit code. Different for 32bit vs 64bit.
+ifeq ($(ARCH_DATA_MODEL),32)
+define binary_file_verification # binary_file
+( \
+  $(call binary_file_safeseh_verification,$1); \
+  $(call binary_file_nxcompat_verification,$1); \
+  $(call binary_file_dynamicbase_verification,$1); \
+  $(call binary_file_dll_verification,$1); \
+)
+endef
 else
-
-# Macro to check it's input file for banned dependencies and verify the
-#   binary was built properly. Relies on process exit code.
 define binary_file_verification # binary_file
+( \
+  $(call binary_file_nxcompat_verification,$1); \
+  $(call binary_file_dynamicbase_verification,$1); \
+  $(call binary_file_dll_verification,$1); \
+)
 endef
-
 endif
 
--- a/make/common/shared/Defs.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Defs.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -218,7 +218,11 @@
 else
   LAUNCHER_NAME = java
   PRODUCT_NAME = Java(TM)
-  PRODUCT_SUFFIX = SE Runtime Environment
+  ifeq ($(J4B), true)
+    PRODUCT_SUFFIX = SE Runtime Environment for Business
+  else
+    PRODUCT_SUFFIX = SE Runtime Environment
+  endif
   JDK_RC_PLATFORM_NAME = Platform SE
   COMPANY_NAME = Oracle Corporation
 endif
--- a/make/common/shared/Platform.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Platform.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 20010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2011, 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
@@ -148,14 +148,18 @@
   # Suffix for file bundles used in previous release
   BUNDLE_FILE_SUFFIX=.tar
   # How much RAM does this machine have:
-  MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
+  MB_OF_MEMORY=$(shell /usr/sbin/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
 endif
 
 # Platform settings specific to Linux
 ifeq ($(SYSTEM_UNAME), Linux)
   PLATFORM = linux
   # Arch and OS name/version
-  mach := $(shell uname -m)
+  ifdef CROSS_COMPILE_ARCH
+    mach := $(CROSS_COMPILE_ARCH)
+  else
+    mach := $(shell uname -m)
+  endif
   archExpr = case "$(mach)" in \
                 i[3-9]86) \
                     echo i586 \
@@ -192,11 +196,13 @@
       ARCH=sparcv9
     endif
   else
-    # i586 is 32-bit, amd64 is 64-bit
+    # Most archs are 32-bit
     ifndef ARCH_DATA_MODEL
-      ifeq ($(ARCH), i586)
-        ARCH_DATA_MODEL=32
-      else
+      ARCH_DATA_MODEL=32
+      ifeq ($(ARCH), amd64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), ia64)
         ARCH_DATA_MODEL=64
       endif
     endif
--- a/make/common/shared/Sanity-Settings.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Sanity-Settings.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -104,7 +104,11 @@
 endif
 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME)
 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION)
-ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER)
+ifdef REQUIRED_CC_VER
+  ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER)
+else
+  ALL_SETTINGS+=$(call addOptionalSetting,CC_VER)
+endif
 ifeq ($(PLATFORM),solaris)
   ifeq ($(ARCH_DATA_MODEL), 32)
     ifndef OPENJDK
--- a/make/common/shared/Sanity.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/common/shared/Sanity.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -121,7 +121,7 @@
   ALSA_INCLUDE=/usr/include/alsa/version.h
   ALSA_LIBRARY=/usr/lib/libasound.so
   _ALSA_VERSION := $(shell $(EGREP) SND_LIB_VERSION_STR $(ALSA_INCLUDE) | \
-           $(SED) -e 's@.*\"\(.*\)\".*@\1@' )
+           $(SED) -e 's@.*"\(.*\)".*@\1@' )
   ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
 endif
 
@@ -228,9 +228,8 @@
 	sane-ant_version \
 	sane-zip_version \
 	sane-unzip_version \
- 	sane-msvcrt_path \
-        sane-freetype \
-        sane-build_modules
+	sane-msvcrt_path \
+        sane-freetype
 
 ######################################################
 # check for COPYRIGHT_YEAR variable
@@ -288,6 +287,12 @@
 	      "      $(YOU_ARE_USING) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL). \n" \
 	      "" >> $(ERROR_FILE) ; \
 	fi
+ifdef BUILD_CLIENT_ONLY
+	@if [ "$(ARCH_DATA_MODEL)" != 32 ]; then \
+	   $(ECHO) "WARNING: You have requested BUILD_CLIENT_ONLY in a 64-bit build.\n" \
+	     "" >> $(WARNING_FILE) ; \
+	fi
+endif
 
 ######################################################
 # Check the OS version (windows and linux have release name checks)
@@ -342,12 +347,12 @@
 ifneq ($(PLATFORM), windows)
 	@if [ "$(LC_ALL)" != "" -a "$(LC_ALL)" != "C" ]; then \
 	  $(ECHO) "WARNING: LC_ALL has been set to $(LC_ALL), this can cause build failures. \n" \
-	    "        Try setting LC_ALL to \"C\". \n" \
+	    "        Try setting LC_ALL to 'C'. \n" \
 	    "" >> $(WARNING_FILE) ; \
         fi
 	@if [ "$(LANG)" != "" -a "$(LANG)" != "C" ]; then \
 	  $(ECHO) "WARNING: LANG has been set to $(LANG), this can cause build failures. \n" \
-	    "        Try setting LANG to \"C\". \n" \
+	    "        Try setting LANG to 'C'. \n" \
 	    "" >> $(WARNING_FILE) ; \
         fi
 endif
@@ -820,38 +825,26 @@
 ######################################################
 
 ifdef OPENJDK
-
-# The freetypecheck Makefile prints out "Failed" if not good enough
-$(TEMPDIR)/freetypeinfo: FRC
+  ifndef CROSS_COMPILE_ARCH
+    # The freetypecheck Makefile prints out "Failed" if not good enough
+    $(TEMPDIR)/freetypeinfo: FRC
 	@$(prep-target)
 	@(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \
 	    $(ECHO) "Failed to build freetypecheck." ) > $@
 
-sane-freetype: $(TEMPDIR)/freetypeinfo
+    sane-freetype: $(TEMPDIR)/freetypeinfo
 	@if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
 	  $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
 	          " or higher is required. \n" \
 		  "`$(CAT) $<`  \n" >> $(ERROR_FILE) ; \
 	fi
-
+  else
+    #do nothing  (cross-compiling)
+    sane-freetype: 
+  endif
 else
-#do nothing  (not OpenJDK)
-sane-freetype: 
-endif
-
-######################################################
-# if specified, BUILD_MODULES must contain valid values.
-######################################################
-MODULES_REGEX="all|base|desktop|management|enterprise|misc|tools"
-sane-build_modules:
-ifdef BUILD_MODULES
-	@for m in $(BUILD_MODULES) ; do \
-            valid=`$(ECHO) $$m | $(EGREP) $(MODULES_REGEX)`; \
-            if [ "x$$valid" = "x" ] ; then \
-                $(ECHO) "ERROR: $$m set in the BUILD_MODULES variable is invalid.\n" \
-                "" >> $(ERROR_FILE); \
-            fi \
-	done
+  #do nothing  (not OpenJDK)
+  sane-freetype: 
 endif
 
 ######################################################
@@ -1011,30 +1004,15 @@
 ######################################################
 sane-msdevtools_path:
 ifeq ($(PLATFORM), windows)
-  ifneq ($(COMPILER_VERSION), VS2010)
-	@if [ "$(MSDEVTOOLS_PATH)" != "" -a ! -r "$(MSDEVTOOLS_PATH)" ]; then \
-	  $(ECHO) "ERROR: You do not have a valid MSDEVTOOLS_PATH setting. \n" \
-	    "      Please check your access to \n" \
-	    "          $(MSDEVTOOLS_PATH) \n" \
-	    "      and/or check your value of ALT_MSDEVTOOLS_PATH. \n" \
-	    "" >> $(ERROR_FILE) ; \
-	fi
-  else
-    ifeq ($(wildcard $(REBASE)),)
-	@$(ECHO) "ERROR: Cannot find the REBASE utility from path: $(REBASE)\n" \
-	    "      This is normally obtained from the WINDOWSSDKDIR." \
-	    "" >> $(ERROR_FILE)
-    endif
-    ifeq ($(wildcard $(RC)),)
+  ifeq ($(wildcard $(RC)),)
 	@$(ECHO) "ERROR: Cannot find the RC utility from path: $(RC)\n" \
 	    "      This is normally obtained from the WINDOWSSDKDIR." \
 	    "" >> $(ERROR_FILE)
-    endif
-    ifeq ($(wildcard $(DUMPBIN)),)
+  endif
+  ifeq ($(wildcard $(DUMPBIN)),)
 	@$(ECHO) "ERROR: Cannot find the DUMPBIN utility from path: $(DUMPBIN)\n" \
-	    "      This is normally obtained from the WINDOWSSDKDIR." \
+	    "      This is normally obtained from the COMPILER_PATH." \
 	    "" >> $(ERROR_FILE)
-    endif
   endif
 endif
 
@@ -1139,7 +1117,7 @@
 #    be checked when this represents a full control build (i.e. the
 #    HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
 $(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
-	@$(install-non-module-file)
+	@$(install-file)
 	@$(RM) $@.IMPORT
 	@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
 	  $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
@@ -1153,7 +1131,7 @@
 	fi
 
 $(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
-	@$(install-non-module-file)
+	@$(install-file)
 	@$(RM) $@.IMPORT
 	@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
 	  $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
@@ -1335,7 +1313,7 @@
 	        "      Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \
 	        "          http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
 		"      Or  http://www.microsoft.com/directx\n" \
-  		"" >> $(WARNING_FILE) ; \
+		"" >> $(WARNING_FILE) ; \
 	      fi \
 	    fi \
 	  fi \
@@ -1356,9 +1334,9 @@
 	fi
 	@if [ "$(LINK_CHECK)" != "same" ]; then \
 	  $(ECHO) "WARNING: To build Java 2 SDK $(JDK_VERSION) you need : \n" \
-	    "      $(REQUIRED_COMPILER_VERSION) - link.exe version \"$(REQUIRED_LINK_VER)\" \n" \
+	    "      $(REQUIRED_COMPILER_VERSION) - link.exe version '$(REQUIRED_LINK_VER)' \n" \
 	      "      Specifically the $(REQUIRED_COMPILER_NAME) link.exe. \n " \
-	    "      $(YOU_ARE_USING) Linker version \"$(LINK_VER)\" \n" \
+	    "      $(YOU_ARE_USING) Linker version '$(LINK_VER)' \n" \
 	    "" >> $(WARNING_FILE) ; \
 	fi
 endif
@@ -1366,13 +1344,16 @@
 ######################################################
 # Check the compiler version(s)
 ######################################################
-CC_CHECK  :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER))
+ifdef REQUIRED_CC_VER
+  CC_CHECK  :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER))
+endif
 sane-compiler: sane-link
+ifdef REQUIRED_CC_VER
 	@if [ "$(CC_CHECK)" = "missing" ]; then \
 	  $(ECHO) "ERROR: The Compiler version is undefined. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
-ifndef OPENJDK
+  ifndef OPENJDK
 	@if [ "$(CC_CHECK)" != "same" ]; then \
 	      $(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(REQUIRED_COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \
 	      "      Specifically the $(REQUIRED_COMPILER_NAME) compiler. \n " \
@@ -1381,6 +1362,7 @@
 	      "          $(COMPILER_PATH) \n" \
 	      "" >> $(WARNING_FILE) ; \
          fi
+  endif
 endif
 
 ######################################################
@@ -1448,7 +1430,6 @@
 ######################################################
 sane-install-mssdk_path:
 ifeq ($(PLATFORM), windows)
-  ifeq ($(COMPILER_VERSION), VS2010)
 	@if [ -z "$(WINDOWSSDKDIR)" ]; then \
 	  $(ECHO) "WARNING: Your WINDOWSSDKDIR setting is empty.\n" \
 	    "        It is recommended to set ALT_WINDOWSSDKDIR.\n" \
@@ -1461,7 +1442,6 @@
 	    "      and/or check your value of ALT_WINDOWSSDKDIR. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
-  endif
 	@if [ -z "$(INSTALL_MSSDK)" ]; then \
 	  $(ECHO) "WARNING: Your INSTALL_MSSDK setting is empty.\n" \
 	    "        It is recommended to set ALT_INSTALL_MSSDK.\n" \
--- a/make/docs/CORE_PKGS.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/docs/CORE_PKGS.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2011, 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
@@ -55,7 +55,7 @@
 # This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
 #
 ACTIVE_JSR_PKGS= \
-  java.dyn \
+  java.lang.invoke \
   java.sql  \
   javax.activation  \
   javax.annotation.*  \
@@ -97,11 +97,11 @@
   java.awt.print                                 \
   java.beans                                     \
   java.beans.beancontext                         \
-  java.dyn                                       \
   java.io                                        \
   java.lang                                      \
   java.lang.annotation                           \
   java.lang.instrument                           \
+  java.lang.invoke                               \
   java.lang.management                           \
   java.lang.ref                                  \
   java.lang.reflect                              \
--- a/make/docs/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/docs/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -43,7 +43,7 @@
 BUG_SUBMIT_URL = http://bugs.sun.com/services/bugreport/index.jsp
 
 # Common line for how to submit a bug or rfe
-BUG_SUBMIT_LINE = <a href=\"$(BUG_SUBMIT_URL)\">Submit a bug or feature</a>
+BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
 
 # Url to devdocs page
 #   Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
@@ -166,24 +166,35 @@
 
 # Common bottom argument
 define CommonBottom # year
-<font size=\"-1\"><p> $(call CopyrightLine,,$1,)</font>
+<font size="-1"><br> $(call CopyrightLine,,$1,)</font>
 endef
 
 # Common trademark bottom argument (Not sure why this is used sometimes)
 define CommonTrademarkBottom # year
-<font size=\"-1\">\
+<font size="-1">\
 $(BUG_SUBMIT_LINE)<br>$(JAVA_TRADEMARK_LINE)<br>\
 $(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\
 </font>
 endef
 
+# Common echo of option
+define OptionOnly # opt
+$(PRINTF) "%s\n" "$1"
+endef
+define OptionPair # opt arg
+$(PRINTF) "%s '%s'\n" "$1" '$2'
+endef
+define OptionTrip # opt arg arg
+$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
+endef
+
 # Core api bottom argument (with special sauce)
-COREAPI_BOTTOM = <font size=\"-1\"> $(BUG_SUBMIT_LINE)\
+COREAPI_BOTTOM = <font size="-1"> $(BUG_SUBMIT_LINE)\
 <br>For further API reference and developer documentation, \
-see <a href=\"$(DEV_DOCS_URL)\" target=\"_blank\">Java SE Documentation</a>. \
+see <a href="$(DEV_DOCS_URL)" target="_blank">Java SE Documentation</a>. \
 That documentation contains more detailed, developer-targeted descriptions, \
 with conceptual overviews, definitions of terms, workarounds, \
-and working code examples.<p>\
+and working code examples.<br>\
 $(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
 </font>
 
@@ -212,11 +223,11 @@
     DRAFT_WINTITLE = $(BUILD_NUMBER)
     # Early access top text (not used in FCS releases)
     COREAPI_TOP_EARLYACCESS = \
-<div style=\"background-color: \#EEEEEE\"> \
-<div style=\"padding: 6px; margin-top: 2px; margin-bottom: 6px; \
+<div style="background-color: \#EEEEEE"> \
+<div style="padding: 6px; margin-top: 2px; margin-bottom: 6px; \
 margin-left: 6px; margin-right: 6px; text-align: justify; \
 font-size: 80%; font-family: Helvetica, Arial, sans-serif; \
-font-weight: normal;\"> \
+font-weight: normal;"> \
 Please note that the specifications and other information \
 contained herein are not final and are subject to change. \
 The information is being made available to you solely for purpose of \
@@ -281,15 +292,9 @@
 COREAPI_HEADER = \
 <strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
 
-# Ignored tags
-IGNORED_TAGS =	beaninfo revised since.unbundled spec specdefault Note ToDo
-
 # Java language specification cite
-JLS3_CITE = <a href=\"$(JLS3_URL)\"> \
-		The Java Language Specification, Third Edition</a>
-TAG_JLS3 = -tag 'jls3:a:See <cite>$(JLS3_CITE)</cite>:'
-
-TAGS = $(IGNORED_TAGS:%=-tag %:X) $(TAG_JLS3)
+TAG_JLS3 = jls3:a:See <cite><a href="$(JLS3_URL)"> \
+The Java Language Specification, Third Edition</a></cite>:
 
 # Overview file for core apis
 COREAPI_OVERVIEW = $(SHARE_SRC)/classes/overview-core.html
@@ -314,19 +319,26 @@
 # Create file with javadoc options in it
 $(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "$(TAGS)"						; \
-	  $(ECHO) "-encoding ISO-8859-1"				; \
-	  $(ECHO) "-splitIndex"						; \
-	  $(ECHO) "-overview $(COREAPI_OVERVIEW)" 			; \
-	  $(ECHO) "-doctitle '$(COREAPI_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(COREAPI_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(COREAPI_BOTTOM)$(DRAFT_BOTTOM)'"		; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ISO-8859-1)			; \
+	  $(call OptionPair,-tag,beaninfo:X)				; \
+	  $(call OptionPair,-tag,revised:X)				; \
+	  $(call OptionPair,-tag,since.unbundled:X)			; \
+	  $(call OptionPair,-tag,spec:X)				; \
+	  $(call OptionPair,-tag,specdefault:X)				; \
+	  $(call OptionPair,-tag,Note:X)				; \
+	  $(call OptionPair,-tag,ToDo:X)				; \
+          $(call OptionPair,-tag,$(TAG_JLS3)) 				; \
+	  $(call OptionOnly,-splitIndex)				; \
+	  $(call OptionPair,-overview,$(COREAPI_OVERVIEW))		; \
+	  $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ;\
+	  $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
         ) >> $@
 ifdef COREAPI_TOP_EARLYACCESS
-	@$(ECHO) "-top '$(COREAPI_TOP_EARLYACCESS)'" >> $@
+	@$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@
 endif
 
 # Create a file with the package names in it
@@ -375,16 +387,16 @@
 # Create file with javadoc options in it
 $(MIRROR_OPTIONS_FILE): $(MIRROR_OVERVIEW)
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-overview $(MIRROR_OVERVIEW)" 			; \
-	  $(ECHO) "-doctitle '$(MIRROR_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(MIRROR_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(MIRROR_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(MIRROR_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-group $(MIRROR_GROUPNAME) $(MIRROR_REGEXP)"		; \
-	  $(ECHO) "-linkoffline $(MIRROR2COREAPI) $(COREAPI_DOCSDIR)/"; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionPair,-overview,$(MIRROR_OVERVIEW))		; \
+	  $(call OptionPair,-doctitle,$(MIRROR_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(MIRROR_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(MIRROR_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(MIRROR_BOTTOM)$(DRAFT_BOTTOM)) 	; \
+	  $(call OptionTrip,-group,$(MIRROR_GROUPNAME),$(MIRROR_REGEXP)); \
+	  $(call OptionTrip,-linkoffline,$(MIRROR2COREAPI),$(COREAPI_DOCSDIR)); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -432,16 +444,16 @@
 # Create file with javadoc options in it
 $(DOCLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-breakiterator"					; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-doctitle '$(DOCLETAPI_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(DOCLETAPI_HEADER)$(DRAFT_HEADER)'"	; \
-	  $(ECHO) "-bottom '$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)'"	; \
-	  $(ECHO) "-group $(DOCLETAPI_GROUPNAME) $(DOCLETAPI_REGEXP)"	; \
-	  $(ECHO) "-linkoffline $(DOCLETAPI2COREAPI) $(COREAPI_DOCSDIR)/"; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-breakiterator)				; \
+	  $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \
+	  $(call OptionTrip,-linkoffline,$(DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -492,13 +504,13 @@
 # Create file with javadoc options in it
 $(TAGLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nonavbar"						; \
-	  $(ECHO) "-noindex"						; \
-	  $(ECHO) "-bottom '$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)'"			; \
-	  $(ECHO) "-linkoffline $(TAGLETAPI2COREAPI) $(COREAPI_DOCSDIR)/"; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nonavbar)					; \
+	  $(call OptionOnly,-noindex)					; \
+	  $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -543,16 +555,16 @@
 # Create file with javadoc options in it
 $(DOMAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-splitIndex"						; \
-	  $(ECHO) "-doctitle '$(DOMAPI_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(DOMAPI_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-group $(DOMAPI_GROUPNAME) $(DOMAPI_REGEXP)"		; \
-	  $(ECHO) "-linkoffline $(DOMAPI2COREAPI) $(COREAPI_DOCSDIR)/" 	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-splitIndex)				; \
+	  $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \
+	  $(call OptionTrip,-linkoffline,$(DOMAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -605,15 +617,15 @@
 # Create file with javadoc options in it
 $(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-overview $(JDI_OVERVIEW)" 				; \
-	  $(ECHO) "-doctitle '$(JDI_DOCTITLE)'"				; \
-	  $(ECHO) "-windowtitle '$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)'"	; \
-	  $(ECHO) "-header '$(JDI_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(JDI_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(JDI2COREAPI) $(COREAPI_DOCSDIR)/" 	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionPair,-overview,$(JDI_OVERVIEW))			; \
+	  $(call OptionPair,-doctitle,$(JDI_DOCTITLE))			; \
+	  $(call OptionPair,-windowtitle,$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(JDI2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -693,15 +705,15 @@
 # Create file with javadoc options in it
 $(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-overview $(JAAS_OVERVIEW)" 				; \
-	  $(ECHO) "-doctitle '$(JAAS_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)'"; \
-	  $(ECHO) "-header '$(JAAS_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(JAAS_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(JAAS2COREAPI) $(COREAPI_DOCSDIR)/" 	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionPair,-overview,$(JAAS_OVERVIEW))			; \
+	  $(call OptionPair,-doctitle,$(JAAS_DOCTITLE))			; \
+	  $(call OptionPair,-windowtitle,$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(JAAS2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -745,16 +757,16 @@
 # Create file with javadoc options in it
 $(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-overview $(JGSS_OVERVIEW)" 				; \
-	  $(ECHO) "-doctitle '$(JGSS_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)'"; \
-	  $(ECHO) "-header '$(JGSS_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(JGSS_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(JGSS2COREAPI) $(COREAPI_DOCSDIR)/" 	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-overview,$(JGSS_OVERVIEW))			; \
+	  $(call OptionPair,-doctitle,$(JGSS_DOCTITLE))			; \
+	  $(call OptionPair,-windowtitle,$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(JGSS2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -797,15 +809,15 @@
 # Create file with javadoc options in it
 $(SMARTCARDIO_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-doctitle '$(SMARTCARDIO_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)'"	; \
-	  $(ECHO) "-bottom '$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)'"	; \
-	  $(ECHO) "-linkoffline $(SMARTCARDIO2COREAPI) $(COREAPI_DOCSDIR)/"; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \
+	  $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \
+	  $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -847,15 +859,15 @@
 # Create file with javadoc options in it
 $(HTTPSERVER_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-doctitle '$(HTTPSERVER_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(HTTPSERVER_HEADER)$(DRAFT_HEADER)'"	; \
-	  $(ECHO) "-bottom '$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)'"	; \
-	  $(ECHO) "-linkoffline $(HTTPSERVER2COREAPI) $(COREAPI_DOCSDIR)/"; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \
+	  $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \
+	  $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -907,16 +919,16 @@
 # Create file with javadoc options in it
 $(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-overview $(MGMT_OVERVIEW)" 				; \
-	  $(ECHO) "-doctitle '$(MGMT_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)'"; \
-	  $(ECHO) "-header '$(MGMT_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(MGMT_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(MGMT2COREAPI) $(COREAPI_DOCSDIR)/" 	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-overview,$(MGMT_OVERVIEW))			; \
+	  $(call OptionPair,-doctitle,$(MGMT_DOCTITLE))			; \
+	  $(call OptionPair,-windowtitle,$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(MGMT2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -958,15 +970,15 @@
 # Create file with javadoc options in it
 $(ATTACH_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-doctitle '$(ATTACH_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(ATTACH_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(ATTACH_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(ATTACH2COREAPI) $(COREAPI_DOCSDIR)/"	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -1008,15 +1020,15 @@
 # Create file with javadoc options in it
 $(JCONSOLE_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-doctitle '$(JCONSOLE_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(JCONSOLE_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(JCONSOLE2COREAPI) $(COREAPI_DOCSDIR)/"; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -1063,15 +1075,15 @@
 # Create file with javadoc options in it
 $(TREEAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-doctitle '$(TREEAPI_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(TREEAPI_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-group $(TREEAPI_GROUPNAME) $(TREEAPI_REGEXP)"	; \
-	  $(ECHO) "-linkoffline $(TREEAPI2COREAPI) $(COREAPI_DOCSDIR)/"	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
+	  $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -1113,15 +1125,15 @@
 # Create file with javadoc options in it
 $(SCTPAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-doctitle '$(SCTPAPI_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(SCTPAPI_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(SCTPAPI2COREAPI) $(COREAPI_DOCSDIR)/"	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
@@ -1163,15 +1175,15 @@
 # Create file with javadoc options in it
 $(TRACING_OPTIONS_FILE):
 	$(prep-target)
-	@($(ECHO) "$(COMMON_JAVADOCFLAGS)"				; \
-	  $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\""		; \
-	  $(ECHO) "-encoding ascii"					; \
-	  $(ECHO) "-nodeprecatedlist"					; \
-	  $(ECHO) "-doctitle '$(TRACING_DOCTITLE)'"			; \
-	  $(ECHO) "-windowtitle '$(TRACING_WINDOWTITLE) $(DRAFT_WINTITLE)'";\
-	  $(ECHO) "-header '$(TRACING_HEADER)$(DRAFT_HEADER)'"		; \
-	  $(ECHO) "-bottom '$(TRACING_BOTTOM)$(DRAFT_BOTTOM)'"		; \
-	  $(ECHO) "-linkoffline $(TRACING2COREAPI) $(COREAPI_DOCSDIR)/"	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
+	  $(call OptionPair,-encoding,ascii)				; \
+	  $(call OptionOnly,-nodeprecatedlist)				; \
+	  $(call OptionPair,-doctitle,$(TRACING_DOCTITLE))		; \
+	  $(call OptionPair,-windowtitle,$(TRACING_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	  $(call OptionPair,-header,$(TRACING_HEADER)$(DRAFT_HEADER))	; \
+	  $(call OptionPair,-bottom,$(TRACING_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionTrip,-linkoffline,$(TRACING2COREAPI),$(COREAPI_DOCSDIR)/); \
         ) >> $@
 
 # Create a file with the package names in it
--- a/make/docs/NON_CORE_PKGS.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/docs/NON_CORE_PKGS.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -91,8 +91,6 @@
 TRACING_PKGS     = com.sun.tracing         \
                    com.sun.tracing.dtrace
 
-ORACLENET_PKGS   = com.oracle.net
-
 # non-core packages in rt.jar
 NON_CORE_PKGS    = $(DOMAPI_PKGS) \
                    $(MGMT_PKGS) \
@@ -103,6 +101,5 @@
                    $(HTTPSERVER_PKGS) \
                    $(SMARTCARDIO_PKGS) \
                    $(TRACING_PKGS) \
-                   $(SCTPAPI_PKGS) \
-                   $(ORACLENET_PKGS)
+                   $(SCTPAPI_PKGS)
 
--- a/make/java/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2011, 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
@@ -44,7 +44,7 @@
 SUBDIRS_desktop    = awt applet beans
 SUBDIRS_management = management
 SUBDIRS_misc       = npt java_crw_demo java_hprof_demo \
-                     logging instrument dyn sql rmi
+                     logging instrument invoke sql rmi
 
 
 ifeq ($(PLATFORM), solaris)
--- a/make/java/awt/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/awt/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = awt
 PACKAGE = java.awt
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/dyn/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2008, 2010, 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.
-#
-
-BUILDDIR = ../..
-
-PACKAGE = java.dyn
-PRODUCT = java
-include $(BUILDDIR)/common/Defs.gmk
-
-AUTO_FILES_JAVA_DIRS = java/dyn sun/dyn
-
-# The sources built here use new language syntax to generate
-# method handle calls.  Let's be sure we are using that format.
-LANGUAGE_VERSION = -source 7
-CLASS_VERSION = -target 7
-
-# Tell the compiler not to accept transitional forms.
-OTHER_JAVACFLAGS = -XDallowTransitionalJSR292=no
-
-include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/fdlibm/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/fdlibm/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -31,7 +31,6 @@
 #
 
 BUILDDIR     = ../..
-MODULE       = base
 LIBRARY      = fdlibm
 PRODUCT      = java
 
--- a/make/java/instrument/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/instrument/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2011, 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 @@
 # agent, supporting java.lang.instrument
 
 BUILDDIR = ../..
-MODULE  = instrument
 PACKAGE = sun.instrument
 LIBRARY = instrument
 PRODUCT = sun
@@ -110,7 +109,7 @@
     LDFLAGS += -R \$$ORIGIN/jli
   endif
   ifeq ($(PLATFORM), linux)
-    LDFLAGS += -Wl,-z -Wl,origin
+    LDFLAGS += $(LDFLAG_Z_ORIGIN)
     LDFLAGS += -Wl,--allow-shlib-undefined
     LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli
   endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/invoke/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2008, 2011, 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.
+#
+
+BUILDDIR = ../..
+
+PACKAGE = java.lang.invoke
+PRODUCT = java
+include $(BUILDDIR)/common/Defs.gmk
+
+AUTO_FILES_JAVA_DIRS = java/lang/invoke sun/invoke
+FILES_java = \
+    java/lang/ClassValue.java \
+    java/lang/BootstrapMethodError.java
+
+# The sources built here use new language syntax to generate
+# method handle calls.  Let's be sure we are using that format.
+LANGUAGE_VERSION = -source 7
+CLASS_VERSION = -target 7
+
+include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/java/FILES_java.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/java/FILES_java.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -466,7 +466,6 @@
     java/security/ProtectionDomain.java \
     java/net/URLClassLoader.java \
     java/net/URLConnection.java \
-    sun/misc/BootClassLoaderHook.java \
     sun/misc/Launcher.java \
     sun/misc/MetaIndex.java \
     sun/misc/URLClassPath.java \
--- a/make/java/java/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/java/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = java.lang
 LIBRARY = java
 PRODUCT = java
@@ -244,7 +243,7 @@
 
 $(GENSRCDIR)/java/lang/UNIXProcess.java: \
     $(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.$(PLATFORM)
-	$(install-non-module-file)
+	$(install-file)
 
 clean:: 
 	$(RM) $(GENSRCDIR)/java/lang/UNIXProcess.java
@@ -318,7 +317,6 @@
 	$(BOOT_JAVA_CMD) -jar $(GENERATECURRENCYDATA_JARFILE) -o $@.temp \
 		< $(SHARE_SRC)/classes/java/util/CurrencyData.properties
 	$(MV) $@.temp $@
-	$(install-module-file)
 	$(call chmod-file, 444)
 
 clean:: 
@@ -373,7 +371,7 @@
 		-usecharforbyte 11 4 1
 
 $(GENSRCDIR)/java/lang/%.java : $(CHARACTERDATA)/%.java.template
-	$(install-non-module-file)
+	$(install-file)
 
 clean::
 	$(RM) $(GENSRCDIR)/java/lang/CharacterDataLatin1.java 
--- a/make/java/java_crw_demo/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/java_crw_demo/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -25,7 +25,6 @@
 
 BUILDDIR = ../..
 
-MODULE  = demos
 LIBRARY = java_crw_demo
 PRODUCT = sun
 LIBRARY_OUTPUT = java_crw_demo
--- a/make/java/java_hprof_demo/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/java_hprof_demo/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = instrument
 LIBRARY = hprof
 PRODUCT = sun
 LIBRARY_OUTPUT = hprof_jvmti
--- a/make/java/jli/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/jli/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -30,7 +30,6 @@
 # its manifestations (java, javaw, javac, ...).
 #
 BUILDDIR = ../..
-MODULE  = base
 LIBRARY = jli
 PRODUCT = java
 
@@ -79,13 +78,17 @@
 	zutil.c
 
 ifneq ($(PLATFORM), windows)
-
-FILES_c += \
-	$(CTARGDIR)ergo.c \
-	$(CTARGDIR)ergo_$(ERGO_FAMILY).c
+  FILES_c += ergo.c 
+  ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
+  # if the architecture specific ergo file exists then
+  # use it, else use the generic definitions from ergo.c
+  ifneq ($(wildcard $(LAUNCHER_PLATFORM_SRC)/$(ERGO_ARCH_FILE)),)
+    FILES_c += $(ERGO_ARCH_FILE)
+  else
+    OTHER_CPPFLAGS += -DUSE_GENERIC_ERGO
+  endif
 endif
 
-
 # Names of arch directories
 LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"'
 ifeq ($(PLATFORM), solaris)
--- a/make/java/jvm/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/jvm/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2011, 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,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE   = base
 
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -39,12 +38,13 @@
 	  $(INCLUDEDIR)/classfile_constants.h
 
 $(INCLUDEDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
-	$(install-non-module-file)
+	$(install-file)
 
 $(PLATFORM_INCLUDE)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
-	$(install-non-module-file)
+	$(install-file)
 
-JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg
+JVMCFG_DIR = $(LIBDIR)/$(LIBARCH)
+JVMCFG = $(JVMCFG_DIR)/jvm.cfg
 
 #
 # How to install jvm.cfg.
@@ -55,8 +55,21 @@
 JVMCFG_ARCH = $(ARCH)
 endif
 
+ifdef BUILD_CLIENT_ONLY
+$(JVMCFG)::
+	$(MKDIR) -p $(JVMCFG_DIR)
+	@# Update jvm.cfg to use -client by default and alias -server to -client
+	$(RM) -f $(JVMCFG)
+	$(ECHO) "-client KNOWN">$(JVMCFG)
+	$(ECHO) "-server ALIASED_TO -client">>$(JVMCFG)
+	$(ECHO) "-hotspot ALIASED_TO -client">>$(JVMCFG)
+	$(ECHO) "-classic WARN">>$(JVMCFG)
+	$(ECHO) "-native ERROR">>$(JVMCFG)
+	$(ECHO) "-green ERROR">>$(JVMCFG)
+else
 $(JVMCFG): $(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
 	$(install-file)
+endif
 
 all: build
 
--- a/make/java/logging/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/logging/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = logging
 PACKAGE = java.util.logging
 PRODUCT = java
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/main/java/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/main/java/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = base
 PROGRAM = java
 PRODUCT = java
 
--- a/make/java/main/javaw/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/main/javaw/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = base
 PROGRAM = javaw
 PRODUCT = java
 
--- a/make/java/management/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/management/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = management
 PACKAGE = java.lang.management
 LIBRARY = management
 PRODUCT = java
--- a/make/java/net/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/net/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = java.net
 LIBRARY = net
 PRODUCT = sun
--- a/make/java/nio/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/nio/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2011, 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 @@
 #
 
 BUILDDIR = ../..
-MODULE  = nio
 PACKAGE = java.nio
 LIBRARY = nio
 PRODUCT = java
@@ -304,11 +303,7 @@
 # Rules
 #
 
-SUBDIRS_management = mxbean
-include $(BUILDDIR)/common/Subdirs.gmk
-
 build: sources
-	$(SUBDIRS-loop)
 
 clean clobber::
 	$(RM) -r $(NIO_GEN) $(SNIO_GEN)
@@ -821,11 +816,11 @@
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
 
 $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
-	$(install-non-module-file)
+	$(install-file)
 
 $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
 	$(prep-target)
-	($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \
+	($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS) $(LDDFLAGS) \
 	   -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
 
 $(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
@@ -856,7 +851,7 @@
 
 $(GENUC_EXE) : $(GENUC_SRC)
 	$(prep-target)
-	$(CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
+	$(HOST_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
 
 $(SFS_GEN)/UnixConstants.java: $(GENUC_EXE)
 	$(prep-target)
@@ -872,7 +867,7 @@
 
 $(GENSC_EXE) : $(GENSC_SRC)
 	$(prep-target)
-	$(CC) $(CPPFLAGS) -o $@ $(GENSC_SRC)
+	$(HOST_CC) $(CPPFLAGS) -o $@ $(GENSC_SRC)
 
 $(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
 	$(prep-target)
--- a/make/java/nio/mapfile-linux	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/nio/mapfile-linux	Wed Apr 20 04:38:36 2011 +0100
@@ -95,6 +95,8 @@
 		Java_sun_nio_ch_NativeThread_current;
 		Java_sun_nio_ch_NativeThread_init;
 		Java_sun_nio_ch_NativeThread_signal;
+		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
+		Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
 		Java_sun_nio_ch_Net_socket0;
 		Java_sun_nio_ch_Net_bind0;
 		Java_sun_nio_ch_Net_connect0;
--- a/make/java/nio/mapfile-solaris	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/nio/mapfile-solaris	Wed Apr 20 04:38:36 2011 +0100
@@ -82,6 +82,8 @@
 		Java_sun_nio_ch_NativeThread_current;
 		Java_sun_nio_ch_NativeThread_init;
 		Java_sun_nio_ch_NativeThread_signal;
+		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
+                Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
 		Java_sun_nio_ch_Net_socket0;
 		Java_sun_nio_ch_Net_bind0;
 		Java_sun_nio_ch_Net_connect0;
--- a/make/java/nio/mxbean/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2010, 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.
-#
-
-BUILDDIR = ../../..
-MODULE   = management
-PACKAGE  = java.nio
-PRODUCT  = java
-include $(BUILDDIR)/common/Defs.gmk
-
-FILES_java = java/nio/BufferPoolMXBean.java
-
-include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/npt/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/npt/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -26,7 +26,6 @@
 BUILDDIR = ../..
 
 # It's currently used by jpda and hprof.  Put it in base module for now.
-MODULE  = base
 LIBRARY = npt
 PRODUCT = sun
 LIBRARY_OUTPUT = npt
--- a/make/java/redist/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/redist/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -35,7 +35,6 @@
 # 
 
 BUILDDIR = ../..
-MODULE   = base
 PRODUCT  = java
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -77,8 +76,12 @@
 INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
 
 # List of files coming from outside this workspace
-IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
-              $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
+ifndef BUILD_CLIENT_ONLY
+  IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
+                $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
+else
+  IMPORT_LIST =
+endif
 
 # Hotspot client is only available on 32-bit non-Zero builds
 ifneq ($(ZERO_BUILD), true)
@@ -98,10 +101,12 @@
 	$(call chmod-file, a+x)
 
 # Get the hotspot .map and .pdb files for client and server
+ifndef BUILD_CLIENT_ONLY
 IMPORT_LIST += \
 	$(LIBDIR)/$(JVMLIB_NAME) \
 	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
 	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
+endif
 
 # Add .map and .pdb files to the import path for client and kernel VMs. 
 # These are only available on 32-bit windows builds. 
@@ -122,50 +127,51 @@
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
-	@$(install-module-file)
 
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
-	@$(install-module-file)
 
+ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
-	@$(install-module-file)
+endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
-	@$(install-module-file)
 
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
-	@$(install-module-file)
 
+ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
-	@$(install-module-file)
+endif
 
 #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
 else # PLATFORM
 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
 
-IMPORT_LIST += \
-        $(LIB_LOCATION)/$(LIBJSIG_NAME) \
-	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
+IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) 
+ifndef BUILD_CLIENT_ONLY
+  IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
+endif
 
 ifeq ($(PLATFORM), solaris)
-  IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
-# The conditional can be removed when import JDKs contain these files.
-ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
-  IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
-else
-  $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
-endif 
-endif 
+  ifndef BUILD_CLIENT_ONLY
+    IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
+    # The conditional can be removed when import JDKs contain these files.
+    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
+    else
+      $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
+    endif 
+  endif 
+endif
 
 ifneq ($(ZERO_BUILD), true)
 ifeq ($(ARCH_DATA_MODEL), 32)
@@ -186,18 +192,20 @@
   $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
 endif
 
-# The conditional can be removed when import JDKs contain these files.
-ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
-  IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
-else
-  $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
-endif
+ifndef BUILD_CLIENT_ONLY
+  # The conditional can be removed when import JDKs contain these files.
+  ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
+  else
+    $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
+  endif
 
-# The conditional can be removed when import JDKs contain these files.
-ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
-  IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
-else
-  $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
+  # The conditional can be removed when import JDKs contain these files.
+  ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
+  else
+    $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
+ endif
 endif
 
 # For backwards compatability, make a link of the 32-bit client JVM to $(LIBDIR)
@@ -229,10 +237,16 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
+else
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
+	@$(prep-target)
+	$(call install-sym-link, ../$(LIBJSIG_NAME))
+endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
 	$(install-import-file)
@@ -242,6 +256,7 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
@@ -249,6 +264,7 @@
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
+endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
 	$(install-import-file)
@@ -258,6 +274,7 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
@@ -272,6 +289,7 @@
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
 	$(install-import-file)
+endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt
 	$(install-import-file)
@@ -291,7 +309,7 @@
 
 $(LIBDIR)/jce.jar: \
 	    $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
-	$(install-non-module-file)
+	$(install-file)
 $(LIBDIR)/security/US_export_policy.jar: \
 	    $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
 	$(install-file)
--- a/make/java/redist/fonts/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/redist/fonts/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE   = font
 PRODUCT  = java
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/java/redist/sajdi/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/redist/sajdi/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE   = sajdi
 PRODUCT  = java
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/java/security/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/security/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2010 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2011 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,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = java.security
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -65,6 +64,8 @@
 ifndef OPENJDK
   BLACKLIST_SRC =	$(CLOSED_SHARE_SRC)/lib/security/blacklist
   BLACKLIST_BUILD = $(LIBDIR)/security/blacklist
+  TRUSTEDLIBS_SRC = $(CLOSED_SHARE_SRC)/lib/security/trusted.libraries
+  TRUSTEDLIBS_BUILD = $(LIBDIR)/security/trusted.libraries
 endif
 
 FILES_class = $(FILES_java:%.java=$(CLASSBINDIR)/%.class)
@@ -77,7 +78,7 @@
 ifdef OPENJDK
 build: properties policy cacerts
 else
-build: properties policy cacerts blacklist
+build: properties policy cacerts blacklist trustedlibs
 endif
 
 install: all
@@ -90,6 +91,8 @@
 
 blacklist: classes $(BLACKLIST_BUILD)
 
+trustedlibs: classes $(TRUSTEDLIBS_BUILD)
+
 $(PROPS_BUILD): $(PROPS_SRC)
 	$(install-file)
 
@@ -102,9 +105,12 @@
 $(BLACKLIST_BUILD): $(BLACKLIST_SRC)
 	$(install-file)
 
+$(TRUSTEDLIBS_BUILD): $(TRUSTEDLIBS_SRC)
+	$(install-file)
+
 clean clobber:: .delete.classlist
 	$(RM) -r $(CLASSBINDIR)/java/security
-	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD) $(BLACKLIST_BUILD)
+	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD) $(BLACKLIST_BUILD) $(TRUSTEDLIBS_BUILD)
 
 # Additional Rule for building sun.security.util
 $(CLASSBINDIR)/%.class: $(SHARE_SRC)/sun/%.java
--- a/make/java/sql/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/sql/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = jdbc-base
 PACKAGE = java.sql
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/text/base/FILES_java.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/text/base/FILES_java.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -136,6 +136,7 @@
         sun/text/resources/CollationData_sl.java \
         sun/text/resources/CollationData_sq.java \
         sun/text/resources/CollationData_sr.java \
+        sun/text/resources/CollationData_sr_Latn.java \
         sun/text/resources/CollationData_sv.java \
         sun/text/resources/CollationData_tr.java \
         sun/text/resources/CollationData_uk.java \
@@ -251,6 +252,10 @@
         sun/text/resources/FormatData_sr_CS.java \
         sun/text/resources/FormatData_sr_ME.java \
         sun/text/resources/FormatData_sr_RS.java \
+        sun/text/resources/FormatData_sr_Latn.java \
+        sun/text/resources/FormatData_sr_Latn_BA.java \
+        sun/text/resources/FormatData_sr_Latn_ME.java \
+        sun/text/resources/FormatData_sr_Latn_RS.java \
         sun/text/resources/FormatData_sv.java \
         sun/text/resources/FormatData_sv_SE.java \
         sun/text/resources/FormatData_tr.java \
--- a/make/java/text/base/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/text/base/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = base
 PACKAGE = java.text
 PRODUCT = sun
 
--- a/make/java/util/FILES_properties.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/util/FILES_properties.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -65,6 +65,7 @@
         sun/util/resources/LocaleNames_sl.properties \
         sun/util/resources/LocaleNames_sq.properties \
         sun/util/resources/LocaleNames_sr.properties \
+        sun/util/resources/LocaleNames_sr_Latn.properties \
         sun/util/resources/LocaleNames_sv.properties \
         sun/util/resources/LocaleNames_tr.properties \
         sun/util/resources/LocaleNames_uk.properties \
@@ -111,6 +112,9 @@
         sun/util/resources/CalendarData_sl.properties \
         sun/util/resources/CalendarData_sq.properties \
         sun/util/resources/CalendarData_sr.properties \
+        sun/util/resources/CalendarData_sr_Latn_BA.properties \
+        sun/util/resources/CalendarData_sr_Latn_ME.properties \
+        sun/util/resources/CalendarData_sr_Latn_RS.properties \
         sun/util/resources/CalendarData_sv.properties \
         sun/util/resources/CalendarData_tr.properties \
         sun/util/resources/CalendarData_uk.properties \
@@ -186,6 +190,7 @@
         sun/util/resources/CurrencyNames_nl_NL.properties \
         sun/util/resources/CurrencyNames_no_NO.properties \
         sun/util/resources/CurrencyNames_pl_PL.properties \
+        sun/util/resources/CurrencyNames_pt.properties \
         sun/util/resources/CurrencyNames_pt_BR.properties \
         sun/util/resources/CurrencyNames_pt_PT.properties \
         sun/util/resources/CurrencyNames_ro_RO.properties \
@@ -196,6 +201,10 @@
         sun/util/resources/CurrencyNames_sr_BA.properties \
         sun/util/resources/CurrencyNames_sr_CS.properties \
         sun/util/resources/CurrencyNames_sr_ME.properties \
+        sun/util/resources/CurrencyNames_sr_RS.properties \
+        sun/util/resources/CurrencyNames_sr_Latn_BA.properties \
+        sun/util/resources/CurrencyNames_sr_Latn_ME.properties \
+        sun/util/resources/CurrencyNames_sr_Latn_RS.properties \
         sun/util/resources/CurrencyNames_sv.properties \
         sun/util/resources/CurrencyNames_sv_SE.properties \
         sun/util/resources/CurrencyNames_tr_TR.properties \
--- a/make/java/verify/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/verify/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = base
 PRODUCT = java
 LIBRARY = verify
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/zip/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/java/zip/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -25,7 +25,6 @@
 
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = java.util.zip
 LIBRARY = zip
 PRODUCT = sun
--- a/make/javax/crypto/Defs-jce.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/crypto/Defs-jce.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -83,7 +83,7 @@
 
 define release-warning
 	@$(ECHO) \
-	    "\n***The jar files built by the \"release\" target must***" \
+	    "\n***The jar files built by the 'release' target must***" \
 	    "\n***still be checked into the closed workspace!     ***" \
 	    $(README-MAKEFILE_WARNING)
 endef
--- a/make/javax/crypto/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/crypto/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -108,7 +108,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = javax.crypto
 PRODUCT = sun
 
@@ -294,7 +293,7 @@
 
 $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
 	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
-	$(install-non-module-file)
+	$(install-file)
 
 $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
 	    policy/limited/default_local.policy				\
@@ -415,7 +414,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
 endif
-	$(install-non-module-file)
+	$(install-file)
 
 #
 # Install the appropriate policy file, depending on the type of build.
@@ -435,7 +434,7 @@
 	    $(POLICY_DESTDIR)/local_policy.jar
 	$(CP) $^ $(POLICY_DESTDIR)
 
-install-limited: install-limited-jars install-module-files
+install-limited: install-limited-jars
 ifndef OPENJDK
 	$(release-warning)
 endif
@@ -449,7 +448,7 @@
 	    $(POLICY_DESTDIR)/local_policy.jar
 	$(CP) $^ $(POLICY_DESTDIR)
 
-install-unlimited: install-unlimited-jars install-module-files
+install-unlimited: install-unlimited-jars
 ifndef OPENJDK
 	$(release-warning)
 endif
@@ -466,16 +465,9 @@
 	    $(PREBUILT_DIR)/jce/local_policy.jar \
 	    $(POLICY_DESTDIR)
 
-install-prebuilt: install-prebuilt-jars install-module-files
+install-prebuilt: install-prebuilt-jars
 endif
 
-install-module-files: \
-	   $(POLICY_DESTDIR)/US_export_policy.jar \
-	   $(POLICY_DESTDIR)/local_policy.jar
-
-$(POLICY_DESTDIR)/%.jar :
-	$(install-module-file)
-
 # =====================================================
 # Support routines.
 #
--- a/make/javax/imageio/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/imageio/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = imageio
 PACKAGE = javax.imageio
 PRODUCT = jiio
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/javax/print/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/print/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = print
 PACKAGE = javax.print
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/javax/sound/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/sound/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsound
 PRODUCT = sun
--- a/make/javax/sound/SoundDefs.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/sound/SoundDefs.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2011, 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
@@ -73,6 +73,15 @@
   ifeq ($(ARCH), amd64)
     CPPFLAGS += -DX_ARCH=X_AMD64
   endif # ARCH amd64
+
+  ifeq ($(ARCH), arm)
+    CPPFLAGS += -DX_ARCH=X_ARM
+  endif # ARCH arm
+
+  ifeq ($(ARCH), ppc)
+    CPPFLAGS += -DX_ARCH=X_PPC
+  endif # ARCH ppc
+
 endif
 
 
--- a/make/javax/sound/jsoundalsa/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/sound/jsoundalsa/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsoundalsa
 PRODUCT = sun
--- a/make/javax/sound/jsoundds/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/sound/jsoundds/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsoundds
 PRODUCT = sun
--- a/make/javax/sql/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/sql/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = jdbc-enterprise
 PACKAGE = javax.sql
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/javax/swing/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/swing/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR  = ../..
-MODULE    = swing
 PACKAGE   = javax.swing
 PRODUCT   = com
 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
--- a/make/javax/swing/plaf/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/javax/swing/plaf/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR  = ../../..
-MODULE    = swing
 PACKAGE   = javax.swing.plaf
 PRODUCT   = com
 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
--- a/make/jpda/back/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/jpda/back/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = debugging
 LIBRARY = jdwp
 PRODUCT = jpda
 
--- a/make/jpda/transport/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/jpda/transport/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = debugging
 PRODUCT = jpda
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/jpda/transport/shmem/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/jpda/transport/shmem/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE   = debugging
 LIBRARY  = dt_shmem
 PRODUCT = jbug
 
--- a/make/jpda/transport/socket/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/jpda/transport/socket/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = debugging
 LIBRARY = dt_socket
 PRODUCT = jbug
 
--- a/make/jpda/tty/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/jpda/tty/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = jdb
 PACKAGE = com.sun.tools.example.debug.tty
 PRODUCT = jpda
 PROGRAM = jdb
--- a/make/launchers/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/launchers/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ..
-MODULE  = tools
 PACKAGE = launchers
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -38,7 +37,6 @@
 define make-corba-launcher
 $(CD) $(BUILDDIR)/launchers && \
 $(MAKE) -f Makefile.launcher \
-        MODULE=corba \
         PROGRAM=$(strip $1) \
         MAIN_CLASS=$(strip $2) \
         MAIN_JAVA_ARGS="$(strip $3)" \
--- a/make/mkdemo/jfc/Font2DTest/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jfc/Font2DTest/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -33,7 +33,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 DEMO_ROOT       = $(SHARE_SRC)/demo/jfc/$(DEMONAME)
-DEMO_TOPFILES   = ./README.txt
+DEMO_TOPFILES   = ./README.txt ./$(DEMONAME).html
 DEMO_MAINCLASS  = $(DEMONAME)
 DEMO_DESTDIR    = $(DEMODIR)/jfc/$(DEMONAME)
 
--- a/make/mkdemo/jfc/Java2D/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jfc/Java2D/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -33,7 +33,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 DEMO_ROOT       = $(CLOSED_SRC)/share/demo/jfc/Java2D
-DEMO_TOPFILES   = ./Java2Demo.html ./README.txt
+DEMO_TOPFILES   = ./README.txt ./$(DEMONAME).html
 DEMO_MAINCLASS  = java2d.Java2Demo
 DEMO_DESTDIR    = $(DEMODIR)/jfc/Java2D
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mkdemo/jfc/Laffy/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2011, 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.
+#
+
+#
+# Makefile to build the Laffy demo.
+#
+
+BUILDDIR = ../../..
+PRODUCT = demo/jfc
+DEMONAME = Laffy
+include $(BUILDDIR)/common/Defs.gmk
+
+DEMO_ROOT       = $(CLOSED_SRC)/share/demo/jfc/$(DEMONAME)
+DEMO_DESTDIR    = $(DEMODIR)/jfc/$(DEMONAME)
+DEMO_TOPFILES	= ./readme.html ./laffy.png
+DEMO_SKIP_SRCZIP = true
+
+#
+# Demo jar building rules.
+#
+include $(BUILDDIR)/common/Demo.gmk
--- a/make/mkdemo/jfc/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jfc/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -43,7 +43,7 @@
 
 # Some demos aren't currently included in OpenJDK
 ifndef OPENJDK
-  SUBDIRS += Java2D SwingSet2 SwingSet3 Stylepad
+  SUBDIRS += Java2D Laffy SwingSet2 SwingSet3 Stylepad
 endif
 
 include $(BUILDDIR)/common/Subdirs.gmk
--- a/make/mkdemo/jfc/SwingApplet/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jfc/SwingApplet/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -33,7 +33,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 DEMO_ROOT       = $(SHARE_SRC)/demo/jfc/$(DEMONAME)
-DEMO_TOPFILES   = ./README.txt
+DEMO_TOPFILES   = ./README.txt ./$(DEMONAME).html
 DEMO_MAINCLASS  = $(DEMONAME)
 DEMO_DESTDIR    = $(DEMODIR)/jfc/$(DEMONAME)
 
--- a/make/mkdemo/jfc/SwingSet2/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jfc/SwingSet2/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -33,10 +33,11 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 DEMO_ROOT       = $(CLOSED_SRC)/share/demo/jfc/$(DEMONAME)
-DEMO_TOPFILES   = ./README.txt
+DEMO_TOPFILES   = ./README.txt ./$(DEMONAME).html
 DEMO_MAINCLASS  = $(DEMONAME)
 DEMO_MANIFEST_ATTR = SplashScreen-Image: resources/images/splash.png
 DEMO_DESTDIR    = $(DEMODIR)/jfc/$(DEMONAME)
+DEMO_INCL_SRC   = true
 
 #
 # Demo jar building rules.
--- a/make/mkdemo/jpda/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jpda/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -32,6 +32,8 @@
 DEMO_PKGDIR     = com/sun/tools/example
 DEMO_TOPFILES   = ./com/sun/tools/example/README
 DEMO_DESTDIR    = $(DEMODIR)/jpda
+DEMO_JAR_NAME   = examples.jar
+DEMO_ONLY_SRC   = true
 
 #
 # Demo jar building rules.
--- a/make/mkdemo/jvmti/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/jvmti/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = demos
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/mkdemo/management/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mkdemo/management/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = demos
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/mksample/dtrace/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/dtrace/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/jmx/jmx-scandir/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/jmx/jmx-scandir/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nbproject/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/nbproject/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nio/file/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/nio/file/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nio/multicast/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/nio/multicast/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nio/server/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/nio/server/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/scripting/scriptpad/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/scripting/scriptpad/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/webservices/EbayClient/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/webservices/EbayClient/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/webservices/EbayServer/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/mksample/webservices/EbayServer/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 
-MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/modules/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-#
-# Copyright (c) 2009, 2010, 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.
-#
-
-BUILDDIR = ..
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Modularizing the JDK
-# - Post jdk build process until the source tree is restructured
-#   for modules build
-# - <outputdir>/modules/<module> will be created for each module.
-#
-# Steps:
-# 0. During jdk build before this makefile is invoked, classes, 
-#    resource files, and other non-class files such as native libraries,
-#    properties file, images, etc are created.
-#
-#    Non-class files are copied to <outputdir>/tmp/modules/<MODULE>
-#    directory in this step to prepare for the post-build modularization. 
-#
-#    The MODULE variable defined in other makefiles specifies 
-#    the lowest-level module that the non-class files belong to.
-#    The name might or might not be the same as the name of the modules 
-#    in the resulting <outputdir>/modules directory.
-#    
-# 1. Unpack all jars in the <builddir>/lib directory to a temporary 
-#    location (<outputdir>/tmp/modules/classes) to prepare for modules
-#    creation.
-#
-# 2. Run ClassAnalyzer tool to analyze all jdk classes and generate
-#    class list for all modules and also perform dependency analysis. 
-#
-#    Input configuration files :-
-#
-#    modules.config : defines the low-level modules and specifies 
-#       what classes and resource files each module includes.
-#    modules.group  : defines the module groups and its members.
-#    jdk7.depconfig : lists the dynamic dependencies including
-#       use of reflection Class.forName and JNI FindClass and
-#       service provider.
-#    optional.depconfig : lists the optional dependencies
-#
-# 3. Create one directory for each module (<outputdir>/modules/<module>)
-#    based on the output files from (2).
-#       
-#    modules.list lists the modules to be created for the modules
-#    build and its members. For each module (m) in modules.list,
-#    a. create $m/lib/$m.jar with all classes and resource files
-#       listed in $m.classlist and $m.resources respectively.
-#    b. copy all non-class files from its members to 
-#       <outputdir>/modules/$m.
-
-
-MAINMANIFEST=$(JDK_TOPDIR)/make/tools/manifest.mf
-MODULE_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
-
-TMP = $(ABS_MODULES_TEMPDIR)
-MODULE_CLASSLIST = $(ABS_MODULES_TEMPDIR)/classlist
-MODULE_CLASSES = $(ABS_MODULES_TEMPDIR)/classes
-MODULES_LIST = $(MODULE_CLASSLIST)/modules.list
-
-all:: unpack-jars gen-classlist modularize
-
-JAR_LIST := $(shell $(FIND) $(ABS_OUTPUTDIR)/lib -name \*.jar -print) 
-unpack-jars:
-	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-	$(RM) -rf $(MODULE_CLASSES)
-	$(MKDIR) -p $(MODULE_CLASSES)
-	$(CP) -rf $(CLASSBINDIR)/* $(MODULE_CLASSES)
-	@for jf in  $(JAR_LIST) ; do \
-	   $(CD) $(MODULE_CLASSES) && $(BOOT_JAR_CMD) xf $$jf $(BOOT_JAR_JFLAGS);\
-	done
-	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
-
-gen-classlist:
-	$(CD) tools && $(MAKE) all
-
-modularize: $(MODULE_JAR_MANIFEST_FILE)
-	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-	@$(RM) -rf $(MODULES_DIR)
-
-	@# create jar file for modules and
-	@# copy other files from all members of this module 
-	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
-   	   $(ECHO) "Creating module $$m" ; \
-   	   $(SED) -e 's%\\%\/%g' < $(MODULE_CLASSLIST)/$$m.classlist > $(TMP)/tmp.cf ; \
-	   if [ -f $(MODULE_CLASSLIST)/$$m.resources ] ; then \
-   	       $(SED) -e 's%\\%\/%g' < $(MODULE_CLASSLIST)/$$m.resources >> $(TMP)/tmp.cf ; \
-           fi ; \
-           $(MKDIR) -p $(ABS_MODULES_DIR)/$$m/lib; \
-	   $(CD) $(MODULE_CLASSES) && \
-               $(BOOT_JAR_CMD) c0mf $(MODULE_JAR_MANIFEST_FILE) \
-		   $(ABS_MODULES_DIR)/$$m/lib/$$m.jar \
-	           @$(TMP)/tmp.cf \
-                   $(BOOT_JAR_JFLAGS); \
-	   for s in `$(GREP) "^$$m" $(MODULES_LIST)` ; do \
-               if [ -d $(TMP)/$$s ] ; then \
-               	   $(CP) -rf $(TMP)/$$s/*  $(ABS_MODULES_DIR)/$$m; \
-		   $(RM) -rf $(ABS_MODULES_DIR)/$$m/classes; \
-	       fi \
-	   done \
-        done
-	@$(CD) $(MODULE_CLASSES) && $(java-vm-cleanup)
-	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
-
-$(MODULE_JAR_MANIFEST_FILE):
-	$(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) > $@
-
-clean clobber::
-	$(RM) -rf $(MODULE_CLASSLIST)
-	$(RM) -rf $(MODULES_DIR)
-	$(RM) $(MODULE_JAR_MANIFEST_FILE)
--- a/make/modules/bootmodule.roots	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-#
-# Copyright (c) 2009, 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.
-#
-
-#
-# List of root classes/methods, each line of the following syntax:
-# <class name> 
-# <method name> <signature>|*
-# exclude <class>|<method> 
-
-# The boot module generated based on this rootset does not support
-# - security permission check
-# - non-standard charset
-# - logging output
-# - resource bundles
-#   including error output from the launcher 
-
-# VM preloaded classes
-java.lang.Object
-java.lang.String
-java.lang.Class
-java.lang.Cloneable
-java.lang.ClassLoader
-java.lang.System
-java.lang.Throwable
-java.lang.Error
-java.lang.ThreadDeath
-java.lang.Exception
-java.lang.RuntimeException
-java.security.ProtectionDomain
-java.security.AccessControlContext
-java.lang.ClassNotFoundException
-java.lang.NoClassDefFoundError
-java.lang.ClassCastException
-java.lang.ArrayStoreException
-java.lang.VirtualMachineError
-java.lang.OutOfMemoryError
-java.lang.StackOverflowError
-java.lang.IllegalMonitorStateException
-java.lang.ref.Reference
-java.lang.ref.SoftReference
-java.lang.ref.WeakReference
-java.lang.ref.FinalReference
-java.lang.ref.PhantomReference
-java.lang.ref.Finalizer
-java.lang.Runnable
-java.lang.Thread
-java.lang.ThreadGroup
-java.util.Properties
-java.lang.reflect.AccessibleObject
-java.lang.reflect.Member
-java.lang.reflect.Field
-java.lang.reflect.Method
-java.lang.reflect.Constructor
-java.lang.reflect.Type
-sun.reflect.MagicAccessorImpl
-sun.reflect.MethodAccessorImpl
-sun.reflect.ConstructorAccessorImpl
-sun.reflect.DelegatingClassLoader
-sun.reflect.ConstantPool
-sun.reflect.UnsafeStaticFieldAccessorImpl
-java.util.Vector
-java.lang.StringBuffer
-java.lang.StackTraceElement
-java.nio.Buffer
-java.lang.Boolean
-java.lang.Character
-java.lang.Float
-java.lang.Double
-java.lang.Byte
-java.lang.Short
-java.lang.Integer
-java.lang.Long
-java.lang.NullPointerException
-java.lang.ArithmeticException
-java.lang.Compiler
-
-
-# Root methods
-java.lang.ClassLoader.getSystemClassLoader ()Ljava/lang/ClassLoader;
-java.lang.System.initializeSystemClass ()V
-sun.launcher.LauncherHelper.checkAndLoadMain (ZZLjava/lang/String;)Ljava/lang/Object;
-
-# The tool doesn't automatically find superclasses and parse the method
-# if overridden as it tries to reduce unnecessary classes being pulled in.
-# The following forces the dependency to be included the result.
-sun.net.www.protocol.file.Handler.<init> ()V
-sun.net.www.protocol.jar.Handler.<init> ()V
-sun.net.www.protocol.file.Handler.openConnection *
-sun.net.www.protocol.jar.Handler.openConnection *
-sun.misc.URLClassPath$JarLoader.<init>  (Ljava/net/URL;Ljava/net/URLStreamHandler;Ljava/util/HashMap;)V
-sun.misc.URLClassPath$FileLoader.<init> (Ljava/net/URL;)V
-sun.misc.URLClassPath$FileLoader.getClassPath *
-sun.misc.URLClassPath$FileLoader.getResource *
-sun.misc.URLClassPath$JarLoader.getResource *
-sun.misc.URLClassPath$JarLoader.getClassPath *
-
-# permission collections
-java.io.FilePermission.newPermissionCollection ()Ljava/security/PermissionCollection;
-java.security.BasicPermission.newPermissionCollection ()Ljava/security/PermissionCollection;
-
-# native
-java.io.UnixFileSystem
-java.io.UnixFileSystem.<init> ()V
-java.io.UnixFileSystem.canonicalize *
-java.io.Win32FileSystem
-java.io.Win32FileSystem.<init> ()V
-java.io.Win32FileSystem.canonicalize *
-java.io.WinNTFileSystem
-java.io.WinNTFileSystem.<init> ()V
-java.io.WinNTFileSystem.canonicalize *
-
-# missing
-java.util.HashMap.<init> ()V
-java.util.HashMap$EntrySet.iterator *
-
-# Called from native GetStringPlatformChars (jni_util.c)
-java.lang.String.getBytes *
-
-# charset
-sun.nio.cs.US_ASCII.newEncoder ()Ljava/nio/charset/CharsetEncoder;
-sun.nio.cs.UTF_8.newEncoder ()Ljava/nio/charset/CharsetEncoder;
-sun.nio.cs.UTF_8.newDecoder  *
-sun.nio.cs.UTF_16.newEncoder ()Ljava/nio/charset/CharsetEncoder;
-sun.nio.cs.UTF_16.newDecoder  *
-sun.nio.cs.UTF_32.newEncoder ()Ljava/nio/charset/CharsetEncoder;
-sun.nio.cs.UTF_32.newDecoder  *
-
-# hashcode
-java.util.jar.Attributes$Name.hashCode *
-
-# nio
-sun.nio.ByteBuffered
-sun.nio.ch.DirectBuffer
-java.nio.DirectByteBuffer
-java.nio.MappedByteBuffer
-java.nio.DirectLongBufferU
-
-# resource files
-sun.launcher.resources.launcher
-
-sun.misc.Launcher$AppClassLoader.getPermissions *
-sun.misc.Launcher$AppClassLoader.loadClass  (Ljava/lang/String;)Ljava/lang/Class;
-sun.misc.Launcher$AppClassLoader.findClass  (Ljava/lang/String;)Ljava/lang/Class;
-sun.misc.Launcher$ExtClassLoader.getPermissions *
-sun.misc.Launcher$ExtClassLoader.loadClass  (Ljava/lang/String;)Ljava/lang/Class;
-sun.misc.Launcher$ExtClassLoader.findClass  (Ljava/lang/String;)Ljava/lang/Class;
-java.lang.ClassLoader.checkPackageAccess *
-java.lang.ClassLoader.findClass *
-java.lang.ClassLoader.defineClass *
-java.net.URLClassLoader.getPermissions *
-java.net.URLClassLoader.findClass *
-java.net.URLClassLoader.defineClass *
-java.security.SecureClassLoader.defineClass *
-# need to parse superclasses <init>
-java.security.SecureClassLoader.<init> ()V
-
-exclude sun.security.provider.PolicyFile.<init>
-exclude java.lang.ClassLoader.compareCerts
-exclude java.security.cert.Certificate.equals
-# unsigned jars - no verifier
-exclude java.util.jar.JarFile.initializeVerifier
-exclude java.util.jar.JarVerifier 
-exclude sun.security.util.SignatureFileVerifier.<init>
-
-
-# what about other charset
-exclude sun.misc.Service
-exclude java.util.ServiceLoader
-
-# exclude support for localized messages
-exclude java.util.ResourceBundle.getBundle
-exclude java.text.MessageFormat
-exclude sun.util.logging.PlatformLogger$LoggerProxy.format *
-
-# exclude nio and miscellaneous classes
-exclude java.nio.channels.**
-exclude sun.misc.FloatingDecimal
-exclude sun.misc.FormattedFloatingDecimal
-exclude sun.misc.FDBigInt 
--- a/make/modules/jdk7.depconfig	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,473 +0,0 @@
-#
-# Copyright (c) 2009, 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.
-#
-
-# private java.lang.Object createInetSocketAddress(java.lang.String, int)
-@ClassForName
-  com.sun.jndi.ldap.Connection -> java.net.InetSocketAddress
-  com.sun.jndi.ldap.Connection -> java.net.SocketAddress
-
-# com.sun.jndi.ldap.VersionHelper
-@ClassForName(optional)
-  com.sun.jndi.ldap.VersionHelper -> com.sun.jndi.ldap.VersionHelper*
-
-# private static void initMethodHandles()
-@ClassForName
-  com.sun.jndi.toolkit.corba.CorbaUtils -> javax.rmi.CORBA.Stub
-  com.sun.jndi.toolkit.corba.CorbaUtils -> javax.rmi.PortableRemoteObject
-
-# com.sun.naming.internal.ResourceManager$AppletParameter
-@ClassForName(optional)
-  com.sun.naming.internal.ResourceManager$AppletParameter -> java.applet.Applet
-
-# private static boolean loadProviderAsService()
-@Provider
-  com.sun.net.httpserver.spi.HttpServerProvider -> META-INF/services/com.sun.net.httpserver.spi.HttpServerProvider
-
-# com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT
-@ClassForName
-  com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT -> javax.xml.XMLConstants
-
-# public static java.beans.PersistenceDelegate getPersistenceDelegate(java.lang.Class)
-@ClassForName
-  java.beans.MetaData -> java.beans.*_PersistenceDelegate
-
-# private static java.lang.reflect.Method getNanosMethod()
-@ClassForName(optional)
-  java.beans.java_sql_Timestamp_PersistenceDelegate -> java.sql.Timestamp
-
-# java.beans.java_util_Collections$CheckedCollection_PersistenceDelegate
-@ClassForName
-  java.beans.java_util_Collections$CheckedCollection_PersistenceDelegate -> java.util.Collections$CheckedCollection
-
-# java.beans.java_util_Collections$CheckedMap_PersistenceDelegate
-@ClassForName
-  java.beans.java_util_Collections$CheckedMap_PersistenceDelegate -> java.util.Collections$CheckedMap
-
-# private static java.lang.Object getType(java.lang.Object)
-@ClassForName
-  java.beans.java_util_EnumMap_PersistenceDelegate -> java.util.EnumMap
-
-# private java.lang.Integer getAxis(java.lang.Object)
-@ClassForName
-  java.beans.javax_swing_Box_PersistenceDelegate -> javax.swing.BoxLayout
-
-# java.lang.Double
-@Inline
-  java.lang.Double -> sun.misc.FloatConsts
-  java.lang.Double -> sun.misc.DoubleConsts
-
-# java.lang.Float
-@Inline
-  java.lang.Float -> sun.misc.FloatConsts
-  java.lang.Float -> sun.misc.DoubleConsts
-
-# java.net.DefaultDatagramSocketImplFactory
-@ClassForName(optional)
-  java.net.DefaultDatagramSocketImplFactory -> java.net.*DatagramSocketImpl
-
-# private static sun.net.spi.nameservice.NameService createNSProvider(java.lang.String)
-@Provider
-  java.net.InetAddress -> META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor
-
-# static java.net.InetAddressImpl create()
-@ClassForName
-  java.net.InetAddressImplFactory -> java.net.*Inet[46]AddressImpl
-
-# private static void init()
-@NativeFindClass
-  java.net.PlainDatagramSocketImpl -> java.io.FileDescriptor
-
-# java.net.ProxySelector
-@ClassForName
-  java.net.ProxySelector -> sun.net.spi.DefaultProxySelector
-
-# static java.net.URLStreamHandler getURLStreamHandler(java.lang.String)
-@ClassForName(optional)
-  java.net.URL -> sun.net.www.protocol.*.Handler
-
-# private java.net.ContentHandler lookupContentHandlerClassFor(java.lang.String)
-@ClassForName
-  java.net.URLConnection -> sun.net.www.content.*
-
-# private static java.nio.channels.spi.AsynchronousChannelProvider loadProviderAsService()
-@Provider
-  java.nio.channels.spi.AsynchronousChannelProvider$ProviderHolder -> META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider
-
-# private static boolean loadProviderFromProperty()
-@ClassForName
-  java.nio.channels.spi.SelectorProvider -> sun.nio.ch.DefaultSelectorProvider
-
-# private static boolean loadProviderAsService()
-@Provider
-  java.nio.channels.spi.SelectorProvider -> META-INF/services/java.nio.channels.spi.SelectorProvider
-
-# private static java.util.Iterator providers()
-@Provider
-  java.nio.charset.Charset -> META-INF/services/java.nio.charset.spi.CharsetProvider
-
-# private static void probeExtendedProvider()
-@ClassForName(optional)
-  java.nio.charset.Charset -> sun.nio.cs.ext.ExtendedCharsets
-
-# public static java.nio.file.FileSystem newFileSystem(java.net.URI, java.util.Map<java.lang.String, ?>, java.lang.ClassLoader)
-@Provider
-  java.nio.file.FileSystems -> META-INF/services/java.nio.file.FileSystemProvider
-
-# private static java.util.List<java.nio.file.spi.FileTypeDetector> loadInstalledDetectors()
-@Provider
-  java.nio.file.Files$DefaultFileTypeDetectorHolder -> META-INF/services/java.nio.file.spi.FileTypeDetector
-
-# public static java.util.List<java.nio.file.spi.FileSystemProvider> installedProviders()
-@Provider
-  java.nio.file.spi.FileSystemProvider -> META-INF/services/java.nio.file.FileSystemProvider
-
-# private static java.rmi.server.RMIClassLoaderSpi initializeProvider()
-@Provider
-  java.rmi.server.RMIClassLoader -> META-INF/services/java.rmi.server.RMIClassLoaderSpi
-
-# private static void initializeSystemScope()
-@ClassForName(optional)
-  java.security.IdentityScope -> sun.security.provider.IdentityDatabase
-
-# static java.security.Policy getPolicyNoCheck()
-@ClassForName
-  java.security.Policy -> sun.security.provider.PolicyFile
-
-# private static java.lang.Class getSpiClass(java.lang.String)
-@ClassForName
-  java.security.Security -> java.security.*Spi
-
-# private static void invalidateSMCache(java.lang.String)
-@ClassForName
-  java.security.Security -> java.lang.SecurityManager
-
-# private static void loadInitialDrivers()
-@Provider
-  java.sql.DriverManager -> META-INF/services/java.sql.Driver
-
-# private static java.text.BreakIterator createBreakInstance(java.util.Locale, int, java.lang.String, java.lang.String)
-@Provider
-  java.text.BreakIterator -> META-INF/services/java.util.spi.BreakIteratorProvider
-
-# public static java.text.Collator getInstance(java.util.Locale)
-@Provider
-  java.text.Collator -> META-INF/services/java.util.spi.CollatorProvider
-
-# private static java.text.DateFormat get(int, int, int, java.util.Locale)
-@Provider
-  java.text.DateFormat -> META-INF/services/java.util.spi.DateNameProvider
-
-# public static java.util.Locale[] getAvailableLocales()
-@Provider
-  java.text.DateFormatSymbols -> META-INF/services/java.util.spi.DateFormatSymbolsProvider
-
-# public static java.util.Locale[] getAvailableLocales()
-@Provider
-  java.text.DecimalFormatSymbols -> META-INF/services/java.util.spi.DecimalFormatSymbolsProvider
-
-# public static java.util.Locale[] getAvailableLocales()
-@Provider
-  java.text.NumberFormat -> META-INF/services/java.util.spi.NumberFormatProvider
-
-# public java.lang.String getDisplayName(java.util.Locale)
-@Provider
-  java.util.Currency -> META-INF/services/java.util.spi.CurrencyNameProvider
-
-# java.util.Formatter
-@Inline
-  java.util.Formatter -> sun.misc.DoubleConsts
-
-# java.util.Locale
-@Inline
-  java.util.Locale -> java.util.LocaleISOData
-
-# private java.lang.String getDisplayString(java.lang.String, java.util.Locale, int)
-@Provider
-  java.util.Locale -> META-INF/services/java.util.spi.LocaleNameProvider
-
-# private static java.util.prefs.PreferencesFactory factory1()
-@ClassForName
-  java.util.prefs.Preferences -> java.util.prefs.WindowsPreferencesFactory
-  java.util.prefs.Preferences -> java.util.prefs.FileSystemPreferencesFactory
-
-# private static java.util.prefs.PreferencesFactory factory1()
-@Provider
-  java.util.prefs.Preferences -> META-INF/services/java.util.prefs.PreferencesFactory
-
-# public void registerApplicationClasspathSpis()
-@Provider
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.IIOServiceProvider
-
-# private void registerInstalledProviders()
-@Provider
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageReaderSpi
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageWriterSpi
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageReaderWriterSpi
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageTranscoderSpi
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageInputStreamSpi
-  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageOutputStreamSpi
-
-# public javax.naming.ldap.ExtendedResponse createExtendedResponse(java.lang.String, byte[], int, int)
-@Provider
-  javax.naming.ldap.StartTlsRequest -> META-INF/services/javax.naming.ldap.StartTlsResponse
-
-# private static java.util.ArrayList getAllLookupServices()
-@Provider
-  javax.print.PrintServiceLookup -> META-INF/services/javax.print.PrintServiceLookup
-
-# private static java.util.ArrayList getAllFactories()
-@Provider
-  javax.print.StreamPrintServiceFactory -> META-INF/services/javax.print.StreamPrintServiceFactory
-
-# private void initEngines(java.lang.ClassLoader)
-@Provider
-  javax.script.ScriptEngineManager -> META-INF/services/javax.script.ScriptEngineFactory
-
-# private void initializeInputMethodLocatorList()
-@Provider
-  sun.awt.im.ExecutableInputMethodManager -> META-INF/services/java.awt.im.spi.InputMethodDescriptor
-
-# private static java.lang.Class getConverterClass(int, java.lang.String)
-@ClassForName(optional)
-  sun.io.Converters -> sun.io.*
-
-# public static sun.java2d.cmm.PCMM getModule()
-@Provider
-  sun.java2d.cmm.CMSManager -> META-INF/services/sun.java2d.cmm.PCMM
-
-# public static sun.java2d.pipe.RenderingEngine getInstance()
-@Provider
-  sun.java2d.pipe.RenderingEngine -> META-INF/services/sun.java2d.pipe.RenderingEngine
-
-# public static sun.java2d.pipe.RenderingEngine getInstance()
-@ClassForName(optional)
-  sun.java2d.pipe.RenderingEngine -> sun.dc.DuctusRenderingEngine
-
-# sun.misc.FloatingDecimal
-@Inline
-  sun.misc.FloatingDecimal -> sun.misc.FloatConsts
-  sun.misc.FloatingDecimal -> sun.misc.DoubleConsts
-
-# sun.misc.FormattedFloatingDecimal
-@Inline
-  sun.misc.FormattedFloatingDecimal -> sun.misc.FloatConsts
-  sun.misc.FormattedFloatingDecimal -> sun.misc.DoubleConsts
-
-# sun.misc.FpUtils
-@Inline
-  sun.misc.FpUtils -> sun.misc.FloatConsts
-  sun.misc.FpUtils -> sun.misc.DoubleConsts
-
-# public java.net.URLStreamHandler createURLStreamHandler(java.lang.String)
-@ClassForName(optional)
-  sun.misc.Launcher$Factory -> sun.net.www.protocol.*.Handler
-
-# private static sun.net.NetHooks$Provider loadProvider(java.lang.String)
-@ClassForName(optional)
-  sun.net.NetHooks -> sun.net.spi.SdpProvider
-
-# sun.net.idn.StringPrep
-@Inline
-  sun.net.idn.StringPrep -> sun.net.idn.UCharacterDirection
-
-# private static boolean init()
-@NativeFindClass
-  sun.net.spi.DefaultProxySelector -> java.net.Proxy
-  sun.net.spi.DefaultProxySelector -> java.net.Proxy$Type
-  sun.net.spi.DefaultProxySelector -> java.net.InetSocketAddress
-
-# private static java.nio.channels.Channel createChannel()
-@ClassForName
-  sun.nio.ch.InheritedChannel -> java.io.FileDescriptor
-
-# private static void initDBBConstructor()
-@ClassForName
-  sun.nio.ch.Util -> java.nio.DirectByteBuffer
-
-# private static void initDBBRConstructor()
-@ClassForName
-  sun.nio.ch.Util -> java.nio.DirectByteBufferR
-
-# private java.nio.charset.Charset lookup(java.lang.String)
-@ClassForName(optional)
-  sun.nio.cs.FastCharsetProvider -> sun.nio.cs.*
-
-# sun.nio.cs.ext.ExtendedCharsets
-@ClassForName(optional)
-  sun.nio.cs.ext.ExtendedCharsets -> sun.nio.cs.ext.*
-
-# sun.nio.cs.ext.ExtendedCharsets
-@ClassForName(optional)
-  sun.nio.cs.ext.ExtendedCharsets -> sun.nio.cs.ext.*
-
-# public static java.nio.file.spi.FileSystemProvider create()
-@ClassForName
-  sun.nio.fs.DefaultFileSystemProvider -> sun.nio.fs.SolarisFileSystemProvider
-  sun.nio.fs.DefaultFileSystemProvider -> sun.nio.fs.LinuxFileSystemProvider
-
-# sun.rmi.server.MarshalInputStream
-@ClassForName
-  sun.rmi.server.MarshalInputStream -> sun.rmi.server.Activation$ActivationSystemImpl_Stub
-  sun.rmi.server.MarshalInputStream -> sun.rmi.registry.RegistryImpl_Stub
-
-# private java.security.Provider doLoadProvider()
-@ClassForName(optional)
-  sun.security.jca.ProviderConfig -> sun.security.pkcs11.SunPKCS11
-  sun.security.jca.ProviderConfig -> sun.security.provider.Sun
-  sun.security.jca.ProviderConfig -> sun.security.rsa.SunRsaSign
-  sun.security.jca.ProviderConfig -> sun.security.ec.SunEC
-  sun.security.jca.ProviderConfig -> com.sun.net.ssl.internal.ssl.Provider
-  sun.security.jca.ProviderConfig -> com.sun.crypto.provider.SunJCE
-  sun.security.jca.ProviderConfig -> sun.security.jgss.SunProvider
-  sun.security.jca.ProviderConfig -> com.sun.security.sasl.Provider
-  sun.security.jca.ProviderConfig -> org.jcp.xml.dsig.internal.dom.XMLDSigRI
-  sun.security.jca.ProviderConfig -> sun.security.smartcardio.SunPCSC
-  sun.security.jca.ProviderConfig -> sun.security.mscapi.SunMSCAPI
-
-# public static java.security.Provider getSunProvider()
-@ClassForName
-  sun.security.jca.Providers -> sun.security.provider.Sun
-  sun.security.jca.Providers -> sun.security.provider.VerificationProvider
-
-# private static sun.security.jgss.spi.MechanismFactory getMechFactoryImpl(java.security.Provider, java.lang.String, org.ietf.jgss.Oid, sun.security.jgss.GSSCaller)
-@ClassForName
-  sun.security.jgss.ProviderList -> sun.security.jgss.spi.MechanismFactory
-
-# sun.security.jgss.wrapper.SunNativeProvider
-@NativeFindClass
-  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.Oid
-  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.GSSException
-  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.GSSNameElement
-  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.GSSCredElement
-  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.NativeGSSContext
-  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.SunNativeProvider
-  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.MessageProp
-  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.ChannelBinding
-  sun.security.jgss.wrapper.SunNativeProvider -> java.net.InetAddress
-  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.GSSLibStub
-
-# static void ensureLoaded()
-@NativeFindClass
-  sun.security.krb5.Credentials -> sun.security.krb5.internal.Krb5
-  sun.security.krb5.Credentials -> sun.security.krb5.internal.Ticket
-  sun.security.krb5.Credentials -> sun.security.krb5.PrincipalName
-  sun.security.krb5.Credentials -> sun.security.util.DerValue
-  sun.security.krb5.Credentials -> sun.security.krb5.EncryptionKey
-  sun.security.krb5.Credentials -> sun.security.krb5.internal.TicketFlags
-  sun.security.krb5.Credentials -> sun.security.krb5.internal.KerberosTime
-
-# public static java.lang.String getDefaultCacheName()
-@ClassForName(optional)
-  sun.security.krb5.internal.ccache.FileCredentialsCache -> com.sun.security.auth.module.UnixSystem
-
-# sun.security.pkcs.PKCS9Attribute
-@ClassForName
-  sun.security.pkcs.PKCS9Attribute -> sun.security.util.ObjectIdentifier
-  sun.security.pkcs.PKCS9Attribute -> java.util.Date
-  sun.security.pkcs.PKCS9Attribute -> sun.security.pkcs.SignerInfo
-  sun.security.pkcs.PKCS9Attribute -> sun.security.x509.CertificateExtensions
-
-# protected T engineGetKeySpec(java.security.Key, java.lang.Class<T>)
-@ClassForName
-  sun.security.provider.DSAKeyFactory -> java.security.spec.DSAPublicKeySpec
-  sun.security.provider.DSAKeyFactory -> java.security.spec.X509EncodedKeySpec
-  sun.security.provider.DSAKeyFactory -> java.security.spec.DSAPrivateKeySpec
-  sun.security.provider.DSAKeyFactory -> java.security.spec.PKCS8EncodedKeySpec
-
-# protected T engineGetParameterSpec(java.lang.Class<T>)
-@ClassForName
-  sun.security.provider.DSAParameters -> java.security.spec.DSAParameterSpec
-
-# sun.security.provider.VerificationProvider
-@ClassForName(optional)
-  sun.security.provider.VerificationProvider -> sun.security.provider.Sun
-  sun.security.provider.VerificationProvider -> sun.security.rsa.SunRsaSign
-
-# sun.security.provider.certpath.URICertStore$LDAP
-@ClassForName(optional)
-  sun.security.provider.certpath.URICertStore$LDAP -> sun.security.provider.certpath.ldap.LDAPCertStoreHelper
-
-# sun.security.smartcardio.PCSC
-@NativeFindClass
-  sun.security.smartcardio.PCSC -> sun.security.smartcardio.PCSCException
-
-# sun.security.ssl.HandshakeMessage
-@ClassForName
-  sun.security.ssl.HandshakeMessage -> java.security.MessageDigest$Delegate
-
-# sun.security.ssl.JsseJce
-@ClassForName(optional)
-  sun.security.ssl.JsseJce -> sun.security.krb5.PrincipalName
-
-# sun.security.x509.OIDMap$OIDInfo
-@ClassForName
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.SubjectKeyIdentifierExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.KeyUsageExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.PrivateKeyUsageExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.SubjectAlternativeNameExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.IssuerAlternativeNameExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.BasicConstraintsExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CRLNumberExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CRLReasonCodeExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.NameConstraintsExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.PolicyMappingsExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.AuthorityKeyIdentifierExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.PolicyConstraintsExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.NetscapeCertTypeExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CertificatePoliciesExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.ExtendedKeyUsageExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.InhibitAnyPolicyExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CRLDistributionPointsExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CertificateIssuerExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.SubjectInfoAccessExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.AuthorityInfoAccessExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.IssuingDistributionPointExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.DeltaCRLIndicatorExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.FreshestCRLExtension
-  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.OCSPNoCheckExtension
-
-# sun.util.LocaleServiceProviderPool$AllAvailableLocales
-@Provider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.BreakIteratorProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.CollatorProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.DateFormatProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.DateFormatSymbolsProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.DecimalFormatSymbolsProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.NumberFormatProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.util.spi.CurrencyNameProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.util.spi.LocaleNameProvider
-  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.util.spi.TimeZoneNameProvider
-
-# private static final java.lang.String[] retrieveDisplayNames(sun.util.resources.OpenListResourceBundle, java.lang.String, java.util.Locale)
-@Provider
-  sun.util.TimeZoneNameUtility -> META-INF/services/java.util.spi.TimeZoneNamePProvider
-
-# public static sun.util.calendar.CalendarSystem forName(java.lang.String)
-@ClassForName
-  sun.util.calendar.CalendarSystem -> sun.util.calendar.Gregorian
-  sun.util.calendar.CalendarSystem -> sun.util.calendar.LocalGregorianCalendar
-  sun.util.calendar.CalendarSystem -> sun.util.calendar.JulianCalendar
-
-# sun.util.logging.LoggingSupport
-@ClassForName(optional)
-  sun.util.logging.LoggingSupport -> java.util.logging.LoggingProxyImpl
--- a/make/modules/modules.config	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,928 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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.
- */
-
-// These classes are not referenced in the JDK but we can't
-// remove them for compatibility reason.  Define this module
-// first so that other modules don't need to exclude these clases
-module private-legacy {
-    include sun.misc.Cache*,
-            sun.misc.ClassLoaderUtil,
-            sun.misc.Compare,
-            sun.misc.ConditionLock,
-            sun.misc.CRC16,
-            sun.misc.Lock,
-            sun.misc.Regexp,
-            sun.misc.RequestProcessor,
-            sun.misc.Sort,
-            sun.misc.Request,
-            sun.misc.Timeable,
-            sun.misc.Timer,
-            sun.misc.TimerThread,
-            sun.misc.TimerTickThread,
-            sun.misc.UCDecoder,
-            sun.misc.UCEncoder,
-            sun.misc.UUDecoder,
-            sun.misc.UUEncoder,
-            com.sun.net.ssl.SSLContext,
-            sun.net.NetworkServer,
-            sun.net.URLCanonicalizer,
-            sun.reflect.misc.ConstructorUtil,
-            sun.reflect.FieldInfo,
-            sun.reflect.SignatureIterator,
-            sun.reflect.generics.reflectiveObjects.NotImplementedException,
-            sunw.io.Serializable,
-            sunw.util.EventListener,
-            sunw.util.EventObject;
-}
-
-// Deprecated classes that aren't referenced/used go here.
-module deprecated {
-    // add deprecated security classes once b78 is promoted
-}
-
-/**************************************************************************/
-
-module base {
-    // core classes
-    include java.lang.*,
-            java.lang.annotation.*,
-            java.lang.ref.*,
-            java.lang.reflect.*,
-            java.math.*,
-            java.net.*,
-            java.util.*,
-            java.util.concurrent.**,
-            java.util.jar.*,
-            java.util.regex.*,
-            java.util.spi.*,
-            java.util.zip.*,
-            java.text.**;
-
-    exclude java.util.jar.Pack200*,
-            java.util.XMLUtils,
-            java.text.Bidi;
-
-    include java.io.*, java.nio.*, java.nio.charset.**;
-    exclude java.io.TempFileHelper, java.nio.BufferPoolMXBean;
-
-    // security APIs
-    // javax.crypto and javax.security.auth are included to avoid inconsistent
-    // spliting of JCA and JAAS. This adds about 85k. Also note that some deprecated
-    // classes must be included for now (see 6876158, 6876170)
-    include java.security.*,
-            java.security.cert.*,
-            java.security.interfaces.*,
-            java.security.spec.*,
-            javax.security.auth.**,
-            javax.crypto.**;
-
-    // Sun and RSA security providers (except LDAP CertStore)
-    // roots sun.security.provider.* sun.security.provider.certpath.* sun.security.rsa.*
-    include com.sun.security.auth.PrincipalComparator,
-            com.sun.security.auth.SubjectCodeSource,
-            com.sun.security.auth.login.**,
-            com.sun.security.auth.Policy*,
-            sun.security.action.*,
-            sun.security.ec.*,
-            sun.security.jca.*,
-            sun.security.pkcs.*,
-            sun.security.provider.*,
-            sun.security.provider.certpath.*,
-            sun.security.rsa.*,
-            sun.security.util.*,
-            sun.security.validator.*,
-            sun.security.x509.*,
-            sun.security.timestamp.*;
-
-    // this list is based on the classlist generated from the rootset
-    // need investigation
-    exclude sun.security.ec.ECD*,
-            sun.security.ec.ECKeyPairGenerator,
-            sun.security.ec.SunEC*,
-            sun.security.pkcs.PKCS10*,
-            sun.security.pkcs.EncodingException,
-            sun.security.util.AuthResources_*,
-            sun.security.util.Resources_*,
-            sun.security.util.BigInt,
-            sun.security.util.HostnameChecker,
-            sun.security.x509.CertAndKeyGen,
-            sun.security.util.PathList;
-
-    // Kerberos not needed
-    exclude javax.security.auth.kerberos.**,
-            sun.security.jgss.**,
-            sun.security.krb5.**,
-            sun.security.ssl.Kerberos*,
-            org.ietf.jgss.**;
-
-   // property events and annotations
-   include java.beans.ChangeListenerMap,
-           java.beans.IndexedPropertyChangeEvent,
-           java.beans.PropertyChange*,
-           java.beans.PropertyVetoException,
-           java.beans.VetoableChange*,
-           java.beans.ConstructorProperties;
-
-    // mandatory charsets
-    include sun.nio.cs.*;
-
-    exclude sun.nio.cs.AbstractCharsetProvider,
-            sun.nio.cs.CharsetMapping,
-            sun.nio.cs.IBM*,
-            sun.nio.cs.ISO*,
-            sun.nio.cs.KOI8_*,
-            sun.nio.cs.MS125*,
-            sun.nio.cs.UTF_32*,
-            sun.nio.cs.SingleByteDecoder,
-            sun.nio.cs.SingleByteEncoder;
-
-    allow   sun.nio.cs.ISO_8859_1,
-            sun.nio.cs.ISO_8859_15,
-            sun.nio.cs.MS1252;
-
-    include sun.text.*,
-            sun.text.normalizer.*;
-
-    // resource files
-    include sun/text/resources/*.icu;
-
-    exclude sun.text.bidi.*,
-            sun.text.CharArrayCodePointIterator,
-            sun.text.CharSequenceCodePointIterator,
-            sun.text.CharacterIteratorCodePointIterator,
-            sun.text.CodePointIterator;
-
-    include sun.util.*,
-            sun.util.calendar.*,
-            sun.util.logging.*,
-            sun.util.resources.LocaleData,
-            sun.util.resources.LocaleNamesBundle,
-            sun.util.resources.OpenListResourceBundle;
-
-    // US_en locale
-    include sun.text.resources.BreakIteratorInfo,
-            sun.text.resources.FormatData,
-            sun.text.resources.FormatData_en_US,
-            sun.util.resources.CalendarData,
-            sun.util.resources.CalendarData_en,
-            sun.util.resources.TimeZoneNames,
-            sun.util.resources.TimeZoneNames_en,
-            sun.util.resources.TimeZoneNamesBundle,
-            sun.util.resources.LocaleNames,
-            sun.util.resources.LocaleNames_en,
-            sun.util.resources.LocalenamesBundles,
-            sun.util.resources.CurrencyNames,
-            sun.util.resources.CurrencyNames_en_US,
-            sun.util.EmptyListResourceBundle;
-
-    // resources file needed by
-    // - sun.misc.ExtensionInfo
-    // - sun.security.provider.PolicyFile
-    // - com.sun.security.auth.PolicyFile
-    include sun.misc.resources.Messages,
-            sun.security.util.Resources,
-            sun.security.util.AuthResources;
-
-    // java.nio.channels and java.nio.file not in base
-    include sun.nio.ch.Interruptible,
-            sun.nio.ch.DirectBuffer,
-            sun.nio.ByteBuffered;
-
-    include sun.reflect.**;
-
-    // protocol handlers
-    include sun.net.www.protocol.file.*,
-            sun.net.www.protocol.jar.*,
-            sun.net.www.protocol.http.*;
-
-    include sun.net.*,
-            sun.net.spi.*,
-            sun.net.idn.*,
-            sun.net.util.*,
-            sun.net.www.*,
-            sun.net.www.http.*,
-            sun.net.spi.nameservice.*;
-
-    // resource file for sun.net.idn
-    include sun/net/idn/*;
-
-    // classes in net-compat
-    exclude sun.net.Telnet*, sun.net.TransferProtocolClient;
-
-    // classes in deploy
-    exclude sun.net.www.protocol.http.AuthCacheBridge;
-
-    // classes in security-jsse
-    exclude java.net.SecureCacheResponse;
-
-    // launcher
-    include sun.launcher.LauncherHelper, sun.launcher.resources.launcher;
-
-    include sun.misc.*;
-    exclude sun.misc.FIFOQueueEnumerator,
-            sun.misc.LIFOQueueEnumerator,
-            sun.misc.GC,
-            sun.misc.PerformanceLogger,
-            sun.misc.Queue,
-            sun.misc.QueueElement,
-            sun.misc.Ref,
-            sun.misc.VMSupport;
-
-    // On Windows, OSEnvironment dependency
-    include sun.io.Win32ErrorMode;
-}
-
-/**************************************************************************/
-
-module charsets {
-    include sun.nio.cs.ext.**;
-
-    include sun.nio.cs.AbstractCharsetProvider,
-            sun.nio.cs.CharsetMapping,
-            sun.nio.cs.IBM*,
-            sun.nio.cs.ISO*,
-            sun.nio.cs.KOI8_*,
-            sun.nio.cs.MS125*,
-            sun.nio.cs.SingleByte*,
-            sun.nio.cs.UTF_32*;
-
-    exclude sun.nio.cs.ISO_8859_1,
-            sun.nio.cs.MS1252;
-
-    // legacy sun.io converters
-    include sun.io.*;
-}
-
-/**************************************************************************/
-
-// For now, retains the current JRE extensions where localedata.jar in jre/lib/ext 
-module localedata {
-    include sun.util.resources.*_ar,
-            sun.util.resources.*_ar_*,
-            sun.util.resources.*_hi,
-            sun.util.resources.*_hi_*,
-            sun.util.resources.*_iw,
-            sun.util.resources.*_iw_*,
-            sun.util.resources.*_ja,
-            sun.util.resources.*_ja_*,
-            sun.util.resources.*_ko,
-            sun.util.resources.*_ko_*,
-            sun.util.resources.*_th,
-            sun.util.resources.*_th_*,
-            sun.util.resources.*_vi,
-            sun.util.resources.*_vi_*,
-            sun.util.resources.*_zh,
-            sun.util.resources.*_zh_*;
-    include sun.text.resources.*_ar,
-            sun.text.resources.*_ar_*,
-            sun.text.resources.*_hi,
-            sun.text.resources.*_hi_*,
-            sun.text.resources.*_iw,
-            sun.text.resources.*_iw_*,
-            sun.text.resources.*_ja,
-            sun.text.resources.*_ja_*,
-            sun.text.resources.*_ko,
-            sun.text.resources.*_ko_*,
-            sun.text.resources.*_th,
-            sun.text.resources.*_th_*,
-            sun.text.resources.*_vi,
-            sun.text.resources.*_vi_*,
-            sun.text.resources.*_zh,
-            sun.text.resources.*_zh_*;
-}
-
-module resources {
-    include sun.text.resources.*, sun.util.resources.*, sun.misc.resources.*;
-}
-
-/**************************************************************************/
-
-module nio {
-    include java.nio.channels.**, java.nio.file.**, com.sun.nio.file.**;
-
-    // this is excluded from base
-    include java.io.TempFileHelper;
-
-    // provider implementations and their dependencies
-    include sun.nio.ch.*, sun.nio.fs.**;
-    exclude sun.nio.ch.Sctp*;
-}
-
-/**************************************************************************/
-
-module pack200 {
-    include java.util.jar.Pack200*, com.sun.java.util.jar.pack.**;
-}
-
-/**************************************************************************/
-
-module logging {
-    include java.util.logging.*, sun.util.logging.**;
-    exclude java.util.logging.PlatformLoggingMXBean;
-
-    // Formatter for HTTP messages
-    include sun.net.www.protocol.http.logging.*;
-}
-
-/**************************************************************************/
-
-module management-snmp {
-    include com.sun.jmx.snmp.**, sun.management.snmp.**;
-}
-
-module management-iiop {
-    include com.sun.jmx.remote.protocol.iiop.*;
-
-    // stubs and ties
-    include javax.management.remote.rmi._*,
-            org.omg.stub.javax.management.remote.rmi.**;
-}
-
-module management {
-    include java.lang.management.*, com.sun.management.**, sun.management.**;
-    include javax.management.**, com.sun.jmx.**;
-
-    // other management interfaces
-    include java.nio.BufferPoolMXBean;
-    include java.util.logging.PlatformLoggingMXBean;
-
-    // supporting classes in sun.misc
-    include sun.misc.VMSupport;
-}
-
-/**************************************************************************/
-
-module tracing {
-    // tracing
-    include com.sun.tracing.**, sun.tracing.**;
-}
-
-module instrument {
-    // java.lang.instrument
-    include java.lang.instrument.*, sun.instrument.*;
-
-    // HPROF support
-    include com.sun.demo.jvmti.hprof.*;
-
-    include tracing;
-}
-
-/**************************************************************************/
-
-module rmi-activation {
-    include java.rmi.activation.**,
-            sun.rmi.server.Act*,
-            sun.rmi.server.InactiveGroupException;
-}
-
-module rmic {
-    // rmic is included in tools
-    include sun.rmi.rmic.**;
-}
-
-module rmi {
-    include java.rmi.**, sun.rmi.**, com.sun.rmi.**;
-
-    // SSL factories are in rmi
-    include javax.rmi.ssl.**;
-
-    // supporting classes in sun.misc and dependencies
-    include sun.misc.GC;
-}
-
-/**************************************************************************/
-
-module prefs {
-    include java.util.prefs.*;
-}
-
-/**************************************************************************/
-
-module security-jsse {
-    include javax.net.**,
-            javax.security.cert.*,
-            java.net.SecureCacheResponse,
-            com.sun.net.ssl.**,
-            com.sun.security.cert.internal.x509.*,
-            sun.security.ssl.*,
-            sun.net.www.protocol.https.**,
-            sun.security.internal.interfaces.Tls*,
-            sun.security.internal.spec.Tls*,
-            sun.security.util.HostnameChecker;
-}
-
-module security-sunpkcs11 {
-    include sun.security.pkcs11.**;
-}
-
-module security-sunjce {
-    include com.sun.crypto.provider.*;
-}
-
-module security-sunec {
-    include sun.security.ec.*;
-}
-
-module security-sunmscapi {
-    include sun.security.mscapi.*;
-}
-
-module security-kerberos {
-    include javax.security.auth.kerberos.*,
-            com.sun.security.jgss.**,
-            com.sun.security.auth.module.Krb5LoginModule,
-            com.sun.security.sasl.gsskerb.**,             // GSSAPI SASL mechanism
-            sun.security.jgss.**,
-            sun.security.ssl.krb5.**,
-            sun.security.krb5.**,
-            org.ietf.jgss.**,
-            sun.net.www.protocol.http.spnego.*;
-}
-
-module security-sasl {
-    include javax.security.sasl.**,
-            com.sun.security.sasl.**;
-}
-
-module security-xmldsig {
-    include javax.xml.crypto.**,
-            org.jcp.xml.dsig.**,
-            com.sun.org.apache.xml.internal.security.**;
-}
-
-module security-smartcardio {
-    include javax.smartcardio.**, sun.security.smartcardio.**;
-}
-
-module security-auth {
-    include com.sun.security.auth.**, sun.security.util.AuthResources_*;
-}
-
-module security-misc {
-    include security-auth;
-
-    include sun.security.pkcs.*,
-            sun.security.pkcs12.*;
-
-    // this class is a candidate to be removed.
-    include sun.security.util.BigInt;
-}
-
-module security-resources {
-    include sun.security.util.Resources_*;
-}
-
-module security-compat {
-    include java.security.acl.*, sun.security.acl.*;
-}
-
-/**************************************************************************/
-
-module jndi-ldap {
-    include javax.naming.ldap.**,
-            com.sun.jndi.ldap.**,
-            com.sun.jndi.url.ldap.*,
-            com.sun.jndi.url.ldaps.*,
-            sun.security.provider.certpath.ldap.**;
-}
-
-module jndi-rmiregistry {
-    include com.sun.jndi.rmi.**, com.sun.jndi.url.rmi.**;
-}
-
-module jndi-dns {
-    include net-dns;
-    include com.sun.jndi.dns.**, com.sun.jndi.url.dns.**;
-}
-
-module jndi-cosnaming {
-    include com.sun.jndi.cosnaming.**,
-            com.sun.jndi.toolkit.corba.**,
-            com.sun.jndi.url.corbaname.**,
-            com.sun.jndi.url.iiop.**,
-            com.sun.jndi.url.iiopname.**;
-}
-
-// framework/API and classes used by providers
-module jndi {
-    include javax.naming.**,
-            com.sun.naming.**,
-            com.sun.jndi.toolkit.ctx.**,
-            com.sun.jndi.toolkit.dir.**,
-            com.sun.jndi.toolkit.url.**;
-}
-
-/**************************************************************************/
-
-module jdbc-base {
-    include java.sql.**, javax.sql.*;
-    exclude javax.sql.XA*;
-}
-
-module jdbc-enterprise {
-    include javax.sql.**, com.sun.rowset.**;
-}
-
-module jdbc-odbc {
-    include sun.jdbc.odbc.**;
-}
-
-/**************************************************************************/
-
-module scripting {
-    include javax.script.**;
-
-    // supporting classes for scripting engines
-    include com.sun.script.util.**;
-}
-
-module scripting-rhino {
-    include com.sun.script.javascript.**, sun.org.mozilla.javascript.**;
-}
-
-/**************************************************************************/
-
-module httpserver {
-    include com.sun.net.httpserver.**, sun.net.httpserver.**;
-}
-
-/**************************************************************************/
-
-module sctp {
-    // API and dependencies
-    include com.sun.nio.sctp.**, sun.nio.ch.Sctp*;
-}
-
-/**************************************************************************/
-
-module langtools {
-    include javax.tools.**, javax.lang.model.**, javax.annotation.processing.**;
-
-    // include mirror API for now
-    include com.sun.mirror.**;
-
-    // include the JSR292 APIs for now
-    include java.dyn.**, sun.dyn.**;
-}
-
-/**************************************************************************/
-
-module beans {
-    include java.beans.**, com.sun.beans.**, sun.beans.**;
-}
-
-/**************************************************************************/
-
-module jaxp-parsers-api {
-    include javax.xml.*, javax.xml.parsers.**,
-            org.w3c.dom.**, org.w3c.sax.**, org.xml.sax.**;
-}
-
-module jaxp-api {
-    include javax.xml.**;
-    exclude javax.xml.crypto.**,   // XML-DSIG
-            javax.xml.bind.**,     // JAX-WS
-            javax.xml.soap.**,
-            javax.xml.ws.**;
-}
-
-module jaxp-xerces-impl {
-    include com.sun.org.apache.xerces.internal.**;
-
-    // include in xerces-impl due to circular dependencies
-    include com.sun.org.apache.xml.internal.serialize.**,
-            com.sun.xml.internal.stream.**;
-    exclude com.sun.xml.internal.stream.buffer.**;  // JAX-WS
-}
-
-// required by Xerces and JAX-WS
-module jaxp-xerces-resolver {
-    include com.sun.org.apache.xml.internal.resolver.**;
-}
-
-module jaxp-xalan {
-    include com.sun.org.apache.xalan.internal.**,
-            com.sun.org.apache.xpath.internal.**,
-            com.sun.org.apache.xml.internal.dtm.**,
-            com.sun.org.apache.xml.internal.res.**,
-            com.sun.org.apache.xml.internal.serializer.**,
-            com.sun.org.apache.xml.internal.utils.**,
-            com.sun.org.apache.bcel.internal.**,
-            com.sun.org.apache.regexp.internal.**,
-            com.sun.java_cup.internal.**;
-}
-
-/**************************************************************************/
-
-module jaxws-tools {
-    include com.sun.codemodel.**,
-            com.sun.xml.internal.dtdparser.**,
-            com.sun.xml.internal.rngom.**,
-            com.sun.xml.internal.xsom.**,
-            com.sun.istack.internal.tools.**,
-            com.sun.istack.internal.ws.**,
-            com.sun.tools.internal.xjc.**,
-            com.sun.tools.internal.ws.**,
-            com.sun.tools.internal.jxc.**,
-            org.relaxng.datatype.**;
-}
-
-module jaxws {
-    include javax.jws.**,
-            javax.xml.bind.**,
-            javax.xml.soap.**,
-            javax.xml.ws.**,
-            org.relaxng.**,
-            com.sun.istack.internal.*,
-            com.sun.istack.internal.localization.*,
-            com.sun.xml.internal.**;
-
-    // include JAF in this module
-    include javax.activation.**, com.sun.activation.**;
-
-    include META-INF/mailcap.default,
-            META-INF/mimetypes.default;
-}
-
-/**************************************************************************/
-module enterprise-base {
-    include javax.transaction.**,  // JTA
-            javax.annotation.*;    // Common annotations (JSR-250)
-}
-
-/**************************************************************************/
-module corba {
-    include javax.activity.**,
-            javax.rmi.*,
-            javax.rmi.CORBA.*,
-            javax.transaction.**,
-            com.sun.corba.**,
-            com.sun.org.omg.**,
-            org.omg.**,
-            sun.corba.**;
-
-    // JMX remote API
-    exclude org.omg.stub.javax.management.**;
-}
-
-/**************************************************************************/
-
-module applet {
-    include java.applet.**,
-            sun.applet.**;
-}
-
-module awt {
-    include java.awt.**,
-            sun.awt.**,
-            com.sun.awt.**;
-}
-
-module font {
-    include sun.font.**;
-}
-
-module imageio {
-    include javax.imageio.**,
-            com.sun.imageio.**;
-}
-
-module java2d {
-    include sun.dc.**,
-            sun.java2d.**,
-            com.sun.image.**;
-}
-
-module media {
-    include com.sun.media.**;
-}
-
-module print {
-    include javax.print.**,
-            sun.print.**;
-}
-
-module sound {
-    include javax.sound.**;
-}
-
-module swing {
-    include javax.swing.**,
-            sun.swing.**,
-            // sajdi also contains classes in subpackages of com.sun.java.swing;
-            // so use '*' instead of '**' 
-            com.sun.java.swing.*,
-            com.sun.java.swing.plaf.**,
-            com.sun.swing.**;
-}
-
-module client {
-    include applet,
-            awt,
-            font,
-            imageio,
-            java2d,
-            media,
-            print,
-            sound,
-            swing;
-
-    include javax.accessibility.*,
-            sun.audio.**,
-            com.sun.accessibility.**;
-
-    // Bidi class in client module for now
-    include java.text.Bidi, sun.text.bidi.*;
-
-    // PerformanceLogger and dependencies
-    include sun.misc.Ref, sun.misc.PerformanceLogger;
-
-    // misc. dependencies that we need to examine
-    include sun.text.CodePointIterator,
-            sun.text.Char*,
-            sun.misc.Queue*,
-            sun.misc.FIFOQueueEnumerator,
-            sun.misc.LIFOQueueEnumerator;
-
-    // content handlers
-    include sun.net.www.content.audio.**,
-            sun.net.www.content.image.**;
-}
-
-/**************************************************************************/
-
-module deploy {
-
-    // For now, all plugin and JNLP
-    include com.sun.java.browser.**,
-            netscape.**,
-            sun.plugin.**,
-            sun.plugin2.**,,
-            com.sun.deploy.**,
-            com.sun.javaws.**,
-            javax.jnlp.*,
-            com.sun.jnlp.*;
-
-    // Hook for http authentication
-    include sun.net.www.protocol.http.AuthCacheBridge;
-}
-
-/**************************************************************************/
-
-module net-dns {
-    include sun.net.dns.**;                 // to access DNS config.
-    include sun.net.spi.nameservice.dns.**; // for DNS-only name service.
-}
-
-module net-compat {
-    // NTLM authentication support
-    include sun.net.www.protocol.http.ntlm.*;
-
-    // ftp and mail clients
-    include sun.net.ftp.**, sun.net.smtp.**;
-
-    // Legacy protocol handlers
-    include sun.net.www.protocol.**;
-
-    // Legacy content handlers
-    include sun.net.www.content.**;
-
-    include sun.net.Telnet*,
-            sun.net.TransferProtocolClient;
-}
-
-/**************************************************************************/
-
-// jar-tool and security-tools are JRE tools
-module jar-tool {
-    include sun.tools.jar.**;
-}
-
-module policytool {
-    include sun.security.tools.policytool.*;
-}
-
-module security-tools {
-    include sun.security.tools.**;
-
-    // Used by security tools
-    include sun.security.util.PathList, sun.security.x509.CertAndKeyGen;
-
-    exclude sun.security.tools.JarBASE64Encoder,
-            sun.security.tools.JarSigner,
-            sun.security.tools.JarSignerParameters,
-            sun.security.tools.JarSignerResources*,
-            sun.security.tools.SignatureFile,
-            sun.security.tools.TimestampedSigner;
-}
-
-module jconsole {
-    include sun.tools.jconsole.**,
-            com.sun.tools.jconsole.*;
-}
-
-module serialver {
-    include sun.tools.serialver.**;
-}
-
-module gui-tools {
-    include jconsole,
-            serialver;
-
-    include com.sun.tools.example.debug.bdi.**,
-            com.sun.tools.example.debug.gui.**,
-            com.sun.tools.internal.xjc.**;
-}
-
-module attach {
-    include com.sun.tools.attach.**,
-            sun.tools.attach.**;
-}
-
-module debugging {
-    include com.sun.jdi.**, com.sun.tools.jdi.**;
-}
-
-module jdb {
-    include com.sun.tools.example.debug.**;
-}
-
-module sajdi {
-    include sun.jvm.hotspot.**,
-            com.sun.java.swing.ui.**,
-            com.sun.java.swing.action.**;
-
-    include toolbarButtonGraphics/**;
-    include sa.properties;
-}
-
-module tools {
-    include attach,
-            debugging,
-            jaxws-tools,
-            jdb,
-            rmic,
-            sajdi;
-
-    // include gui-tools in tools module unless the tool binaries
-    // are modified to load the new gui-tools.jar
-    include gui-tools;
-
-    include com.sun.tools.**, sun.tools.**, sun.security.tools.**,
-            com.sun.jarsigner.**,
-            com.sun.javac.**,
-            com.sun.javadoc.**, com.sun.source.**,
-            sun.jvmstat.**;
-}
-
-/**************************************************************************/
-
-module servicetag {
-    include com.sun.servicetag.**;
-}
-
-/**************************************************************************/
-
-// these classes will be removed from JRE - see 6909002
-module inputmethods-ext {
-    include com.sun.inputmethods.internal.**;
-}
-
-/**************************************************************************/
-
-// Workaround for US export and local policy files 
-// They are currently in signed jars under the jre/lib/security directory
-module US_export_policy {
-    include default_US_export.policy;
-}
-
-module local_policy {
-    include default_local.policy,
-            exempt_local.policy;
-}
-
-/**************************************************************************/
-
-module other {
-    include **;
-}
--- a/make/modules/modules.group	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2009, 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.
- */
-
-/*
- * Example:
- *    module jdbc {
- *        include jdbc-base, jdbc-enterprise, jdbc-odbc;
- *    }
- */
--- a/make/modules/optional.depconfig	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-#
-# Copyright (c) 2009, 2010, 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.
-#
-
-# public final java.nio.channels.SocketChannel getChannel()
-@Optional
-  sun.security.ssl.BaseSSLSocketImpl -> java.nio.channels.SocketChannel
-
-# public XMLDecoder(java.io.InputStream)
-# public XMLDecoder(java.io.InputStream, java.lang.Object)
-# public XMLDecoder(java.io.InputStream, java.lang.Object, java.beans.ExceptionListener)
-# public XMLDecoder(java.io.InputStream, java.lang.Object, java.beans.ExceptionListener, java.lang.ClassLoader)
-# public XMLDecoder(org.xml.sax.InputSource)
-@Optional
-  java.beans.XMLDecoder -> com.sun.beans.decoder.DocumentHandler
-  java.beans.XMLDecoder -> org.xml.sax.InputSource
-
-# public static org.xml.sax.helpers.DefaultHandler createHandler(java.lang.Object, java.beans.ExceptionListener, java.lang.ClassLoader)
-@Optional
-  java.beans.XMLDecoder -> com.sun.beans.decoder.DocumentHandler
-  java.beans.XMLDecoder -> org.xml.sax.helpers.DefaultHandler
-
-# public final java.nio.channels.FileChannel getChannel()
-@Optional
-  java.net.SocketInputStream -> java.nio.channels.FileChannel
-
-# public final java.nio.channels.FileChannel getChannel()
-@Optional
-  java.net.SocketOutputStream -> java.nio.channels.FileChannel
-
-# public Scanner(java.io.File)
-# public Scanner(java.io.File, java.lang.String)
-@Optional
-  java.util.Scanner -> java.nio.channels.ReadableByteChannel
-  java.util.Scanner -> java.nio.channels.Channels
-
-# public Scanner(java.nio.file.FileRef)
-# public Scanner(java.nio.file.FileRef, java.lang.String)
-@Optional
-  java.util.Scanner -> java.nio.file.FileRef
-  java.util.Scanner -> java.nio.file.OpenOption
-
-# public Scanner(java.nio.channels.ReadableByteChannel)
-# public Scanner(java.nio.channels.ReadableByteChannel, java.lang.String)
-@Optional
-  java.util.Scanner -> java.nio.channels.ReadableByteChannel
-  java.util.Scanner -> java.nio.channels.Channels
-
-# private static void loadSnmpAgent(java.lang.String, java.util.Properties)
-@Optional
-  sun.management.Agent -> sun.management.snmp.AdaptorBootstrap
-
-# public void connect()
-@Optional
-  sun.net.www.protocol.http.HttpURLConnection -> java.net.SecureCacheResponse
-
-# private static sun.security.util.PermissionFactory<?> permissionFactory()
-@Optional
-  sun.security.util.SecurityConstants$AWT -> sun.awt.AWTPermissionFactory
-
-# sun.util.logging.LoggingSupport
-@Optional
-  sun.util.logging.LoggingSupport -> java.util.logging.LoggingProxyImpl
-
-# public java.nio.channels.DatagramChannel getChannel()
-@Optional
-  java.net.DatagramSocket -> java.nio.channels.DatagramChannel
-
-# public java.nio.channels.SocketChannel getChannel()
-@Optional
-  java.net.Socket -> java.nio.channels.SocketChannel
-
-# public java.nio.channels.ServerSocketChannel getChannel()
-@Optional
-  java.net.ServerSocket -> java.nio.channels.ServerSocketChannel
-
-# public final java.nio.channels.FileChannel getChannel()
-@Optional
-  java.io.RandomAccessFile -> java.nio.channels.FileChannel
-  java.io.RandomAccessFile -> sun.nio.ch.FileChannelImpl
-
-# public static sun.nio.cs.StreamDecoder forDecoder(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int)
-@Optional
-  sun.nio.cs.StreamDecoder -> java.nio.channels.ReadableByteChannel
-
-# private static java.nio.channels.FileChannel getChannel(java.io.FileInputStream)
-# StreamDecoder(java.io.InputStream, java.lang.Object, java.nio.charset.CharsetDecoder)
-@Optional
-  sun.nio.cs.StreamDecoder -> java.nio.channels.FileChannel
-
-# StreamDecoder(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int)
-@Optional
-  sun.nio.cs.StreamDecoder -> java.nio.channels.ReadableByteChannel
-
-# public static java.io.File createTemporaryFile(java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute<?>[])
-@Optional
-  java.io.File -> java.io.TempFileHelper
-  java.io.File -> java.nio.file.attribute.FileAttribute
-
-# public java.nio.file.Path toPath()
-@Optional
-  java.io.File -> java.nio.file.Paths
-  java.io.File -> java.nio.file.Path
-
-# public static sun.nio.cs.StreamEncoder forEncoder(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int)
-# private StreamEncoder(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int)
-@Optional
-  sun.nio.cs.StreamEncoder -> java.nio.channels.WritableByteChannel
-
-# public java.nio.channels.FileChannel getChannel()
-@Optional
-  java.io.FileOutputStream -> java.nio.channels.FileChannel
-  java.io.FileOutputStream -> sun.nio.ch.FileChannelImpl
-
-# public java.nio.channels.FileChannel getChannel()
-@Optional
-  java.io.FileInputStream -> java.nio.channels.FileChannel
-  java.io.FileInputStream -> sun.nio.ch.FileChannelImpl
-
-# public void loadFromXML(java.io.InputStream)
-# public void storeToXML(java.io.OutputStream, java.lang.String, java.lang.String)
-@Optional
-  java.util.Properties -> java.util.XMLUtils
-
-# public static java.nio.channels.Channel inheritedChannel()
-@Optional
-  java.lang.System -> java.nio.channels.Channel
-  java.lang.System -> java.nio.channels.spi.SelectorProvider
--- a/make/modules/tools/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-#
-# Copyright (c) 2009, 2010, 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.
-#
-
-#
-# Makefile for building the classanalyzer tool
-#
-
-BUILDDIR = ../..
-include $(BUILDDIR)/common/Defs.gmk
-
-PKGDIR = com/sun/classanalyzer
-BUILDTOOL_SOURCE_ROOT = src
-BUILDTOOL_MAIN        = $(PKGDIR)/ClassAnalyzer.java
-BUILTTOOL_MAINCLASS   = $(subst /,.,$(BUILDTOOL_MAIN:%.java=%))
-
-BUILDTOOL_MAIN_SOURCE_FILE = $(BUILDTOOL_SOURCE_ROOT)/$(BUILDTOOL_MAIN)
-BUILDTOOL_MANIFEST_FILE    = $(BUILDTOOLCLASSDIR)/classanalyzer_manifest.mf
-
-FILES_java := $(shell $(CD) $(BUILDTOOL_SOURCE_ROOT) \
-    && $(FIND) $(PKGDIR) -type f -print)
-
-FILES_class = $(FILES_java:%.java=$(BUILDTOOLCLASSDIR)/%.class)
-
-CLASSANALYZER_JAR_FILE     = $(BUILDTOOLJARDIR)/classanalyzer.jar
-
-#
-# ClassAnalyzer depends on the com.sun.tools.classfile API.
-# The tool is compiled with the latest version of the classfile 
-# library in the langtools repo to make sure that synchronized
-# change is made if the classfile API is changed. 
-#
-# If langtools repo exists, build its own copy of the
-# classfile library and use it for compile time and runtime.
-# If not exist (the top level repo is not a forest), use 
-# the built jdk tools that imports tools.jar from the latest
-# promoted build.
-#
-# If the classfile API is changed but not yet in a promoted build,
-# the build might fail and the tool would need the langtools repo
-# to build in that case.
-#
-ifndef LANGTOOLS_TOPDIR
-  LANGTOOLS_TOPDIR=$(JDK_TOPDIR)/../langtools
-endif
-
-LANGTOOLS_TOPDIR_EXISTS := $(shell \
-  if [ -d $(LANGTOOLS_TOPDIR) ] ; then \
-    echo true; \
-  else \
-    echo false; \
-  fi)
-
-CLASSFILE_SRC = $(LANGTOOLS_TOPDIR)/src/share/classes
-CLASSFILE_PKGDIR = com/sun/tools/classfile
-
-ifeq ($(LANGTOOLS_TOPDIR_EXISTS), true)
-  FILES_classfile_java := $(shell \
-       $(CD) $(CLASSFILE_SRC) && \
-           $(FIND) $(CLASSFILE_PKGDIR) -name '*.java' -print)
-  FILES_classfile_class = $(FILES_classfile_java:%.java=$(BUILDTOOLCLASSDIR)/%.class)
-  CLASSFILE_JAR_FILE = $(BUILDTOOLJARDIR)/classfile.jar
-  BUILDTOOL_JAVAC    = $(BOOT_JAVAC_CMD) $(JAVAC_JVM_FLAGS) \
-                          $(BOOT_JAVACFLAGS) -classpath $(CLASSFILE_JAR_FILE)
-  BUILDTOOL_JAVA     = $(BOOT_JAVA_CMD) $(JAVA_TOOLS_FLAGS) \
-                          -Xbootclasspath/p:$(CLASSFILE_JAR_FILE)
-else
-  # if langtools doesn't exist, use tools from the built jdk
-  BUILDTOOL_JAVAC = $(BINDIR)/javac $(JAVAC_JVM_FLAGS) \
-                       $(BOOT_JAVACFLAGS)
-  BUILDTOOL_JAVA  = $(BINDIR)/java $(JAVA_TOOLS_FLAGS)
-endif
-
-# Location of the output modules.list, <module>.classlist
-# and other output files generated by the class analyzer tool.
-#
-MODULE_CLASSLIST = $(MODULES_TEMPDIR)/classlist
-
-all build: classanalyzer gen-classlist
-
-classanalyzer: $(CLASSFILE_JAR_FILE) $(CLASSANALYZER_JAR_FILE) 
-
-gen-classlist:
-	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-	@$(RM) -rf $(MODULE_CLASSLIST)
-	@$(MKDIR) -p $(MODULE_CLASSLIST)
-	$(BUILDTOOL_JAVA) \
-                -Dclassanalyzer.debug \
-                -jar $(CLASSANALYZER_JAR_FILE) \
-                -jdkhome $(OUTPUTDIR) \
-                -config ../modules.config \
-                -config ../modules.group \
-                -depconfig ../jdk7.depconfig \
-                -depconfig ../optional.depconfig \
-                -showdynamic \
-                -output $(MODULE_CLASSLIST)
-	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
-
-$(BUILDTOOL_MANIFEST_FILE): $(BUILDTOOL_MAIN_SOURCE_FILE)
-	@$(prep-target)
-	$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
-
-$(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)/%.class : $(CLASSFILE_SRC)/$(CLASSFILE_PKGDIR)/%.java
-	@$(prep-target)
-	@$(BUILDTOOL_JAVAC) \
-            -sourcepath $(CLASSFILE_SRC) \
-            -d $(BUILDTOOLCLASSDIR) $<
-
-$(BUILDTOOLCLASSDIR)/%.class : $(BUILDTOOL_SOURCE_ROOT)/%.java
-	@$(prep-target)
-	$(BUILDTOOL_JAVAC) \
-            -sourcepath $(BUILDTOOL_SOURCE_ROOT) \
-            -d $(BUILDTOOLCLASSDIR) $<
-
-$(CLASSANALYZER_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
-	@$(prep-target)
-	$(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
-	    -C $(BUILDTOOLCLASSDIR) $(PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
-	@$(java-vm-cleanup)
-
-$(BUILDTOOLJARDIR)/classfile.jar: $(FILES_classfile_class)
-	@$(prep-target)
-	$(CD) $(BUILDTOOLCLASSDIR) && \
-	    $(BOOT_JAR_CMD) cf $@ \
-	        $(CLASSFILE_PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
-	@$(java-vm-cleanup)
-
-clean clobber::
-	@$(RM) -rf $(BUILDTOOLCLASSDIR)/$(PKGDIR)
-	@$(RM) -rf $(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)
-	@$(RM) $(BUILDTOOL_MANIFEST_FILE)
-	@$(RM) $(CLASSANALYZER_JAR_FILE)
-	@$(RM) $(CLASSFILE_JAR_FILE)
--- a/make/modules/tools/build.xml	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Copyright (c) 2009, 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.
--->
-
-<project name="classanalyzer" default="build" basedir=".">
-</project>
--- a/make/modules/tools/nbproject/project.properties	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 2009, 2010, 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.
-#
-
-application.title=classanalyzer
-application.vendor=mchung
-build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-
-# This directory is removed when the project is cleaned:
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-
-cp.extra=${tools.jar} 
-
-debug.classpath=\
-    ${run.classpath}
-debug.test.classpath=\
-    ${run.test.classpath}
-
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/classanalyzer.jar
-dist.javadoc.dir=${dist.dir}/javadoc
-
-excludes=
-
-file.reference.tools.jar=${jdk.home}/lib/tools.jar
-file.reference.tools-src=src
-includes=**
-jar.compress=false
-javac.classpath=\
-    ${file.reference.tools.jar}
-javac.deprecation=false
-javac.source=1.5
-javac.target=1.5
-javac.test.classpath=
-javadoc.author=false
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=false
-javadoc.use=false
-javadoc.version=false
-main.class=com.sun.classanalyzer.ClassAnalyzer
-manifest.file=manifest.mf
-meta.inf.dir=${src.dir}/META-INF
-platform.active=JDK_1.6
-run.classpath=\
-    ${javac.classpath}:\
-    ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
-# or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=-Xmx256m
-run.test.classpath=
-source.encoding=UTF-8
-src.dir=${file.reference.tools-src}
--- a/make/modules/tools/nbproject/project.xml	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright (c) 2009, 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.
--->
-
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.java.j2seproject</type>
-    <configuration>
-        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
-            <name>classanalyzer</name>
-            <explicit-platform explicit-source-supported="true"/>
-            <source-roots>
-                <root id="src.dir"/>
-            </source-roots>
-            <test-roots/>
-        </data>
-    </configuration>
-</project>
--- a/make/modules/tools/src/com/sun/classanalyzer/AnnotatedDependency.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,627 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.Map;
-
-import com.sun.classanalyzer.Module.Reference;
-import java.util.LinkedList;
-import java.util.TreeMap;
-
-/**
- *
- * @author Mandy Chung
- */
-public abstract class AnnotatedDependency implements Comparable<AnnotatedDependency> {
-
-    final Klass from;
-    final List<String> classes;
-    protected boolean optional;
-    String description;
-    Klass.Method method;
-    private List<Filter> filters = null;
-
-    public AnnotatedDependency(Klass klass) {
-        this(klass, false);
-    }
-
-    public AnnotatedDependency(Klass klass, boolean optional) {
-        this.from = klass;
-        this.classes = new ArrayList<String>();
-        this.optional = optional;
-    }
-
-    abstract String getTag();
-
-    abstract boolean isDynamic();
-
-    void setMethod(Klass.Method m) {
-        this.method = m;
-    }
-
-    void addElement(String element, List<String> value) {
-        if (element.equals("value")) {
-            addValue(value);
-        } else if (element.equals("description")) {
-            description = value.get(0);
-        } else if (element.equals("optional")) {
-            optional = value.get(0).equals("1") || Boolean.parseBoolean(value.get(0));
-        }
-    }
-
-    void addValue(List<String> value) {
-        for (String s : value) {
-            if ((s = s.trim()).length() > 0) {
-                classes.add(s);
-            }
-        }
-    }
-
-    List<String> getValue() {
-        return classes;
-    }
-
-    boolean isOptional() {
-        return optional;
-    }
-
-    boolean isEmpty() {
-        return classes.isEmpty();
-    }
-
-    boolean matches(String classname) {
-        synchronized (this) {
-            // initialize filters
-            if (filters == null) {
-                filters = new ArrayList<Filter>();
-                for (String pattern : classes) {
-                    filters.add(new Filter(pattern));
-                }
-
-            }
-        }
-
-        for (Filter f : filters) {
-            if (f.matches(classname)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        for (String v : getValue()) {
-            if (sb.length() == 0) {
-                sb.append(getTag());
-                sb.append("\n");
-            } else {
-                sb.append("\n");
-            }
-            sb.append("  ");
-            sb.append(from.getClassName()).append(" -> ");
-            sb.append(v);
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public int compareTo(AnnotatedDependency o) {
-        if (from == o.from) {
-            if (this.getClass().getName().equals(o.getClass().getName())) {
-                String s1 = classes.isEmpty() ? "" : classes.get(0);
-                String s2 = o.classes.isEmpty() ? "" : o.classes.get(0);
-                return s1.compareTo(s2);
-            } else {
-                return this.getClass().getName().compareTo(o.getClass().getName());
-            }
-
-        } else {
-            return from.compareTo(o.from);
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        int hashcode = 7 + 73 * from.hashCode();
-        for (String s : classes) {
-            hashcode ^= s.hashCode();
-        }
-        return hashcode;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof AnnotatedDependency)) {
-            return false;
-        }
-        AnnotatedDependency other = (AnnotatedDependency) obj;
-        boolean ret = this.from.equals(other.from) && this.classes.size() == other.classes.size();
-        if (ret == true) {
-            for (int i = 0; i < this.classes.size(); i++) {
-                ret = ret && this.classes.get(i).equals(other.classes.get(i));
-            }
-        }
-        return ret;
-    }
-
-    static class ClassForName extends AnnotatedDependency {
-
-        public ClassForName(Klass klass, boolean optional) {
-            super(klass, optional);
-        }
-
-        @Override
-        String getTag() {
-            if (this.optional) {
-                return TAG + "(optional)";
-            } else {
-                return TAG;
-            }
-        }
-
-        @Override
-        boolean isDynamic() {
-            return true;
-        }
-        static final String TYPE = "sun.annotation.ClassForName";
-        static final String TAG = "@ClassForName";
-    }
-
-    static class NativeFindClass extends AnnotatedDependency {
-
-        public NativeFindClass(Klass klass, boolean optional) {
-            super(klass, optional);
-        }
-
-        @Override
-        String getTag() {
-            if (this.optional) {
-                return TAG + "(optional)";
-            } else {
-                return TAG;
-            }
-        }
-
-        @Override
-        boolean isDynamic() {
-            return true;
-        }
-        static final String TYPE = "sun.annotation.NativeFindClass";
-        static final String TAG = "@NativeFindClass";
-    }
-
-    static class Provider extends AnnotatedDependency {
-
-        private List<String> services = new ArrayList<String>();
-
-        Provider(Klass klass) {
-            super(klass, true);
-        }
-
-        @Override
-        boolean isDynamic() {
-            return true;
-        }
-
-        public List<String> services() {
-            return services;
-        }
-
-        @Override
-        void addElement(String element, List<String> value) {
-            if (element.equals("service")) {
-                List<String> configFiles = new ArrayList<String>();
-                for (String s : value) {
-                    if ((s = s.trim()).length() > 0) {
-                        configFiles.add(metaInfPath + s);
-                    }
-                }
-                addValue(configFiles);
-            }
-        }
-
-        @Override
-        void addValue(List<String> value) {
-            for (String s : value) {
-                if ((s = s.trim()).length() > 0) {
-                    if (s.startsWith("META-INF")) {
-                        services.add(s);
-                        readServiceConfiguration(s, classes);
-                    } else {
-                        throw new RuntimeException("invalid value" + s);
-                    }
-                }
-            }
-        }
-
-        boolean isEmpty() {
-            return services.isEmpty();
-        }
-        static final String metaInfPath =
-                "META-INF" + File.separator + "services" + File.separator;
-
-        static void readServiceConfiguration(String config, List<String> names) {
-            BufferedReader br = null;
-            try {
-                InputStream is = ClassPath.open(config);
-                if (is != null) {
-                    // Properties doesn't perserve the order of the input file
-                    br = new BufferedReader(new InputStreamReader(is, "utf-8"));
-                    int lc = 1;
-                    while ((lc = parseLine(br, lc, names)) >= 0);
-                }
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            } finally {
-                if (br != null) {
-                    try {
-                        br.close();
-                    } catch (IOException ex) {
-                        throw new RuntimeException(ex);
-                    }
-                }
-            }
-        }
-
-        // Parse a single line from the given configuration file, adding the name
-        // on the line to the names list.
-        //
-        private static int parseLine(BufferedReader r, int lc, List<String> names) throws IOException {
-            String ln = r.readLine();
-            if (ln == null) {
-                return -1;
-            }
-            int ci = ln.indexOf('#');
-            if (ci >= 0) {
-                ln = ln.substring(0, ci);
-            }
-            ln = ln.trim();
-            int n = ln.length();
-            if (n != 0) {
-                if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0)) {
-                    throw new RuntimeException("Illegal configuration-file syntax");
-                }
-                int cp = ln.codePointAt(0);
-                if (!Character.isJavaIdentifierStart(cp)) {
-                    throw new RuntimeException("Illegal provider-class name: " + ln);
-                }
-                for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
-                    cp = ln.codePointAt(i);
-                    if (!Character.isJavaIdentifierPart(cp) && (cp != '.')) {
-                        throw new RuntimeException("Illegal provider-class name: " + ln);
-                    }
-                }
-                if (!names.contains(ln)) {
-                    names.add(ln);
-                }
-            }
-            return lc + 1;
-        }
-
-        @Override
-        String getTag() {
-            return TAG;
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (!(obj instanceof AnnotatedDependency)) {
-                return false;
-            }
-            Provider other = (Provider) obj;
-            boolean ret = this.from.equals(other.from) &&
-                    this.services.size() == other.services.size();
-            if (ret == true) {
-                for (int i = 0; i < this.services.size(); i++) {
-                    ret = ret && this.services.get(i).equals(other.services.get(i));
-                }
-            }
-            return ret;
-        }
-
-        @Override
-        public int hashCode() {
-            int hashcode = 7 + 73 * from.hashCode();
-            for (String s : services) {
-                hashcode ^= s.hashCode();
-            }
-            return hashcode;
-        }
-
-        @Override
-        public List<String> getValue() {
-            List<String> result = new ArrayList<String>();
-            result.addAll(services);
-            return result;
-        }
-        static final String TYPE = "sun.annotation.Provider";
-        static final String TAG = "@Provider";
-    }
-
-    static class OptionalDependency extends AnnotatedDependency {
-
-        static boolean isOptional(Klass from, Klass to) {
-            synchronized (OptionalDependency.class) {
-                if (optionalDepsMap == null) {
-                    // Build a map of classes to its optional dependencies
-                    initDependencies();
-                }
-            }
-            for (Reference ref : optionalDepsMap.keySet()) {
-                if (ref.referrer() == from && ref.referree() == to) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        OptionalDependency(Klass klass) {
-            super(klass, true);
-        }
-
-        @Override
-        boolean isDynamic() {
-            return false;
-        }
-
-        @Override
-        String getTag() {
-            return TAG;
-        }
-        static final String TYPE = "sun.annotation.Optional";
-        static final String TAG = "@Optional";
-    }
-
-    static class CompilerInline extends AnnotatedDependency {
-
-        public CompilerInline(Klass klass) {
-            super(klass);
-        }
-
-        @Override
-        String getTag() {
-            return TAG;
-        }
-
-        @Override
-        boolean isDynamic() {
-            return false;
-        }
-        static final String TYPE = "sun.annotation.Inline";
-        static final String TAG = "@Inline";
-    }
-
-    static class Filter {
-
-        final String pattern;
-        final String regex;
-
-        Filter(String pattern) {
-            this.pattern = pattern;
-
-            boolean isRegex = false;
-            for (int i = 0; i < pattern.length(); i++) {
-                char p = pattern.charAt(i);
-                if (p == '*' || p == '[' || p == ']') {
-                    isRegex = true;
-                    break;
-                }
-            }
-
-            if (isRegex) {
-                this.regex = convertToRegex(pattern);
-            } else {
-                this.regex = null;
-            }
-        }
-
-        private String convertToRegex(String pattern) {
-            StringBuilder sb = new StringBuilder();
-            int i = 0;
-            int index = 0;
-            int plen = pattern.length();
-            while (i < plen) {
-                char p = pattern.charAt(i);
-                if (p == '*') {
-                    sb.append("(").append(pattern.substring(index, i)).append(")");
-                    if (i + 1 < plen && pattern.charAt(i + 1) == '*') {
-                        sb.append(".*");
-                        index = i + 2;
-                    } else {
-                        sb.append("[^\\.]*");
-                        index = i + 1;
-                    }
-                } else if (p == '[') {
-                    int j = i + 1;
-                    while (j < plen) {
-                        if (pattern.charAt(j) == ']') {
-                            break;
-                        }
-                        j++;
-                    }
-                    if (j >= plen || pattern.charAt(j) != ']') {
-                        throw new RuntimeException("Malformed pattern " + pattern);
-                    }
-                    sb.append("(").append(pattern.substring(index, i)).append(")");
-                    sb.append(pattern.substring(i, j + 1));
-                    index = j + 1;
-                    i = j;
-                }
-                i++;
-            }
-            if (index < plen) {
-                sb.append("(").append(pattern.substring(index, plen)).append(")");
-            }
-            return sb.toString();
-        }
-
-        boolean matches(String name) {
-            if (regex == null) {
-                // the pattern is not a regex
-                return name.equals(pattern);
-            } else {
-                return name.matches(regex);
-            }
-        }
-    }
-
-    static boolean isValidType(String type) {
-        if (type.endsWith("(optional)")) {
-            int len = type.length() - "(optional)".length();
-            type = type.substring(0, len);
-        }
-        return type.equals(ClassForName.TYPE) || type.equals(ClassForName.TAG) ||
-                type.equals(NativeFindClass.TYPE) || type.equals(NativeFindClass.TAG) ||
-                type.equals(Provider.TYPE) || type.equals(Provider.TAG) ||
-                type.equals(CompilerInline.TYPE) || type.equals(CompilerInline.TAG) ||
-                type.equals(OptionalDependency.TYPE) || type.equals(OptionalDependency.TAG);
-    }
-
-    static AnnotatedDependency newAnnotatedDependency(String tag, String value, Klass klass) {
-        AnnotatedDependency dep = newAnnotatedDependency(tag, klass);
-        if (dep != null) {
-            dep.addValue(Collections.singletonList(value));
-        }
-        return dep;
-    }
-    static List<AnnotatedDependency> annotatedDependencies = new LinkedList<AnnotatedDependency>();
-    static List<AnnotatedDependency> optionalDependencies = new LinkedList<AnnotatedDependency>();
-
-    static AnnotatedDependency newAnnotatedDependency(String type, Klass klass) {
-        boolean optional = false;
-        if (type.endsWith("(optional)")) {
-            optional = true;
-            int len = type.length() - "(optional)".length();
-            type = type.substring(0, len);
-        }
-
-        if (type.equals(OptionalDependency.TYPE) || type.equals(OptionalDependency.TAG)) {
-            return newOptionalDependency(klass);
-        }
-
-        AnnotatedDependency dep;
-        if (type.equals(ClassForName.TYPE) || type.equals(ClassForName.TAG)) {
-            dep = new ClassForName(klass, optional);
-        } else if (type.equals(NativeFindClass.TYPE) || type.equals(NativeFindClass.TAG)) {
-            dep = new NativeFindClass(klass, optional);
-        } else if (type.equals(Provider.TYPE) || type.equals(Provider.TAG)) {
-            dep = new Provider(klass);
-        } else if (type.equals(CompilerInline.TYPE) || type.equals(CompilerInline.TAG)) {
-            dep = new CompilerInline(klass);
-        } else {
-            return null;
-        }
-        klass.addAnnotatedDep(dep);
-        annotatedDependencies.add(dep);
-        return dep;
-    }
-
-    static OptionalDependency newOptionalDependency(Klass klass) {
-        OptionalDependency dep = new OptionalDependency(klass);
-        optionalDependencies.add(dep);
-        return dep;
-    }
-    static Map<Reference, Set<AnnotatedDependency>> annotatedDepsMap = null;
-    static Map<Reference, Set<AnnotatedDependency>> optionalDepsMap = null;
-
-    static Map<Reference, Set<AnnotatedDependency>> getReferences(Module m) {
-        // ensure it's initialized
-        initDependencies();
-
-        Map<Reference, Set<AnnotatedDependency>> result = new TreeMap<Reference, Set<AnnotatedDependency>>();
-        for (Reference ref : annotatedDepsMap.keySet()) {
-            if (m.contains(ref.referrer()) && m.isModuleDependence(ref.referree())) {
-                result.put(ref, annotatedDepsMap.get(ref));
-            }
-        }
-        return result;
-    }
-
-    static Set<Module.Dependency> getDependencies(Module m) {
-        // ensure it's initialized
-        initDependencies();
-
-        Set<Module.Dependency> deps = new TreeSet<Module.Dependency>();
-        for (Reference ref : annotatedDepsMap.keySet()) {
-            if (m.contains(ref.referrer())) {
-                Module other = m.getModuleDependence(ref.referree());
-                if (other != null) {
-                    for (AnnotatedDependency ad : annotatedDepsMap.get(ref)) {
-                        Module.Dependency d = new Module.Dependency(other, ad.isOptional(), ad.isDynamic());
-                        deps.add(d);
-                    }
-                }
-            }
-        }
-        return deps;
-    }
-
-    synchronized static void initDependencies() {
-        if (annotatedDepsMap != null) {
-            return;
-        }
-
-        // Build a map of references to its dependencies
-        annotatedDepsMap = new TreeMap<Reference, Set<AnnotatedDependency>>();
-        optionalDepsMap = new TreeMap<Reference, Set<AnnotatedDependency>>();
-
-        for (Klass k : Klass.getAllClasses()) {
-            for (AnnotatedDependency ad : annotatedDependencies) {
-                if (ad.matches(k.getClassName())) {
-                    Reference ref = new Reference(ad.from, k);
-                    Set<AnnotatedDependency> set = annotatedDepsMap.get(ref);
-                    if (set == null) {
-                        set = new TreeSet<AnnotatedDependency>();
-                        annotatedDepsMap.put(ref, set);
-                    }
-                    set.add(ad);
-                }
-            }
-
-            for (AnnotatedDependency ad : optionalDependencies) {
-                if (ad.matches(k.getClassName())) {
-                    Reference ref = new Reference(ad.from, k);
-                    Set<AnnotatedDependency> set = optionalDepsMap.get(ref);
-                    if (set == null) {
-                        set = new TreeSet<AnnotatedDependency>();
-                        optionalDepsMap.put(ref, set);
-                    }
-                    set.add(ad);
-                }
-            }
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/AnnotationParser.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import com.sun.tools.classfile.*;
-import com.sun.tools.classfile.Annotation;
-import com.sun.tools.classfile.ExtendedAnnotation;
-import com.sun.tools.classfile.Annotation.Annotation_element_value;
-import com.sun.tools.classfile.Annotation.Array_element_value;
-import com.sun.tools.classfile.Annotation.Class_element_value;
-import com.sun.tools.classfile.Annotation.Enum_element_value;
-import com.sun.tools.classfile.Annotation.Primitive_element_value;
-import com.sun.tools.classfile.ConstantPoolException;
-import com.sun.tools.classfile.Descriptor;
-import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.classanalyzer.AnnotatedDependency.*;
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.Map;
-import java.util.Set;
-
-/**
- *
- * @author Mandy Chung
- */
-public class AnnotationParser {
-
-    static boolean parseAnnotation = false;
-    static void setParseAnnotation(boolean newValue) {
-        parseAnnotation = newValue;
-    }
-
-    private final ClassFileParser cfparser;
-    public AnnotationParser(ClassFileParser cfparser) {
-        this.cfparser = cfparser;
-    }
-
-    private AnnotatedDependency addAnnotation(Annotation annot, Klass.Method method) {
-        String type = getType(annot.type_index);
-        AnnotatedDependency dep = AnnotatedDependency.newAnnotatedDependency(type, cfparser.this_klass);
-        if (dep != null) {
-            for (int i = 0; i < annot.num_element_value_pairs; i++) {
-                Element element = getElement(annot.element_value_pairs[i]);
-                dep.addElement(element.name, element.value);
-            }
-            dep.setMethod(method);
-        }
-        return dep;
-    }
-
-    private AnnotatedDependency addAnnotation(ExtendedAnnotation annot, Klass.Method method) {
-        return addAnnotation(annot.annotation, method);
-    }
-
-    class Element {
-
-        String name;
-        List<String> value;
-
-        Element(String name) {
-            this.name = name;
-            this.value = new ArrayList<String>();
-        }
-
-        void add(String v) {
-            value.add(v);
-        }
-    }
-
-    Element getElement(Annotation.element_value_pair pair) {
-        Element element = new Element(getName(pair.element_name_index));
-        evp.parse(pair.value, element);
-        return element;
-    }
-
-    private String getType(int index) {
-        try {
-            Descriptor d = new Descriptor(index);
-            return d.getFieldType(cfparser.classfile.constant_pool);
-        } catch (ConstantPoolException ignore) {
-        } catch (InvalidDescriptor ignore) {
-        }
-        return "Unknown";
-    }
-
-    private String getName(int index) {
-        return cfparser.constantPoolParser.stringValue(index);
-    }
-    element_value_Parser evp = new element_value_Parser();
-
-    class element_value_Parser implements Annotation.element_value.Visitor<Void, Element> {
-
-        public Void parse(Annotation.element_value value, Element element) {
-            value.accept(this, element);
-            return null;
-        }
-
-        public Void visitPrimitive(Primitive_element_value ev, Element element) {
-            String value = getName(ev.const_value_index);
-            element.add(value);
-            return null;
-        }
-
-        public Void visitEnum(Enum_element_value ev, Element element) {
-            String value = getName(ev.type_name_index) + "." + getName(ev.const_name_index);
-            element.add(value);
-            return null;
-        }
-
-        public Void visitClass(Class_element_value ev, Element element) {
-            String value = getName(ev.class_info_index) + ".class";
-            element.add(value);
-            return null;
-        }
-
-        public Void visitAnnotation(Annotation_element_value ev, Element element) {
-            // AnnotationParser.this.addAnnotation(ev.annotation_value);
-            throw new UnsupportedOperationException("Not supported: " + ev);
-        }
-
-        public Void visitArray(Array_element_value ev, Element element) {
-            for (int i = 0; i < ev.num_values; i++) {
-                parse(ev.values[i], element);
-            }
-            return null;
-        }
-    }
-
-    void parseAttributes(Attributes attributes, Klass.Method method) {
-        if (!parseAnnotation) {
-            return;
-        }
-
-        visitRuntimeAnnotations((RuntimeVisibleAnnotations_attribute) attributes.get(Attribute.RuntimeVisibleAnnotations), method);
-        visitRuntimeAnnotations((RuntimeInvisibleAnnotations_attribute) attributes.get(Attribute.RuntimeInvisibleAnnotations), method);
-        visitRuntimeTypeAnnotations((RuntimeVisibleTypeAnnotations_attribute) attributes.get(Attribute.RuntimeVisibleTypeAnnotations), method);
-        visitRuntimeTypeAnnotations((RuntimeInvisibleTypeAnnotations_attribute) attributes.get(Attribute.RuntimeInvisibleTypeAnnotations), method);
-        visitRuntimeParameterAnnotations((RuntimeVisibleParameterAnnotations_attribute) attributes.get(Attribute.RuntimeVisibleParameterAnnotations), method);
-        visitRuntimeParameterAnnotations((RuntimeInvisibleParameterAnnotations_attribute) attributes.get(Attribute.RuntimeInvisibleParameterAnnotations), method);
-    }
-
-    public void visitRuntimeAnnotations(RuntimeAnnotations_attribute attr, Klass.Method method) {
-        if (attr == null) {
-            return;
-        }
-
-        for (int i = 0; i < attr.annotations.length; i++) {
-            addAnnotation(attr.annotations[i], method);
-        }
-    }
-
-    public void visitRuntimeTypeAnnotations(RuntimeTypeAnnotations_attribute attr, Klass.Method method) {
-        if (attr == null) {
-            return;
-        }
-
-        for (int i = 0; i < attr.annotations.length; i++) {
-            addAnnotation(attr.annotations[i], method);
-        }
-    }
-
-    public void visitRuntimeParameterAnnotations(RuntimeParameterAnnotations_attribute attr, Klass.Method method) {
-        if (attr == null) {
-            return;
-        }
-
-        for (int param = 0; param < attr.parameter_annotations.length; param++) {
-            for (int i = 0; i < attr.parameter_annotations[param].length; i++) {
-                addAnnotation(attr.parameter_annotations[param][i], method);
-            }
-        }
-    }
-
-    void parseAttributes(Attributes attributes) {
-        parseAttributes(attributes, null);
-    }
-
-    public static void main(String[] args) throws Exception {
-        String jdkhome = null;
-        String output = ".";
-
-        // process arguments
-        int i = 0;
-        while (i < args.length) {
-            String arg = args[i++];
-            if (arg.equals("-jdkhome")) {
-                if (i < args.length) {
-                    jdkhome = args[i++];
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-output")) {
-                output = args[i++];
-            } else {
-                usage();
-            }
-        }
-        if (jdkhome == null) {
-            usage();
-        }
-
-        // parse annotation and code attribute to find all references
-        // to Class.forName etc
-        CodeAttributeParser.setParseCodeAttribute(true);
-        AnnotationParser.setParseAnnotation(true);
-
-        ClassPath.setJDKHome(jdkhome);
-        ClassPath.parseAllClassFiles();
-
-        PrintWriter writer = new PrintWriter(new File(output, "jdk7.depconfig"));
-
-        try {
-            for (Klass k : Klass.getAllClasses()) {
-                for (AnnotatedDependency dep : k.getAnnotatedDeps()) {
-                    if (dep.isEmpty()) {
-                        continue;
-                    }
-                    writer.format("# %s \n", dep.method == null ? dep.from : dep.method);
-                    writer.format("%s\n\n", dep);
-                }
-            }
-        } finally {
-            writer.close();
-        }
-
-        writer = new PrintWriter(new File(output, "optional.depconfig"));
-        try {
-            AnnotatedDependency prev = null;
-            for (AnnotatedDependency dep : AnnotatedDependency.optionalDependencies) {
-                if (prev != null && !dep.equals(prev)) {
-                    writer.format("%s\n\n", prev);
-                }
-                writer.format("# %s \n", dep.method == null ? dep.from : dep.method);
-                prev = dep;
-            }
-            if (prev != null) {
-                writer.format("%s\n\n", prev);
-            }
-        } finally {
-            writer.close();
-        }
-
-        writer = new PrintWriter(new File(output, "runtime.references"));
-        try {
-            for (Map.Entry<String, Set<Klass.Method>> entry : CodeAttributeParser.runtimeReferences.entrySet()) {
-                writer.format("References to %s\n", entry.getKey());
-                Klass prev = null;
-                for (Klass.Method m : entry.getValue()) {
-                    if (prev == null || prev != m.getKlass()) {
-                        writer.format("  %-50s # %s\n", m.getKlass(), m);
-                    } else if (prev == m.getKlass()) {
-                        writer.format("  %-50s # %s\n", "", m);
-                    }
-                    prev = m.getKlass();
-                }
-            }
-        } finally {
-            writer.close();
-        }
-    }
-
-    private static void usage() {
-        System.out.println("Usage: AnnotationParser <options>");
-        System.out.println("Options: ");
-        System.out.println("\t-jdkhome <JDK home> where all jars will be parsed");
-        System.out.println("\t-depconfig <output file for annotated dependencies>");
-        System.out.println("\t-optional <output file for optional dependencies>");
-        System.exit(-1);
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/BootAnalyzer.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,819 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.File;
-import java.util.ArrayDeque;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import com.sun.tools.classfile.*;
-import com.sun.tools.classfile.ConstantPool.*;
-import static com.sun.tools.classfile.ConstantPool.*;
-import com.sun.tools.classfile.Instruction.TypeKind;
-import com.sun.tools.classfile.Type.*;
-
-/**
- * Generate the module config for the boot module with
- * a given set of roots (classes or methods) and exclude list.
- *
- * This tool does method-level dependency analysis starting
- * from the root set and follows references transitively as follows:
- * <ul>
- * <li>For a given class, it will parse the ClassFile to
- *     find its superclass and superinterfaces and also
- *     its static initializer &lt;clinit&gt;.</li>
- * <li>For each method, it will parse its Code attribute
- *     to look for a Methodref, Fieldref, and InterfaceMethodref.
- *     </li>
- * <li>For each Fieldref, it will include the type of
- *     the field in the dependency.</li>
- * <li>For each MethodRef, it will follow all references in
- *     that method.</li>
- * <li>For each InterfaceMethodref, it will follow all references in
- *     that method defined its implementation classes in
- *     the resulting dependency list.</li>
- * </ul>
- *
- * Limitation:
- * <ul>
- * <li>For each Methodref, it only parses the method of
- *     the specified type.  It doesn't analyze the class hierarchy
- *     and follow references of its subclasses since it ends up
- *     pulls in many unnecessary dependencies.  For now,
- *     the list of subclasses and methods need to be listed in
- *     the root set.</li>
- * </ul>
- *
- * @author Mandy Chung
- */
-public class BootAnalyzer {
-
-    public static void main(String[] args) throws Exception {
-        String jdkhome = null;
-        String config = null;
-        String output = ".";
-        boolean printClassList = false;
-
-        // process arguments
-        int i = 0;
-        while (i < args.length) {
-            String arg = args[i++];
-            if (arg.equals("-jdkhome")) {
-                if (i < args.length) {
-                    jdkhome = args[i++];
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-config")) {
-                config = args[i++];
-            } else if (arg.equals("-output")) {
-                output = args[i++];
-            } else if (arg.equals("-classlist")) {
-                printClassList = true;
-            } else {
-                usage();
-            }
-        }
-
-
-
-        if (jdkhome == null || config == null) {
-            usage();
-        }
-
-        File jre = new File(jdkhome, "jre");
-        if (jre.exists()) {
-            ClassPath.setJDKHome(jdkhome);
-        } else {
-            File classes = new File(jdkhome, "classes");
-            if (classes.exists()) {
-                ClassPath.setClassPath(classes.getCanonicalPath());
-            } else {
-                throw new RuntimeException("Invalid jdkhome: " + jdkhome);
-            }
-        }
-
-        parseConfigFile(config);
-        followRoots();
-
-        // create output directory if it doesn't exist
-        File dir = new File(output);
-        if (!dir.isDirectory()) {
-            if (!dir.exists()) {
-                boolean created = dir.mkdir();
-                if (!created) {
-                    throw new RuntimeException("Unable to create `" + dir + "'");
-                }
-            }
-        }
-
-        String bootmodule = "boot";
-        String bootconfig = resolve(dir, bootmodule, "config");
-        printBootConfig(bootconfig, bootmodule);
-
-        List<ModuleConfig> list = ModuleConfig.readConfigurationFile(bootconfig);
-        Module module = Module.addModule(list.get(0));
-        for (Klass k : Klass.getAllClasses()) {
-            module.addKlass(k);
-        }
-        module.fixupDependencies();
-
-        if (printClassList) {
-            module.printClassListTo(resolve(dir, bootmodule, "classlist"));
-            module.printSummaryTo(resolve(dir, bootmodule, "summary"));
-        }
-    }
-
-    // print boot.config file as an input to the ClassAnalyzer
-    private static void printBootConfig(String output, String bootmodule) throws IOException {
-
-        File f = new File(output);
-        PrintWriter writer = new PrintWriter(f);
-        try {
-            int count = 0;
-            writer.format("module %s {%n", bootmodule);
-            for (Klass k : Klass.getAllClasses()) {
-                if (count++ == 0) {
-                    writer.format("%4s%7s %s", "", "include", k);
-                } else {
-                    writer.format(",%n");
-                    writer.format("%4s%7s %s", "", "", k);
-                }
-            }
-            writer.format(";%n}%n");
-        } finally {
-            writer.close();
-        }
-    }
-
-    private static String resolve(File dir, String mname, String suffix) {
-        File f = new File(dir, mname + "." + suffix);
-        return f.toString();
-
-    }
-    static List<MethodDescriptor> methods = new LinkedList<MethodDescriptor>();
-    static Deque<MethodDescriptor> pending = new ArrayDeque<MethodDescriptor>();
-    static Deque<MethodDescriptor> interfaceMethodRefs = new ArrayDeque<MethodDescriptor>();
-    static Filter filter = new Filter();
-
-    private static void followRoots() throws IOException {
-        MethodDescriptor md = null;
-
-        while ((md = pending.poll()) != null) {
-            if (!methods.contains(md)) {
-                methods.add(md);
-                if (md.classname.isEmpty()) {
-                    trace("Warning: class missing %s%n", md);
-                    continue;
-                }
-
-                if (filter.isExcluded(md.classname)) {
-                    trace("excluded %s%n", md);
-                } else {
-                    KlassInfo kinfo = getKlassInfo(md.classname);
-                    if (kinfo.classname.contains("$")) {
-                        int pos = kinfo.classname.lastIndexOf('$');
-                        String outer = kinfo.classname.substring(0, pos);
-                        if (!cache.containsKey(outer)) {
-                            trace("  include outer class %s%n", outer);
-                            getKlassInfo(outer).ensureParse();
-                        }
-                    }
-
-                    kinfo.ensureParse();
-                    if (md.methodname.length() > 0) {
-                        if (filter.isExcluded(md.name)) {
-                            trace("excluded %s%n", md);
-                        } else {
-                            if (md.interfaceMethodRef) {
-                                trace("interface methodref %s%n", md);
-                                interfaceMethodRefs.add(md);
-                            } else {
-                                List<String> descriptors = kinfo.parse(md);
-                                if (descriptors.isEmpty()) {
-                                    if (kinfo.getSuperclass() != null) {
-                                        String sn = kinfo.getSuperclass().classname;
-                                        MethodDescriptor superMD = new MethodDescriptor(sn + "." + md.methodname, md.descriptor, false);
-                                        if (!methods.contains(superMD) && !pending.contains(superMD)) {
-                                            trace("  delegated %s to %s%n", md, superMD);
-                                            pending.add(superMD);
-                                        }
-                                    } else if (kinfo.isClass()) {
-                                        trace("  %s (not found)%n", md);
-                                    } else {
-                                        trace("  %s (interface)%n", md);
-                                    }
-                                } else {
-                                    if (md.descriptor.equals("*")) {
-                                        trace("  parsed %s : ", md.name);
-                                        for (String s : descriptors) {
-                                            trace(" %s", s);
-                                        }
-                                        trace("%n");
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            if (pending.isEmpty()) {
-                for (Klass k : Klass.getAllClasses()) {
-                    if (k.getFileSize() == 0) {
-                        getKlassInfo(k.getClassName()).ensureParse();
-                    }
-                }
-                while ((md = interfaceMethodRefs.poll()) != null) {
-                    addSubClassMethods(md);
-                }
-            }
-        }
-    }
-
-    static void addSubClassMethods(MethodDescriptor md) throws IOException {
-        for (KlassInfo kinfo : getSubClasses(md.classname)) {
-            String methodname = kinfo.classname + "." + md.methodname;
-            MethodDescriptor other = new MethodDescriptor(methodname, md.descriptor, false);
-            if (!methods.contains(other) && !pending.contains(other)) {
-                trace("Warning: subclass from %s to %s%n", md.classname, other);
-                pending.add(other);
-            }
-        }
-    }
-    private final static String privilegedActionInterf = "java.security.PrivilegedAction";
-    private final static String privilegedExceptionActionInterf = "java.security.PrivilegedExceptionAction";
-
-    static boolean isPrivilegedAction(String classname) {
-        if (classname.isEmpty()) {
-            return false;
-        }
-        KlassInfo kinfo = getKlassInfo(classname);
-        for (KlassInfo ki : kinfo.getInterfaces()) {
-            String interf = ki.classname;
-            if (interf.equals(privilegedActionInterf) ||
-                    interf.equals(privilegedExceptionActionInterf)) {
-                return true;
-            }
-        }
-        return false;
-    }
-    static Map<String, KlassInfo> cache = new HashMap<String, KlassInfo>();
-
-    static KlassInfo getKlassInfo(String classname) {
-        classname = classname.replace('/', '.');
-
-        KlassInfo kinfo = cache.get(classname);
-        if (kinfo == null) {
-            kinfo = new KlassInfo(classname);
-            cache.put(classname, kinfo);
-        }
-        return kinfo;
-    }
-
-    static class KlassInfo {
-
-        final String classname;
-        private ClassFileParser parser;
-        private KlassInfo superclass;
-        private List<KlassInfo> interfaces = new LinkedList<KlassInfo>();
-
-        KlassInfo(String classname) {
-            this.classname = classname;
-        }
-
-        boolean isClass() {
-            ensureParse();
-            return parser.classfile.isClass();
-        }
-
-        KlassInfo getSuperclass() {
-            ensureParse();
-            return superclass;
-        }
-
-        List<KlassInfo> getInterfaces() {
-            ensureParse();
-            return java.util.Collections.unmodifiableList(interfaces);
-        }
-
-        void ensureParse() {
-            try {
-                getClassFileParser();
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        synchronized ClassFileParser getClassFileParser() throws IOException {
-            if (parser == null) {
-                parser = ClassPath.parserForClass(classname);
-                if (parser != null) {
-                    parseClassFile();
-                    List<String> descriptors = parse(new MethodDescriptor(classname + ".<clinit>", "()V", false));
-                }
-            }
-            return parser;
-        }
-
-        List<String> parse(MethodDescriptor md) {
-            ensureParse();
-            try {
-                List<String> descriptors = new LinkedList<String>();
-                for (Method m : parser.classfile.methods) {
-                    String name = m.getName(parser.classfile.constant_pool);
-                    String desc = parser.constantPoolParser.getDescriptor(m.descriptor.index);
-                    if (name.equals(md.methodname)) {
-                        if (md.descriptor.equals("*") || md.descriptor.equals(desc)) {
-                            parseMethod(parser, m);
-                            descriptors.add(desc);
-                        }
-                    }
-                }
-                return descriptors;
-            } catch (ConstantPoolException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-
-        private void parseClassFile() throws IOException {
-            parser.parseClassInfo();
-
-            ClassFile classfile = parser.classfile;
-            try {
-                if (classfile.super_class > 0) {
-                    superclass = getKlassInfo(classfile.getSuperclassName());
-                }
-                if (classfile.interfaces != null) {
-                    for (int i = 0; i < classfile.interfaces.length; i++) {
-                        interfaces.add(getKlassInfo(classfile.getInterfaceName(i)));
-                    }
-                }
-            } catch (ConstantPoolException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-
-    static List<KlassInfo> getSubClasses(String classname) throws IOException {
-        List<KlassInfo> result = new LinkedList<KlassInfo>();
-        List<KlassInfo> list = new LinkedList<KlassInfo>();
-        list.addAll(cache.values());
-        for (KlassInfo kinfo : list) {
-            if (kinfo.getSuperclass() != null && classname.equals(kinfo.getSuperclass().classname)) {
-                result.add(kinfo);
-            }
-            for (KlassInfo interf : kinfo.getInterfaces()) {
-                if (classname.equals(interf.classname)) {
-                    result.add(kinfo);
-                }
-            }
-        }
-        return result;
-    }
-
-    private static void parseConfigFile(String config) throws IOException {
-        FileInputStream in = new FileInputStream(config);
-        try {
-            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-            String line;
-            int lineNumber = 0;
-            while ((line = reader.readLine()) != null) {
-                lineNumber++;
-                if ((line = line.trim()).length() > 0) {
-                    if (line.startsWith("#")) {
-                        continue;
-                    }
-
-                    String[] s = line.split("\\s+");
-                    if ("exclude".equals(s[0])) {
-                        filter.exclude(s[1]);
-                    } else {
-                        String name = s[0].replace('/', '.');
-                        if (name.length() > 0) {
-                            String classname = name.replace('/', '.');
-                            if (s.length == 2) {
-                                // method name
-                                int pos = classname.lastIndexOf('.');
-                                classname = classname.substring(0, pos);
-                            }
-
-                            KlassInfo kinfo = getKlassInfo(classname);
-                            if (kinfo.getClassFileParser() != null) {
-                                // class exists
-                                MethodDescriptor md = (s.length == 1) ? new MethodDescriptor(name) : new MethodDescriptor(name, s[1], false);
-                                if (!pending.contains(md)) {
-                                    pending.add(md);
-                                }
-                            } else {
-                                // class not found
-                                trace("Class %s not found%n", classname);
-                            }
-                        }
-                    }
-                }
-            }
-
-        } finally {
-            in.close();
-        }
-    }
-
-    private static void parseMethod(ClassFileParser cfparser, Method m) {
-        Klass.Method kmethod = cfparser.parseMethod(m);
-        Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code);
-        if (c_attr != null) {
-            LineNumberTable_attribute lineNumTable =
-                    (LineNumberTable_attribute) c_attr.attributes.get(Attribute.LineNumberTable);
-            InstructorVisitor visitor = new InstructorVisitor(cfparser, lineNumTable);
-            trace("parseMethod %s %s %n", cfparser.this_klass, kmethod);
-            for (Instruction instr : c_attr.getInstructions()) {
-                try {
-                    instr.accept(visitor, kmethod);
-                } catch (ArrayIndexOutOfBoundsException e) {
-                    throw new RuntimeException("error at or after byte " + instr.getPC());
-                }
-
-            }
-
-            if (c_attr.exception_table_langth > 0) {
-                for (int i = 0; i <
-                        c_attr.exception_table.length; i++) {
-                    Code_attribute.Exception_data handler = c_attr.exception_table[i];
-                    int catch_type = handler.catch_type;
-                    if (catch_type > 0) {
-                        visitor.addConstantPoolRef(catch_type, kmethod, handler.start_pc);
-                    }
-
-                }
-            }
-        }
-    }
-
-    static class MethodDescriptor {
-
-        final String name;
-        final String classname;
-        final String methodname;
-        final String descriptor;
-        final boolean interfaceMethodRef;
-
-        MethodDescriptor(String classname) {
-            this.classname = classname.replace('/', '.');
-            this.name = this.classname;
-            this.methodname = "";
-            this.descriptor = "";
-            this.interfaceMethodRef = false;
-            if (this.classname.length() == 1) {
-                throw new RuntimeException("invalid " + this);
-            }
-        }
-
-        MethodDescriptor(String name, String descriptor, boolean interfaceMethodRef) {
-            name = name.replace('/', '.');
-            this.name = name;
-            int pos = name.lastIndexOf('.');
-            this.classname = name.substring(0, pos);
-            this.methodname = name.substring(pos + 1, name.length());
-            this.descriptor = descriptor;
-            this.interfaceMethodRef = interfaceMethodRef;
-            if (this.classname.length() == 1) {
-                throw new RuntimeException("invalid " + this);
-            }
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            MethodDescriptor m = (MethodDescriptor) obj;
-
-            return this.name.equals(m.name) &&
-                    this.descriptor.equals(m.descriptor);
-        }
-
-        @Override
-        public int hashCode() {
-            int hash = 7;
-            hash = 97 * hash + (this.name != null ? this.name.hashCode() : 0);
-            hash = 97 * hash + (this.descriptor != null ? this.descriptor.hashCode() : 0);
-            return hash;
-        }
-
-        public String toString() {
-            if (descriptor.isEmpty()) {
-                return name;
-            } else {
-                return name + " : " + descriptor;
-            }
-        }
-    }
-
-    static class Filter {
-
-        private Set<String> excludes = new TreeSet<String>();
-
-        Filter exclude(String pattern) {
-            excludes.add(pattern);
-            return this;
-        }
-
-        boolean isExcluded(String klass) {
-            for (String pattern : excludes) {
-                if (matches(klass, pattern)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private boolean matches(String klass, String pattern) {
-            int pos = klass.lastIndexOf('.');
-            String packageName = pos > 0 ? klass.substring(0, pos) : "<unnamed>";
-            if (pattern.endsWith("**")) {
-                String p = pattern.substring(0, pattern.length() - 2);
-                return klass.startsWith(p);
-            } else if (pattern.endsWith("*")) {
-                pos = pattern.lastIndexOf('.');
-                String pkg = pos > 0 ? pattern.substring(0, pos) : "<unnamed>";
-                if (packageName.equals(pkg)) {
-                    // package name has to be exact match
-                    String p = pattern.substring(0, pattern.length() - 1);
-                    return klass.startsWith(p);
-                } else {
-                    return false;
-                }
-            } else {
-                // exact match or inner class
-                return klass.equals(pattern) || klass.startsWith(pattern + "$");
-            }
-        }
-    }
-
-    static class InstructorVisitor implements Instruction.KindVisitor<Void, Klass.Method> {
-
-        private final ClassFileParser parser;
-        private final LineNumberTable_attribute lineNumTable;
-
-        InstructorVisitor(ClassFileParser parser, LineNumberTable_attribute lineNumTable) {
-            this.parser = parser;
-            this.lineNumTable = lineNumTable;
-        }
-
-        int getLineNumber(int pc) {
-            if (lineNumTable != null) {
-                int start_pc = 0;
-                int lineno = 0;
-                for (int i = 0; i < lineNumTable.line_number_table_length; i++) {
-                    int cur_start_pc = lineNumTable.line_number_table[i].start_pc;
-                    if (pc == 0 && cur_start_pc == 0) {
-                        return lineNumTable.line_number_table[i].line_number;
-                    } else if (pc >= start_pc && pc < cur_start_pc) {
-                        return lineno;
-                    }
-                    start_pc = cur_start_pc;
-                    lineno = lineNumTable.line_number_table[i].line_number;
-                }
-            }
-            return 0;
-        }
-
-        void addConstantPoolRef(int index, Klass.Method m, int pc) {
-            try {
-                CPInfo cpInfo = parser.classfile.constant_pool.get(index);
-                String name = cpInfo.accept(typeFinder, null);
-                if (name != null) {
-                    trace("   %s %s at line %d%n", parser.constantPoolParser.tagName(index), name, getLineNumber(pc));
-                }
-            } catch (InvalidIndex ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-
-        public Void visitNoOperands(Instruction instr, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitArrayType(Instruction instr, TypeKind kind, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitBranch(Instruction instr, int offset, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitConstantPoolRef(Instruction instr, int index, Klass.Method m) {
-            addConstantPoolRef(index, m, instr.getPC());
-            return null;
-        }
-
-        public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Klass.Method m) {
-            addConstantPoolRef(index, m, instr.getPC());
-            return null;
-        }
-
-        public Void visitLocal(Instruction instr, int index, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitLocalAndValue(Instruction instr, int index, int value, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitValue(Instruction instr, int value, Klass.Method m) {
-            return null;
-        }
-
-        public Void visitUnknown(Instruction instr, Klass.Method m) {
-            return null;
-        }
-        private ConstantPool.Visitor<String, Void> typeFinder = new ConstantPool.Visitor<String, Void>() {
-
-            String getClassName(CPRefInfo info, Void p) {
-                try {
-                    return parser.checkClassName(info.getClassName()).replace('/', '.');
-                } catch (ConstantPoolException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-
-            boolean addReferencedClass(String name) {
-                if (Klass.findKlass(name) == null) {
-                    MethodDescriptor md = new MethodDescriptor(name);
-                    if (!methods.contains(md) && !pending.contains(md)) {
-                        pending.add(md);
-                    }
-                    return true;
-                }
-                return false;
-            }
-            private String privilegedActionClass = "";
-
-            void cachePrivilegedAction(String classname) {
-                trace("   found PrivilegedAction %s%n", classname);
-                privilegedActionClass = classname;
-            }
-
-            void doPrivilegedCall(String method) {
-                if (privilegedActionClass.length() > 0) {
-                    MethodDescriptor md = new MethodDescriptor(privilegedActionClass + ".run", "*", false);
-                    if (!methods.contains(md) && !pending.contains(md)) {
-                        trace("   doPrivileged %s%n", md);
-                        pending.add(md);
-                    }
-                }
-            }
-
-            private String addMethodDescriptor(CPRefInfo info, Void p) {
-                try {
-                    String classname = getClassName(info, null);
-                    String method = classname + "." + info.getNameAndTypeInfo().getName();
-                    String descriptor = info.getNameAndTypeInfo().getType();
-
-                    if (method.endsWith(".<init>") && isPrivilegedAction(classname)) {
-                        cachePrivilegedAction(classname);
-                    }
-                    if (method.equals("java.security.AccessController.doPrivileged")) {
-                        doPrivilegedCall(method);
-                        return method;
-                    }
-
-                    boolean interfaceMethodRef = info instanceof CONSTANT_InterfaceMethodref_info;
-                    MethodDescriptor md = new MethodDescriptor(method, descriptor, interfaceMethodRef);
-                    if (!methods.contains(md) && !pending.contains(md)) {
-                        pending.add(md);
-                    }
-                    return method;
-                } catch (ConstantPoolException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-
-            public String visitClass(CONSTANT_Class_info info, Void p) {
-                try {
-                    String classname = parser.checkClassName(info.getName()).replace('/', '.');
-                    if (classname.length() > 0) {
-                        addReferencedClass(classname);
-                    }
-                    return classname;
-                } catch (ConstantPoolException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-
-            public String visitDouble(CONSTANT_Double_info info, Void p) {
-                // skip
-                return null;
-            }
-
-            public String visitFieldref(CONSTANT_Fieldref_info info, Void p) {
-                try {
-                    String classname = getClassName(info, p);
-                    if (classname.length() > 0) {
-                        addReferencedClass(classname);
-                    }
-
-                    String type = info.getNameAndTypeInfo().getType();
-                    String fieldType = parser.checkClassName(type).replace('/', '.');
-                    if (fieldType.length() > 0) {
-                        addReferencedClass(classname);
-                    }
-                    return parser.constantPoolParser.stringValue(info);
-                } catch (ConstantPoolException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-
-            public String visitFloat(CONSTANT_Float_info info, Void p) {
-                // skip
-                return null;
-            }
-
-            public String visitInteger(CONSTANT_Integer_info info, Void p) {
-                // skip
-                return null;
-            }
-
-            public String visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) {
-                return addMethodDescriptor(info, p);
-            }
-
-            public String visitLong(CONSTANT_Long_info info, Void p) {
-                // skip
-                return null;
-            }
-
-            public String visitNameAndType(CONSTANT_NameAndType_info info, Void p) {
-                // skip
-                return null;
-            }
-
-            public String visitMethodref(CONSTANT_Methodref_info info, Void p) {
-                return addMethodDescriptor(info, p);
-            }
-
-            public String visitString(CONSTANT_String_info info, Void p) {
-                // skip
-                return null;
-            }
-
-            public String visitUtf8(CONSTANT_Utf8_info info, Void p) {
-                return null;
-            }
-        };
-    }
-    static boolean traceOn = System.getProperty("classanalyzer.debug") != null;
-
-    private static void trace(String format, Object... args) {
-        if (traceOn) {
-            System.out.format(format, args);
-        }
-    }
-
-    private static void usage() {
-        System.out.println("Usage: BootAnalyzer <options>");
-        System.out.println("Options: ");
-        System.out.println("\t-jdkhome <JDK home> where all jars will be parsed");
-        System.out.println("\t-config  <roots for the boot module>");
-        System.out.println("\t-output  <output dir>");
-        System.out.println("\t-classlist print class list and summary");
-        System.exit(-1);
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/CheckDeps.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * A simple tool to check module dependencies against a known list of
- * dependencies. The tool fails (by throwing a RuntimeException) is an
- * unexpected dependency is detected.
- */
-
-public class CheckDeps {
-
-    /**
-     * Represents a dependency from one module to another module. The dependency
-     * may be optional.
-     */
-    static class Dependency {
-        private final String module;
-        private final String other;
-        private final boolean optional;
-
-        private Dependency(String module, String other, boolean optional) {
-            this.module = module;
-            this.other = other;
-            this.optional = optional;
-        }
-
-        String module()      { return module; }
-        String other()       { return other; }
-        boolean isOptional() { return optional; }
-
-        /**
-         * Parses a dependency in one of the following forms:
-         *   a -> b
-         *   [optional] a -> b
-         */
-        static Dependency fromString(String s) {
-            String[] components = s.split(" ");
-            int count = components.length;
-            if (count != 3 && count != 4)
-                throw new IllegalArgumentException(s);
-            boolean optional = (count == 4);
-            if (optional && !components[0].equals("[optional]"))
-                throw new IllegalArgumentException(s);
-            String arrow = optional ? components[2] : components[1];
-            if (!arrow.equals("->"))
-                throw new IllegalArgumentException(s);
-            String module = optional ? components[1] : components[0];
-            String other = optional ? components[3] : components[2];
-            return new Dependency(module, other, optional);
-        }
-
-        @Override public String toString() {
-            StringBuilder sb = new StringBuilder();
-            if (optional)
-                sb.append("[optional] ");
-            sb.append(module);
-            sb.append(" -> ");
-            sb.append(other);
-            return sb.toString();
-        }
-    }
-
-    /**
-     * Represents the "tail"
-     */
-    static class DependencyTail {
-        private final String module;
-        private final boolean optional;
-
-        DependencyTail(String module, boolean optional) {
-            this.module = module;
-            this.optional = optional;
-        }
-        String module()      { return module; }
-        boolean isOptional() { return optional; }
-    }
-
-    static void usage() {
-        System.out.println("java CheckDeps file1 file2");
-        System.out.println("  where file1 is the expected dependencies and file2 is");
-        System.out.println("  the actual dependencies. Both files are assumed to be");
-        System.out.println("  in modules.summary format (see ClassAnalyzer tool).");
-        System.out.println();
-        System.out.println("Example usages:");
-        System.out.println("  java CheckDeps make/modules/modules.summary " +
-            "$(OUTPUTDIR)/modules.summary");
-        System.exit(-1);
-    }
-
-    public static void main(String[] args) throws IOException {
-        if (args.length != 2)
-            usage();
-
-        // maps a module to the list of modules that it depends on
-        Map<String,List<DependencyTail>> expected =
-            new HashMap<String,List<DependencyTail>>();
-
-        // parse the expected dependencies file
-        Scanner s;
-        s = new Scanner(new FileInputStream(args[0]));
-        try {
-            while (s.hasNextLine()) {
-                Dependency ref = Dependency.fromString(s.nextLine());
-                if (ref != null) {
-                    String module = ref.module();
-                    List<DependencyTail> list = expected.get(module);
-                    if (list == null) {
-                        list = new ArrayList<DependencyTail>();
-                        expected.put(module, list);
-                    }
-                    list.add(new DependencyTail(ref.other(), ref.isOptional()));
-                }
-            }
-        } finally {
-            s.close();
-        }
-
-        // parse the actual dependencies file, checking each dependency
-        // against the expected list.
-        boolean fail = false;
-        s = new Scanner(new FileInputStream(args[1]));
-        try {
-            while (s.hasNextLine()) {
-                Dependency dep = Dependency.fromString(s.nextLine());
-
-                // check if this dependency is expected
-                List<DependencyTail> list = expected.get(dep.module());
-                DependencyTail tail = null;
-                if (list != null) {
-                    for (DependencyTail t: list) {
-                        if (t.module().equals(dep.other())) {
-                            tail = t;
-                            break;
-                        }
-                    }
-                }
-                if (tail == null) {
-                    System.err.println("Unexpected dependency: " + dep);
-                    fail = true;
-                } else {
-                    // hard dependency when optional dependency is expected
-                    if (tail.isOptional() != dep.isOptional()) {
-                        if (tail.isOptional()) {
-                            System.err.println("Unexpected dependency: " + dep);
-                            fail = true;
-                        }
-                    }
-                }
-            }
-        } finally {
-            s.close();
-        }
-
-        if (fail)
-            throw new RuntimeException("Unexpected dependencies found");
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ClassAnalyzer.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,354 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import com.sun.classanalyzer.AnnotatedDependency.*;
-import com.sun.classanalyzer.Module.Dependency;
-import com.sun.classanalyzer.Module.PackageInfo;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-/**
- *
- * @author Mandy Chung
- */
-public class ClassAnalyzer {
-
-    public static void main(String[] args) throws Exception {
-        String jdkhome = null;
-        String cpath = null;
-        List<String> configs = new ArrayList<String>();
-        List<String> depconfigs = new ArrayList<String>();
-        String output = ".";
-        boolean mergeModules = true;
-        boolean showDynamic = false;
-
-        // process arguments
-        int i = 0;
-        while (i < args.length) {
-            String arg = args[i++];
-            if (arg.equals("-jdkhome")) {
-                if (i < args.length) {
-                    jdkhome = args[i++];
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-cpath")) {
-                if (i < args.length) {
-                    cpath = args[i++];
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-config")) {
-                if (i < args.length) {
-                    configs.add(args[i++]);
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-depconfig")) {
-                if (i < args.length) {
-                    depconfigs.add(args[i++]);
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-output")) {
-                if (i < args.length) {
-                    output = args[i++];
-                } else {
-                    usage();
-                }
-            } else if (arg.equals("-base")) {
-                ModuleConfig.setBaseModule(args[i++]);
-            } else if (arg.equals("-nomerge")) {
-                // analyze the fine-grained module dependencies
-                mergeModules = false;
-            } else if (arg.equals("-showdynamic")) {
-                showDynamic = true;
-            } else {
-                System.err.println("Invalid option: " + arg);
-                usage();
-            }
-        }
-
-        if ((jdkhome == null && cpath == null) || (jdkhome != null && cpath != null)) {
-            usage();
-        }
-        if (configs.isEmpty()) {
-            usage();
-        }
-
-        if (jdkhome != null) {
-            ClassPath.setJDKHome(jdkhome);
-        } else if (cpath != null) {
-            ClassPath.setClassPath(cpath);
-        }
-
-        // create output directory if it doesn't exist
-        File dir = new File(output);
-        if (!dir.isDirectory()) {
-            if (!dir.exists()) {
-                boolean created = dir.mkdir();
-                if (!created) {
-                    throw new RuntimeException("Unable to create `" + dir + "'");
-                }
-            }
-        }
-
-        buildModules(configs, depconfigs, mergeModules);
-
-        // generate output files
-        for (Module m : modules) {
-            // only generate reports for top-level modules
-            if (m.group() == m) {
-                m.printClassListTo(resolve(dir, m.name(), "classlist"));
-                m.printResourceListTo(resolve(dir, m.name(), "resources"));
-                m.printSummaryTo(resolve(dir, m.name(), "summary"));
-                m.printDependenciesTo(resolve(dir, m.name(), "dependencies"), showDynamic);
-            }
-        }
-
-        // Generate other summary reports
-        printModulesSummary(dir, showDynamic);
-        printModulesDot(dir, showDynamic);
-        printModulesList(dir);
-        printPackagesSummary(dir);
-    }
-    private static List<Module> modules = new ArrayList<Module>();
-
-    static void buildModules(List<String> configs,
-            List<String> depconfigs,
-            boolean mergeModules) throws IOException {
-        // create modules based on the input config files
-        for (String file : configs) {
-            for (ModuleConfig mconfig : ModuleConfig.readConfigurationFile(file)) {
-                modules.add(Module.addModule(mconfig));
-            }
-        }
-
-        // parse class files
-        ClassPath.parseAllClassFiles();
-
-        // Add additional dependencies if specified
-        if (depconfigs != null && depconfigs.size() > 0) {
-            DependencyConfig.parse(depconfigs);
-        }
-
-        // process the roots and dependencies to get the classes for each module
-        for (Module m : modules) {
-            m.processRootsAndReferences();
-        }
-
-        // update the dependencies for classes that were subsequently allocated
-        // to modules
-        for (Module m : modules) {
-            m.fixupDependencies();
-        }
-
-        if (mergeModules) {
-            Module.buildModuleMembers();
-        }
-    }
-
-    private static void printModulesSummary(File dir, boolean showDynamic) throws IOException {
-        // print summary of dependencies
-        PrintWriter writer = new PrintWriter(new File(dir, "modules.summary"));
-        try {
-            for (Module m : modules) {
-                // only show top-level module dependencies
-                if (m.group() == m) {
-                    for (Dependency dep : m.dependents()) {
-                        if (!showDynamic && dep.dynamic && dep.optional) {
-                            continue;
-                        }
-                        if (dep.module == null || !dep.module.isBase()) {
-
-                            String prefix = "";
-                            if (dep.optional) {
-                                if (dep.dynamic) {
-                                    prefix = "[dynamic] ";
-                                } else {
-                                    prefix = "[optional] ";
-                                }
-                            }
-
-                            Module other = dep != null ? dep.module : null;
-                            writer.format("%s%s -> %s%n", prefix, m, other);
-                        }
-                    }
-                }
-            }
-        } finally {
-            writer.close();
-        }
-    }
-
-    private static void printModulesDot(File dir, boolean showDynamic) throws IOException {
-        PrintWriter writer = new PrintWriter(new File(dir, "modules.dot"));
-        try {
-            writer.println("digraph jdk {");
-            for (Module m : modules) {
-                if (m.group() == m) {
-                    for (Dependency dep : m.dependents()) {
-                        if (!showDynamic && dep.dynamic && dep.optional) {
-                            continue;
-                        }
-                        if (dep.module == null || !dep.module.isBase()) {
-                            String style = "";
-                            String color = "";
-                            String property = "";
-                            if (dep.optional) {
-                                style = "style=dotted";
-                            }
-                            if (dep.dynamic) {
-                                color = "color=red";
-                            }
-                            if (style.length() > 0 || color.length() > 0) {
-                                String comma = "";
-                                if (style.length() > 0 && color.length() > 0) {
-                                    comma = ", ";
-                                }
-                                property = String.format(" [%s%s%s]", style, comma, color);
-                            }
-                            Module other = dep != null ? dep.module : null;
-                            writer.format("    \"%s\" -> \"%s\"%s;%n", m, other, property);
-                        }
-                    }
-                }
-            }
-            writer.println("}");
-        } finally {
-            writer.close();
-        }
-    }
-
-    private static void printMembers(Module m, PrintWriter writer) {
-        for (Module member : m.members()) {
-            if (!member.isEmpty()) {
-                writer.format("%s ", member);
-                printMembers(member, writer);
-            }
-        }
-    }
-
-    private static void printModulesList(File dir) throws IOException {
-        // print module group / members relationship
-        PrintWriter writer = new PrintWriter(new File(dir, "modules.list"));
-        try {
-            for (Module m : modules) {
-                if (m.group() == m && !m.isEmpty()) {
-                    writer.format("%s ", m);
-                    printMembers(m, writer);
-                    writer.println();
-                }
-            }
-        } finally {
-            writer.close();
-        }
-    }
-
-    private static void printPackagesSummary(File dir) throws IOException {
-        // print package / module relationship
-        PrintWriter writer = new PrintWriter(new File(dir, "modules.pkginfo"));
-        try {
-            Map<String, Set<Module>> packages = new TreeMap<String, Set<Module>>();
-            Set<String> splitPackages = new TreeSet<String>();
-
-            for (Module m : modules) {
-                if (m.group() == m) {
-                    for (PackageInfo info : m.getPackageInfos()) {
-                        Set<Module> value = packages.get(info.pkgName);
-                        if (value == null) {
-                            value = new TreeSet<Module>();
-                            packages.put(info.pkgName, value);
-                        } else {
-                            // package in more than one module
-                            splitPackages.add(info.pkgName);
-                        }
-                        value.add(m);
-                    }
-                }
-            }
-
-            // packages that are splitted among multiple modules
-            writer.println("Packages splitted across modules:-\n");
-            writer.format("%-60s  %s\n", "Package", "Module");
-
-            for (String pkgname : splitPackages) {
-                writer.format("%-60s", pkgname);
-                for (Module m : packages.get(pkgname)) {
-                    writer.format("  %s", m);
-                }
-                writer.println();
-            }
-
-            writer.println("\nPackage-private dependencies:-");
-            for (String pkgname : splitPackages) {
-                for (Klass k : Klass.getAllClasses()) {
-                    if (k.getPackageName().equals(pkgname)) {
-                        Module m = k.getModule();
-                        // check if this klass references a package-private
-                        // class that is in a different module
-                        for (Klass other : k.getReferencedClasses()) {
-                            if (other.getModule() != m &&
-                                    !other.isPublic() &&
-                                    other.getPackageName().equals(pkgname)) {
-                                String from = k.getClassName() + " (" + m + ")";
-                                writer.format("%-60s -> %s (%s)\n", from, other, other.getModule());
-                            }
-                        }
-                    }
-                }
-            }
-        } finally {
-            writer.close();
-        }
-
-    }
-
-    private static String resolve(File dir, String mname, String suffix) {
-        File f = new File(dir, mname + "." + suffix);
-        return f.toString();
-
-    }
-
-    private static void usage() {
-        System.out.println("Usage: ClassAnalyzer <options>");
-        System.out.println("Options: ");
-        System.out.println("\t-jdkhome <JDK home> where all jars will be parsed");
-        System.out.println("\t-cpath   <classpath> where classes and jars will be parsed");
-        System.out.println("\t         Either -jdkhome or -cpath option can be used.");
-        System.out.println("\t-config  <module config file>");
-        System.out.println("\t         This option can be repeated for multiple module config files");
-        System.out.println("\t-output  <output dir>");
-        System.out.println("\t-nomerge specify not to merge modules");
-        System.out.println("\t-showdynamic show dynamic dependencies in the reports");
-        System.exit(-1);
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ClassFileParser.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,629 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import com.sun.tools.classfile.*;
-import com.sun.tools.classfile.Type.*;
-import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
-import static com.sun.tools.classfile.AccessFlags.*;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-/**
- *
- * @author Mandy Chung
- */
-public class ClassFileParser {
-
-    final Klass this_klass;
-    final ClassFile classfile;
-    final ConstantPoolParser constantPoolParser;
-    final AnnotationParser annotationParser;
-    final CodeAttributeParser codeAttributeParser;
-    private final boolean buildDeps;
-
-    protected ClassFileParser(InputStream in, long size, boolean buildDeps) throws IOException {
-        try {
-            this.classfile = ClassFile.read(in);
-            this.this_klass = getKlass(this.classfile);
-            this.buildDeps = buildDeps;
-            this.constantPoolParser = new ConstantPoolParser(this);
-            this.annotationParser = new AnnotationParser(this);
-            this.codeAttributeParser = new CodeAttributeParser(this);
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    private Klass getKlass(ClassFile cf) throws ConstantPoolException {
-        Klass k = Klass.getKlass(cf.getName());
-        k.setAccessFlags(cf.access_flags.flags);
-        k.setFileSize(cf.byteLength());
-        return k;
-    }
-
-    public static ClassFileParser newParser(InputStream in, long size, boolean buildDeps) throws IOException {
-        return new ClassFileParser(in, size, buildDeps);
-    }
-
-    public static ClassFileParser newParser(String classPathname, boolean buildDeps) throws IOException {
-        return newParser(new File(classPathname), buildDeps);
-    }
-
-    public static ClassFileParser newParser(File f, boolean buildDeps) throws IOException {
-        BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
-        try {
-            return newParser(in, f.length(), buildDeps);
-        } finally {
-            in.close();
-        }
-    }
-
-    public void parseDependency(boolean publicAPIs) throws IOException {
-        if (publicAPIs && !classfile.access_flags.is(ACC_PUBLIC)) {
-            // process public APIs only
-            return;
-        }
-
-        parseClassInfo();
-        if (!publicAPIs) {
-            // parse all references in the classfile
-            constantPoolParser.parseDependency();
-        }
-        parseMethods(publicAPIs);
-        parseFields(publicAPIs);
-    }
-
-    void parseClassInfo() throws IOException {
-        ConstantPool cpool = classfile.constant_pool;
-        try {
-            Signature_attribute sigAttr = (Signature_attribute) classfile.attributes.get(Attribute.Signature);
-            if (sigAttr == null) {
-                // use info from class file header
-                if (classfile.isClass() && classfile.super_class != 0) {
-                    String sn = classfile.getSuperclassName();
-                    addExtends(sn);
-                }
-                for (int i = 0; i < classfile.interfaces.length; i++) {
-                    String interf = classfile.getInterfaceName(i);
-                    if (classfile.isClass()) {
-                        addImplements(interf);
-                    } else {
-                        addExtends(interf);
-                    }
-                }
-            } else {
-                Type t = sigAttr.getParsedSignature().getType(cpool);
-                // The signature parser cannot disambiguate between a
-                // FieldType and a ClassSignatureType that only contains a superclass type.
-                if (t instanceof Type.ClassSigType) {
-                    Type.ClassSigType cst = Type.ClassSigType.class.cast(t);
-                    if (cst.superclassType != null) {
-                        for (Klass k : getKlass(cst.superclassType)) {
-                            addExtends(k);
-                        }
-                    }
-                    if (cst.superinterfaceTypes != null) {
-                        for (Type t1 : cst.superinterfaceTypes) {
-                            for (Klass k : getKlass(t1)) {
-                                addImplements(k);
-                            }
-                        }
-                    }
-                } else {
-                    for (Klass k : getKlass(t)) {
-                        addExtends(k);
-                    }
-                }
-            }
-            // parse attributes
-            annotationParser.parseAttributes(classfile.attributes);
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    private void parseFields(boolean publicAPIs) throws IOException {
-        ConstantPool cpool = classfile.constant_pool;
-        for (Field f : classfile.fields) {
-            try {
-                AccessFlags flags = f.access_flags;
-                if (publicAPIs && !flags.is(ACC_PUBLIC) && !flags.is(ACC_PROTECTED)) {
-                    continue;
-                }
-                String fieldname = f.getName(cpool);
-                Signature_attribute sigAttr = (Signature_attribute) f.attributes.get(Attribute.Signature);
-
-                if (sigAttr == null) {
-                    Set<Klass> types = parseDescriptor(f.descriptor);
-                    String info = getFlag(flags) + " " + f.descriptor.getFieldType(cpool) + " " + fieldname;
-                    addFieldTypes(types, info, flags);
-                } else {
-                    Type t = sigAttr.getParsedSignature().getType(cpool);
-                    String info = getFlag(flags) + " " + t + " " + fieldname;
-                    addFieldTypes(getKlass(t), info, flags);
-                }
-                // parse attributes
-                annotationParser.parseAttributes(f.attributes);
-            } catch (ConstantPoolException ex) {
-                throw new RuntimeException(ex);
-            } catch (InvalidDescriptor ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-
-    private void parseMethods(boolean publicAPIs) {
-        for (Method m : classfile.methods) {
-            if (publicAPIs && !m.access_flags.is(ACC_PUBLIC) && !m.access_flags.is(ACC_PROTECTED)) {
-                // only interest in the API level
-                return;
-            }
-
-            parseMethod(m);
-        }
-    }
-
-    String checkClassName(String classname) {
-        int i = 0;
-        while (i < classname.length()) {
-            switch (classname.charAt(i)) {
-                case 'Z':
-                case 'B':
-                case 'C':
-                case 'S':
-                case 'I':
-                case 'J':
-                case 'F':
-                case 'D':
-                    return "";
-                case 'L':
-                    if (!classname.endsWith(";")) {
-                        throw new RuntimeException("Invalid classname " + classname);
-                    }
-                    return classname.substring(i + 1, classname.length() - 1);
-                case '[':
-                    i++;
-                    break;
-                default:
-                    if (classname.endsWith(";")) {
-                        throw new RuntimeException("Invalid classname " + classname);
-                    }
-                    return classname;
-
-            }
-        }
-        throw new RuntimeException("Invalid classname " + classname);
-    }
-
-    private void addExtends(String classname) throws IOException {
-        if (!buildDeps) {
-            return;
-        }
-
-        addExtends(Klass.getKlass(classname));
-    }
-
-    private void addExtends(Klass k) {
-        if (!buildDeps) {
-            return;
-        }
-
-        ResolutionInfo resInfo = ResolutionInfo.resolvedExtends(this_klass, k);
-        resInfo.setPublicAccess(classfile.access_flags.is(ACC_PUBLIC));
-        this_klass.addDep(k, resInfo);
-        k.addReferrer(this_klass, resInfo);
-    }
-
-    private void addImplements(String classname) throws IOException {
-        if (!buildDeps) {
-            return;
-        }
-
-        addImplements(Klass.getKlass(classname));
-    }
-
-    private void addImplements(Klass k) {
-        if (!buildDeps) {
-            return;
-        }
-
-        ResolutionInfo resInfo = ResolutionInfo.resolvedImplements(this_klass, k);
-        resInfo.setPublicAccess(classfile.access_flags.is(ACC_PUBLIC));
-
-        this_klass.addDep(k, resInfo);
-
-        k.addReferrer(this_klass, resInfo);
-    }
-
-    private Set<Klass> getKlass(Type type) throws IOException {
-        Set<Klass> refTypes = new TreeSet<Klass>();
-        if (!buildDeps) {
-            return refTypes;
-        }
-
-        type.accept(typevisitor, refTypes);
-        return refTypes;
-    }
-    private Type.Visitor<Void, Set<Klass>> typevisitor = new Type.Visitor<Void, Set<Klass>>() {
-
-        public Void visitSimpleType(SimpleType type, Set<Klass> klasses) {
-            // nop
-            return null;
-        }
-
-        public Void visitArrayType(ArrayType type, Set<Klass> klasses) {
-            try {
-                klasses.addAll(getKlass(type.elemType));
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            }
-            return null;
-
-        }
-
-        public Void visitMethodType(MethodType type, Set<Klass> klasses) {
-            throw new InternalError("Unexpected type " + type);
-        }
-
-        public Void visitClassSigType(ClassSigType type, Set<Klass> klasses) {
-            try {
-                if (type.superclassType != null) {
-                    klasses.addAll(getKlass(type.superclassType));
-                }
-                if (type.superinterfaceTypes != null) {
-                    for (Type t : type.superinterfaceTypes) {
-                        klasses.addAll(getKlass(t));
-                    }
-                }
-                if (type.typeParamTypes != null) {
-                    for (Type t : type.typeParamTypes) {
-                        klasses.addAll(getKlass(t));
-                    }
-                }
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            }
-            return null;
-        }
-
-        public Void visitClassType(ClassType type, Set<Klass> klasses) {
-            klasses.add(Klass.getKlass(type.getBinaryName()));
-            if (type.typeArgs != null) {
-                for (Type t : type.typeArgs) {
-                    try {
-                        klasses.addAll(getKlass(t));
-                    } catch (IOException ex) {
-                        throw new RuntimeException(ex);
-                    }
-                }
-            }
-            return null;
-
-        }
-
-        public Void visitTypeParamType(TypeParamType type, Set<Klass> klasses) {
-            try {
-                if (type.classBound != null) {
-                    klasses.addAll(getKlass(type.classBound));
-                }
-                if (type.interfaceBounds != null) {
-                    for (Type t : type.interfaceBounds) {
-                        klasses.addAll(getKlass(t));
-                    }
-                }
-
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            }
-
-            return null;
-
-        }
-
-        public Void visitWildcardType(WildcardType type, Set<Klass> klasses) {
-            if (type.boundType != null) {
-                try {
-                    klasses.addAll(getKlass(type.boundType));
-                } catch (IOException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-            return null;
-
-        }
-    };
-
-    private void printMethod(Method m) {
-        try {
-            System.out.println("parsing " + m.getName(classfile.constant_pool) + "(" +
-                    m.descriptor.getParameterTypes(classfile.constant_pool) + ") return type " +
-                    m.descriptor.getReturnType(classfile.constant_pool));
-
-        } catch (ConstantPoolException ex) {
-        } catch (InvalidDescriptor ex) {
-        }
-    }
-
-    private static StringBuilder appendWord(StringBuilder sb, String word) {
-        if (sb.length() > 0) {
-            sb.append(" ");
-        }
-        sb.append(word);
-        return sb;
-    }
-
-    private static String getFlag(AccessFlags flags) {
-        StringBuilder modifier = new StringBuilder();
-        if (flags.is(ACC_PUBLIC)) {
-            modifier.append("public");
-        }
-        if (flags.is(ACC_PRIVATE)) {
-            modifier.append("private");
-        }
-        if (flags.is(ACC_PROTECTED)) {
-            modifier.append("protected");
-        }
-        if (flags.is(ACC_STATIC)) {
-            appendWord(modifier, "static");
-        }
-        if (flags.is(ACC_FINAL)) {
-            appendWord(modifier, "final");
-        }
-        if (flags.is(ACC_SYNCHRONIZED)) {
-            // return "synchronized";
-        }
-        if (flags.is(0x80)) {
-            // return (t == Type.Field ? "transient" : null);
-            // return "transient";
-        }
-        if (flags.is(ACC_VOLATILE)) {
-            // return "volatile";
-        }
-        if (flags.is(ACC_NATIVE)) {
-            // return "native";
-        }
-        if (flags.is(ACC_ABSTRACT)) {
-            appendWord(modifier, "abstract");
-        }
-        if (flags.is(ACC_STRICT)) {
-            // return "strictfp";
-        }
-        if (flags.is(ACC_MODULE)) {
-            appendWord(modifier, "module");
-        }
-        return modifier.toString();
-    }
-
-    private Klass.Method toKlassMethod(Method m, Descriptor d) {
-        try {
-            ConstantPool cpool = classfile.constant_pool;
-            String methodname = m.getName(cpool);
-            StringBuilder sb = new StringBuilder();
-            sb.append(getFlag(m.access_flags));
-            if (methodname.equals("<init>")) {
-                String s = this_klass.getBasename() + d.getParameterTypes(cpool);
-                appendWord(sb, s);
-            } else if (methodname.equals("<clinit>")) {
-                // <clinit>
-                appendWord(sb, methodname);
-            } else {
-                String s = d.getReturnType(cpool) + " " + methodname + d.getParameterTypes(cpool);
-                appendWord(sb, s);
-            }
-            String signature = sb.toString().replace('/', '.');
-            return this_klass.getMethod(methodname, signature);
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        } catch (InvalidDescriptor ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    Klass.Method parseMethod(Method m) {
-        AccessFlags flags = m.access_flags;
-        Descriptor d;
-        List<? extends Type> methodExceptions = null;
-        try {
-            ConstantPool cpool = classfile.constant_pool;
-            Klass.Method kmethod;
-            Signature_attribute sigAttr = (Signature_attribute) m.attributes.get(Attribute.Signature);
-            if (sigAttr == null) {
-                d = m.descriptor;
-                Set<Klass> types = parseDescriptor(d);
-
-                kmethod = toKlassMethod(m, d);
-                addMethodTypes(types, kmethod, flags);
-            } else {
-                Type.MethodType methodType;
-                Signature methodSig = sigAttr.getParsedSignature();
-                d = methodSig;
-                try {
-                    kmethod = toKlassMethod(m, d);
-                    methodType = (Type.MethodType) methodSig.getType(cpool);
-                    addMethodTypes(getKlass(methodType.returnType), kmethod, flags);
-                    if (methodType.paramTypes != null) {
-                        for (Type t : methodType.paramTypes) {
-                            addMethodTypes(getKlass(t), kmethod, flags);
-                        }
-                    }
-                    if (methodType.typeParamTypes != null) {
-                        for (Type t : methodType.typeParamTypes) {
-                            addMethodTypes(getKlass(t), kmethod, flags);
-                        }
-                    }
-
-                    methodExceptions = methodType.throwsTypes;
-                    if (methodExceptions != null) {
-                        if (methodExceptions.size() == 0) {
-                            methodExceptions = null;
-                        } else {
-                            for (Type t : methodExceptions) {
-                                addCheckedExceptionTypes(getKlass(t), kmethod, flags);
-                            }
-                        }
-                    }
-                } catch (ConstantPoolException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-
-            Attribute e_attr = m.attributes.get(Attribute.Exceptions);
-            if (e_attr != null && methodExceptions == null) {
-                // if there are generic exceptions, there must be erased exceptions
-                if (e_attr instanceof Exceptions_attribute) {
-                    Exceptions_attribute exceptions = (Exceptions_attribute) e_attr;
-                    for (int i = 0; i < exceptions.number_of_exceptions; i++) {
-                        String classname = checkClassName(exceptions.getException(i, classfile.constant_pool));
-                        if (classname.length() > 0 && buildDeps) {
-                            Klass to = Klass.getKlass(classname);
-                            ResolutionInfo resInfo = ResolutionInfo.resolvedCheckedException(this_klass, to, kmethod);
-                            resInfo.setPublicAccess(flags.is(ACC_PUBLIC));
-
-                            this_klass.addDep(to, resInfo);
-                            to.addReferrer(this_klass, resInfo);
-                        }
-                    }
-                } else {
-                    throw new RuntimeException("Invalid attribute: " + e_attr);
-                }
-            }
-
-            Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code);
-            if (c_attr != null) {
-                codeAttributeParser.parse(c_attr, kmethod);
-            }
-            kmethod.isAbstract = classfile.access_flags.is(ACC_ABSTRACT);
-            kmethod.setCodeLength(m.byteLength());
-
-            // parse annotation attributes
-            annotationParser.parseAttributes(m.attributes, kmethod);
-            return kmethod;
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    private void addFieldTypes(Set<Klass> types, String info, AccessFlags flags) {
-        if (types.isEmpty() || !buildDeps) {
-            return;
-        }
-
-        for (Klass to : types) {
-            ResolutionInfo resInfo = ResolutionInfo.resolvedField(this_klass, to, info);
-            resInfo.setPublicAccess(flags.is(ACC_PUBLIC));
-
-            this_klass.addDep(to, resInfo);
-            to.addReferrer(this_klass, resInfo);
-        }
-    }
-
-    private void addReferencedTypes(Method m, Descriptor d, AccessFlags flags) {
-        Set<Klass> types = parseDescriptor(d);
-
-        Klass.Method method = toKlassMethod(m, d);
-        addMethodTypes(types, method, flags);
-    }
-
-    private void addMethodTypes(Set<Klass> types, Klass.Method method, AccessFlags flags) {
-        if (types.isEmpty() || !buildDeps) {
-            return;
-        }
-        for (Klass to : types) {
-            ResolutionInfo resInfo = ResolutionInfo.resolvedMethodSignature(this_klass, to, method);
-            resInfo.setPublicAccess(flags.is(ACC_PUBLIC));
-
-            this_klass.addDep(to, resInfo);
-            to.addReferrer(this_klass, resInfo);
-        }
-    }
-
-    private void addCheckedExceptionTypes(Set<Klass> types, Klass.Method method, AccessFlags flags) {
-        if (types.isEmpty() || !buildDeps) {
-            return;
-        }
-        for (Klass to : types) {
-            ResolutionInfo resInfo = ResolutionInfo.resolvedCheckedException(this_klass, to, method);
-            resInfo.setPublicAccess(flags.is(ACC_PUBLIC));
-
-            this_klass.addDep(to, resInfo);
-            to.addReferrer(this_klass, resInfo);
-        }
-    }
-
-    private Set<Klass> parseDescriptor(Descriptor d) {
-        Set<Klass> types = new TreeSet<Klass>();
-        try {
-            String desc = d.getValue(classfile.constant_pool);
-            int p = 0;
-            while (p < desc.length()) {
-                String type;
-                char ch;
-                switch (ch = desc.charAt(p++)) {
-                    case '(':
-                    case ')':
-                    case '[':
-                    case 'B':
-                    case 'C':
-                    case 'D':
-                    case 'F':
-                    case 'I':
-                    case 'J':
-                    case 'S':
-                    case 'Z':
-                    case 'V':
-                        continue;
-                    case 'L':
-                        int sep = desc.indexOf(';', p);
-                        if (sep == -1) {
-                            throw new RuntimeException("Invalid descriptor: " + (p - 1) + " " + desc);
-                        }
-                        type = checkClassName(desc.substring(p, sep));
-                        p = sep + 1;
-                        break;
-                    default:
-                        throw new RuntimeException("Invalid descriptor: " + (p - 1) + " " + desc);
-                }
-
-                if (!type.isEmpty() && buildDeps) {
-                    Klass to = Klass.getKlass(type);
-                    types.add(to);
-
-                }
-            }
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        }
-        return types;
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ClassPath.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-/**
- *
- * @author mchung
- */
-public class ClassPath {
-
-    public class FileInfo {
-
-        File file;
-        JarFile jarfile;
-        int classCount;
-        long filesize;
-
-        FileInfo(File f) throws IOException {
-            this.file = f;
-            this.classCount = 0;
-            if (file.getName().endsWith(".jar")) {
-                this.filesize = file.length();
-                jarfile = new JarFile(f);
-            }
-        }
-
-        File getFile() {
-            return file;
-        }
-
-        JarFile getJarFile() {
-            return jarfile;
-        }
-
-        String getName() throws IOException {
-            return file.getCanonicalPath();
-        }
-    }
-    private List<FileInfo> fileList = new ArrayList<FileInfo>();
-    private static ClassPath instance = new ClassPath();
-
-    static List<FileInfo> getFileInfos() {
-        return instance.fileList;
-    }
-
-    static ClassPath setJDKHome(String jdkhome) throws IOException {
-        List<File> files = new ArrayList<File>();
-        File jre = new File(jdkhome, "jre");
-        File lib = new File(jdkhome, "lib");
-        if (jre.exists() && jre.isDirectory()) {
-            listFiles(new File(jre, "lib"), ".jar", files);
-        } else if (lib.exists() && lib.isDirectory()) {
-            // either a JRE or a jdk build image
-            listFiles(lib, ".jar", files);
-
-            File classes = new File(jdkhome, "classes");
-            if (classes.exists() && classes.isDirectory()) {
-                // jdk build outputdir
-                instance.add(classes);
-            }
-        } else {
-            throw new RuntimeException("\"" + jdkhome + "\" not a JDK home");
-        }
-
-        for (File f : files) {
-            instance.add(f);
-        }
-        return instance;
-    }
-
-    static ClassPath setClassPath(String path) throws IOException {
-        if (path.endsWith(".class")) {
-            // one class file
-            File f = new File(path);
-            if (!f.exists()) {
-                throw new RuntimeException("Classfile \"" + f + "\" doesn't exist");
-            }
-
-            instance.add(f);
-        } else {
-            List<File> jarFiles = new ArrayList<File>();
-            String[] locs = path.split(File.pathSeparator);
-            for (String p : locs) {
-                File f = new File(p);
-                if (!f.exists()) {
-                    throw new RuntimeException("\"" + f + "\" doesn't exist");
-                }
-
-                if (f.isDirectory()) {
-                    instance.add(f);  // add the directory to look up .class files
-                    listFiles(f, ".jar", jarFiles);
-                } else if (p.endsWith(".jar")) {
-                    // jar files
-                    jarFiles.add(f);
-                } else {
-                    throw new RuntimeException("Invalid file \"" + f);
-                }
-            }
-            // add jarFiles if any
-            for (File f : jarFiles) {
-                instance.add(f);
-            }
-        }
-
-        return instance;
-    }
-
-    private void add(File f) throws IOException {
-        fileList.add(new FileInfo(f));
-    }
-
-    public static InputStream open(String pathname) throws IOException {
-        for (FileInfo fi : instance.fileList) {
-            if (fi.getName().endsWith(".jar")) {
-                String path = pathname.replace(File.separatorChar, '/');
-                JarEntry e = fi.jarfile.getJarEntry(path);
-                if (e != null) {
-                    return fi.jarfile.getInputStream(e);
-                }
-            } else if (fi.getFile().isDirectory()) {
-                File f = new File(fi.getFile(), pathname);
-                if (f.exists()) {
-                    return new FileInputStream(f);
-                }
-            } else if (fi.file.isFile()) {
-                if (fi.getName().endsWith(File.separator + pathname)) {
-                    return new FileInputStream(fi.file);
-                }
-            }
-        }
-        return null;
-    }
-
-    static ClassFileParser parserForClass(String classname) throws IOException {
-        String pathname = classname.replace('.', File.separatorChar) + ".class";
-
-        ClassFileParser cfparser = null;
-        for (FileInfo fi : instance.fileList) {
-            if (fi.getName().endsWith(".class")) {
-                if (fi.getName().endsWith(File.separator + pathname)) {
-                    cfparser = ClassFileParser.newParser(fi.getFile(), true);
-                    break;
-                }
-            } else if (fi.getName().endsWith(".jar")) {
-                JarEntry e = fi.jarfile.getJarEntry(classname.replace('.', '/') + ".class");
-                if (e != null) {
-                    cfparser = ClassFileParser.newParser(fi.jarfile.getInputStream(e), e.getSize(), true);
-                    break;
-                }
-            } else if (fi.getFile().isDirectory()) {
-                File f = new File(fi.getFile(), pathname);
-                if (f.exists()) {
-                    cfparser = ClassFileParser.newParser(f, true);
-                    break;
-                }
-            }
-        }
-        return cfparser;
-    }
-
-    public static void parseAllClassFiles() throws IOException {
-        instance.parseFiles();
-    }
-
-    private void parseFiles() throws IOException {
-        Set<Klass> classes = new HashSet<Klass>();
-
-        int count = 0;
-        for (FileInfo fi : fileList) {
-            // filter out public generated classes (i.e. not public API)
-            // javax.management.remote.rmi._RMIConnectionImpl_Tie
-            // javax.management.remote.rmi._RMIServerImpl_Tie
-            if (fi.getName().endsWith(".class")) {
-                parseClass(fi);
-            } else if (fi.getName().endsWith(".jar")) {
-                Enumeration<JarEntry> entries = fi.jarfile.entries();
-                while (entries.hasMoreElements()) {
-                    JarEntry e = entries.nextElement();
-                    if (e.getName().endsWith(".class")) {
-                        ClassFileParser cfparser = ClassFileParser.newParser(fi.jarfile.getInputStream(e), e.getSize(), true);
-                        cfparser.parseDependency(false);
-                        fi.classCount++;
-                    } else if (!e.isDirectory() && ResourceFile.isResource(e.getName())) {
-                        ResourceFile.addResource(e.getName(), fi.jarfile.getInputStream(e));
-                    }
-                }
-            } else if (fi.getFile().isDirectory()) {
-                List<File> files = new ArrayList<File>();
-                listFiles(fi.getFile(), "", files);
-                for (File f : files) {
-                    if (f.getName().endsWith(".class")) {
-                        parseClass(fi, f);
-                    } else if (!f.isDirectory() && ResourceFile.isResource(f.getCanonicalPath())) {
-                        String pathname = f.getCanonicalPath();
-                        String dir = fi.getName();
-                        if (!pathname.startsWith(dir)) {
-                            throw new RuntimeException("Incorrect pathname " + pathname);
-                        }
-                        String name = pathname.substring(dir.length() + 1, pathname.length());
-                        BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
-                        try {
-                            ResourceFile.addResource(name, in);
-                        } finally {
-                            in.close();
-                        }
-                    }
-                }
-            } else {
-                // should not reach here
-                throw new RuntimeException("Unexpected class path: " + fi.getFile());
-            }
-        }
-    }
-
-    private void parseClass(FileInfo fi) throws IOException {
-        parseClass(fi, fi.getFile());
-    }
-
-    private void parseClass(FileInfo fi, File f) throws IOException {
-        ClassFileParser cfparser = ClassFileParser.newParser(f, true);
-        cfparser.parseDependency(false);
-        fi.classCount++;
-        // need to update the filesize for this directory
-        fi.filesize += fi.getFile().length();
-
-    }
-
-    public static void listFiles(File path, String suffix, List<File> result) {
-        if (path.isDirectory()) {
-            File[] children = path.listFiles();
-            for (File c : children) {
-                listFiles(c, suffix, result);
-            }
-
-        } else {
-            if (suffix.isEmpty() || path.getName().endsWith(suffix)) {
-                result.add(path);
-            }
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/CodeAttributeParser.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import com.sun.classanalyzer.Klass.Method;
-
-import com.sun.tools.classfile.*;
-import com.sun.tools.classfile.Instruction.*;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-/**
- *
- * @author Mandy Chung
- */
-public class CodeAttributeParser {
-    private final ClassFileParser cfparser;
-    private final ConstantPool cpool;
-    private final ConstantPoolParser constantPoolParser;
-
-
-    static final Map<String, Set<Method>> runtimeReferences =
-            new HashMap<String, Set<Method>>();
-
-
-    CodeAttributeParser(ClassFileParser parser) {
-        this.cfparser = parser;
-        this.cpool = cfparser.classfile.constant_pool;
-        this.constantPoolParser = cfparser.constantPoolParser;
-    }
-
-    static boolean parseCodeAttribute = false; // by default don't parse code attribute
-    static void setParseCodeAttribute(boolean newValue) {
-        parseCodeAttribute = newValue;
-    }
-
-    void parse(Code_attribute attr, Klass.Method method) {
-        if (!parseCodeAttribute) {
-            return;
-        }
-
-        for (Instruction instr : attr.getInstructions()) {
-            try {
-                instr.accept(instructionVisitor, method);
-            } catch (ArrayIndexOutOfBoundsException e) {
-                throw new RuntimeException("error at or after byte " + instr.getPC());
-            }
-
-        }
-
-        if (attr.exception_table_langth > 0) {
-            for (int i = 0; i <
-                    attr.exception_table.length; i++) {
-                Code_attribute.Exception_data handler = attr.exception_table[i];
-                int catch_type = handler.catch_type;
-                if (catch_type > 0) {
-                    addMethodReference(catch_type, method);
-                }
-
-            }
-        }
-
-    }
-
-
-    private void addMethodReference(int index, Klass.Method m) {
-        String method = constantPoolParser.getMethodName(index);
-
-        if (method != null &&
-               (method.equals("java.lang.Class.forName") ||
-                method.equals("java.lang.Class.loadClass") ||
-                method.startsWith("java.util.ServiceLoader.load") ||
-                method.equals("sun.misc.Service.providers"))) {
-            Set<Method> refs = runtimeReferences.get(method);
-            if (refs == null) {
-                refs = new TreeSet<Method>();
-                runtimeReferences.put(method, refs);
-            }
-            refs.add(m);
-        }
-    }
-
-    Instruction.KindVisitor<Void, Klass.Method> instructionVisitor =
-            new Instruction.KindVisitor<Void, Klass.Method>() {
-
-                public Void visitNoOperands(Instruction instr, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitArrayType(Instruction instr, TypeKind kind, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitBranch(Instruction instr, int offset, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitConstantPoolRef(Instruction instr, int index, Klass.Method m) {
-                    addMethodReference(index, m);
-                    return null;
-                }
-
-                public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Klass.Method m) {
-                    addMethodReference(index, m);
-                    return null;
-                }
-
-                public Void visitLocal(Instruction instr, int index, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitLocalAndValue(Instruction instr, int index, int value, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitValue(Instruction instr, int value, Klass.Method m) {
-                    return null;
-                }
-
-                public Void visitUnknown(Instruction instr, Klass.Method m) {
-                    return null;
-                }
-            };
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ConstantPoolAnalyzer.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-/**
- *
- * @author Mandy Chung
- */
-public class ConstantPoolAnalyzer {
-    public static void main(String[] args) throws Exception {
-        String jdkhome = null;
-
-        // process arguments
-        int i = 0;
-        while (i < args.length) {
-            String arg = args[i++];
-            if (arg.equals("-jdkhome")) {
-                if (i < args.length) {
-                    jdkhome = args[i++];
-                } else {
-                    usage();
-                }
-            }
-        }
-        if (jdkhome == null) {
-            usage();
-        }
-        ClassPath.setJDKHome(jdkhome);
-        ClassPath.parseAllClassFiles();
-    }
-
-    private static void usage() {
-        System.out.println("Usage: ConstantPoolAnalyzer <options>");
-        System.out.println("Options: ");
-        System.out.println("\t-jdkhome <JDK home> where all jars will be parsed");
-        System.out.println("\t-cpath <classpath> where classes and jars will be parsed");
-        System.exit(-1);
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ConstantPoolParser.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import com.sun.tools.classfile.*;
-import com.sun.tools.classfile.ConstantPool.*;
-import static com.sun.tools.classfile.ConstantPool.*;
-
-/**
- *
- * @author Mandy Chung
- */
-public class ConstantPoolParser {
-
-    private final ClassFileParser cfparser;
-    private final StringValueVisitor visitor;
-    private final ConstantPool cpool;
-
-    ConstantPoolParser(ClassFileParser parser) {
-        this.cfparser = parser;
-        this.cpool = cfparser.classfile.constant_pool;
-        this.visitor = new StringValueVisitor();
-    }
-
-    public String stringValue(CPInfo cpInfo) {
-        return visitor.visit(cpInfo);
-    }
-
-    public String stringValue(int constant_pool_index) {
-        try {
-            return stringValue(cpool.get(constant_pool_index));
-        } catch (ConstantPool.InvalidIndex e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public void parseDependency() {
-        ConstantPool.Visitor<Integer, Void> v = new ConstantPool.Visitor<Integer, Void>() {
-
-            public Integer visitClass(CONSTANT_Class_info info, Void p) {
-                try {
-                    String classname = cfparser.checkClassName(info.getName());
-                    if (classname.isEmpty()) {
-                        return 1;
-                    }
-
-                    Klass from = cfparser.this_klass;
-                    Klass to = Klass.getKlass(classname);
-                    ResolutionInfo resInfo = ResolutionInfo.resolvedConstantPool(from, to, info.name_index);
-
-                    from.addDep(to, resInfo);
-                    to.addReferrer(from, resInfo);
-                } catch (ConstantPoolException ex) {
-                    throw new RuntimeException(ex);
-                }
-                return 1;
-            }
-
-            public Integer visitDouble(CONSTANT_Double_info info, Void p) {
-                // skip
-                return 2;
-            }
-
-            public Integer visitFieldref(CONSTANT_Fieldref_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitFloat(CONSTANT_Float_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitInteger(CONSTANT_Integer_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitLong(CONSTANT_Long_info info, Void p) {
-                // skip
-                return 2;
-            }
-
-            public Integer visitNameAndType(CONSTANT_NameAndType_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitMethodref(CONSTANT_Methodref_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitString(CONSTANT_String_info info, Void p) {
-                // skip
-                return 1;
-            }
-
-            public Integer visitUtf8(CONSTANT_Utf8_info info, Void p) {
-                // skip
-                return 1;
-            }
-        };
-        int cpx = 1;
-        while (cpx < cpool.size()) {
-            try {
-                CPInfo cpInfo = cpool.get(cpx);
-                cpx += cpInfo.accept(v, null);
-            } catch (ConstantPool.InvalidIndex ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-
-    int getTag(int index) {
-        try {
-            return cpool.get(index).getTag();
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    String getDescriptor(int index) {
-        CPInfo cpInfo;
-        try {
-            cpInfo = cpool.get(index);
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        }
-
-        int tag = cpInfo.getTag();
-        switch (tag) {
-            case CONSTANT_Methodref:
-            case CONSTANT_InterfaceMethodref:
-            case CONSTANT_Fieldref:
-                // simplify references within this class
-                CPRefInfo ref = (CPRefInfo) cpInfo;
-                try {
-                    return ref.getNameAndTypeInfo().getType();
-                } catch (ConstantPoolException ex) {
-                }
-        }
-        return stringValue(cpInfo);
-    }
-
-    String getMethodName(int index) {
-        try {
-            CPInfo cpInfo = cpool.get(index);
-            if (cpInfo.getTag() == CONSTANT_Methodref ||
-                    cpInfo.getTag() == CONSTANT_InterfaceMethodref) {
-
-                // simplify references within this class
-                CPRefInfo ref = (CPRefInfo) cpInfo;
-                String classname;
-                if (ref.class_index == cfparser.classfile.this_class) {
-                    classname = cfparser.this_klass.getClassName();
-                } else {
-                    classname = cfparser.checkClassName(ref.getClassName()).replace('/', '.');
-                }
-                String methodname = ref.getNameAndTypeInfo().getName();
-                return classname + "." + methodname;
-            } else {
-                return null;
-            }
-        } catch (InvalidIndex ex) {
-            throw new RuntimeException(ex);
-        } catch (ConstantPoolException ex) {
-            throw new RuntimeException(ex);
-        }
-
-    }
-
-    class StringValueVisitor implements ConstantPool.Visitor<String, Void> {
-
-        public StringValueVisitor() {
-        }
-
-        public String visit(CPInfo info) {
-            return info.accept(this, null);
-        }
-
-        public String visitClass(CONSTANT_Class_info info, Void p) {
-            return getCheckedName(info);
-        }
-
-        String getCheckedName(CONSTANT_Class_info info) {
-            try {
-                return checkName(info.getName());
-            } catch (ConstantPoolException e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        public String visitDouble(CONSTANT_Double_info info, Void p) {
-            return info.value + "d";
-        }
-
-        public String visitFieldref(CONSTANT_Fieldref_info info, Void p) {
-            return visitRef(info, p);
-        }
-
-        public String visitFloat(CONSTANT_Float_info info, Void p) {
-            return info.value + "f";
-        }
-
-        public String visitInteger(CONSTANT_Integer_info info, Void p) {
-            return String.valueOf(info.value);
-        }
-
-        public String visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) {
-            return visitRef(info, p);
-        }
-
-        public String visitLong(CONSTANT_Long_info info, Void p) {
-            return info.value + "l";
-        }
-
-        public String visitNameAndType(CONSTANT_NameAndType_info info, Void p) {
-            return getCheckedName(info) + ":" + getType(info);
-        }
-
-        String getCheckedName(CONSTANT_NameAndType_info info) {
-            try {
-                return checkName(info.getName());
-            } catch (ConstantPoolException e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        String getType(CONSTANT_NameAndType_info info) {
-            try {
-                return info.getType();
-            } catch (ConstantPoolException e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        public String visitMethodref(CONSTANT_Methodref_info info, Void p) {
-            return visitRef(info, p);
-        }
-
-        public String visitString(CONSTANT_String_info info, Void p) {
-            try {
-                int string_index = info.string_index;
-                return cpool.getUTF8Info(string_index).accept(this, p);
-            } catch (ConstantPoolException e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        public String visitUtf8(CONSTANT_Utf8_info info, Void p) {
-            String s = info.value;
-            StringBuilder sb = new StringBuilder();
-            for (int i = 0; i < s.length(); i++) {
-                char c = s.charAt(i);
-                switch (c) {
-                    case '\t':
-                        sb.append('\\').append('t');
-                        break;
-                    case '\n':
-                        sb.append('\\').append('n');
-                        break;
-                    case '\r':
-                        sb.append('\\').append('r');
-                        break;
-                    case '\"':
-                        sb.append('\\').append('\"');
-                        break;
-                    default:
-                        sb.append(c);
-                }
-            }
-            return sb.toString();
-        }
-
-        String visitRef(CPRefInfo info, Void p) {
-            String cn = getCheckedClassName(info);
-            String nat;
-            try {
-                nat = info.getNameAndTypeInfo().accept(this, p);
-            } catch (ConstantPoolException e) {
-                nat = e.getMessage();
-            }
-            return cn + "." + nat;
-        }
-
-        String getCheckedClassName(CPRefInfo info) {
-            try {
-                return checkName(info.getClassName());
-            } catch (ConstantPoolException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-    /* If name is a valid binary name, return it; otherwise quote it. */
-
-    private static String checkName(String name) {
-        if (name == null) {
-            return "null";
-        }
-
-        int len = name.length();
-        if (len == 0) {
-            return "\"\"";
-        }
-
-        int cc = '/';
-        int cp;
-        for (int k = 0; k < len; k += Character.charCount(cp)) {
-            cp = name.codePointAt(k);
-            if ((cc == '/' && !Character.isJavaIdentifierStart(cp)) || (cp != '/' && !Character.isJavaIdentifierPart(cp))) {
-                return "\"" + name + "\"";
-            }
-            cc = cp;
-        }
-        return name;
-    }
-
-    String tagName(int index) {
-        try {
-            int tag = cpool.get(index).getTag();
-            switch (tag) {
-                case CONSTANT_Utf8:
-                    return "Utf8";
-                case CONSTANT_Integer:
-                    return "int";
-                case CONSTANT_Float:
-                    return "float";
-                case CONSTANT_Long:
-                    return "long";
-                case CONSTANT_Double:
-                    return "double";
-                case CONSTANT_Class:
-                    return "class";
-                case CONSTANT_String:
-                    return "String";
-                case CONSTANT_Fieldref:
-                    return "Field";
-                case CONSTANT_Methodref:
-                    return "Method";
-                case CONSTANT_InterfaceMethodref:
-                    return "InterfaceMethod";
-                case CONSTANT_NameAndType:
-                    return "NameAndType";
-                default:
-                    return "(unknown tag)";
-            }
-        } catch (InvalidIndex e) {
-            throw new RuntimeException(e);
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/DependencyConfig.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.List;
-
-/**
- * Config file specifying additional dependency
- * Each line consists of:
- * <tag> <classname> -> <value>
- * where <tag> can be:
- *    @ClassForName and <value> is its dependency
- *    @Provider and <value> is the service name
- *    @Providers and <value> is the list of the service names
- *
- * @author Mandy Chung
- */
-public class DependencyConfig {
-    private DependencyConfig() {
-    }
-
-    static void parse(List<String> configs) throws IOException {
-        for (String s : configs) {
-            parse(s);
-        }
-    }
-
-    private static void parse(String config) throws IOException {
-        // parse configuration file
-        FileInputStream in = new FileInputStream(config);
-        try {
-            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-            String line;
-            int lineNumber = 0;
-            String type = null;
-            while ((line = reader.readLine()) != null) {
-                lineNumber++;
-                line = line.trim();
-                if (line.length() == 0 || line.charAt(0) == '#') {
-                    continue;
-                }
-                if (line.charAt(0) == '@') {
-                    if (AnnotatedDependency.isValidType(line)) {
-                        type = line;
-                        continue;
-                    } else {
-                        throw new RuntimeException(config + ", line " +
-                            lineNumber + ", invalid annotation type.");
-                    }
-                }
-                String[] s = line.split("\\s+");
-                if (s.length < 3 || !s[1].equals("->")) {
-                    throw new RuntimeException(config + ", line " +
-                            lineNumber + ", is malformed");
-                }
-                String classname = s[0].trim();
-                String value = s[2].trim();
-
-                Klass k = Klass.findKlass(classname);
-                if (k == null) {
-                    // System.out.println("Warning: " + classname + " cannot be found");
-                    continue;
-                }
-                AnnotatedDependency dep = AnnotatedDependency.newAnnotatedDependency(type, value, k);
-                if (dep == null) {
-                    throw new RuntimeException(config + ", line " +
-                            lineNumber + ", is malformed. Fail to construct the dependency.");
-                }
-            }
-
-        } finally {
-            in.close();
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/Klass.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import com.sun.tools.classfile.AccessFlags;
-
-/**
- *
- * @author Mandy Chung
- */
-public class Klass implements Comparable<Klass> {
-    private final String classname;
-    private final String packagename;
-    private Module module;
-    private boolean isJavaLangObject;
-    private String[] paths;
-    private Map<String, Set<Method>> methods;
-    private AccessFlags accessFlags;
-    private long filesize;
-
-    private SortedMap<Klass, Set<ResolutionInfo>> deps;
-    private SortedMap<Klass, Set<ResolutionInfo>> referrers;
-    private List<AnnotatedDependency> annotatedDeps;
-    private Set<String> classForNameRefs;
-
-    private Klass(String classname) {
-        this.classname = classname;
-        this.paths = classname.replace('.', '/').split("/");
-        this.isJavaLangObject = classname.equals("java.lang.Object");
-        this.deps = new TreeMap<Klass, Set<ResolutionInfo>>();
-        this.referrers = new TreeMap<Klass, Set<ResolutionInfo>>();
-        this.methods = new HashMap<String, Set<Method>>();
-        this.annotatedDeps = new ArrayList<AnnotatedDependency>();
-        this.classForNameRefs = new TreeSet<String>();
-
-        int pos = classname.lastIndexOf('.');
-        this.packagename = (pos > 0) ? classname.substring(0, pos) : "<unnamed>";
-    }
-
-    String getBasename() {
-        return paths[paths.length - 1];
-    }
-
-    String getClassName() {
-        return classname;
-    }
-
-    String getPackageName() {
-        return packagename;
-    }
-
-    String getClassFilePathname() {
-        StringBuilder sb = new StringBuilder(paths[0]);
-        for (int i = 1; i < paths.length; i++) {
-            String p = paths[i];
-            sb.append(File.separator).append(p);
-        }
-        return sb.append(".class").toString();
-    }
-
-    boolean isPublic() {
-        return accessFlags == null || accessFlags.is(AccessFlags.ACC_PUBLIC);
-    }
-
-    Module getModule() {
-        return module;
-    }
-
-    void setModule(Module m) {
-        if (module != null) {
-            throw new RuntimeException("Module for " + this + " already set");
-        }
-        this.module = m;
-    }
-
-    Set<Klass> getReferencedClasses() {
-        return deps.keySet();
-    }
-
-    Set<Klass> getReferencingClasses() {
-        return referrers.keySet();
-    }
-
-    void setAccessFlags(int flags) {
-        this.accessFlags = new AccessFlags(flags);
-    }
-
-    void setFileSize(long size) {
-        this.filesize = size;
-    }
-
-    long getFileSize() {
-        return this.filesize;
-    }
-
-    boolean exists() {
-        return filesize > 0;
-    }
-
-    boolean skip(Klass k) {
-        // skip if either class is a root or same class
-        return k.isJavaLangObject || this == k || k.classname.equals(classname);
-    }
-
-    void addDep(Method callee, ResolutionInfo resInfo) {
-        addDep(callee.getKlass(), resInfo);
-    }
-
-    void addDep(Klass ref, ResolutionInfo ri) {
-        if (skip(ref)) {
-            return;
-        }
-        Set<ResolutionInfo> resInfos;
-        if (!deps.containsKey(ref)) {
-            resInfos = new TreeSet<ResolutionInfo>();
-            deps.put(ref, resInfos);
-        } else {
-            resInfos = deps.get(ref);
-        }
-        resInfos.add(ri);
-    }
-
-    void addReferrer(Method caller, ResolutionInfo resInfo) {
-        addReferrer(caller.getKlass(), resInfo);
-    }
-
-    void addReferrer(Klass k, ResolutionInfo ri) {
-        if (skip(k)) {
-            return;
-        }
-        Set<ResolutionInfo> resInfos;
-        if (!referrers.containsKey(k)) {
-            resInfos = new TreeSet<ResolutionInfo>();
-            referrers.put(k, resInfos);
-        } else {
-            resInfos = referrers.get(k);
-        }
-        resInfos.add(ri);
-    }
-
-    Method getMethod(String name) {
-        return getMethod(name, "");
-    }
-
-    Method getMethod(String name, String signature) {
-        Set<Method> set;
-        if (methods.containsKey(name)) {
-            set = methods.get(name);
-        } else {
-            set = new TreeSet<Method>();
-            methods.put(name, set);
-        }
-
-        for (Method m : set) {
-            if (m.getName().equals(name) && m.getSignature().equals(signature)) {
-                return m;
-            }
-        }
-        Method m = new Method(this, name, signature);
-        set.add(m);
-        return m;
-    }
-
-    @Override
-    public String toString() {
-        return classname;
-    }
-
-    @Override
-    public int compareTo(Klass o) {
-        return classname.compareTo(o.classname);
-    }
-
-    void addAnnotatedDep(AnnotatedDependency dep) {
-        annotatedDeps.add(dep);
-    }
-
-    void addClassForNameReference(String method) {
-        classForNameRefs.add(method);
-    }
-
-    List<AnnotatedDependency> getAnnotatedDeps() {
-        return annotatedDeps;
-    }
-
-    private static Map<String, Klass> classes = new TreeMap<String, Klass>();
-    static Set<Klass> getAllClasses() {
-        return new TreeSet<Klass>(classes.values());
-    }
-
-    static Klass findKlassFromPathname(String filename) {
-        String name = filename;
-        if (filename.endsWith(".class")) {
-            name = filename.substring(0, filename.length() - 6);
-        }
-
-        // trim ".class"
-        name = name.replace('/', '.');
-        for (Klass k : classes.values()) {
-            if (name.endsWith(k.getClassName())) {
-                return k;
-            }
-        }
-        return null;
-    }
-
-    static Klass findKlass(String classname) {
-        return classes.get(classname);
-    }
-
-    static Klass getKlass(String name) {
-        Klass k;
-        String classname = name.replace('/', '.');
-        if (classname.charAt(classname.length() - 1) == ';') {
-            classname = classname.substring(0, classname.length() - 1);
-        }
-        if (classes.containsKey(classname)) {
-            k = classes.get(classname);
-        } else {
-            k = new Klass(classname);
-            classes.put(classname, k);
-        }
-        return k;
-    }
-
-    public class Method implements Comparable<Method> {
-
-        private final Klass k;
-        private final String method;
-        private final String signature;
-        private long codeLength;
-        // non-primitive types only
-        private final List<Klass> argTypes;
-        private final Klass returnType;
-        boolean isAbstract = false;
-        boolean marked = false;
-
-        public Method(Klass k, String method, String signature) {
-            this(k, method, signature, null, null);
-        }
-
-        public Method(Klass k, String method, String signature, Klass returnType, List<Klass> argTypes) {
-            this.k = k;
-            this.method = method;
-            this.signature = signature;
-            this.argTypes = argTypes;
-            this.returnType = returnType;
-            this.codeLength = 0;
-        }
-
-        public Klass getKlass() {
-            return k;
-        }
-
-        public String getName() {
-            return method;
-        }
-
-        public String getSignature() {
-            return signature;
-        }
-
-        public Klass getReturnType() {
-            return returnType;
-        }
-
-        public List<Klass> argTypes() {
-            return argTypes;
-        }
-
-        public void setCodeLength(long len) {
-            this.codeLength = len;
-        }
-
-        public long getCodeLength() {
-            return codeLength;
-        }
-
-        @Override
-        public boolean equals(Object o) {
-            if (o instanceof Method) {
-                return compareTo((Method) o) == 0;
-            } else {
-                return false;
-            }
-        }
-
-        @Override
-        public int hashCode() {
-            int hash = 3;
-            hash = 71 * hash + (this.k != null ? this.k.hashCode() : 0);
-            hash = 71 * hash + (this.method != null ? this.method.hashCode() : 0);
-            return hash;
-        }
-
-        @Override
-        public String toString() {
-            if (signature.isEmpty()) {
-                return k.classname + "." + method;
-            } else {
-                return signature;
-            }
-        }
-
-        public String toHtmlString() {
-            return toString().replace("<", "&lt;").replace(">", "&gt;");
-        }
-
-        boolean isClinit() {
-            return method.equals("<clinit>");
-        }
-
-        public int compareTo(Method m) {
-            if (k == m.getKlass()) {
-                if (method.equals(m.method)) {
-                    return signature.compareTo(m.signature);
-                } else {
-                    return method.compareTo(m.method);
-                }
-            } else {
-                return k.compareTo(m.getKlass());
-            }
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/Module.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,693 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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 com.sun.classanalyzer;
-
-import com.sun.classanalyzer.AnnotatedDependency.OptionalDependency;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayDeque;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Deque;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-/**
- *
- * @author Mandy Chung
- */
-public class Module implements Comparable<Module> {
-
-    private static Map<String, Module> modules = new LinkedHashMap<String, Module>();
-
-    public static Module addModule(ModuleConfig config) {
-        String name = config.module;
-        if (modules.containsKey(name)) {
-            throw new RuntimeException("module \"" + name + "\" already exists");
-        }
-
-        Module m = new Module(config);
-        modules.put(name, m);
-        return m;
-    }
-
-    public static Module findModule(String name) {
-        return modules.get(name);
-    }
-
-    static Collection<Module> getAllModules() {
-        return Collections.unmodifiableCollection(modules.values());
-    }
-    private final String name;
-    private final ModuleConfig config;
-    private final Set<Klass> classes;
-    private final Set<ResourceFile> resources;
-    private final Set<Reference> unresolved;
-    private final Set<Dependency> dependents;
-    private final Map<String, PackageInfo> packages;
-    private final Set<Module> members;
-    private Module group;
-    private boolean isBaseModule;
-
-    private Module(ModuleConfig config) {
-        this.name = config.module;
-        this.isBaseModule = config.isBase;
-        this.classes = new TreeSet<Klass>();
-        this.resources = new TreeSet<ResourceFile>();
-        this.config = config;
-        this.unresolved = new HashSet<Reference>();
-        this.dependents = new TreeSet<Dependency>();
-        this.packages = new TreeMap<String, PackageInfo>();
-        this.members = new TreeSet<Module>();
-        this.group = this; // initialize to itself
-    }
-
-    String name() {
-        return name;
-    }
-
-    Module group() {
-        return group;
-    }
-
-    boolean isBase() {
-        return isBaseModule;
-    }
-
-    Set<Module> members() {
-        return members;
-    }
-
-    boolean contains(Klass k) {
-        return k != null && classes.contains(k);
-    }
-
-    boolean isEmpty() {
-        return classes.isEmpty() && resources.isEmpty();
-    }
-
-    /**
-     * Returns an Iterable of Dependency, only one for each dependent
-     * module of the strongest dependency (i.e.
-     * hard static > hard dynamic > optional static > optional dynamic
-     */
-    Iterable<Dependency> dependents() {
-        Map<Module, Dependency> deps = new LinkedHashMap<Module, Dependency>();
-        for (Dependency dep : dependents) {
-            Dependency d = deps.get(dep.module);
-            if (d == null || dep.compareTo(d) > 0) {
-                deps.put(dep.module, dep);
-            }
-        }
-        return deps.values();
-    }
-
-    @Override
-    public int compareTo(Module o) {
-        if (o == null) {
-            return -1;
-        }
-        return name.compareTo(o.name);
-    }
-
-    @Override
-    public String toString() {
-        return name;
-    }
-
-    void addKlass(Klass k) {
-        classes.add(k);
-        k.setModule(this);
-
-        // update package statistics
-        String pkg = k.getPackageName();
-        PackageInfo pkginfo = packages.get(pkg);
-        if (pkginfo == null) {
-            pkginfo = new PackageInfo(pkg);
-            packages.put(pkg, pkginfo);
-        }
-        if (k.exists()) {
-            // only count the class that is parsed
-            pkginfo.add(k.getFileSize());
-        }
-    }
-
-    void addResource(ResourceFile res) {
-        resources.add(res);
-        res.setModule(this);
-    }
-
-    void processRootsAndReferences() {
-        // start with the root set
-        Deque<Klass> pending = new ArrayDeque<Klass>();
-        for (Klass k : Klass.getAllClasses()) {
-            if (k.getModule() != null) {
-                continue;
-            }
-            String classname = k.getClassName();
-            if (config.matchesRoot(classname) && !config.isExcluded(classname)) {
-                addKlass(k);
-                pending.add(k);
-            }
-        }
-
-        // follow all references
-        Klass k;
-        while ((k = pending.poll()) != null) {
-            if (!classes.contains(k)) {
-                addKlass(k);
-            }
-            for (Klass other : k.getReferencedClasses()) {
-                Module otherModule = other.getModule();
-                if (otherModule != null && otherModule != this) {
-                    // this module is dependent on otherModule
-                    addDependency(k, other);
-                    continue;
-                }
-
-                if (!classes.contains(other)) {
-                    if (config.isExcluded(other.getClassName())) {
-                        // reference to an excluded class
-                        unresolved.add(new Reference(k, other));
-                    } else {
-                        pending.add(other);
-                    }
-                }
-            }
-        }
-
-        // add other matching classes that don't require dependency analysis
-        for (Klass c : Klass.getAllClasses()) {
-            if (c.getModule() == null) {
-                String classname = c.getClassName();
-                if (config.matchesIncludes(classname) && !config.isExcluded(classname)) {
-                    addKlass(c);
-                    // dependencies
-                    for (Klass other : c.getReferencedClasses()) {
-                        Module otherModule = other.getModule();
-                        if (otherModule == null) {
-                            unresolved.add(new Reference(c, other));
-                        } else {
-                            if (otherModule != this) {
-                                // this module is dependent on otherModule
-                                addDependency(c, other);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-
-        // add other matching classes that don't require dependency analysis
-        for (ResourceFile res : ResourceFile.getAllResources()) {
-            if (res.getModule() == null) {
-                String name = res.getName();
-                if (config.matchesIncludes(name) && !config.isExcluded(name)) {
-                    addResource(res);
-                }
-            }
-        }
-    }
-
-    void addDependency(Klass from, Klass to) {
-        Dependency dep = new Dependency(from, to);
-        dependents.add(dep);
-    }
-
-    void fixupDependencies() {
-        // update dependencies for classes that were allocated to modules after
-        // this module was processed.
-        for (Reference ref : unresolved) {
-            Module m = ref.referree().getModule();
-            if (m == null || m != this) {
-                addDependency(ref.referrer, ref.referree);
-            }
-        }
-
-        fixupAnnotatedDependencies();
-    }
-
-    private void fixupAnnotatedDependencies() {
-        // add dependencies that this klass may depend on due to the AnnotatedDependency
-        dependents.addAll(AnnotatedDependency.getDependencies(this));
-    }
-
-    boolean isModuleDependence(Klass k) {
-        Module m = k.getModule();
-        return m == null || (!classes.contains(k) && !m.isBase());
-    }
-
-    Module getModuleDependence(Klass k) {
-        if (isModuleDependence(k)) {
-            Module m = k.getModule();
-            if (group == this && m != null) {
-                // top-level module
-                return m.group;
-            } else {
-                return m;
-            }
-        }
-        return null;
-    }
-
-    <P> void visit(Set<Module> visited, Visitor<P> visitor, P p) {
-        if (!visited.contains(this)) {
-            visited.add(this);
-            visitor.preVisit(this, p);
-            for (Module m : members) {
-                m.visit(visited, visitor, p);
-                visitor.postVisit(this, m, p);
-            }
-        } else {
-            throw new RuntimeException("Cycle detected: module " + this.name);
-        }
-    }
-
-    void addMember(Module m) {
-        // merge class list
-        for (Klass k : m.classes) {
-            classes.add(k);
-        }
-
-        // merge resource list
-        for (ResourceFile res : m.resources) {
-            resources.add(res);
-        }
-
-        // merge the package statistics
-        for (PackageInfo pinfo : m.getPackageInfos()) {
-            String packageName = pinfo.pkgName;
-            PackageInfo pkginfo = packages.get(packageName);
-            if (pkginfo == null) {
-                pkginfo = new PackageInfo(packageName);
-                packages.put(packageName, pkginfo);
-            }
-            pkginfo.add(pinfo);
-        }
-    }
-
-    static void buildModuleMembers() {
-        // set up module member relationship
-        for (Module m : modules.values()) {
-            m.group = m; // initialize to itself
-            for (String name : m.config.members()) {
-                Module member = modules.get(name);
-                if (member == null) {
-                    throw new RuntimeException("module \"" + name + "\" doesn't exist");
-                }
-                m.members.add(member);
-            }
-        }
-
-        // set up the top-level module
-        Visitor<Module> groupSetter = new Visitor<Module>() {
-
-            public void preVisit(Module m, Module p) {
-                m.group = p;
-                if (p.isBaseModule) {
-                    // all members are also base
-                    m.isBaseModule = true;
-                }
-            }
-
-            public void postVisit(Module m, Module child, Module p) {
-                // nop - breadth-first search
-            }
-        };
-
-        // propagate the top-level module to all its members
-        for (Module p : modules.values()) {
-            for (Module m : p.members) {
-                if (m.group == m) {
-                    m.visit(new TreeSet<Module>(), groupSetter, p);
-                }
-            }
-        }
-
-        Visitor<Module> mergeClassList = new Visitor<Module>() {
-
-            public void preVisit(Module m, Module p) {
-                // nop - depth-first search
-            }
-
-            public void postVisit(Module m, Module child, Module p) {
-                m.addMember(child);
-            }
-        };
-
-        Set<Module> visited = new TreeSet<Module>();
-        for (Module m : modules.values()) {
-            if (m.group() == m) {
-                if (m.members().size() > 0) {
-                    // merge class list from all its members
-                    m.visit(visited, mergeClassList, m);
-                }
-
-                // clear the dependencies before fixup
-                m.dependents.clear();
-
-                // fixup dependencies
-                for (Klass k : m.classes) {
-                    for (Klass other : k.getReferencedClasses()) {
-                        if (m.isModuleDependence(other)) {
-                            // this module is dependent on otherModule
-                            m.addDependency(k, other);
-                        }
-                    }
-                }
-
-                // add dependencies that this klass may depend on due to the AnnotatedDependency
-                m.fixupAnnotatedDependencies();
-            }
-        }
-    }
-
-    class PackageInfo implements Comparable {
-
-        final String pkgName;
-        int count;
-        long filesize;
-
-        PackageInfo(String name) {
-            this.pkgName = name;
-            this.count = 0;
-            this.filesize = 0;
-        }
-
-        void add(PackageInfo pkg) {
-            this.count += pkg.count;
-            this.filesize += pkg.filesize;
-        }
-
-        void add(long size) {
-            count++;
-            filesize += size;
-
-        }
-
-        @Override
-        public int compareTo(Object o) {
-            return pkgName.compareTo(((PackageInfo) o).pkgName);
-        }
-    }
-
-    Set<PackageInfo> getPackageInfos() {
-        return new TreeSet<PackageInfo>(packages.values());
-    }
-
-    void printSummaryTo(String output) throws IOException {
-        PrintWriter writer = new PrintWriter(output);
-        try {
-            long total = 0L;
-            int count = 0;
-            writer.format("%10s\t%10s\t%s\n", "Bytes", "Classes", "Package name");
-            for (String pkg : packages.keySet()) {
-                PackageInfo info = packages.get(pkg);
-                if (info.count > 0) {
-                    writer.format("%10d\t%10d\t%s\n", info.filesize, info.count, pkg);
-                    total += info.filesize;
-                    count += info.count;
-                }
-            }
-
-            writer.format("\nTotal: %d bytes (uncompressed) %d classes\n", total, count);
-        } finally {
-            writer.close();
-        }
-
-    }
-
-    void printClassListTo(String output) throws IOException {
-        // no file created if the module doesn't have any class nor resource
-        if (isEmpty()) {
-            return;
-        }
-
-        PrintWriter writer = new PrintWriter(output);
-        try {
-            for (Klass c : classes) {
-                if (c.exists()) {
-                    writer.format("%s\n", c.getClassFilePathname());
-                } else {
-                    trace("%s in module %s missing\n", c, this);
-                }
-            }
-
-        } finally {
-            writer.close();
-        }
-    }
-
-    void printResourceListTo(String output) throws IOException {
-        // no file created if the module doesn't have any resource file
-        if (resources.isEmpty()) {
-            return;
-        }
-
-        PrintWriter writer = new PrintWriter(output);
-        try {
-            for (ResourceFile res : resources) {
-                writer.format("%s\n", res.getPathname());
-            }
-        } finally {
-            writer.close();
-        }
-    }
-
-    void printDependenciesTo(String output, boolean showDynamic) throws IOException {
-        // no file created if the module doesn't have any class
-        if (isEmpty()) {
-            return;
-        }
-
-        PrintWriter writer = new PrintWriter(output);
-        try {
-            // classes that this klass may depend on due to the AnnotatedDependency
-            Map<Reference, Set<AnnotatedDependency>> annotatedDeps = AnnotatedDependency.getReferences(this);
-
-            for (Klass klass : classes) {
-                Set<Klass> references = klass.getReferencedClasses();
-                for (Klass other : references) {
-                    String classname = klass.getClassName();
-                    boolean optional = OptionalDependency.isOptional(klass, other);
-                    if (optional) {
-                        classname = "[optional] " + classname;
-                    }
-
-                    Module m = getModuleDependence(other);
-                    if (m != null || other.getModule() == null) {
-                        writer.format("%-40s -> %s (%s)", classname, other, m);
-                        Reference ref = new Reference(klass, other);
-                        if (annotatedDeps.containsKey(ref)) {
-                            for (AnnotatedDependency ad : annotatedDeps.get(ref)) {
-                                writer.format(" %s", ad.getTag());
-                            }
-                            // printed; so remove the dependency from the annotated deps list
-                            annotatedDeps.remove(ref);
-                        }
-                        writer.format("\n");
-                    }
-                }
-            }
-
-
-            // print remaining dependencies specified in AnnotatedDependency list
-            if (annotatedDeps.size() > 0) {
-                for (Map.Entry<Reference, Set<AnnotatedDependency>> entry : annotatedDeps.entrySet()) {
-                    Reference ref = entry.getKey();
-                    Module m = getModuleDependence(ref.referree);
-                    if (m != null || ref.referree.getModule() == null) {
-                        String classname = ref.referrer.getClassName();
-                        boolean optional = true;
-                        boolean dynamic = true;
-                        String tag = "";
-                        for (AnnotatedDependency ad : entry.getValue()) {
-                            if (optional && !ad.isOptional()) {
-                                optional = false;
-                                tag = ad.getTag();
-                            }
-                            if (!ad.isDynamic()) {
-                                dynamic = false;
-                            }
-                        }
-                        if (!showDynamic && optional && dynamic) {
-                            continue;
-                        }
-                        if (optional) {
-                            if (dynamic) {
-                                classname = "[dynamic] " + classname;
-                            } else {
-                                classname = "[optional] " + classname;
-                            }
-                        }
-                        writer.format("%-40s -> %s (%s) %s%n", classname, ref.referree, m, tag);
-                    }
-                }
-            }
-
-        } finally {
-            writer.close();
-        }
-    }
-
-    static class Dependency implements Comparable<Dependency> {
-
-        final Module module;
-        final boolean optional;
-        final boolean dynamic;
-
-        Dependency(Klass from, Klass to) {
-            // static dependency
-            this.module = to.getModule() != null ? to.getModule().group() : null;
-            this.optional = OptionalDependency.isOptional(from, to);
-            this.dynamic = false;
-        }
-
-        Dependency(Module m, boolean optional, boolean dynamic) {
-            this.module = m != null ? m.group() : null;
-            this.optional = optional;
-            this.dynamic = dynamic;
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (!(obj instanceof Dependency)) {
-                return false;
-            }
-            if (this == obj) {
-                return true;
-            }
-
-            Dependency d = (Dependency) obj;
-            if (this.module != d.module) {
-                return false;
-            } else {
-                return this.optional == d.optional && this.dynamic == d.dynamic;
-            }
-        }
-
-        @Override
-        public int hashCode() {
-            int hash = 3;
-            hash = 19 * hash + (this.module != null ? this.module.hashCode() : 0);
-            hash = 19 * hash + (this.optional ? 1 : 0);
-            hash = 19 * hash + (this.dynamic ? 1 : 0);
-            return hash;
-        }
-
-        @Override
-        public int compareTo(Dependency d) {
-            if (this.equals(d)) {
-                return 0;
-            }
-
-            // Hard static > hard dynamic > optional static > optional dynamic
-            if (this.module == d.module) {
-                if (this.optional == d.optional) {
-                    return this.dynamic ? -1 : 1;
-                } else {
-                    return this.optional ? -1 : 1;
-                }
-            } else if (this.module != null && d.module != null) {
-                return (this.module.compareTo(d.module));
-            } else {
-                return (this.module == null) ? -1 : 1;
-            }
-        }
-
-        @Override
-        public String toString() {
-            String s = module.name();
-            if (dynamic && optional) {
-                s += " (dynamic)";
-            } else if (optional) {
-                s += " (optional)";
-            }
-            return s;
-        }
-    }
-
-    static class Reference implements Comparable<Reference> {
-
-        private final Klass referrer, referree;
-
-        Reference(Klass referrer, Klass referree) {
-            this.referrer = referrer;
-            this.referree = referree;
-        }
-
-        Klass referrer() {
-            return referrer;
-        }
-
-        Klass referree() {
-            return referree;
-        }
-
-        @Override
-        public int hashCode() {
-            return referrer.hashCode() ^ referree.hashCode();
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (!(obj instanceof Reference)) {
-                return false;
-            }
-            if (this == obj) {
-                return true;
-            }
-
-            Reference r = (Reference) obj;
-            return (this.referrer.equals(r.referrer) &&
-                    this.referree.equals(r.referree));
-        }
-
-        @Override
-        public int compareTo(Reference r) {
-            int ret = referrer.compareTo(r.referrer);
-            if (ret == 0) {
-                ret = referree.compareTo(r.referree);
-            }
-            return ret;
-        }
-    }
-
-    interface Visitor<P> {
-
-        public void preVisit(Module m, P param);
-
-        public void postVisit(Module m, Module child, P param);
-    }
-    private static boolean traceOn = System.getProperty("classanalyzer.debug") != null;
-
-    private static void trace(String format, Object... params) {
-        System.err.format(format, params);
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ModuleConfig.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,562 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.regex.Pattern;
-
-/**
- *
- * @author Mandy Chung
- */
-public class ModuleConfig {
-
-    private static String baseModuleName = "base";
-    private final Set<String> roots;
-    private final Set<String> includes;
-    private final Filter filter;
-    private List<String> members;
-    final String module;
-    final boolean isBase;
-
-    private ModuleConfig(String name) throws IOException {
-        this.roots = new TreeSet<String>();
-        this.includes = new TreeSet<String>();
-        this.module = name;
-        this.isBase = name.equals(baseModuleName);
-        this.filter = new Filter(this);
-    }
-
-    List<String> members() {
-        if (members == null) {
-            members = new LinkedList<String>();
-
-            for (String s : includes) {
-                if (!s.contains("*") && Module.findModule(s) != null) {
-                    // module member
-                    members.add(s);
-                }
-            }
-        }
-        return members;
-    }
-
-    boolean matchesRoot(String name) {
-        for (String pattern : roots) {
-            if (matches(name, pattern)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    boolean matchesIncludes(String name) {
-        for (String pattern : includes) {
-            if (matches(name, pattern)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    boolean isExcluded(String name) {
-        return filter.isExcluded(name);
-    }
-
-    boolean matchesPackage(String packageName, String pattern) {
-        int pos = pattern.lastIndexOf('.');
-        String pkg = pos > 0 ? pattern.substring(0, pos) : "<unnamed>";
-        return packageName.equals(pkg);
-    }
-
-
-    boolean matches(String name, String pattern) {
-        if (pattern.contains("**") && !pattern.endsWith("**")) {
-            throw new UnsupportedOperationException("Not yet implemented");
-        }
-
-        String javaName = name;
-
-        boolean isResourceFile = name.indexOf('/') >= 0;
-        if (isResourceFile) {
-            // it's a resource file; convert the name as a java
-            javaName = name.replace('/', '.');
-        }
-        if (pattern.indexOf('/') < 0) {
-            // if the pattern doesn't contain '/
-            return matchesJavaName(javaName, pattern);
-        } else {
-            if (isResourceFile) {
-                // the pattern is for matching resource file
-                return matchesNameWithSlash(name, pattern);
-            } else {
-                return false;
-            }
-        }
-    }
-
-    boolean matchesJavaName(String name, String pattern) {
-        int pos = name.lastIndexOf('.');
-        String packageName = pos > 0 ? name.substring(0, pos) : "<unnamed>";
-        if (pattern.endsWith("**")) {
-            String p = pattern.substring(0, pattern.length() - 2);
-            return name.startsWith(p);
-        } else if (pattern.endsWith("*") && pattern.indexOf('*') == pattern.lastIndexOf('*')) {
-            if (matchesPackage(packageName, pattern)) {
-                // package name has to be exact match
-                String p = pattern.substring(0, pattern.length() - 1);
-                return name.startsWith(p);
-            } else {
-                return false;
-            }
-        } else if (pattern.contains("*")) {
-            String basename = pos > 0 ? name.substring(pos + 1, name.length()) : name;
-            pos = pattern.indexOf('*');
-            String prefix = pattern.substring(0, pos);
-            String suffix = pattern.substring(pos + 1, pattern.length());
-            if (name.startsWith(prefix) && matchesPackage(packageName, prefix)) {
-                // package name has to be exact match
-                if (suffix.contains("*")) {
-                    return name.matches(convertToRegex(pattern));
-                } else {
-                    return basename.endsWith(suffix);
-                }
-            } else {
-                // we don't support wildcard be used in the package name
-                return false;
-            }
-        } else {
-            // exact match or inner class
-            return name.equals(pattern) || name.startsWith(pattern + "$");
-        }
-    }
-
-    boolean matchesNameWithSlash(String name, String pattern) {
-        if (pattern.endsWith("**")) {
-            String p = pattern.substring(0, pattern.length() - 2);
-            return name.startsWith(p);
-        } else if (pattern.contains("*")) {
-            int pos = pattern.indexOf('*');
-            String prefix = pattern.substring(0, pos);
-            String suffix = pattern.substring(pos + 1, pattern.length());
-            String tail = name.substring(pos, name.length());
-
-            if (!name.startsWith(prefix)) {
-                // prefix has to exact match
-                return false;
-            }
-
-            if (pattern.indexOf('*') == pattern.lastIndexOf('*')) {
-                // exact match prefix with no '/' in the tail string
-                String wildcard = tail.substring(0, tail.length() - suffix.length());
-                return tail.indexOf('/') < 0 && tail.endsWith(suffix);
-            }
-
-            if (suffix.contains("*")) {
-                return matchesNameWithSlash(tail, suffix);
-            } else {
-                // tail ends with the suffix while no '/' in the wildcard matched string
-                String any = tail.substring(0, tail.length() - suffix.length());
-                return tail.endsWith(suffix) && any.indexOf('/') < 0;
-            }
-        } else {
-            // exact match
-            return name.equals(pattern);
-        }
-    }
-
-    private String convertToRegex(String pattern) {
-        StringBuilder sb = new StringBuilder();
-        int i = 0;
-        int index = 0;
-        int plen = pattern.length();
-        while (i < plen) {
-            char p = pattern.charAt(i);
-            if (p == '*') {
-                sb.append("(").append(pattern.substring(index, i)).append(")");
-                if (i + 1 < plen && pattern.charAt(i + 1) == '*') {
-                    sb.append(".*");
-                    index = i + 2;
-                } else {
-                    sb.append("[^\\.]*");
-                    index = i + 1;
-                }
-            }
-            i++;
-        }
-        if (index < plen) {
-            sb.append("(").append(pattern.substring(index, plen)).append(")");
-        }
-        return sb.toString();
-    }
-
-    static class Filter {
-
-        final ModuleConfig config;
-        final Set<String> exclude = new TreeSet<String>();
-        final Set<String> allow = new TreeSet<String>();
-
-        Filter(ModuleConfig config) {
-            this.config = config;
-        }
-
-        Filter exclude(String pattern) {
-            exclude.add(pattern);
-            return this;
-        }
-
-        Filter allow(String pattern) {
-            allow.add(pattern);
-            return this;
-        }
-
-        String allowedBy(String name) {
-            String allowedBy = null;
-            for (String pattern : allow) {
-                if (config.matches(name, pattern)) {
-                    if (name.equals(pattern)) {
-                        return pattern;  // exact match
-                    }
-                    if (allowedBy == null) {
-                        allowedBy = pattern;
-                    } else {
-                        if (pattern.length() > allowedBy.length()) {
-                            allowedBy = pattern;
-                        }
-                    }
-                }
-            }
-            return allowedBy;
-        }
-
-        String excludedBy(String name) {
-            String allowedBy = allowedBy(name);
-            String excludedBy = null;
-
-            if (allowedBy != null && name.equals(allowedBy)) {
-                return null;  // exact match
-            }
-            for (String pattern : exclude) {
-                if (config.matches(name, pattern)) {
-                    // not matched by allowed rule or exact match
-                    if (allowedBy == null || name.equals(pattern)) {
-                        return pattern;
-                    }
-                    if (excludedBy == null) {
-                        excludedBy = pattern;
-                    } else {
-                        if (pattern.length() > excludedBy.length()) {
-                            excludedBy = pattern;
-                        }
-                    }
-                }
-            }
-            return excludedBy;
-        }
-
-        boolean isExcluded(String name) {
-            String allowedBy = allowedBy(name);
-            String excludedBy = excludedBy(name);
-
-            if (excludedBy == null) {
-                return false;
-            }
-            // not matched by allowed rule or exact match
-            if (allowedBy == null || name.equals(excludedBy)) {
-                return true;
-            }
-
-            if (allowedBy == null) {
-                return true;
-            }
-            if (allowedBy != null &&
-                    excludedBy.length() > allowedBy.length()) {
-                return true;
-            }
-            return false;
-        }
-    }
-
-    private static String trimComment(String line) {
-        StringBuilder sb = new StringBuilder();
-
-        int pos = 0;
-        while (pos >= 0 && pos < line.length()) {
-            int c1 = line.indexOf("//", pos);
-            if (c1 > 0 && !Character.isWhitespace(line.charAt(c1-1))) {
-                // not a comment
-                c1 = -1;
-            }
-
-            int c2 = line.indexOf("/*", pos);
-            if (c2 > 0 && !Character.isWhitespace(line.charAt(c2-1))) {
-                // not a comment
-                c2 = -1;
-            }
-
-            int c = line.length();
-            int n = line.length();
-            if (c1 >= 0 || c2 >= 0) {
-                if (c1 >= 0) {
-                    c = c1;
-                }
-                if (c2 >= 0 && c2 < c) {
-                    c = c2;
-                }
-                int c3 = line.indexOf("*/", c2 + 2);
-                if (c == c2 && c3 > c2) {
-                    n = c3 + 2;
-                }
-            }
-            if (c > 0) {
-                if (sb.length() > 0) {
-                    // add a whitespace if multiple comments on one line
-                    sb.append(" ");
-                }
-                sb.append(line.substring(pos, c));
-            }
-            pos = n;
-        }
-        return sb.toString();
-    }
-
-    private static boolean beginBlockComment(String line) {
-        int pos = 0;
-        while (pos >= 0 && pos < line.length()) {
-            int c = line.indexOf("/*", pos);
-            if (c < 0) {
-                return false;
-            }
-
-            if (c > 0 && !Character.isWhitespace(line.charAt(c-1))) {
-                return false;
-            }
-
-            int c1 = line.indexOf("//", pos);
-            if (c1 >= 0 && c1 < c) {
-                return false;
-            }
-
-            int c2 = line.indexOf("*/", c + 2);
-            if (c2 < 0) {
-                return true;
-            }
-            pos = c + 2;
-        }
-        return false;
-    }
-
-    static void setBaseModule(String name) {
-        baseModuleName = name;
-    }
-    // TODO: we shall remove "-" from the regex once we define
-    // the naming convention for the module names without dashes
-    static final Pattern classNamePattern = Pattern.compile("[\\w\\.\\*_$-/]+");
-
-    static List<ModuleConfig> readConfigurationFile(String file) throws IOException {
-        List<ModuleConfig> result = new ArrayList<ModuleConfig>();
-        // parse configuration file
-        FileInputStream in = new FileInputStream(file);
-        try {
-            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-            String line;
-
-            int lineNumber = 0;
-            boolean inRoots = false;
-            boolean inIncludes = false;
-            boolean inAllows = false;
-            boolean inExcludes = false;
-            boolean inBlockComment = false;
-            ModuleConfig config = null;
-
-            while ((line = reader.readLine()) != null) {
-                lineNumber++;
-
-                if (inBlockComment) {
-                    int c = line.indexOf("*/");
-                    if (c >= 0) {
-                        line = line.substring(c + 2, line.length());
-                        inBlockComment = false;
-                    } else {
-                        // skip lines until end of comment block
-                        continue;
-                    }
-                }
-
-                inBlockComment = beginBlockComment(line);
-
-                line = trimComment(line).trim();
-                // ignore empty lines
-                if (line.length() == 0) {
-                    continue;
-                }
-
-                String values;
-                if (inRoots || inIncludes || inExcludes || inAllows) {
-                    values = line;
-                } else {
-                    String[] s = line.split("\\s+");
-                    String keyword = s[0].trim();
-                    if (keyword.equals("module")) {
-                        if (s.length != 3 || !s[2].trim().equals("{")) {
-                            throw new RuntimeException(file + ", line " +
-                                    lineNumber + ", is malformed");
-                        }
-                        config = new ModuleConfig(s[1].trim());
-                        result.add(config);
-                        // switch to a new module; so reset the flags
-                        inRoots = false;
-                        inIncludes = false;
-                        inExcludes = false;
-                        inAllows = false;
-                        continue;
-                    } else if (keyword.equals("roots")) {
-                        inRoots = true;
-                    } else if (keyword.equals("include")) {
-                        inIncludes = true;
-                    } else if (keyword.equals("exclude")) {
-                        inExcludes = true;
-                    } else if (keyword.equals("allow")) {
-                        inAllows = true;
-                    } else if (keyword.equals("}")) {
-                        if (config == null || s.length != 1) {
-                            throw new RuntimeException(file + ", line " +
-                                    lineNumber + ", is malformed");
-                        } else {
-                            // end of a module
-                            config = null;
-                            continue;
-                        }
-                    } else {
-                        throw new RuntimeException(file + ", \"" + keyword + "\" on line " +
-                                lineNumber + ", is not recognized");
-                    }
-                    values = line.substring(keyword.length(), line.length()).trim();
-                }
-
-                if (config == null) {
-                    throw new RuntimeException(file + ", module not specified");
-                }
-
-                int len = values.length();
-                if (len == 0) {
-                    continue;
-                }
-                char lastchar = values.charAt(len - 1);
-                if (lastchar != ',' && lastchar != ';') {
-                    throw new RuntimeException(file + ", line " +
-                            lineNumber + ", is malformed:" +
-                            " ',' or ';' is missing.");
-                }
-
-                values = values.substring(0, len - 1);
-                // parse the values specified for a keyword specified
-                for (String s : values.split(",")) {
-                    s = s.trim();
-                    if (s.length() > 0) {
-                        if (!classNamePattern.matcher(s).matches()) {
-                            throw new RuntimeException(file + ", line " +
-                                    lineNumber + ", is malformed: \"" + s + "\"");
-                        }
-                        if (inRoots) {
-                            config.roots.add(s);
-                        } else if (inIncludes) {
-                            config.includes.add(s);
-                        } else if (inExcludes) {
-                            config.filter.exclude(s);
-                        } else if (inAllows) {
-                            config.filter.allow(s);
-                        }
-
-                    }
-                }
-                if (lastchar == ';') {
-                    inRoots = false;
-                    inIncludes = false;
-                    inExcludes = false;
-                    inAllows = false;
-                }
-            }
-
-            if (inBlockComment) {
-                throw new RuntimeException(file + ", line " +
-                        lineNumber + ", missing \"*/\" to end a block comment");
-            }
-            if (config != null) {
-                throw new RuntimeException(file + ", line " +
-                        lineNumber + ", missing \"}\" to end module definition" +
-                        " for \"" + config.module + "\"");
-            }
-
-        } finally {
-            in.close();
-        }
-
-        return result;
-    }
-
-    private String format(String keyword, Collection<String> values) {
-        if (values.size() == 0) {
-            return "";
-        }
-
-        StringBuilder sb = new StringBuilder();
-        String format = "%4s%-9s";
-        String spaces = String.format(format, "", "");
-        sb.append(String.format(format, "", keyword));
-        int count = 0;
-        for (String s : values) {
-            if (count > 0) {
-                sb.append(",\n").append(spaces);
-            } else if (count++ > 0) {
-                sb.append(", ");
-            }
-            sb.append(s);
-        }
-        if (count > 0) {
-            sb.append(";\n");
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("module " + module).append(" {\n");
-        sb.append(format("include", includes));
-        sb.append(format("root", roots));
-        sb.append(format("allow", filter.allow));
-        sb.append(format("exclude", filter.exclude));
-        sb.append("}\n");
-        return sb.toString();
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ResolutionInfo.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import com.sun.classanalyzer.Klass.Method;
-
-/**
- *
- * @author mchung
- */
-public class ResolutionInfo implements Comparable<ResolutionInfo> {
-
-    enum Type {
-
-        REFLECTION("reflection", true),
-        NATIVE("native", true),
-        INTERFACE("interface", false),
-        SUPER("super", false),
-        EXPLICIT("explicit", false),
-        VERIFICATION("verification", false),
-        METHODTRACE("method trace", true),
-        CONSTANT_POOL("constant pool", true),
-        CHECKED_EXCEPTION("throws", true),
-        METHOD("method", true),
-        FIELD("field", true),
-        EXTENDS("extends", true),
-        IMPLEMENTS("implements", true),
-        NOINFO("No info", false);
-
-        private final String name;
-        private final boolean hasInfo;
-
-        private Type(String name, boolean hasInfo) {
-            this.name = name;
-            this.hasInfo = hasInfo;
-        }
-
-        public String getName() {
-            return name;
-        }
-
-        public boolean hasInfo() {
-            return hasInfo;
-        }
-
-        public static Type getType(String s) {
-            if (s.isEmpty()) {
-                return NOINFO;
-            }
-            for (Type t : values()) {
-                if (s.equals(t.name)) {
-                    return t;
-                }
-            }
-            // Need to fix the VM output to add "native"
-            // throw new IllegalArgumentException("Invalid ResolutionInfo.type \"" + s + "\"");
-            System.out.println("WARNING: Invalid ResolutionInfo.type \"" + s + "\"");
-            return null;
-        }
-    }
-    final Klass fromClass;
-    final Method method;
-    final Klass toClass;
-    final int linenumber;
-    final Type type;
-    final String info;
-    private boolean isPublic = false;
-
-    private ResolutionInfo(Klass from, Klass to, int linenumber, Type type, String info) {
-        this.fromClass = from;
-        this.method = null;
-        this.toClass = to;
-        this.linenumber = linenumber;
-        this.type = type;
-        this.info = info;
-    }
-
-    private ResolutionInfo(Klass from, Method m, Klass to, int linenumber, Type type) {
-        this.fromClass = from;
-        this.method = m;
-        this.toClass = to;
-        this.linenumber = linenumber;
-        this.type = type;
-        this.info = m.toString();
-    }
-
-    public boolean isPublic() {
-        return isPublic;
-    }
-
-    public void setPublicAccess(boolean value) {
-        isPublic = value;
-    }
-    static ResolutionInfo resolved(Klass from, Klass to) {
-        return new ResolutionInfo(from, to, 0, Type.NOINFO, "");
-    }
-
-    static ResolutionInfo resolved(Klass from, Klass to, int linenumber) {
-        return new ResolutionInfo(from, to, linenumber, Type.NOINFO, "");
-    }
-
-    static ResolutionInfo resolved(Klass from, Klass to, int linenumber, String reason) {
-        String[] ss = reason.split("\\s+");
-        Type type;
-        String info;
-        if (linenumber == -1) {
-            type = Type.NATIVE;
-            info = ss[0];  // native method name
-        } else {
-            info = ss.length == 2 ? ss[1] : "";
-            type = Type.getType(ss[0]);
-            if (type == null) {
-                if (reason.isEmpty()) {
-                    throw new IllegalArgumentException("Invalid type: " + reason + " (" + ss[0] + ")" + ss.length);
-                }
-                // assume it's native
-                type = Type.NATIVE;
-                info = reason.isEmpty() ? ss[0] : reason;
-            }
-        }
-
-        return new ResolutionInfo(from, to, linenumber, type, info);
-    }
-
-    static ResolutionInfo resolved(Klass from, Klass to, Method callee) {
-        return new ResolutionInfo(from, callee, to, 0, Type.METHODTRACE);
-    }
-
-    static ResolutionInfo resolvedConstantPool(Klass from, Klass to, int index) {
-        return new ResolutionInfo(from, to, 0, Type.CONSTANT_POOL, "#" + index);
-    }
-
-    static ResolutionInfo resolvedField(Klass from, Klass to, String fieldname) {
-        return new ResolutionInfo(from, to, 0, Type.FIELD, fieldname);
-    }
-
-    static ResolutionInfo resolvedMethodSignature(Klass from, Klass to, Method m) {
-        return new ResolutionInfo(from, m, to, 0, Type.METHOD);
-    }
-
-    static ResolutionInfo resolvedCheckedException(Klass from, Klass to, Method m) {
-        return new ResolutionInfo(from, m, to, 0, Type.CHECKED_EXCEPTION);
-    }
-
-    static ResolutionInfo resolvedExtends(Klass from, Klass to) {
-        String info = from.getClassName() + " implements " + to.getClassName();
-        return new ResolutionInfo(from, to, 0, Type.EXTENDS, info);
-    }
-
-    static ResolutionInfo resolvedImplements(Klass from, Klass to) {
-        String info = from.getClassName() + " implements " + to.getClassName();
-        return new ResolutionInfo(from, to, 0, Type.IMPLEMENTS, info);
-    }
-
-    @Override
-    public int compareTo(ResolutionInfo ri) {
-        if (this.fromClass == ri.fromClass &&
-                this.toClass == ri.toClass &&
-                this.linenumber == ri.linenumber &&
-                this.type == ri.type &&
-                this.info.equals(ri.info)) {
-            return 0;
-        } else if (this.fromClass == ri.fromClass) {
-            if (this.linenumber > ri.linenumber) {
-                return 1;
-            } else if (this.linenumber < ri.linenumber) {
-                return -1;
-            } else if (this.type != ri.type) {
-                return this.type.getName().compareTo(ri.type.getName());
-            } else if (this.toClass != ri.toClass) {
-                return this.toClass.compareTo(ri.toClass);
-            } else {
-                return this.info.compareTo(ri.info);
-            }
-        } else {
-            return this.fromClass.compareTo(ri.fromClass);
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ResourceFile.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-/**
- *
- * @author Mandy Chung
- */
-public class ResourceFile implements Comparable<ResourceFile> {
-
-    private final String pathname;
-    private Module module;
-
-    ResourceFile(String pathname) {
-        this.pathname = pathname.replace(File.separatorChar, '/');
-    }
-
-    Module getModule() {
-        return module;
-    }
-
-    void setModule(Module m) {
-        if (module != null) {
-            throw new RuntimeException("Module for " + this + " already set");
-        }
-        this.module = m;
-    }
-
-    String getName() {
-        return pathname;
-    }
-
-    String getPathname() {
-        return pathname;
-    }
-
-    @Override
-    public String toString() {
-        return pathname;
-    }
-
-    @Override
-    public int compareTo(ResourceFile o) {
-        return pathname.compareTo(o.pathname);
-    }
-    static Set<ResourceFile> resources = new TreeSet<ResourceFile>();
-
-    static boolean isResource(String pathname) {
-        String name = pathname.replace(File.separatorChar, '/');
-
-        if (name.endsWith("META-INF/MANIFEST.MF")) {
-            return false;
-        }
-        if (name.contains("META-INF/JCE_RSA.")) {
-            return false;
-        }
-
-        return true;
-    }
-
-    static void addResource(String name, InputStream in) {
-        ResourceFile res;
-        name = name.replace(File.separatorChar, '/');
-        if (name.startsWith("META-INF/services")) {
-            res = new ServiceProviderConfigFile(name, in);
-        } else {
-            res = new ResourceFile(name);
-        }
-        resources.add(res);
-    }
-
-    static Set<ResourceFile> getAllResources() {
-        return Collections.unmodifiableSet(resources);
-    }
-
-    static class ServiceProviderConfigFile extends ResourceFile {
-
-        private final List<String> providers = new ArrayList<String>();
-        private final String service;
-        ServiceProviderConfigFile(String pathname, InputStream in) {
-            super(pathname);
-            readServiceConfiguration(in, providers);
-            this.service = pathname.substring("META-INF/services".length() + 1, pathname.length());
-        }
-
-        @Override
-        String getName() {
-            if (providers.isEmpty()) {
-                return service;
-            } else {
-                // just use the first one for matching
-                return providers.get(0);
-            }
-        }
-
-        @SuppressWarnings("empty-statement")
-        void readServiceConfiguration(InputStream in, List<String> names) {
-            BufferedReader br = null;
-            try {
-                if (in != null) {
-                    // Properties doesn't perserve the order of the input file
-                    br = new BufferedReader(new InputStreamReader(in, "utf-8"));
-                    int lc = 1;
-                    while ((lc = parseLine(br, lc, names)) >= 0);
-                }
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            } finally {
-                if (br != null) {
-                    try {
-                        br.close();
-                    } catch (IOException ex) {
-                        throw new RuntimeException(ex);
-                    }
-                }
-            }
-        }
-
-        // Parse a single line from the given configuration file, adding the name
-        // on the line to the names list.
-        //
-        private int parseLine(BufferedReader r, int lc, List<String> names) throws IOException {
-            String ln = r.readLine();
-            if (ln == null) {
-                return -1;
-            }
-            int ci = ln.indexOf('#');
-            if (ci >= 0) {
-                ln = ln.substring(0, ci);
-            }
-            ln = ln.trim();
-            int n = ln.length();
-            if (n != 0) {
-                if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0)) {
-                    throw new RuntimeException("Illegal configuration-file syntax");
-                }
-                int cp = ln.codePointAt(0);
-                if (!Character.isJavaIdentifierStart(cp)) {
-                    throw new RuntimeException("Illegal provider-class name: " + ln);
-                }
-                for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
-                    cp = ln.codePointAt(i);
-                    if (!Character.isJavaIdentifierPart(cp) && (cp != '.')) {
-                        throw new RuntimeException("Illegal provider-class name: " + ln);
-                    }
-                }
-                if (!names.contains(ln)) {
-                    names.add(ln);
-                }
-            }
-            return lc + 1;
-        }
-    }
-}
--- a/make/modules/tools/src/com/sun/classanalyzer/ShowDeps.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.classanalyzer;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * A simple tool to print out the static dependencies for a given set of JAR,
- * class files, or combinations of. The tools supports an -ignore option to
- * ignore references to classes listed in the file (including .classlists
- * created by the ClassAnalyzer tool).
- */
-
-public class ShowDeps {
-
-    static void usage() {
-        System.out.println("java ShowDeps [-ignore <classlist>] file...");
-        System.out.println("   where <file> is a class or JAR file, or a directory");
-        System.out.println();
-        System.out.println("Example usages:");
-        System.out.println("  java ShowDeps Foo.jar");
-        System.out.println("  java ShowDeps -ignore base.classlist Foo.jar");
-        System.out.println("  java ShowDeps -ignore base.classlist -ignore " +
-            "jaxp-parsers.classlist <dir>");
-        System.exit(-1);
-    }
-
-    public static void main(String[] args) throws IOException {
-        // process -ignore options
-        int argi = 0;
-        Set<String> ignore = new HashSet<String>();
-        while (argi < args.length && args[argi].equals("-ignore")) {
-            argi++;
-            Scanner s = new Scanner(new File(args[argi++]));
-            try {
-                while (s.hasNextLine()) {
-                    String line = s.nextLine();
-                    if (!line.endsWith(".class"))
-                        continue;
-                    int len = line.length();
-                    // convert to class names
-                    String clazz = line.replace('\\', '.').replace('/', '.')
-                        .substring(0, len-6);
-                    ignore.add(clazz);
-                }
-            } finally {
-                s.close();
-            }
-        }
-
-        if (argi >= args.length)
-            usage();
-
-        // parse all classes
-        while (argi < args.length)
-            ClassPath.setClassPath(args[argi++]);
-        ClassPath.parseAllClassFiles();
-
-        // find the classes that don't exist
-        Set<Klass> unresolved = new TreeSet<Klass>();
-        for (Klass k : Klass.getAllClasses()) {
-            if (k.getFileSize() == 0)
-                unresolved.add(k);
-        }
-
-        // print references to classes that don't exist
-        for (Klass k: Klass.getAllClasses()) {
-            for (Klass other : k.getReferencedClasses()) {
-                if (unresolved.contains(other)) {
-                    String name = other.toString();
-                    if (!ignore.contains(name)) {
-                        System.out.format("%s -> %s\n", k, other);
-                    }
-                }
-            }
-        }
-    }
-}
--- a/make/sun/applet/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/applet/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = applet
 PACKAGE = sun.applet
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/awt/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/awt/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = awt
 PRODUCT = sun
@@ -368,7 +367,7 @@
 FONTCONFIGS_SRC	= $(CLOSED_SRC)/solaris/classes/sun/awt/fontconfigs
 _FONTCONFIGS	= \
 	fontconfig.properties				\
-	fontconfig.RedHat.properties			\
+	fontconfig.RedHat.5.5.properties		\
 	fontconfig.Turbo.properties			\
 	fontconfig.SuSE.10.properties                   \
 	fontconfig.SuSE.11.properties
@@ -405,7 +404,6 @@
     $(COMPILEFONTCONFIG_JARFILE)
 	$(prep-target)
 	$(BOOT_JAVA_CMD) -jar $(COMPILEFONTCONFIG_JARFILE) $(COMPILEFONTCONFIG_FLAGS) $< $@
-	$(install-module-file)
 	$(call chmod-file, 444)
 	@$(java-vm-cleanup)
 
--- a/make/sun/awt/mapfile-mawt-vers	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/awt/mapfile-mawt-vers	Wed Apr 20 04:38:36 2011 +0100
@@ -424,6 +424,7 @@
 		Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
 		Java_sun_java2d_xr_XRSurfaceData_initIDs;
 		Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
+		Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
 		Java_sun_java2d_xr_XRBackendNative_initIDs;
 		Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
 		Java_sun_java2d_xr_XRBackendNative_freeGC;
--- a/make/sun/cmm/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/cmm/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE   = java2d
 PRODUCT  = sun
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/sun/cmm/kcms/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/cmm/kcms/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = java2d
 PACKAGE = sun.java2d.cmm.kcms
 LIBRARY = kcms
 PRODUCT = sun
@@ -72,7 +71,8 @@
 # Extra rules
 #
 ifeq  ($(PLATFORM), linux)
-LDLIBS += -lpthread
+    LDLIBS += -lpthread
+    OTHER_CFLAGS += -Wno-missing-field-initializers
 endif
 
 clean clobber:: 
@@ -104,6 +104,5 @@
 
 endif # PLATFORM
 
-#CFLAGS += -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST
-CFLAGS += -DFUT_CALC_EX -DNO_FUT_GCONST
+CFLAGS += -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST
 
--- a/make/sun/cmm/lcms/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/cmm/lcms/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = java2d
 PACKAGE = sun.java2d.cmm.lcms
 LIBRARY = lcms
 PRODUCT = sun
@@ -82,10 +81,6 @@
 ifeq ($(PLATFORM), windows)
 OTHER_CFLAGS += -DCMS_IS_WINDOWS_
 
-ifeq ($(COMPILER_VERSION), VS2003)
-OTHER_CFLAGS += -Dsqrtf=sqrt
-endif
-
 OTHER_LDLIBS = $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib
 OTHER_INCLUDES += -I$(SHARE_SRC)/native/sun/java2d \
                   -I$(SHARE_SRC)/native/sun/awt/debug
--- a/make/sun/dcpr/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/dcpr/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = java2d
 PACKAGE = sun.dc
 LIBRARY = dcpr
 PRODUCT = sun
--- a/make/sun/font/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/font/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = font
 PACKAGE = sun.font
 LIBRARY = fontmanager
 PRODUCT = sun
@@ -136,7 +135,6 @@
 
 $(FREETYPE_LIB):
 	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
-	$(install-module-file)
 endif
 
 #ifeq ($(PLATFORM), solaris)
--- a/make/sun/font/t2k/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/font/t2k/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = font
 PACKAGE = sun.font
 LIBRARY = t2k
 PRODUCT = sun
--- a/make/sun/headless/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/headless/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -30,7 +30,6 @@
 MOTIF_VERSION_STRING=none
 LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/headless
 
-MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = mawt
 LIBRARY_OUTPUT = headless
--- a/make/sun/image/generic/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/image/generic/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = media
 PACKAGE = sun.awt.medialib
 LIBRARY = mlib_image
 PRODUCT = sun
--- a/make/sun/image/vis/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/image/vis/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -27,7 +27,6 @@
 # Makefile for building the VIS (solaris-only) version of medialib
 #
 BUILDDIR = ../../..
-MODULE  = media
 PACKAGE = sun.awt.medialib
 LIBRARY = mlib_image_v
 PRODUCT = sun
--- a/make/sun/jar/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jar/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = jar-tool
 PACKAGE = sun.tools
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/javazic/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -27,7 +27,6 @@
 
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = sun.javazic
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -70,7 +69,6 @@
 	$(RM) -r $(@D)
 	$(prep-target)
 	$(CP) -r $(WORKDIR)/* $(@D)
-	$(install-module-dir)
 
 clean clobber::
 	$(RM) -r $(TEMPDIR) $(INSTALLDIR)
--- a/make/sun/javazic/tzdata/VERSION	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/VERSION	Wed Apr 20 04:38:36 2011 +0100
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2010o
+tzdata2011d
--- a/make/sun/javazic/tzdata/australasia	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/australasia	Wed Apr 20 04:38:36 2011 +0100
@@ -106,14 +106,13 @@
 Rule	AS	1987	2007	-	Oct	lastSun	2:00s	1:00	-
 Rule	AS	1972	only	-	Feb	27	2:00s	0	-
 Rule	AS	1973	1985	-	Mar	Sun>=1	2:00s	0	-
-Rule	AS	1986	1989	-	Mar	Sun>=15	2:00s	0	-
-Rule	AS	1990	only	-	Mar	Sun>=18	2:00s	0	-
-Rule	AS	1991	only	-	Mar	Sun>=1	2:00s	0	-
-Rule	AS	1992	only	-	Mar	Sun>=18	2:00s	0	-
-Rule	AS	1993	only	-	Mar	Sun>=1	2:00s	0	-
-Rule	AS	1994	only	-	Mar	Sun>=18	2:00s	0	-
+Rule	AS	1986	1990	-	Mar	Sun>=15	2:00s	0	-
+Rule	AS	1991	only	-	Mar	3	2:00s	0	-
+Rule	AS	1992	only	-	Mar	22	2:00s	0	-
+Rule	AS	1993	only	-	Mar	7	2:00s	0	-
+Rule	AS	1994	only	-	Mar	20	2:00s	0	-
 Rule	AS	1995	2005	-	Mar	lastSun	2:00s	0	-
-Rule	AS	2006	only	-	Apr	Sun>=1	2:00s	0	-
+Rule	AS	2006	only	-	Apr	2	2:00s	0	-
 Rule	AS	2007	only	-	Mar	lastSun	2:00s	0	-
 Rule	AS	2008	max	-	Apr	Sun>=1	2:00s	0	-
 Rule	AS	2008	max	-	Oct	Sun>=1	2:00s	1:00	-
@@ -532,11 +531,31 @@
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
+# From Raymond Hughes (2011-03-07)
+# I believe this will be posted shortly on the website
+# <a href="http://www.mcil.gov.ws">
+# www.mcil.gov.ws
+# </a>
+#
+# PUBLIC NOTICE ON DAYLIGHT SAVING TIME
+#
+# Pursuant to the Daylight Saving Act 2009 and Cabinets decision,
+# businesses and the general public are hereby advised that daylight
+# saving time is on the first Saturday of April 2011 (02/04/11).
+#
+# The public is therefore advised that when the standard time strikes
+# the hour of four oclock (4.00am or 0400 Hours) on the 2nd April 2011,
+# then all instruments used to measure standard time are to be
+# adjusted/changed to three oclock (3:00am or 0300Hrs).
+#
+# Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
+# INDUSTRY AND LABOUR 28th February 2011
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
-			-11:00	1:00	WSDT	2011 Apr 3 1:00
+			-11:00	1:00	WSDT	2011 Apr 2 4:00
 			-11:00	-	WST
 
 # Solomon Is
--- a/make/sun/javazic/tzdata/etcetera	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/etcetera	Wed Apr 20 04:38:36 2011 +0100
@@ -58,8 +58,7 @@
 # (i.e. west of Greenwich) even though many people would expect it to
 # mean 4 hours ahead of UTC (i.e. east of Greenwich).
 #
-# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation
-# (which is not yet supported by the tz code) allows for
+# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
 # TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
 # ISO 8601 you can use TZ='<-0400>+4'.  Thus the commonly-expected
 # offset is kept within the angle bracket (and is used for display)
--- a/make/sun/javazic/tzdata/europe	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/europe	Wed Apr 20 04:38:36 2011 +0100
@@ -2505,25 +2505,18 @@
 # (on a non-government server though) describing dates between 2002 and 2006:
 # http://www.alomaliye.com/bkk_2002_3769.htm
 
-# From Sue Williams (2008-08-11):
-# I spotted this news article about a potential change in Turkey.
-#
-# <a href="http://www.hurriyet.com.tr/english/domestic/9626174.asp?scr=1">
-# http://www.hurriyet.com.tr/english/domestic/9626174.asp?scr=1
+# From G&ouml;kdeniz Karada&#x011f; (2011-03-10):
+# 
+# According to the articles linked below, Turkey will change into summer
+# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
+# This change is due to a nationwide exam on 27th.
+# 
+# <a href="http://www.worldbulletin.net/?aType=haber&ArticleID=70872">
+# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # </a>
-
-# From Sue Williams (2008-08-20):
-# This article says that around the end of March 2011, Turkey wants to
-# adjust the clocks forward by 1/2 hour and stay that way permanently.
-# The article indicates that this is a change in timezone offset in addition
-# to stopping observance of DST.
-# This proposal has not yet been approved.
-#
-# Read more here...
-#
-# Turkey to abandon daylight saving time in 2011
-# <a href="http://www.turkishdailynews.com.tr/article.php?enewsid=112989">
-# http://www.turkishdailynews.com.tr/article.php?enewsid=112989
+# Turkish:
+# <a href="http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373">
+# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
 # </a>
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2591,6 +2584,8 @@
 			2:00	Turkey	EE%sT	1978 Oct 15
 			3:00	Turkey	TR%sT	1985 Apr 20 # Turkey Time
 			2:00	Turkey	EE%sT	2007
+			2:00	EU	EE%sT	2011 Mar 27 1:00u
+			2:00	-	EET	2011 Mar 28 1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
--- a/make/sun/javazic/tzdata/leapseconds	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/leapseconds	Wed Apr 20 04:38:36 2011 +0100
@@ -78,13 +78,13 @@
 # SERVICE DE LA ROTATION TERRESTRE
 # OBSERVATOIRE DE PARIS
 # 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.      : 33 (0) 1 40 51 22 26
+# Tel.      : 33 (0) 1 40 51 22 29
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 14 July 2010
+# Paris, 2 February 2011
 #
-# Bulletin C 40
+# Bulletin C 41
 #
 # To authorities responsible
 # for the measurement and
@@ -92,9 +92,9 @@
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2010.
+# NO positive leap second will be introduced at the end of June 2011.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :
+# International Atomic Time TAI is :		
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -104,6 +104,6 @@
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director
-# Earth Orientation Center of IERS
+# Head			
+# Earth Orientation Center of the IERS
 # Observatoire de Paris, France
--- a/make/sun/javazic/tzdata/northamerica	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/northamerica	Wed Apr 20 04:38:36 2011 +0100
@@ -368,6 +368,27 @@
 			-7:00	US	M%sT	2003 Oct 26 02:00
 			-6:00	US	C%sT
 
+# From Josh Findley (2011-01-21):
+# ...it appears that Mercer County, North Dakota, changed from the
+# mountain time zone to the central time zone at the last transition from
+# daylight-saving to standard time (on Nov. 7, 2010):
+# <a href="http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm">
+# http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
+# </a>
+# <a href="http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html">
+# http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html
+# </a>
+
+# From Andy Lipscomb (2011-01-24):
+# ...according to the Census Bureau, the largest city is Beulah (although
+# it's commonly referred to as Beulah-Hazen, with Hazen being the next
+# largest city in Mercer County).  Google Maps places Beulah's city hall
+# at 4715'51" north, 10146'40" west, which yields an offset of 6h47'07".
+
+Zone America/North_Dakota/Beulah -6:47:07 - LMT 1883 Nov 18 12:12:53
+			-7:00	US	M%sT	2010 Nov  7 2:00
+			-6:00	US	C%sT
+
 # US mountain time, represented by Denver
 #
 # Colorado, far western Kansas, Montana, western
@@ -427,15 +448,74 @@
 # were nearby inhabitants in some cases and for our purposes perhaps
 # it's best to simply use the official transition.
 #
+
+# From Steve Ferguson (2011-01-31):
+# The author lives in Alaska and many of the references listed are only
+# available to Alaskan residents.
+#
+# <a href="http://www.alaskahistoricalsociety.org/index.cfm?section=discover%20alaska&page=Glimpses%20of%20the%20Past&viewpost=2&ContentId=98">
+# http://www.alaskahistoricalsociety.org/index.cfm?section=discover%20alaska&page=Glimpses%20of%20the%20Past&viewpost=2&ContentId=98
+# </a>
+
+# From Arthur David Olson (2011-02-01):
+# Here's database-relevant material from the 2001 "Alaska History" article:
+#
+# On September 20 [1979]...DOT...officials decreed that on April 27,
+# 1980, Juneau and other nearby communities would move to Yukon Time.
+# Sitka, Petersburg, Wrangell, and Ketchikan, however, would remain on
+# Pacific Time.
+#
+# ...on September 22, 1980, DOT Secretary Neil E. Goldschmidt rescinded the
+# Department's September 1979 decision. Juneau and other communities in
+# northern Southeast reverted to Pacific Time on October 26.
+#
+# On October 28 [1983]...the Metlakatla Indian Community Council voted
+# unanimously to keep the reservation on Pacific Time.
+#
+# According to DOT official Joanne Petrie, Indian reservations are not
+# bound to follow time zones imposed by neighboring jurisdictions.
+#
+# (The last is consistent with how the database now handles the Navajo
+# Nation.)
+
+# From Arthur David Olson (2011-02-09):
+# I just spoke by phone with a staff member at the Metlakatla Indian
+# Community office (using contact information available at
+# <a href="http://www.commerce.state.ak.us/dca/commdb/CIS.cfm?Comm_Boro_name=Metlakatla">
+# http://www.commerce.state.ak.us/dca/commdb/CIS.cfm?Comm_Boro_name=Metlakatla
+# </a>).
+# It's shortly after 1:00 here on the east coast of the United States;
+# the staffer said it was shortly after 10:00 there. When I asked whether
+# that meant they were on Pacific time, they said no--they were on their
+# own time. I asked about daylight saving; they said it wasn't used. I
+# did not inquire about practices in the past.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1980 Apr 27 2:00
+			 -9:00	US	Y%sT	1980 Oct 26 2:00	
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
+Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+			 -9:01:13 -	LMT	1900 Aug 20 12:00
+			 -8:00	-	PST	1942
+			 -8:00	US	P%sT	1946
+			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1983 Oct 30 2:00
+			 -9:00	US	Y%sT	1983 Nov 30
+			 -9:00	US	AK%sT
+Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 18
+			 -8:46:18 -	LMT	1900 Aug 20 12:00
+			 -8:00	-	PST	1942
+			 -8:00	US	P%sT	1946
+			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1983 Oct 30 2:00
+			 -8:00	US	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -493,20 +573,50 @@
 #  three votes for and one against."
 
 # Hawaii
-#
-# From Arthur David Olson:
-# And then there's Hawaii.
-# DST was observed for one day in 1933;
-# standard time was changed by half an hour in 1947;
-# it's always standard as of 1986.
+
+# From Arthur David Olson (2010-12-09):
+# "Hawaiian Time" by Robert C. Schmitt and Doak C. Cox appears on pages 207-225
+# of volume 26 of The Hawaiian Journal of History (1992). As of 2010-12-09,
+# the article is available at
+# <a href="http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf">
+# http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
+# </a>
+# and indicates that standard time was adopted effective noon, January
+# 13, 1896 (page 218), that in "1933, the Legislature decreed daylight
+# saving for the period between the last Sunday of each April and the
+# last Sunday of each September, but less than a month later repealed the
+# act," (page 220), that year-round daylight saving time was in effect
+# from 1942-02-09 to 1945-09-30 (page 221, with no time of day given for
+# when clocks changed) and that clocks were changed by 30 minutes
+# effective the second Sunday of June, 1947 (page 219, with no time of
+# day given for when clocks changed). A footnote for the 1933 changes
+# cites Session Laws of Hawaii 1933, "Act. 90 (approved 26 Apr. 1933)
+# and Act 163 (approved 21 May 1933)."
+
+# From Arthur David Olson (2011-01-19):
+# The following is from "Laws of the Territory of Hawaii Passed by the
+# Seventeenth Legislature: Regular Session 1933," available (as of
+# 2011-01-19) at American University's Pence Law Library. Page 85: "Act
+# 90...At 2 o'clock ante meridian of the last Sunday in April of each
+# year, the standard time of this Territory shall be advanced one
+# hour...This Act shall take effect upon its approval. Approved this 26th
+# day of April, A. D. 1933. LAWRENCE M JUDD, Governor of the Territory of
+# Hawaii." Page 172:  "Act 163...Act 90 of the Session Laws of 1933 is
+# hereby repealed...This Act shall take effect upon its approval, upon
+# which date the standard time of this Territory shall be restored to
+# that existing immediately prior to the taking effect of said Act 90.
+# Approved this 21st day of May, A. D. 1933. LAWRENCE M. JUDD, Governor
+# of the Territory of Hawaii."
 #
-# From Paul Eggert:
-# Shanks says the 1933 experiment lasted for three weeks.  Go with Shanks.
-#
-Zone Pacific/Honolulu	-10:31:26 -	LMT	1900 Jan  1 12:00
-			-10:30	-	HST	1933 Apr 30 2:00
-			-10:30	1:00	HDT	1933 May 21 2:00
-			-10:30	US	H%sT	1947 Jun  8 2:00
+# Note that 1933-05-21 was a Sunday.
+# We're left to guess the time of day when Act 163 was approved; guess noon.
+
+Zone Pacific/Honolulu	-10:31:26 -	LMT	1896 Jan 13 12:00 #Schmitt&Cox
+			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
+			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
+			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
+			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -2518,6 +2628,21 @@
 # the time was announced as "diez cinco"--the same time as here, indicating
 # that has indeed switched to DST. Assume second Sunday from 2009 forward.
 
+# From Steffen Thorsen (2011-03-08):
+# Granma announced that Cuba is going to start DST on 2011-03-20 00:00:00
+# this year. Nothing about the end date known so far (if that has
+# changed at all).
+#
+# Source:
+# <a href="http://granma.co.cu/2011/03/08/nacional/artic01.html">
+# http://granma.co.cu/2011/03/08/nacional/artic01.html
+# </a>
+#
+# Our info:
+# <a href="http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html">
+# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
+# </a>
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
 Rule	Cuba	1928	only	-	Oct	10	0:00	0	S
@@ -2551,7 +2676,9 @@
 Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
-Rule	Cuba	2009	max	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2009	2010	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2011	only	-	Mar	Sun>=15	0:00s	1:00	D
+Rule	Cuba	2012	max	-	Mar	Sun>=8	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890
--- a/make/sun/javazic/tzdata/southamerica	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/southamerica	Wed Apr 20 04:38:36 2011 +0100
@@ -1176,6 +1176,23 @@
 # From Arthur Daivd Olson (2010-03-06):
 # Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch.
 
+# From Glenn Eychaner (2011-03-02): [geychaner@mac.com]
+# It appears that the Chilean government has decided to postpone the
+# change from summer time to winter time again, by three weeks to April
+# 2nd:
+# <a href="http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651">
+# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
+# </a>
+#
+# This is not yet reflected in the offical "cambio de hora" site, but
+# probably will be soon:
+# <a href="http://www.horaoficial.cl/cambio.htm">
+# http://www.horaoficial.cl/cambio.htm
+# </a>
+
+# From Arthur David Olson (2011-03-02):
+# The emol.com article mentions a water shortage as the cause of the
+# postponement, which may mean that it's not a permanent change.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1211,8 +1228,8 @@
 # which is used below in specifying the transition.
 Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
 Rule	Chile	2009	only	-	Mar	Sun>=9	3:00u	0	-
-Rule	Chile	2010	only	-	Apr	 4	3:00u	0	-
-Rule	Chile	2011	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2010	2011	-	Apr	Sun>=1	3:00u	0	-
+Rule	Chile	2012	max	-	Mar	Sun>=9	3:00u	0	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--- a/make/sun/javazic/tzdata/zone.tab	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/javazic/tzdata/zone.tab	Wed Apr 20 04:38:36 2011 +0100
@@ -233,8 +233,8 @@
 HU	+4730+01905	Europe/Budapest
 ID	-0610+10648	Asia/Jakarta	Java & Sumatra
 ID	-0002+10920	Asia/Pontianak	west & central Borneo
-ID	-0507+11924	Asia/Makassar	east & south Borneo, Celebes, Bali, Nusa Tengarra, west Timor
-ID	-0232+14042	Asia/Jayapura	Irian Jaya & the Moluccas
+ID	-0507+11924	Asia/Makassar	east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
+ID	-0232+14042	Asia/Jayapura	west New Guinea (Irian Jaya) & Malukus (Moluccas)
 IE	+5320-00615	Europe/Dublin
 IL	+3146+03514	Asia/Jerusalem
 IM	+5409-00428	Europe/Isle_of_Man
@@ -426,6 +426,7 @@
 US	+450628-0873651	America/Menominee	Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
 US	+470659-1011757	America/North_Dakota/Center	Central Time - North Dakota - Oliver County
 US	+465042-1012439	America/North_Dakota/New_Salem	Central Time - North Dakota - Morton County (except Mandan area)
+US	+471551-1014640	America/North_Dakota/Beulah	Central Time - North Dakota - Mercer County
 US	+394421-1045903	America/Denver	Mountain Time
 US	+433649-1161209	America/Boise	Mountain Time - south Idaho & east Oregon
 US	+364708-1084111	America/Shiprock	Mountain Time - Navajo
@@ -433,9 +434,11 @@
 US	+340308-1181434	America/Los_Angeles	Pacific Time
 US	+611305-1495401	America/Anchorage	Alaska Time
 US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
+US	+571035-1351807	America/Sitka	Alaska Time - southeast Alaska panhandle
 US	+593249-1394338	America/Yakutat	Alaska Time - Alaska panhandle neck
 US	+643004-1652423	America/Nome	Alaska Time - west Alaska
 US	+515248-1763929	America/Adak	Aleutian Islands
+US	+550737-1313435	America/Metlakatla	Metlakatla Time - Annette Island
 US	+211825-1575130	Pacific/Honolulu	Hawaii
 UY	-3453-05611	America/Montevideo
 UZ	+3940+06648	Asia/Samarkand	west Uzbekistan
--- a/make/sun/jawt/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jawt/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = jawt
 PRODUCT = sun
--- a/make/sun/jconsole/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jconsole/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = jconsole
 PACKAGE = sun.tools.jconsole
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/jdbc/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jdbc/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -33,7 +33,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = jdbc-odbc
 PACKAGE = sun.jdbc.odbc
 LIBRARY = JdbcOdbc
 PRODUCT = sun
@@ -62,7 +61,7 @@
   #    ODBC_LIBRARY_LOCATION, and delete the variable assignments below.
   #
   # Tell linker to ignore missing externals when building this shared library.
-  LDFLAGS_DEFS_OPTION = -z nodefs
+  LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker nodefs
   # Define a place to create the fake libraries and their names.
   ODBC_LIBRARY_LOCATION = $(TEMPDIR)
   ODBC_FAKE_LIBRARIES = $(ODBC_LIBRARY_LOCATION)/libodbcinst.so $(ODBC_LIBRARY_LOCATION)/libodbc.so
--- a/make/sun/jdga/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jdga/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -25,7 +25,6 @@
 
 
 BUILDDIR = ../..
-MODULE  = java2d
 PACKAGE = sun.jdga
 LIBRARY = sunwjdga
 PRODUCT = sun
--- a/make/sun/jpeg/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jpeg/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = java2d
 PACKAGE = sun.awt
 LIBRARY = jpeg
 PRODUCT = sun
@@ -65,6 +64,19 @@
     FILES_reorder += reorder-$(ARCH)
   endif
 endif
+
+ifeq ($(PLATFORM), linux)
+
+  # Suppress gcc warnings like "variable might be clobbered by 'longjmp'
+  # or 'vfork'": this warning indicates that some variable is placed to
+  # a register by optimized compiler and it's value might be lost on longjmp().
+  # Recommended way to avoid such warning is to declare the variable as
+  # volatile to prevent the optimization. However, this approach does not
+  # work because we have to declare all variables as volatile in result.
+
+  OTHER_CFLAGS += -Wno-clobbered
+endif
+
 include $(BUILDDIR)/common/Mapfile-vers.gmk
 include $(BUILDDIR)/common/Library.gmk
 
--- a/make/sun/jpeg/reorder-i586	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jpeg/reorder-i586	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
 text: .text%alloc_small: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o;
 text: .text%reset_marker_reader: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%jIInCtlr;
-text: .text%GET_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o;
+# text: .text%GET_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o;
 text: .text%jReadHeader;
 text: .text%jConsumeInput;
 text: .text%reset_input_controller: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
@@ -30,36 +30,36 @@
 text: .text%sun_jpeg_init_source;
 text: .text%consume_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
 text: .text%read_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
-text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%sun_jpeg_fill_input_buffer;
-text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o;
-text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o;
+# text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%emit_message: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jerror.o;
-text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%get_interesting_appn: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
-text: .text%examine_app0: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%examine_app0: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%skip_variable: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%sun_jpeg_skip_input_data;
-text: .text%examine_app14: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%examine_app14: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%get_dqt: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%jAlcQTable;
 text: .text%get_sof: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
-text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%get_dht: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%jAlcHTable;
 text: .text%get_sos: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
-text: .text%initial_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
+# text: .text%initial_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
 text: .text%jDivRound;
-text: .text%default_decompress_parms: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapimin.o;
+# text: .text%default_decompress_parms: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapimin.o;
 text: .text%jHasMultScn;
 text: .text%jStrtDecompress;
 text: .text%jIDMaster;
-text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
+# text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%jCalcDimensions;
-text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
-text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
+# text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
+# text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%jIDColor;
-text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o;
+# text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o;
 text: .text%jIUpsampler;
 text: .text%jRound;
 text: .text%alloc_sarray: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o;
@@ -70,16 +70,16 @@
 text: .text%jIHDecoder;
 text: .text%jIDCoefC;
 text: .text%jIDMainC;
-text: .text%alloc_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
+# text: .text%alloc_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
 text: .text%realize_virt_arrays: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o;
 text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
-text: .text%per_scan_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
-text: .text%latch_quant_tables: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
+# text: .text%per_scan_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
+# text: .text%latch_quant_tables: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
 text: .text%start_pass_huff_decoder: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o;
 text: .text%jMkDDerived;
 text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
-text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
-text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapistd.o;
+# text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
+# text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapistd.o;
 text: .text%prepare_for_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%start_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jddctmgr.o;
 text: .text%start_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
@@ -87,7 +87,7 @@
 text: .text%start_pass_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o;
 text: .text%start_pass_dpost: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdpostct.o;
 text: .text%start_pass_main: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
-text: .text%make_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
+# text: .text%make_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
 text: .text%jReadScanlines;
 text: .text%process_data_context_main: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
 text: .text%decompress_onepass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
@@ -100,11 +100,11 @@
 text: .text%fullsize_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o;
 text: .text%h2v2_fancy_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o;
 text: .text%ycc_rgb_convert: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o;
-text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
-text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o;
+# text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
+# text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o;
 text: .text%read_restart_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%finish_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
-text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
+# text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
 text: .text%jFinDecompress;
 text: .text%finish_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%sun_jpeg_term_source;
--- a/make/sun/jpeg/reorder-sparc	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jpeg/reorder-sparc	Wed Apr 20 04:38:36 2011 +0100
@@ -30,10 +30,10 @@
 text: .text%sun_jpeg_init_source;
 text: .text%consume_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
 text: .text%read_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
-text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%sun_jpeg_fill_input_buffer;
 text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o;
-text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%emit_message: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jerror.o;
 text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%get_interesting_appn: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
@@ -44,7 +44,7 @@
 text: .text%get_dqt: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%jAlcQTable;
 text: .text%get_sof: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
-text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
+# text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%get_dht: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%jAlcHTable;
 text: .text%get_sos: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
@@ -56,10 +56,10 @@
 text: .text%jIDMaster;
 text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%jCalcDimensions;
-text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
-text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
+# text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
+# text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%jIDColor;
-text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o;
+# text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o;
 text: .text%jIUpsampler;
 text: .text%jRound;
 text: .text%alloc_sarray: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o;
@@ -78,7 +78,7 @@
 text: .text%start_pass_huff_decoder: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o;
 text: .text%jMkDDerived;
 text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
-text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
+# text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o;
 text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapistd.o;
 text: .text%prepare_for_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%start_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jddctmgr.o;
@@ -100,11 +100,11 @@
 text: .text%fullsize_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o;
 text: .text%h2v2_fancy_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o;
 text: .text%ycc_rgb_convert: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o;
-text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
-text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o;
+# text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
+#text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o;
 text: .text%read_restart_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o;
 text: .text%finish_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o;
-text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
+# text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o;
 text: .text%jFinDecompress;
 text: .text%finish_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o;
 text: .text%sun_jpeg_term_source;
--- a/make/sun/jpeg/reorder-sparcv9	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/jpeg/reorder-sparcv9	Wed Apr 20 04:38:36 2011 +0100
@@ -30,10 +30,10 @@
 text: .text%sun_jpeg_init_source;
 text: .text%consume_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdinput.o;
 text: .text%read_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
-text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
+# text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%sun_jpeg_fill_input_buffer;
 text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jpegdecoder.o;
-text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
+# text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%emit_message: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jerror.o;
 text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%get_interesting_appn: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
@@ -44,7 +44,7 @@
 text: .text%get_dqt: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%jAlcQTable;
 text: .text%get_sof: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
-text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
+# text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%get_dht: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%jAlcHTable;
 text: .text%get_sos: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
@@ -56,10 +56,10 @@
 text: .text%jIDMaster;
 text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
 text: .text%jCalcDimensions;
-text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
-text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
+# text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
+# text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
 text: .text%jIDColor;
-text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcolor.o;
+# text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcolor.o;
 text: .text%jIUpsampler;
 text: .text%jRound;
 text: .text%alloc_sarray: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jmemmgr.o;
@@ -78,7 +78,7 @@
 text: .text%start_pass_huff_decoder: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdhuff.o;
 text: .text%jMkDDerived;
 text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcoefct.o;
-text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcoefct.o;
+# text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcoefct.o;
 text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdapistd.o;
 text: .text%prepare_for_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
 text: .text%start_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jddctmgr.o;
@@ -100,11 +100,11 @@
 text: .text%fullsize_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdsample.o;
 text: .text%h2v2_fancy_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdsample.o;
 text: .text%ycc_rgb_convert: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcolor.o;
-text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o;
+# text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o;
 text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdhuff.o;
 text: .text%read_restart_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o;
 text: .text%finish_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdinput.o;
-text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o;
+# text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o;
 text: .text%jFinDecompress;
 text: .text%finish_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o;
 text: .text%sun_jpeg_term_source;
--- a/make/sun/launcher/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/launcher/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = base
 PACKAGE = sun.launcher
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/management/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/management/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE   = management
 
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/sun/native2ascii/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/native2ascii/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = tools
 PACKAGE = sun.tools.native2ascii
 PRODUCT = sun
 OTHER_JAVACFLAGS += -Xlint:serial -Werror
--- a/make/sun/net/FILES_java.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/net/FILES_java.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -102,6 +102,7 @@
 	sun/net/www/protocol/http/NegotiateAuthentication.java \
 	sun/net/www/protocol/http/Negotiator.java \
 	sun/net/www/protocol/http/ntlm/NTLMAuthentication.java \
+	sun/net/www/protocol/http/ntlm/NTLMAuthenticationCallback.java \
 	sun/net/www/protocol/http/spnego/NegotiatorImpl.java \
 	sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java \
 	sun/net/www/protocol/http/logging/HttpLogFormatter.java \
--- a/make/sun/net/others/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/net/others/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = base
 PACKAGE = sun.net
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/net/spi/nameservice/dns/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/net/spi/nameservice/dns/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -30,7 +30,6 @@
 BUILDDIR = ../../../../..
 
 # dns should probably be its own module
-MODULE  = net-dns
 PACKAGE = sun.net.spi.nameservice.dns
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/nio/cs/FILES_java.gmk	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/nio/cs/FILES_java.gmk	Wed Apr 20 04:38:36 2011 +0100
@@ -376,6 +376,7 @@
         sun/nio/cs/ext/HKSCSMapping.java \
         sun/nio/cs/ext/HKSCS2001Mapping.java \
         sun/nio/cs/ext/HKSCS_XPMapping.java \
+	sun/nio/cs/ext/IBM1364.java \
 	sun/nio/cs/ext/IBM1381.java \
 	sun/nio/cs/ext/IBM1383.java \
 	sun/nio/cs/ext/IBM930.java \
--- a/make/sun/nio/cs/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/nio/cs/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -30,7 +30,6 @@
 BUILDDIR = ../../..
 
 # charsets should be separated from nio module 
-MODULE  = charsets
 PACKAGE = sun.nio
 PRODUCT = sun
 
--- a/make/sun/org/mozilla/javascript/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/org/mozilla/javascript/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = scripting-rhino
 PACKAGE = sun.org.mozilla.javascript.internal
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/pisces/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/pisces/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = java2d
 PACKAGE = sun.pisces
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/rmi/cgi/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/rmi/cgi/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../../..
 # java-rmi.cgi is a JDK tool
-MODULE  = tools
 PACKAGE = sun.rmi
 PRODUCT = sun
 PROGRAM = java-rmi
--- a/make/sun/rmi/oldtools/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/rmi/oldtools/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE   = oldjavac
 PRODUCT	 = oldjavac
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/rmi/registry/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/rmi/registry/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = rmi
 PACKAGE = sun.rmi.registry
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/rmi/rmi/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/rmi/rmi/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = rmi
 PACKAGE = sun.rmi
 PRODUCT = sun
 LIBRARY = rmi
--- a/make/sun/rmi/rmic/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/rmi/rmic/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = rmic
 PACKAGE = sun.rmi.rmic
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/rmi/rmid/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/rmi/rmid/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = rmi-activation
 PACKAGE = sun.rmi.activation
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/security/ec/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/ec/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -89,7 +89,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = security-sunec
 PACKAGE = sun.security.ec
 PRODUCT = sun
 
@@ -309,7 +308,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunec.jar
 endif
-	$(install-non-module-file)
+	$(install-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/make/sun/security/jgss/wrapper/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/jgss/wrapper/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../../..
-MODULE  = security-kerberos
 PACKAGE = sun.security.jgss.wrapper
 PRODUCT = sun
 
--- a/make/sun/security/krb5/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/krb5/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = security-kerberos
 PACKAGE = sun.security.krb5
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/security/mscapi/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/mscapi/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -89,7 +89,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = security-sunmscapi
 PACKAGE = sun.security.mscapi
 LIBRARY = sunmscapi
 PRODUCT = sun
@@ -273,7 +272,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunmscapi.jar
 endif
-	$(install-non-module-file)
+	$(install-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/make/sun/security/pkcs11/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/pkcs11/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -89,7 +89,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = security-sunpkcs11
 PACKAGE = sun.security.pkcs11
 LIBRARY = j2pkcs11
 PRODUCT = sun
@@ -288,7 +287,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunpkcs11.jar
 endif
-	$(install-non-module-file)
+	$(install-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/make/sun/security/smartcardio/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/smartcardio/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = security-smartcardio
 PACKAGE = sun.security.smartcardio
 LIBRARY = j2pcsc
 PRODUCT = sun
--- a/make/sun/security/tools/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/security/tools/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../../..
-MODULE  = security-tools
 PACKAGE = sun.security.tools
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/serialver/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/serialver/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = serialver
 PACKAGE = sun.tools.serialver
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/splashscreen/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/splashscreen/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = splashscreen
 PRODUCT = sun
--- a/make/sun/text/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/text/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 
 BUILDDIR = ../..
 
-MODULE  = localedata
 PACKAGE = sun.text
 PRODUCT = sun
 
--- a/make/sun/tools/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/tools/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -28,7 +28,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = tools
 PACKAGE = sun.tools
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/tracing/dtrace/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/tracing/dtrace/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -27,7 +27,6 @@
 # Makefile for building dtrace extension
 #
 BUILDDIR = ../../..
-MODULE  = tracing
 PACKAGE = sun.tracing.dtrace
 LIBRARY = jsdt
 PRODUCT = sun
--- a/make/sun/xawt/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/xawt/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,6 @@
 #
 
 BUILDDIR = ../..
-MODULE  = awt
 PACKAGE = sun.awt.X11
 LIBRARY = mawt
 LIBRARY_OUTPUT = xawt
--- a/make/sun/xawt/mapfile-vers	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/sun/xawt/mapfile-vers	Wed Apr 20 04:38:36 2011 +0100
@@ -374,6 +374,7 @@
         Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
         Java_sun_java2d_xr_XRSurfaceData_initIDs;
         Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
+	Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
 	Java_sun_java2d_xr_XRBackendNative_initIDs;
 	Java_sun_java2d_xr_XRBackendNative_freeGC;
 	Java_sun_java2d_xr_XRBackendNative_createGC;
@@ -432,6 +433,7 @@
         Java_sun_awt_X11_GtkFileDialogPeer_run;
         Java_sun_awt_X11_GtkFileDialogPeer_quit;
         Java_sun_awt_X11_GtkFileDialogPeer_toFront;
+        Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
 
 	Java_sun_print_CUPSPrinter_initIDs;
 	Java_sun_print_CUPSPrinter_getCupsServer;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/CharsetMapping/IBM1364.c2b	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,22 @@
+# 
+# Diff of 
+# b2c: cdctables.zip/Package2.zip/IBM-1364A.zip/055444B0.TPMAP110
+# c2b: cdctables.zip/Package2.zip/IBM-1364A.zip/055444B0.UPMAP110
+# shows there are 6 additional c->b entries in UPMAP110, they are
+# listed below (in b->c form)
+#
+# UPMAP110 also defines
+#      <subchar>    \xFE\xFE
+# and commend out
+#      #<subchar1>  \x3F
+# with
+#
+# <UFFFD>         \xFE\xFD            #  (SUB)
+# <UFFFD>         \xFE\xFE            #  (SUB)
+#
+4148    00AD
+4143    00B7
+4149    2015
+42A1    223C
+496F    2299
+4954    FF5E
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/CharsetMapping/IBM1364.map	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,19774 @@
+#
+# b2c mapping for IBM1364, generated from
+# cdctables.zip/Package2.zip/IBM-1364A.zip/055444B0.TPMAP110
+# which is an updated version of IBM-1364 (with EURO)
+#
+# Replacement suggestion from the CDC table are
+#             U+001A     for SBCS
+#             U+FFFD     for DBCS
+00           0000
+01           0001
+02           0002
+03           0003
+04           009C
+05           0009
+06           0086
+07           007F
+08           0097
+09           008D
+0A           008E
+0B           000B
+0C           000C
+0D           000D
+10           0010
+11           0011
+12           0012
+13           0013
+14           009D
+15           0085
+16           0008
+17           0087
+18           0018
+19           0019
+1A           0092
+1B           008F
+1C           001C
+1D           001D
+1E           001E
+1F           001F
+20           0080
+21           0081
+22           0082
+23           0083
+24           0084
+25           000A
+26           0017
+27           001B
+28           0088
+29           0089
+2A           008A
+2B           008B
+2C           008C
+2D           0005
+2E           0006
+2F           0007
+30           0090
+31           0091
+32           0016
+33           0093
+34           0094
+35           0095
+36           0096
+37           0004
+38           0098
+39           0099
+3A           009A
+3B           009B
+3C           0014
+3D           0015
+3E           009E
+3F           001A
+40           0020
+42           FFA0
+43           FFA1
+44           FFA2
+45           FFA3
+46           FFA4
+47           FFA5
+48           FFA6
+49           FFA7
+4A           00A2
+4B           002E
+4C           003C
+4D           0028
+4E           002B
+4F           007C
+50           0026
+52           FFA8
+53           FFA9
+54           FFAA
+55           FFAB
+56           FFAC
+57           FFAD
+58           FFAE
+59           FFAF
+5A           0021
+5B           0024
+5C           002A
+5D           0029
+5E           003B
+5F           00AC
+60           002D
+61           002F
+62           FFB0
+63           FFB1
+64           FFB2
+65           FFB3
+66           FFB4
+67           FFB5
+68           FFB6
+69           FFB7
+6A           00A6
+6B           002C
+6C           0025
+6D           005F
+6E           003E
+6F           003F
+70           005B
+72           FFB8
+73           FFB9
+74           FFBA
+75           FFBB
+76           FFBC
+77           FFBD
+78           FFBE
+79           0060
+7A           003A
+7B           0023
+7C           0040
+7D           0027
+7E           003D
+7F           0022
+80           005D
+81           0061
+82           0062
+83           0063
+84           0064
+85           0065
+86           0066
+87           0067
+88           0068
+89           0069
+8A           FFC2
+8B           FFC3
+8C           FFC4
+8D           FFC5
+8E           FFC6
+8F           FFC7
+91           006A
+92           006B
+93           006C
+94           006D
+95           006E
+96           006F
+97           0070
+98           0071
+99           0072
+9A           FFCA
+9B           FFCB
+9C           FFCC
+9D           FFCD
+9E           FFCE
+9F           FFCF
+A0           203E
+A1           007E
+A2           0073
+A3           0074
+A4           0075
+A5           0076
+A6           0077
+A7           0078
+A8           0079
+A9           007A
+AA           FFD2
+AB           FFD3
+AC           FFD4
+AD           FFD5
+AE           FFD6
+AF           FFD7
+B0           005E
+B2           005C
+BA           FFDA
+BB           FFDB
+BC           FFDC
+C0           007B
+C1           0041
+C2           0042
+C3           0043
+C4           0044
+C5           0045
+C6           0046
+C7           0047
+C8           0048
+C9           0049
+D0           007D
+D1           004A
+D2           004B
+D3           004C
+D4           004D
+D5           004E
+D6           004F
+D7           0050
+D8           0051
+D9           0052
+E0           20A9
+E2           0053
+E3           0054
+E4           0055
+E5           0056
+E6           0057
+E7           0058
+E8           0059
+E9           005A
+F0           0030
+F1           0031
+F2           0032
+F3           0033
+F4           0034
+F5           0035
+F6           0036
+F7           0037
+F8           0038
+F9           0039
+FF           009F
+4040         3000
+4141         3001
+4142         3002
+4143         30FB
+4144         2025
+4145         2026
+4146         00A8
+4147         3003
+4148         2010
+4149         2014
+414A         2225
+414B         FF3C
+414C         FFE3
+414D         2018
+414E         2019
+414F         201C
+4150         201D
+4151         3014
+4152         3015
+4153         3008
+4154         3009
+4155         300A
+4156         300B
+4157         300C
+4158         300D
+4159         300E
+415A         300F
+415B         3010
+415C         3011
+415D         00B1
+415E         00D7
+415F         00F7
+4160         01C2
+4161         2266
+4162         2267
+4163         221E
+4164         2234
+4165         00B0
+4166         2032
+4167         2033
+4168         2103
+4169         212A
+416A         FF3E
+416B         FFE1
+416C         FFE5
+416D         3396
+416E         3397
+416F         2113
+4170         33C4
+4171         339C
+4172         339D
+4173         339E
+4174         338E
+4175         338F
+4176         00A7
+4177         203B
+4178         2606
+4179         2605
+417A         25CB
+417B         25CF
+417C         25CE
+417D         25C7
+417E         25C6
+417F         25A1
+4180         25A0
+4181         25B3
+4182         25B2
+4183         25BD
+4184         25BC
+4185         2192
+4186         2190
+4187         2191
+4188         2193
+4189         2194
+418A         3013
+418B         FF3B
+418C         FF3D
+418D         2260
+418E         2264
+418F         2265
+4190         212B
+4191         2642
+4192         2640
+4193         2220
+4194         22A5
+4195         2312
+4196         2202
+4197         2207
+4198         2261
+4199         2252
+419A         226A
+419B         226B
+419C         221A
+419D         223D
+424A         FFE0
+424B         FF0E
+424C         FF1C
+424D         FF08
+424E         FF0B
+424F         FF5C
+4250         FF06
+425A         FF01
+425B         FF04
+425C         FF0A
+425D         FF09
+425E         FF1B
+425F         FFE2
+4260         FF0D
+4261         FF0F
+426A         FFE4
+426B         FF0C
+426C         FF05
+426D         FF3F
+426E         FF1E
+426F         FF1F
+4279         FF40
+427A         FF1A
+427B         FF03
+427C         FF20
+427D         FF07
+427E         FF1D
+427F         FF02
+4281         FF41
+4282         FF42
+4283         FF43
+4284         FF44
+4285         FF45
+4286         FF46
+4287         FF47
+4288         FF48
+4289         FF49
+4291         FF4A
+4292         FF4B
+4293         FF4C
+4294         FF4D
+4295         FF4E
+4296         FF4F
+4297         FF50
+4298         FF51
+4299         FF52
+42A1         301C
+42A2         FF53
+42A3         FF54
+42A4         FF55
+42A5         FF56
+42A6         FF57
+42A7         FF58
+42A8         FF59
+42A9         FF5A
+42C0         FF5B
+42C1         FF21
+42C2         FF22
+42C3         FF23
+42C4         FF24
+42C5         FF25
+42C6         FF26
+42C7         FF27
+42C8         FF28
+42C9         FF29
+42D0         FF5D
+42D1         FF2A
+42D2         FF2B
+42D3         FF2C
+42D4         FF2D
+42D5         FF2E
+42D6         FF2F
+42D7         FF30
+42D8         FF31
+42D9         FF32
+42E0         FFE6
+42E2         FF33
+42E3         FF34
+42E4         FF35
+42E5         FF36
+42E6         FF37
+42E7         FF38
+42E8         FF39
+42E9         FF3A
+42F0         FF10
+42F1         FF11
+42F2         FF12
+42F3         FF13
+42F4         FF14
+42F5         FF15
+42F6         FF16
+42F7         FF17
+42F8         FF18
+42F9         FF19
+4341         3165
+4342         3166
+4343         3167
+4344         3168
+4345         3169
+4346         316A
+4347         316B
+4348         316C
+4349         316D
+434A         316E
+434B         316F
+434C         3170
+434D         3171
+434E         3172
+434F         3173
+4350         3174
+4351         3175
+4352         3176
+4353         3177
+4354         3178
+4355         3179
+4356         317A
+4357         317B
+4358         317C
+4359         317D
+435A         317E
+435B         317F
+435C         3180
+435D         3181
+435E         3182
+435F         3183
+4360         3184
+4361         3185
+4362         3186
+4363         3187
+4364         3188
+4365         3189
+4366         318A
+4367         318B
+4368         318C
+4369         318D
+436A         318E
+4441         3041
+4442         3042
+4443         3043
+4444         3044
+4445         3045
+4446         3046
+4447         3047
+4448         3048
+4449         3049
+444A         304A
+444B         304B
+444C         304C
+444D         304D
+444E         304E
+444F         304F
+4450         3050
+4451         3051
+4452         3052
+4453         3053
+4454         3054
+4455         3055
+4456         3056
+4457         3057
+4458         3058
+4459         3059
+445A         305A
+445B         305B
+445C         305C
+445D         305D
+445E         305E
+445F         305F
+4460         3060
+4461         3061
+4462         3062
+4463         3063
+4464         3064
+4465         3065
+4466         3066
+4467         3067
+4468         3068
+4469         3069
+446A         306A
+446B         306B
+446C         306C
+446D         306D
+446E         306E
+446F         306F
+4470         3070
+4471         3071
+4472         3072
+4473         3073
+4474         3074
+4475         3075
+4476         3076
+4477         3077
+4478         3078
+4479         3079
+447A         307A
+447B         307B
+447C         307C
+447D         307D
+447E         307E
+447F         307F
+4480         3080
+4481         3081
+4482         3082
+4483         3083
+4484         3084
+4485         3085
+4486         3086
+4487         3087
+4488         3088
+4489         3089
+448A         308A
+448B         308B
+448C         308C
+448D         308D
+448E         308E
+448F         308F
+4490         3090
+4491         3091
+4492         3092
+4493         3093
+4541         30A1
+4542         30A2
+4543         30A3
+4544         30A4
+4545         30A5
+4546         30A6
+4547         30A7
+4548         30A8
+4549         30A9
+454A         30AA
+454B         30AB
+454C         30AC
+454D         30AD
+454E         30AE
+454F         30AF
+4550         30B0
+4551         30B1
+4552         30B2
+4553         30B3
+4554         30B4
+4555         30B5
+4556         30B6
+4557         30B7
+4558         30B8
+4559         30B9
+455A         30BA
+455B         30BB
+455C         30BC
+455D         30BD
+455E         30BE
+455F         30BF
+4560         30C0
+4561         30C1
+4562         30C2
+4563         30C3
+4564         30C4
+4565         30C5
+4566         30C6
+4567         30C7
+4568         30C8
+4569         30C9
+456A         30CA
+456B         30CB
+456C         30CC
+456D         30CD
+456E         30CE
+456F         30CF
+4570         30D0
+4571         30D1
+4572         30D2
+4573         30D3
+4574         30D4
+4575         30D5
+4576         30D6
+4577         30D7
+4578         30D8
+4579         30D9
+457A         30DA
+457B         30DB
+457C         30DC
+457D         30DD
+457E         30DE
+457F         30DF
+4580         30E0
+4581         30E1
+4582         30E2
+4583         30E3
+4584         30E4
+4585         30E5
+4586         30E6
+4587         30E7
+4588         30E8
+4589         30E9
+458A         30EA
+458B         30EB
+458C         30EC
+458D         30ED
+458E         30EE
+458F         30EF
+4590         30F0
+4591         30F1
+4592         30F2
+4593         30F3
+4594         30F4
+4595         30F5
+4596         30F6
+4641         2170
+4642         2171
+4643         2172
+4644         2173
+4645         2174
+4646         2175
+4647         2176
+4648         2177
+4649         2178
+464A         2179
+4650         2160
+4651         2161
+4652         2162
+4653         2163
+4654         2164
+4655         2165
+4656         2166
+4657         2167
+4658         2168
+4659         2169
+4661         0391
+4662         0392
+4663         0393
+4664         0394
+4665         0395
+4666         0396
+4667         0397
+4668         0398
+4669         0399
+466A         039A
+466B         039B
+466C         039C
+466D         039D
+466E         039E
+466F         039F
+4670         03A0
+4671         03A1
+4672         03A3
+4673         03A4
+4674         03A5
+4675         03A6
+4676         03A7
+4677         03A8
+4678         03A9
+4681         03B1
+4682         03B2
+4683         03B3
+4684         03B4
+4685         03B5
+4686         03B6
+4687         03B7
+4688         03B8
+4689         03B9
+468A         03BA
+468B         03BB
+468C         03BC
+468D         03BD
+468E         03BE
+468F         03BF
+4690         03C0
+4691         03C1
+4692         03C3
+4693         03C4
+4694         03C5
+4695         03C6
+4696         03C7
+4697         03C8
+4698         03C9
+4741         2500
+4742         2502
+4743         250C
+4744         2510
+4745         2518
+4746         2514
+4747         251C
+4748         252C
+4749         2524
+474A         2534
+474B         253C
+474C         2501
+474D         2503
+474E         250F
+474F         2513
+4750         251B
+4751         2517
+4752         2523
+4753         2533
+4754         252B
+4755         253B
+4756         254B
+4757         2520
+4758         252F
+4759         2528
+475A         2537
+475B         253F
+475C         251D
+475D         2530
+475E         2525
+475F         2538
+4760         2542
+4761         2512
+4762         2511
+4763         251A
+4764         2519
+4765         2516
+4766         2515
+4767         250E
+4768         250D
+4769         251E
+476A         251F
+476B         2521
+476C         2522
+476D         2526
+476E         2527
+476F         2529
+4770         252A
+4771         252D
+4772         252E
+4773         2531
+4774         2532
+4775         2535
+4776         2536
+4777         2539
+4778         253A
+4779         253D
+477A         253E
+477B         2540
+477C         2541
+477D         2543
+477E         2544
+477F         2545
+4780         2546
+4781         2547
+4782         2548
+4783         2549
+4784         254A
+4841         3395
+4842         3398
+4843         33A3
+4844         33A4
+4845         33A5
+4846         33A6
+4847         3399
+4848         339A
+4849         339B
+484A         339F
+484B         33A0
+484C         33A1
+484D         33A2
+484E         33CA
+484F         338D
+4850         33CF
+4851         3388
+4852         3389
+4853         33C8
+4854         33A7
+4855         33A8
+4856         33B0
+4857         33B1
+4858         33B2
+4859         33B3
+485A         33B4
+485B         33B5
+485C         33B6
+485D         33B7
+485E         33B8
+485F         33B9
+4860         3380
+4861         3381
+4862         3382
+4863         3383
+4864         3384
+4865         33BA
+4866         33BB
+4867         33BC
+4868         33BD
+4869         33BE
+486A         33BF
+486B         3390
+486C         3391
+486D         3392
+486E         3393
+486F         3394
+4870         2126
+4871         33C0
+4872         33C1
+4873         338A
+4874         338B
+4875         338C
+4876         33D6
+4877         33C5
+4878         33AD
+4879         33AE
+487A         33AF
+487B         33DB
+487C         33A9
+487D         33AA
+487E         33AB
+487F         33AC
+4880         33DD
+4881         33D0
+4882         33D3
+4883         33C3
+4884         33C9
+4885         33DC
+4886         33C6
+4941         221D
+4942         2235
+4943         222B
+4944         222C
+4945         2208
+4946         220B
+4947         2286
+4948         2287
+4949         2282
+494A         2283
+494B         222A
+494C         2229
+494D         2227
+494E         2228
+494F         21D2
+4950         21D4
+4951         2200
+4952         2203
+4953         00B4
+4954         02DC
+4955         02C7
+4956         02D8
+4957         02DD
+4958         02DA
+4959         02D9
+495A         00B8
+495B         02DB
+495C         00A1
+495D         00BF
+495E         02D0
+495F         222E
+4960         2211
+4961         220F
+4962         00A4
+4963         2109
+4964         2030
+4965         25C1
+4966         25C0
+4967         25B7
+4968         25B6
+4969         2664
+496A         2660
+496B         2661
+496C         2665
+496D         2667
+496E         2663
+496F         25C9
+4970         25C8
+4971         25A3
+4972         25D0
+4973         25D1
+4974         2592
+4975         25A4
+4976         25A5
+4977         25A8
+4978         25A7
+4979         25A6
+497A         25A9
+497B         2668
+497C         260F
+497D         260E
+497E         261C
+497F         261E
+4980         00B6
+4981         2020
+4982         2021
+4983         2195
+4984         2197
+4985         2199
+4986         2196
+4987         2198
+4988         266D
+4989         2669
+498A         266A
+498B         266C
+498C         327F
+498D         321C
+498E         2116
+498F         33C7
+4990         2122
+4991         33C2
+4992         33D8
+4993         2121
+4994         02BA
+4995         20AC
+4996         00AE
+4A41         0410
+4A42         0411
+4A43         0412
+4A44         0413
+4A45         0414
+4A46         0415
+4A47         0401
+4A48         0416
+4A49         0417
+4A4A         0418
+4A4B         0419
+4A4C         041A
+4A4D         041B
+4A4E         041C
+4A4F         041D
+4A50         041E
+4A51         041F
+4A52         0420
+4A53         0421
+4A54         0422
+4A55         0423
+4A56         0424
+4A57         0425
+4A58         0426
+4A59         0427
+4A5A         0428
+4A5B         0429
+4A5C         042A
+4A5D         042B
+4A5E         042C
+4A5F         042D
+4A60         042E
+4A61         042F
+4A62         0430
+4A63         0431
+4A64         0432
+4A65         0433
+4A66         0434
+4A67         0435
+4A68         0451
+4A69         0436
+4A6A         0437
+4A6B         0438
+4A6C         0439
+4A6D         043A
+4A6E         043B
+4A6F         043C
+4A70         043D
+4A71         043E
+4A72         043F
+4A73         0440
+4A74         0441
+4A75         0442
+4A76         0443
+4A77         0444
+4A78         0445
+4A79         0446
+4A7A         0447
+4A7B         0448
+4A7C         0449
+4A7D         044A
+4A7E         044B
+4A7F         044C
+4A80         044D
+4A81         044E
+4A82         044F
+4B41         00C6
+4B42         00D0
+4B43         00AA
+4B44         0126
+4B46         0132
+4B48         013F
+4B49         0141
+4B4A         00D8
+4B4B         0152
+4B4C         00BA
+4B4D         00DE
+4B4E         0166
+4B4F         014A
+4B51         3260
+4B52         3261
+4B53         3262
+4B54         3263
+4B55         3264
+4B56         3265
+4B57         3266
+4B58         3267
+4B59         3268
+4B5A         3269
+4B5B         326A
+4B5C         326B
+4B5D         326C
+4B5E         326D
+4B5F         326E
+4B60         326F
+4B61         3270
+4B62         3271
+4B63         3272
+4B64         3273
+4B65         3274
+4B66         3275
+4B67         3276
+4B68         3277
+4B69         3278
+4B6A         3279
+4B6B         327A
+4B6C         327B
+4B6D         24D0
+4B6E         24D1
+4B6F         24D2
+4B70         24D3
+4B71         24D4
+4B72         24D5
+4B73         24D6
+4B74         24D7
+4B75         24D8
+4B76         24D9
+4B77         24DA
+4B78         24DB
+4B79         24DC
+4B7A         24DD
+4B7B         24DE
+4B7C         24DF
+4B7D         24E0
+4B7E         24E1
+4B7F         24E2
+4B80         24E3
+4B81         24E4
+4B82         24E5
+4B83         24E6
+4B84         24E7
+4B85         24E8
+4B86         24E9
+4B87         2460
+4B88         2461
+4B89         2462
+4B8A         2463
+4B8B         2464
+4B8C         2465
+4B8D         2466
+4B8E         2467
+4B8F         2468
+4B90         2469
+4B91         246A
+4B92         246B
+4B93         246C
+4B94         246D
+4B95         246E
+4B96         00BD
+4B97         2153
+4B98         2154
+4B99         00BC
+4B9A         00BE
+4B9B         215B
+4B9C         215C
+4B9D         215D
+4B9E         215E
+4BA0         00E6
+4BA1         0111
+4BA2         00F0
+4BA3         0127
+4BA4         0131
+4BA5         0133
+4BA6         0138
+4BA7         0140
+4BA8         0142
+4BA9         00F8
+4BAA         0153
+4BAB         00DF
+4BAC         00FE
+4BAD         0167
+4BAE         014B
+4BAF         0149
+4BB0         3200
+4BB1         3201
+4BB2         3202
+4BB3         3203
+4BB4         3204
+4BB5         3205
+4BB6         3206
+4BB7         3207
+4BB8         3208
+4BB9         3209
+4BBA         320A
+4BBB         320B
+4BBC         320C
+4BBD         320D
+4BBE         320E
+4BBF         320F
+4BC0         3210
+4BC1         3211
+4BC2         3212
+4BC3         3213
+4BC4         3214
+4BC5         3215
+4BC6         3216
+4BC7         3217
+4BC8         3218
+4BC9         3219
+4BCA         321A
+4BCB         321B
+4BCC         249C
+4BCD         249D
+4BCE         249E
+4BCF         249F
+4BD0         24A0
+4BD1         24A1
+4BD2         24A2
+4BD3         24A3
+4BD4         24A4
+4BD5         24A5
+4BD6         24A6
+4BD7         24A7
+4BD8         24A8
+4BD9         24A9
+4BDA         24AA
+4BDB         24AB
+4BDC         24AC
+4BDD         24AD
+4BDE         24AE
+4BDF         24AF
+4BE0         24B0
+4BE1         24B1
+4BE2         24B2
+4BE3         24B3
+4BE4         24B4
+4BE5         24B5
+4BE6         2474
+4BE7         2475
+4BE8         2476
+4BE9         2477
+4BEA         2478
+4BEB         2479
+4BEC         247A
+4BED         247B
+4BEE         247C
+4BEF         247D
+4BF0         247E
+4BF1         247F
+4BF2         2480
+4BF3         2481
+4BF4         2482
+4BF5         00B9
+4BF6         00B2
+4BF7         00B3
+4BF8         2074
+4BF9         207F
+4BFA         2081
+4BFB         2082
+4BFC         2083
+4BFD         2084
+4C41         1100
+4C42         1101
+4C43         1102
+4C44         1103
+4C45         1104
+4C46         1105
+4C47         1106
+4C48         1107
+4C49         1108
+4C4A         1109
+4C4B         110A
+4C4C         110B
+4C4D         110C
+4C4E         110D
+4C4F         110E
+4C50         110F
+4C51         1110
+4C52         1111
+4C53         1112
+4C54         1113
+4C55         1114
+4C56         1115
+4C57         1116
+4C58         1117
+4C59         1118
+4C5A         1119
+4C5B         111A
+4C5C         111B
+4C5D         111C
+4C5E         111D
+4C5F         111E
+4C60         111F
+4C61         1120
+4C62         1121
+4C63         1122
+4C64         1123
+4C65         1124
+4C66         1125
+4C67         1126
+4C68         1127
+4C69         1128
+4C6A         1129
+4C6B         112A
+4C6C         112B
+4C6D         112C
+4C6E         112D
+4C6F         112E
+4C70         112F
+4C71         1130
+4C72         1131
+4C73         1132
+4C74         1133
+4C75         1134
+4C76         1135
+4C77         1136
+4C78         1137
+4C79         1138
+4C7A         1139
+4C7B         113A
+4C7C         113B
+4C7D         113C
+4C7E         113D
+4C7F         113E
+4C80         113F
+4C81         1140
+4C82         1141
+4C83         1142
+4C84         1143
+4C85         1144
+4C86         1145
+4C87         1146
+4C88         1147
+4C89         1148
+4C8A         1149
+4C8B         114A
+4C8C         114B
+4C8D         114C
+4C8E         114D
+4C8F         114E
+4C90         114F
+4C91         1150
+4C92         1151
+4C93         1152
+4C94         1153
+4C95         1154
+4C96         1155
+4C97         1156
+4C98         1157
+4C99         1158
+4C9A         1159
+4D41         115F
+4D42         1160
+4D43         1161
+4D44         1162
+4D45         1163
+4D46         1164
+4D47         1165
+4D48         1166
+4D49         1167
+4D4A         1168
+4D4B         1169
+4D4C         116A
+4D4D         116B
+4D4E         116C
+4D4F         116D
+4D50         116E
+4D51         116F
+4D52         1170
+4D53         1171
+4D54         1172
+4D55         1173
+4D56         1174
+4D57         1175
+4D58         1176
+4D59         1177
+4D5A         1178
+4D5B         1179
+4D5C         117A
+4D5D         117B
+4D5E         117C
+4D5F         117D
+4D60         117E
+4D61         117F
+4D62         1180
+4D63         1181
+4D64         1182
+4D65         1183
+4D66         1184
+4D67         1185
+4D68         1186
+4D69         1187
+4D6A         1188
+4D6B         1189
+4D6C         118A
+4D6D         118B
+4D6E         118C
+4D6F         118D
+4D70         118E
+4D71         118F
+4D72         1190
+4D73         1191
+4D74         1192
+4D75         1193
+4D76         1194
+4D77         1195
+4D78         1196
+4D79         1197
+4D7A         1198
+4D7B         1199
+4D7C         119A
+4D7D         119B
+4D7E         119C
+4D7F         119D
+4D80         119E
+4D81         119F
+4D82         11A0
+4D83         11A1
+4D84         11A2
+4E41         11A8
+4E42         11A9
+4E43         11AA
+4E44         11AB
+4E45         11AC
+4E46         11AD
+4E47         11AE
+4E48         11AF
+4E49         11B0
+4E4A         11B1
+4E4B         11B2
+4E4C         11B3
+4E4D         11B4
+4E4E         11B5
+4E4F         11B6
+4E50         11B7
+4E51         11B8
+4E52         11B9
+4E53         11BA
+4E54         11BB
+4E55         11BC
+4E56         11BD
+4E57         11BE
+4E58         11BF
+4E59         11C0
+4E5A         11C1
+4E5B         11C2
+4E5C         11C3
+4E5D         11C4
+4E5E         11C5
+4E5F         11C6
+4E60         11C7
+4E61         11C8
+4E62         11C9
+4E63         11CA
+4E64         11CB
+4E65         11CC
+4E66         11CD
+4E67         11CE
+4E68         11CF
+4E69         11D0
+4E6A         11D1
+4E6B         11D2
+4E6C         11D3
+4E6D         11D4
+4E6E         11D5
+4E6F         11D6
+4E70         11D7
+4E71         11D8
+4E72         11D9
+4E73         11DA
+4E74         11DB
+4E75         11DC
+4E76         11DD
+4E77         11DE
+4E78         11DF
+4E79         11E0
+4E7A         11E1
+4E7B         11E2
+4E7C         11E3
+4E7D         11E4
+4E7E         11E5
+4E7F         11E6
+4E80         11E7
+4E81         11E8
+4E82         11E9
+4E83         11EA
+4E84         11EB
+4E85         11EC
+4E86         11ED
+4E87         11EE
+4E88         11EF
+4E89         11F0
+4E8A         11F1
+4E8B         11F2
+4E8C         11F3
+4E8D         11F4
+4E8E         11F5
+4E8F         11F6
+4E90         11F7
+4E91         11F8
+4E92         11F9
+5041         4F3D
+5042         4F73
+5043         5047
+5044         50F9
+5045         52A0
+5046         53EF
+5047         5475
+5048         54E5
+5049         5609
+504A         5AC1
+504B         5BB6
+504C         6687
+504D         67EF
+504E         67B6
+504F         6B4C
+5050         7A3C
+5051         82DB
+5052         8304
+5053         8857
+5054         8888
+5055         8A36
+5056         8CC8
+5057         8DCF
+5058         8EFB
+5059         8FE6
+505A         99D5
+505B         523B
+505C         5374
+505D         5404
+505E         F843
+505F         606A
+5060         64F1
+5061         6BBC
+5062         73CF
+5063         811A
+5064         89BA
+5065         89D2
+5066         95A3
+5067         520A
+5068         58BE
+5069         5978
+506A         59E6
+506B         5E72
+506C         5E79
+506D         61C7
+506E         63C0
+506F         6746
+5070         6F97
+5071         764E
+5072         770B
+5073         7A08
+5074         7AFF
+5075         7C21
+5076         826E
+5077         8271
+5078         809D
+5079         8AEB
+507A         9593
+507B         4E6B
+507C         559D
+507D         66F7
+507E         6E34
+507F         78A3
+5080         7AED
+5081         8910
+5082         7FAF
+5083         845B
+5084         97A8
+5085         52D8
+5086         574E
+5087         582A
+5088         5D4C
+5089         611F
+508A         61BE
+508B         6562
+508C         67D1
+508D         6A44
+508E         6E1B
+508F         7518
+5090         75B3
+5091         76E3
+5092         7D3A
+5093         9163
+5094         9451
+5095         9F95
+5096         5323
+5097         5CAC
+5098         7532
+5099         80DB
+509A         9240
+509B         9598
+509C         5CA1
+509D         525B
+509E         59DC
+509F         5D17
+50A0         5EB7
+50A1         5F3A
+50A2         5F4A
+50A3         6177
+50A4         6C5F
+50A5         7586
+50A6         7DB1
+50A7         8941
+50A8         7CE0
+50A9         8154
+50AA         8591
+50AB         8B1B
+50AC         92FC
+50AD         964D
+50AE         4ECB
+50AF         4EF7
+50B0         500B
+50B1         51F1
+50B2         6137
+50B3         613E
+50B4         6168
+50B5         6539
+50B6         69EA
+50B7         6F11
+50B8         75A5
+50B9         7686
+50BA         76D6
+50BB         7B87
+50BC         82A5
+50BD         84CB
+50BE         958B
+50BF         5BA2
+50C0         5751
+50C1         F901
+50C2         7CB3
+50C3         7FB9
+50C4         91B5
+50C5         53BB
+50C6         5C45
+50C7         5DE8
+50C8         62D2
+50C9         636E
+50CA         64DA
+50CB         6E20
+50CC         70AC
+50CD         64E7
+50CE         8DDD
+50CF         907D
+50D0         F902
+50D1         F844
+50D2         92F8
+50D3         4E7E
+50D4         4EF6
+50D5         5065
+50D6         5DFE
+50D7         5EFA
+50D8         6106
+50D9         8654
+50DA         8E47
+50DB         9375
+50DC         9A2B
+50DD         4E5E
+50DE         5091
+50DF         6770
+50E0         5109
+50E1         528D
+50E2         6AA2
+50E3         77BC
+50E4         9ED4
+50E5         52AB
+50E6         602F
+50E7         5048
+50E8         61A9
+50E9         63ED
+50EA         64CA
+50EB         683C
+50EC         6A84
+50ED         6FC0
+50EE         89A1
+50EF         9694
+50F0         9ABC
+50F1         5805
+50F2         80A9
+50F3         727D
+50F4         72AC
+50F5         7504
+50F6         7D79
+50F7         7E6D
+50F8         898B
+50F9         8B74
+50FA         9063
+50FB         9D51
+50FC         6F54
+50FD         6C7A
+50FE         7D50
+5141         7F3A
+5142         8A23
+5143         517C
+5144         614A
+5145         7B9D
+5146         84B9
+5147         8B19
+5148         938C
+5149         4EAC
+514A         50BE
+514B         52C1
+514C         52CD
+514D         537F
+514E         54FD
+514F         5883
+5150         5E9A
+5151         5F91
+5152         6176
+5153         66BB
+5154         6243
+5155         64CE
+5156         656C
+5157         666F
+5158         66F4
+5159         6897
+515A         6AA0
+515B         6D87
+515C         7085
+515D         71B2
+515E         749F
+515F         74CA
+5160         754A
+5161         75D9
+5162         786C
+5163         78EC
+5164         7ADF
+5165         7AF6
+5166         7D45
+5167         7D93
+5168         8015
+5169         803F
+516A         811B
+516B         8396
+516C         8B66
+516D         8F15
+516E         9015
+516F         93E1
+5170         9803
+5171         9838
+5172         9A5A
+5173         9BE8
+5174         4FC2
+5175         5553
+5176         5951
+5177         5B63
+5178         5C46
+5179         60B8
+517A         6212
+517B         6842
+517C         68B0
+517D         6EAA
+517E         754C
+517F         7678
+5180         78CE
+5181         F845
+5182         7A3D
+5183         7CFB
+5184         7E6B
+5185         7E7C
+5186         8A08
+5187         8AA1
+5188         968E
+5189         8C3F
+518A         96DE
+518B         9DC4
+518C         53E9
+518D         53E4
+518E         544A
+518F         5471
+5190         56FA
+5191         59D1
+5192         5B64
+5193         5EAB
+5194         62F7
+5195         6537
+5196         6545
+5197         6572
+5198         67AF
+5199         6772
+519A         6CBD
+519B         75FC
+519C         7690
+519D         8831
+519E         77BD
+519F         7A3F
+51A0         777E
+51A1         8003
+51A2         80A1
+51A3         818F
+51A4         82E6
+51A5         85C1
+51A6         88B4
+51A7         8A41
+51A8         8AA5
+51A9         F903
+51AA         8F9C
+51AB         932E
+51AC         96C7
+51AD         9867
+51AE         9AD8
+51AF         9F13
+51B0         54ED
+51B1         659B
+51B2         66F2
+51B3         688F
+51B4         7A40
+51B5         8C37
+51B6         9D60
+51B7         56F0
+51B8         5764
+51B9         5D11
+51BA         6606
+51BB         68B1
+51BC         68CD
+51BD         6EFE
+51BE         889E
+51BF         6C68
+51C0         F904
+51C1         9AA8
+51C2         4F9B
+51C3         516C
+51C4         5171
+51C5         529F
+51C6         5B54
+51C7         5DE5
+51C8         8CA2
+51C9         606D
+51CA         6050
+51CB         62F1
+51CC         63A7
+51CD         653B
+51CE         6831
+51CF         69D3
+51D0         7A7A
+51D1         7B9C
+51D2         5BE1
+51D3         6208
+51D4         679C
+51D5         74DC
+51D6         79D1
+51D7         83D3
+51D8         874C
+51D9         8A87
+51DA         8AB2
+51DB         904E
+51DC         9846
+51DD         5ED3
+51DE         69E8
+51DF         85FF
+51E0         90ED
+51E1         970D
+51E2         F905
+51E3         51A0
+51E4         5B98
+51E5         5BEC
+51E6         6163
+51E7         68FA
+51E8         74D8
+51E9         6B3E
+51EA         704C
+51EB         76E5
+51EC         7BA1
+51ED         7F50
+51EE         83C5
+51EF         89C0
+51F0         8CAB
+51F1         95DC
+51F2         9928
+51F3         9E1B
+51F4         522E
+51F5         605D
+51F6         62EC
+51F7         9002
+51F8         5149
+51F9         5321
+51FA         58D9
+51FB         5EE3
+51FC         66E0
+51FD         6D38
+51FE         72C2
+5241         73D6
+5242         7B50
+5243         80F1
+5244         945B
+5245         5366
+5246         639B
+5247         7F6B
+5248         4E56
+5249         5080
+524A         584A
+524B         58DE
+524C         602A
+524D         6127
+524E         62D0
+524F         69D0
+5250         9B41
+5251         5B8F
+5252         7D18
+5253         80B1
+5254         8F5F
+5255         4EA4
+5256         50D1
+5257         54AC
+5258         55AC
+5259         5B0C
+525A         5DA0
+525B         5DE7
+525C         654E
+525D         652A
+525E         6821
+525F         6A4B
+5260         72E1
+5261         768E
+5262         77EF
+5263         7D5E
+5264         7FF9
+5265         81A0
+5266         854E
+5267         86DF
+5268         8F03
+5269         8F4E
+526A         90CA
+526B         9278
+526C         9903
+526D         9A55
+526E         9BAB
+526F         4E18
+5270         4E45
+5271         4E5D
+5272         4EC7
+5273         4F5D
+5274         4FF1
+5275         50B4
+5276         5177
+5277         52FE
+5278         5340
+5279         53E3
+527A         53E5
+527B         548E
+527C         5614
+527D         57A2
+527E         5ABE
+527F         5AD7
+5280         5BC7
+5281         5D87
+5282         5ED0
+5283         61FC
+5284         62D8
+5285         6551
+5286         F846
+5287         67B8
+5288         67E9
+5289         69CB
+528A         6B50
+528B         6BC6
+528C         6BEC
+528D         6C42
+528E         6E9D
+528F         7078
+5290         72D7
+5291         7396
+5292         7403
+5293         750C
+5294         77BF
+5295         77E9
+5296         7A76
+5297         7D7F
+5298         8CFC
+5299         81FC
+529A         8205
+529B         820A
+529C         82DF
+529D         8862
+529E         89AF
+529F         8B33
+52A0         8EC0
+52A1         9011
+52A2         90B1
+52A3         9264
+52A4         98B6
+52A5         99D2
+52A6         9A45
+52A7         9CE9
+52A8         9DD7
+52A9         9F9C
+52AA         570B
+52AB         5C40
+52AC         63AC
+52AD         83CA
+52AE         97A0
+52AF         9EB4
+52B0         7A98
+52B1         7FA4
+52B2         8ECD
+52B3         541B
+52B4         90E1
+52B5         5800
+52B6         5C48
+52B7         6398
+52B8         7A9F
+52B9         5BAE
+52BA         5F13
+52BB         7A79
+52BC         7AAE
+52BD         8EAC
+52BE         5026
+52BF         5238
+52C0         52F8
+52C1         5377
+52C2         5708
+52C3         62F3
+52C4         6B0A
+52C5         7737
+52C6         53A5
+52C7         8E76
+52C8         95D5
+52C9         673A
+52CA         6AC3
+52CB         6F70
+52CC         8A6D
+52CD         8DEA
+52CE         8ECC
+52CF         994B
+52D0         6B78
+52D1         8CB4
+52D2         9B3C
+52D3         F907
+52D4         53EB
+52D5         572D
+52D6         594E
+52D7         63C6
+52D8         73EA
+52D9         7845
+52DA         7ABA
+52DB         8475
+52DC         7CFE
+52DD         898F
+52DE         8D73
+52DF         9035
+52E0         95A8
+52E1         5747
+52E2         7B60
+52E3         83CC
+52E4         921E
+52E5         F908
+52E6         6A58
+52E7         514B
+52E8         524B
+52E9         5287
+52EA         621F
+52EB         6975
+52EC         68D8
+52ED         9699
+52EE         50C5
+52EF         52E4
+52F0         5DF9
+52F1         61C3
+52F2         65A4
+52F3         6839
+52F4         69FF
+52F5         6F0C
+52F6         747E
+52F7         7B4B
+52F8         82B9
+52F9         83EB
+52FA         89B2
+52FB         8B39
+52FC         8FD1
+52FD         9949
+52FE         F909
+5341         4ECA
+5342         64D2
+5343         6A8E
+5344         7434
+5345         7981
+5346         79BD
+5347         887F
+5348         887E
+5349         895F
+534A         F90A
+534B         9326
+534C         53CA
+534D         5C8C
+534E         6025
+534F         6271
+5350         6C72
+5351         7B08
+5352         7D1A
+5353         7D66
+5354         4E98
+5355         5162
+5356         77DC
+5357         80AF
+5358         4F01
+5359         4F0E
+535A         5176
+535B         5180
+535C         55DC
+535D         5668
+535E         573B
+535F         57FA
+5360         5914
+5361         5947
+5362         5993
+5363         5BC4
+5364         5C90
+5365         8C48
+5366         5D0E
+5367         5E7E
+5368         5DF1
+5369         5FCC
+536A         6280
+536B         65D7
+536C         65E3
+536D         671F
+536E         675E
+536F         68CB
+5370         68C4
+5371         6A5F
+5372         6B3A
+5373         6C23
+5374         6C7D
+5375         6C82
+5376         6DC7
+5377         7426
+5378         742A
+5379         74A3
+537A         7578
+537B         757F
+537C         7881
+537D         78EF
+537E         7947
+537F         7948
+5380         797A
+5381         7B95
+5382         7D00
+5383         7DBA
+5384         F847
+5385         8006
+5386         802D
+5387         808C
+5388         671E
+5389         8A18
+538A         8B4F
+538B         8D77
+538C         9321
+538D         98E2
+538E         9951
+538F         9A0E
+5390         9A0F
+5391         9A65
+5392         9C2D
+5393         9E92
+5394         7DCA
+5395         4F76
+5396         5409
+5397         62EE
+5398         6854
+5399         91D1
+539A         F848
+539B         55AB
+539C         513A
+539D         61E6
+539E         62CF
+539F         62FF
+53A0         7CEF
+53A1         90A3
+53A2         8AFE
+53A3         6696
+53A4         7156
+53A5         96E3
+53A6         637A
+53A7         634F
+53A8         5357
+53A9         5583
+53AA         7537
+53AB         7D0D
+53AC         56CA
+53AD         5A18
+53AE         66E9
+53AF         4E43
+53B0         5167
+53B1         5948
+53B2         67F0
+53B3         8010
+53B4         8FFA
+53B5         5973
+53B6         5E74
+53B7         79CA
+53B8         5FF5
+53B9         606C
+53BA         62C8
+53BB         637B
+53BC         4F5E
+53BD         5BE7
+53BE         F849
+53BF         52AA
+53C0         5974
+53C1         5B65
+53C2         5F29
+53C3         6012
+53C4         7459
+53C5         6FC3
+53C6         81BF
+53C7         8FB2
+53C8         60F1
+53C9         8166
+53CA         5C3F
+53CB         F84A
+53CC         5AE9
+53CD         8A25
+53CE         7D10
+53CF         80FD
+53D0         5C3C
+53D1         6CE5
+53D2         533F
+53D3         6EBA
+53D4         591A
+53D5         8336
+53D6         4E39
+53D7         4F46
+53D8         55AE
+53D9         5718
+53DA         58C7
+53DB         65B7
+53DC         65E6
+53DD         6A80
+53DE         6BB5
+53DF         6E4D
+53E0         77ED
+53E1         7AEF
+53E2         7C1E
+53E3         7DDE
+53E4         86CB
+53E5         8892
+53E6         9132
+53E7         935B
+53E8         977C
+53E9         601B
+53EA         64BB
+53EB         737A
+53EC         75B8
+53ED         9054
+53EE         95E5
+53EF         97C3
+53F0         5556
+53F1         64D4
+53F2         66C7
+53F3         6DE1
+53F4         6F6D
+53F5         6FB9
+53F6         75F0
+53F7         8043
+53F8         81BD
+53F9         8983
+53FA         8AC7
+53FB         8B5A
+53FC         6C93
+53FD         7B54
+53FE         8E0F
+5441         905D
+5442         515A
+5443         5802
+5444         5858
+5445         5E62
+5446         5510
+5447         649E
+5448         68E0
+5449         7576
+544A         7CD6
+544B         87F7
+544C         9EE8
+544D         4EE3
+544E         5788
+544F         5927
+5450         5C0D
+5451         5CB1
+5452         5E36
+5453         5F85
+5454         6234
+5455         64E1
+5456         73B3
+5457         7893
+5458         81FA
+5459         888B
+545A         8CB8
+545B         968A
+545C         9EDB
+545D         5B85
+545E         5FB7
+545F         60B3
+5460         5012
+5461         5200
+5462         5230
+5463         5716
+5464         5835
+5465         5857
+5466         5C0E
+5467         5C60
+5468         5CF6
+5469         5EA6
+546A         5F92
+546B         60BC
+546C         6311
+546D         6417
+546E         6843
+546F         68F9
+5470         6DD8
+5471         6E21
+5472         6ED4
+5473         6FE4
+5474         71FE
+5475         76DC
+5476         7779
+5477         79B1
+5478         7A3B
+5479         8404
+547A         83DF
+547B         8CED
+547C         8DF3
+547D         8E48
+547E         9003
+547F         9014
+5480         9053
+5481         90FD
+5482         934D
+5483         9676
+5484         97DC
+5485         6BD2
+5486         7006
+5487         7258
+5488         72A2
+5489         7368
+548A         7763
+548B         79BF
+548C         7BE4
+548D         7E9B
+548E         8B80
+548F         58A9
+5490         60C7
+5491         6566
+5492         66BE
+5493         6C8C
+5494         71C9
+5495         8C5A
+5496         9813
+5497         5484
+5498         4E6D
+5499         7A81
+549A         4EDD
+549B         51AC
+549C         51CD
+549D         52D5
+549E         540C
+549F         578C
+54A0         61A7
+54A1         6771
+54A2         6850
+54A3         68DF
+54A4         6D1E
+54A5         6F7C
+54A6         7AE5
+54A7         75BC
+54A8         77B3
+54A9         8463
+54AA         80F4
+54AB         9285
+54AC         515C
+54AD         6597
+54AE         675C
+54AF         6793
+54B0         75D8
+54B1         7AC7
+54B2         8373
+54B3         809A
+54B4         86AA
+54B5         F95A
+54B6         8C46
+54B7         982D
+54B8         5C6F
+54B9         81C0
+54BA         9041
+54BB         906F
+54BC         920D
+54BD         5F97
+54BE         6A59
+54BF         6ED5
+54C0         706F
+54C1         71C8
+54C2         767B
+54C3         7B49
+54C4         85E4
+54C5         8B04
+54C6         9127
+54C7         9419
+54C8         9A30
+54C9         5587
+54CA         61F6
+54CB         7669
+54CC         7F85
+54CD         863F
+54CE         87BA
+54CF         88F8
+54D0         908F
+54D1         F95C
+54D2         6D1B
+54D3         70D9
+54D4         7296
+54D5         73DE
+54D6         7D61
+54D7         843D
+54D8         916A
+54D9         99F1
+54DA         4E82
+54DB         5375
+54DC         5E71
+54DD         6B04
+54DE         6B12
+54DF         703E
+54E0         721B
+54E1         862D
+54E2         9E1E
+54E3         524C
+54E4         57D3
+54E5         8FA3
+54E6         5D50
+54E7         64E5
+54E8         652C
+54E9         6B16
+54EA         6FEB
+54EB         7C43
+54EC         7E9C
+54ED         85CD
+54EE         8964
+54EF         89BD
+54F0         62C9
+54F1         81D8
+54F2         881F
+54F3         5ECA
+54F4         6717
+54F5         6994
+54F6         6D6A
+54F7         72FC
+54F8         7405
+54F9         746F
+54FA         8782
+54FB         90DE
+54FC         4F86
+54FD         840A
+54FE         51B7
+5541         63A0
+5542         7565
+5543         4EAE
+5544         5169
+5545         5006
+5546         51C9
+5547         6881
+5548         6DBC
+5549         6A11
+554A         7CAE
+554B         7CB1
+554C         7CE7
+554D         826F
+554E         8AD2
+554F         8F1B
+5550         91CF
+5551         9B4E
+5552         4FB6
+5553         52F5
+5554         5442
+5555         5EEC
+5556         623E
+5557         65C5
+5558         6ADA
+5559         6FFE
+555A         7658
+555B         792A
+555C         8182
+555D         85DC
+555E         616E
+555F         8823
+5560         8821
+5561         9462
+5562         95AD
+5563         9A62
+5564         9A6A
+5565         9E97
+5566         9ECE
+5567         529B
+5568         6B77
+5569         66C6
+556A         6ADF
+556B         701D
+556C         792B
+556D         8F62
+556E         9742
+556F         6190
+5570         6200
+5571         6523
+5572         6F23
+5573         7149
+5574         7DF4
+5575         806F
+5576         84EE
+5577         8F26
+5578         9023
+5579         934A
+557A         51BD
+557B         52A3
+557C         5217
+557D         6D0C
+557E         70C8
+557F         88C2
+5580         5EC9
+5581         6582
+5582         6BAE
+5583         6FC2
+5584         7C3E
+5585         7375
+5586         9B23
+5587         4EE4
+5588         4F36
+5589         56F9
+558A         5DBA
+558B         601C
+558C         6624
+558D         6CE0
+558E         73B2
+558F         7F9A
+5590         7FCE
+5591         82D3
+5592         86C9
+5593         901E
+5594         96F6
+5595         9748
+5596         9234
+5597         9818
+5598         9F61
+5599         4F8B
+559A         79AE
+559B         91B4
+559C         96B7
+559D         52DE
+559E         6488
+559F         6AD3
+55A0         6F66
+55A1         7210
+55A2         7018
+55A3         76E7
+55A4         8001
+55A5         826B
+55A6         8606
+55A7         865C
+55A8         8DEF
+55A9         8F05
+55AA         8F64
+55AB         9732
+55AC         9B6F
+55AD         9DFA
+55AE         9E75
+55AF         6F09
+55B0         788C
+55B1         F84B
+55B2         7DA0
+55B3         8F46
+55B4         9304
+55B5         9E93
+55B6         9E7F
+55B7         8AD6
+55B8         58DF
+55B9         5F04
+55BA         6727
+55BB         7027
+55BC         74CF
+55BD         7C60
+55BE         807E
+55BF         5121
+55C0         7262
+55C1         78CA
+55C2         7C5F
+55C3         857E
+55C4         8A84
+55C5         8CF4
+55C6         8CC2
+55C7         96F7
+55C8         4E86
+55C9         50DA
+55CA         F84C
+55CB         5BEE
+55CC         5ED6
+55CD         71CE
+55CE         7642
+55CF         77AD
+55D0         6599
+55D1         804A
+55D2         84FC
+55D3         907C
+55D4         9F8D
+55D5         50C2
+55D6         58D8
+55D7         5C62
+55D8         6A13
+55D9         6DDA
+55DA         6F0F
+55DB         7D2F
+55DC         7E37
+55DD         8938
+55DE         964B
+55DF         9ACF
+55E0         5289
+55E1         67F3
+55E2         69B4
+55E3         6D41
+55E4         6E9C
+55E5         7409
+55E6         7460
+55E7         7559
+55E8         7624
+55E9         786B
+55EA         8B2C
+55EB         985E
+55EC         516D
+55ED         622E
+55EE         9678
+55EF         502B
+55F0         5D19
+55F1         6DEA
+55F2         7DB8
+55F3         8F2A
+55F4         5F8B
+55F5         6144
+55F6         6817
+55F7         F961
+55F8         7ABF
+55F9         9686
+55FA         808B
+55FB         52D2
+55FC         51DB
+55FD         5EE9
+55FE         51CC
+5641         695E
+5642         7A1C
+5643         7DBE
+5644         83F1
+5645         9675
+5646         4FDA
+5647         5229
+5648         5398
+5649         540F
+564A         5C65
+564B         60A7
+564C         F84D
+564D         674E
+564E         68A8
+564F         6F13
+5650         7281
+5651         72F8
+5652         7406
+5653         7483
+5654         75E2
+5655         79BB
+5656         7F79
+5657         7C6C
+5658         87AD
+5659         88CF
+565A         91CC
+565B         91D0
+565C         96E2
+565D         9B51
+565E         9BC9
+565F         541D
+5660         71D0
+5661         7498
+5662         85FA
+5663         8EAA
+5664         96A3
+5665         9C57
+5666         9E9F
+5667         6797
+5668         6DCB
+5669         7433
+566A         75F3
+566B         81E8
+566C         9716
+566D         5CA6
+566E         782C
+566F         7ACB
+5670         7B20
+5671         7C92
+5672         5ABD
+5673         6469
+5674         746A
+5675         75F2
+5676         78E8
+5677         87C7
+5678         99AC
+5679         9B54
+567A         9EBB
+567B         5BDE
+567C         5E55
+567D         6F20
+567E         819C
+567F         83AB
+5680         5A29
+5681         5DD2
+5682         5F4E
+5683         6162
+5684         633D
+5685         6669
+5686         66FC
+5687         6EFF
+5688         6F2B
+5689         7063
+568A         779E
+568B         842C
+568C         8513
+568D         883B
+568E         8B3E
+568F         8F13
+5690         93DD
+5691         9945
+5692         9B18
+5693         9C3B
+5694         62B9
+5695         672B
+5696         6CAB
+5697         896A
+5698         977A
+5699         4EA1
+569A         5984
+569B         5FD8
+569C         5FD9
+569D         671B
+569E         7DB2
+569F         7F54
+56A0         8292
+56A1         832B
+56A2         83BD
+56A3         9099
+56A4         9B4D
+56A5         57CB
+56A6         59B9
+56A7         5A92
+56A8         5BD0
+56A9         6627
+56AA         679A
+56AB         6885
+56AC         6BCF
+56AD         7164
+56AE         771B
+56AF         7F75
+56B0         82FA
+56B1         8CB7
+56B2         8CE3
+56B3         9081
+56B4         9B45
+56B5         8108
+56B6         8109
+56B7         8C8A
+56B8         964C
+56B9         9A40
+56BA         9EA5
+56BB         5B5F
+56BC         6C13
+56BD         731B
+56BE         76DF
+56BF         76F2
+56C0         840C
+56C1         51AA
+56C2         8993
+56C3         4FDB
+56C4         514D
+56C5         52C9
+56C6         5195
+56C7         68C9
+56C8         7704
+56C9         7720
+56CA         7DBF
+56CB         7DEC
+56CC         9762
+56CD         9EB5
+56CE         6EC5
+56CF         8511
+56D0         547D
+56D1         51A5
+56D2         540D
+56D3         9CF4
+56D4         660E
+56D5         669D
+56D6         6E9F
+56D7         76BF
+56D8         8317
+56D9         879F
+56DA         9169
+56DB         9298
+56DC         8882
+56DD         4FAE
+56DE         52DF
+56DF         5E3D
+56E0         59C6
+56E1         6155
+56E2         6478
+56E3         66AE
+56E4         5192
+56E5         67D0
+56E6         6A21
+56E7         6BCD
+56E8         6BDB
+56E9         725F
+56EA         7261
+56EB         7738
+56EC         77DB
+56ED         8004
+56EE         8017
+56EF         8305
+56F0         8B00
+56F1         8B28
+56F2         8C8C
+56F3         927E
+56F4         6728
+56F5         6C90
+56F6         7267
+56F7         76EE
+56F8         7766
+56F9         7A46
+56FA         6B7F
+56FB         6C92
+56FC         5922
+56FD         6726
+56FE         6FDB
+5741         77C7
+5742         8499
+5743         536F
+5744         5893
+5745         5999
+5746         5EDF
+5747         63CF
+5748         6634
+5749         6773
+574A         6E3A
+574B         732B
+574C         82D7
+574D         9328
+574E         52D9
+574F         5DEB
+5750         61CB
+5751         620A
+5752         62C7
+5753         64AB
+5754         65E0
+5755         6B66
+5756         6BCB
+5757         7121
+5758         755D
+5759         7E46
+575A         821E
+575B         8302
+575C         856A
+575D         8AA3
+575E         8CBF
+575F         9727
+5760         9D61
+5761         58A8
+5762         9ED8
+5763         520E
+5764         543B
+5765         6587
+5766         6C76
+5767         7D0B
+5768         7D0A
+5769         868A
+576A         9580
+576B         554F
+576C         805E
+576D         52FF
+576E         7269
+576F         5473
+5770         5A9A
+5771         5C3E
+5772         5D4B
+5773         9761
+5774         5F4C
+5775         5FAE
+5776         672A
+5777         6E3C
+5778         7030
+5779         7709
+577A         7C73
+577B         7CDC
+577C         7F8E
+577D         8587
+577E         8B0E
+577F         8FF7
+5780         60B6
+5781         610D
+5782         61AB
+5783         654F
+5784         65FC
+5785         65FB
+5786         6C11
+5787         6CEF
+5788         739F
+5789         73C9
+578A         9594
+578B         95A9
+578C         5BC6
+578D         871C
+578E         8B10
+578F         F84E
+5790         525D
+5791         535A
+5792         62CD
+5793         640F
+5794         64B2
+5795         6734
+5796         6A38
+5797         6B02
+5798         6CCA
+5799         7254
+579A         73C0
+579B         749E
+579C         7B94
+579D         7E1B
+579E         7C95
+579F         818A
+57A0         8236
+57A1         8584
+57A2         8FEB
+57A3         96F9
+57A4         99C1
+57A5         4F34
+57A6         534A
+57A7         53CD
+57A8         53DB
+57A9         62CC
+57AA         642C
+57AB         6500
+57AC         6591
+57AD         69C3
+57AE         6F58
+57AF         6CEE
+57B0         73ED
+57B1         7554
+57B2         76E4
+57B3         78FB
+57B4         792C
+57B5         7D46
+57B6         80D6
+57B7         87E0
+57B8         822C
+57B9         8FD4
+57BA         9812
+57BB         98EF
+57BC         52C3
+57BD         62D4
+57BE         6F51
+57BF         64A5
+57C0         767C
+57C1         8DCB
+57C2         91B1
+57C3         9262
+57C4         9AEE
+57C5         9B43
+57C6         5023
+57C7         508D
+57C8         574A
+57C9         59A8
+57CA         5C28
+57CB         5E47
+57CC         5F77
+57CD         623F
+57CE         653E
+57CF         65B9
+57D0         65C1
+57D1         6609
+57D2         699C
+57D3         7D21
+57D4         80AA
+57D5         8180
+57D6         822B
+57D7         82B3
+57D8         84A1
+57D9         868C
+57DA         8A2A
+57DB         8B17
+57DC         90A6
+57DD         9632
+57DE         9AE3
+57DF         9B74
+57E0         9F90
+57E1         4FF3
+57E2         500D
+57E3         F963
+57E4         57F9
+57E5         5F98
+57E6         62DC
+57E7         6392
+57E8         676F
+57E9         6E43
+57EA         76C3
+57EB         80DA
+57EC         80CC
+57ED         88F5
+57EE         88F4
+57EF         8919
+57F0         8CE0
+57F1         8F29
+57F2         914D
+57F3         966A
+57F4         4F2F
+57F5         4F70
+57F6         5E1B
+57F7         67CF
+57F8         6822
+57F9         767D
+57FA         767E
+57FB         9B44
+57FC         6A0A
+57FD         F84F
+57FE         7169
+5841         756A
+5842         F964
+5843         7E41
+5844         7FFB
+5845         8543
+5846         85E9
+5847         98DC
+5848         4F10
+5849         7B4F
+584A         7F70
+584B         95A5
+584C         51E1
+584D         5E06
+584E         68B5
+584F         6C3E
+5850         6C4E
+5851         6CDB
+5852         72AF
+5853         7BC4
+5854         8303
+5855         6CD5
+5856         743A
+5857         50FB
+5858         5288
+5859         58C1
+585A         64D8
+585B         74A7
+585C         7656
+585D         78A7
+585E         8F9F
+585F         95E2
+5860         9739
+5861         F965
+5862         535E
+5863         5F01
+5864         6C74
+5865         8FAE
+5866         8B8A
+5867         8FA8
+5868         8FAF
+5869         F850
+586A         908A
+586B         99E2
+586C         5225
+586D         5F46
+586E         77A5
+586F         9C49
+5870         9F08
+5871         4E19
+5872         5002
+5873         5175
+5874         5C5B
+5875         5E77
+5876         661E
+5877         663A
+5878         67C4
+5879         70B3
+587A         7501
+587B         75C5
+587C         7ADD
+587D         79C9
+587E         8F27
+587F         8FF8
+5880         9920
+5881         4FDD
+5882         5821
+5883         5831
+5884         5BF6
+5885         666E
+5886         6B65
+5887         6E7A
+5888         6D11
+5889         6F7D
+588A         752B
+588B         88DC
+588C         8913
+588D         8B5C
+588E         8F14
+588F         9D07
+5890         9EFC
+5891         4F0F
+5892         50D5
+5893         5310
+5894         535C
+5895         5B93
+5896         5FA9
+5897         798F
+5898         670D
+5899         8179
+589A         832F
+589B         8514
+589C         8986
+589D         8760
+589E         8907
+589F         8F3B
+58A0         99A5
+58A1         9C12
+58A2         672C
+58A3         4E76
+58A4         4E30
+58A5         4FF8
+58A6         5949
+58A7         5C01
+58A8         5CF0
+58A9         5CEF
+58AA         6367
+58AB         742B
+58AC         68D2
+58AD         70FD
+58AE         7E2B
+58AF         8451
+58B0         84EC
+58B1         8702
+58B2         9022
+58B3         92D2
+58B4         9CF3
+58B5         4EC6
+58B6         4ED8
+58B7         5085
+58B8         5256
+58B9         526F
+58BA         5426
+58BB         57E0
+58BC         592B
+58BD         5A66
+58BE         5B75
+58BF         5BCC
+58C0         5E9C
+58C1         F966
+58C2         6276
+58C3         6577
+58C4         65A7
+58C5         6D6E
+58C6         6EA5
+58C7         7236
+58C8         7C3F
+58C9         7F36
+58CA         7B26
+58CB         7F58
+58CC         8151
+58CD         8150
+58CE         819A
+58CF         8299
+58D0         82FB
+58D1         8709
+58D2         8A03
+58D3         8CA0
+58D4         8CE6
+58D5         8CFB
+58D6         8D74
+58D7         8DBA
+58D8         90E8
+58D9         91DC
+58DA         961C
+58DB         9644
+58DC         982B
+58DD         99D9
+58DE         9B92
+58DF         9CE7
+58E0         5317
+58E1         5206
+58E2         5674
+58E3         F851
+58E4         58B3
+58E5         5954
+58E6         596E
+58E7         5FFF
+58E8         61A4
+58E9         626E
+58EA         6C7E
+58EB         711A
+58EC         76C6
+58ED         7C89
+58EE         7CDE
+58EF         7D1B
+58F0         82AC
+58F1         8561
+58F2         96F0
+58F3         F967
+58F4         4F5B
+58F5         F852
+58F6         5F17
+58F7         62C2
+58F8         9AF4
+58F9         9EFB
+58FA         5D29
+58FB         670B
+58FC         68DA
+58FD         787C
+58FE         7E43
+5941         9D6C
+5942         4E15
+5943         5099
+5944         5315
+5945         532A
+5946         5351
+5947         5983
+5948         59A3
+5949         5A62
+594A         5E87
+594B         60B2
+594C         618A
+594D         6249
+594E         6279
+594F         6590
+5950         F853
+5951         69A7
+5952         6C98
+5953         F968
+5954         6CB8
+5955         6BD4
+5956         6BD8
+5957         7435
+5958         75FA
+5959         7765
+595A         7812
+595B         7891
+595C         79D8
+595D         7BE6
+595E         7DCB
+595F         7FE1
+5960         80A5
+5961         8153
+5962         813E
+5963         81C2
+5964         83F2
+5965         871A
+5966         88E8
+5967         8AB9
+5968         8B6C
+5969         8CBB
+596A         8F61
+596B         9119
+596C         975E
+596D         98DB
+596E         9AC0
+596F         9F3B
+5970         5B2A
+5971         8CD3
+5972         5F6C
+5973         64EF
+5974         658C
+5975         6AB3
+5976         6BAF
+5977         6FF1
+5978         7015
+5979         725D
+597A         860B
+597B         8CA7
+597C         F854
+597D         983B
+597E         9870
+597F         9B22
+5980         6191
+5981         6C37
+5982         8058
+5983         9A01
+5984         4E4D
+5985         4E8B
+5986         4E9B
+5987         4ED5
+5988         4F3C
+5989         4F3A
+598A         820D
+598B         4F7F
+598C         50FF
+598D         53F2
+598E         53F8
+598F         56DB
+5990         5506
+5991         55E3
+5992         58EB
+5993         5962
+5994         59D2
+5995         5A11
+5996         5BEB
+5997         5BFA
+5998         5DF3
+5999         5E2B
+599A         F855
+599B         5F99
+599C         601D
+599D         6368
+599E         8D66
+599F         65AF
+59A0         659C
+59A1         67FB
+59A2         68AD
+59A3         6942
+59A4         69CE
+59A5         6C99
+59A6         6CD7
+59A7         6E23
+59A8         7009
+59A9         90AA
+59AA         7345
+59AB         7940
+59AC         793E
+59AD         7960
+59AE         6B7B
+59AF         7802
+59B0         79C1
+59B1         7B25
+59B2         7BE9
+59B3         84D1
+59B4         7D17
+59B5         7D72
+59B6         838E
+59B7         86C7
+59B8         88DF
+59B9         8A50
+59BA         8A5E
+59BB         8B1D
+59BC         8CDC
+59BD         5C04
+59BE         8FAD
+59BF         8086
+59C0         98FC
+59C1         99DF
+59C2         524A
+59C3         F969
+59C4         69CA
+59C5         6714
+59C6         F96A
+59C7         9460
+59C8         5098
+59C9         522A
+59CA         5C71
+59CB         6563
+59CC         6C55
+59CD         73CA
+59CE         7523
+59CF         759D
+59D0         7B97
+59D1         849C
+59D2         9178
+59D3         6492
+59D4         6BBA
+59D5         4E77
+59D6         85A9
+59D7         4E09
+59D8         F96B
+59D9         6749
+59DA         68EE
+59DB         6E17
+59DC         886B
+59DD         829F
+59DE         8518
+59DF         6B43
+59E0         63F7
+59E1         6F81
+59E2         98AF
+59E3         9364
+59E4         970E
+59E5         4E0A
+59E6         50B7
+59E7         50CF
+59E8         511F
+59E9         5546
+59EA         55AA
+59EB         5617
+59EC         723D
+59ED         5B40
+59EE         5C19
+59EF         5E8A
+59F0         5EA0
+59F1         5EC2
+59F2         5E38
+59F3         60F3
+59F4         76F8
+59F5         6851
+59F6         6A61
+59F7         6BA4
+59F8         6E58
+59F9         72C0
+59FA         7240
+59FB         7965
+59FC         7BB1
+59FD         7FD4
+59FE         88F3
+5A41         89F4
+5A42         8C61
+5A43         8CDE
+5A44         8A73
+5A45         971C
+5A46         585E
+5A47         74BD
+5A48         8CFD
+5A49         9C13
+5A4A         F96C
+5A4B         7A61
+5A4C         7D22
+5A4D         8272
+5A4E         7272
+5A4F         751F
+5A50         7525
+5A51         F96D
+5A52         7B19
+5A53         566C
+5A54         58FB
+5A55         5885
+5A56         5A7F
+5A57         7280
+5A58         5DBC
+5A59         5E8F
+5A5A         5EB6
+5A5B         5F90
+5A5C         6055
+5A5D         6292
+5A5E         654D
+5A5F         6691
+5A60         66D9
+5A61         66F8
+5A62         6816
+5A63         68F2
+5A64         745E
+5A65         7D6E
+5A66         7DD6
+5A67         7F72
+5A68         80E5
+5A69         8212
+5A6A         85AF
+5A6B         897F
+5A6C         8A93
+5A6D         92E4
+5A6E         901D
+5A6F         9ECD
+5A70         F856
+5A71         9F20
+5A72         5915
+5A73         596D
+5A74         F857
+5A75         5E2D
+5A76         60DC
+5A77         6614
+5A78         6673
+5A79         6790
+5A7A         6C50
+5A7B         6DC5
+5A7C         6F5F
+5A7D         77F3
+5A7E         78A9
+5A7F         84C6
+5A80         91CB
+5A81         932B
+5A82         5148
+5A83         4ED9
+5A84         50CA
+5A85         F858
+5A86         5584
+5A87         5BA3
+5A88         5C20
+5A89         6103
+5A8A         6247
+5A8B         65CB
+5A8C         F859
+5A8D         717D
+5A8E         71F9
+5A8F         79AA
+5A90         7444
+5A91         7487
+5A92         74BF
+5A93         766C
+5A94         7DDA
+5A95         7E55
+5A96         7FA8
+5A97         817A
+5A98         81B3
+5A99         8239
+5A9A         861A
+5A9B         87EC
+5A9C         8A75
+5A9D         8DE3
+5A9E         9078
+5A9F         9291
+5AA0         F85A
+5AA1         9BAE
+5AA2         5070
+5AA3         5368
+5AA4         820C
+5AA5         F85B
+5AA6         5C51
+5AA7         6308
+5AA8         6954
+5AA9         6D29
+5AAA         6E2B
+5AAB         859B
+5AAC         8A2D
+5AAD         8AAA
+5AAE         96EA
+5AAF         6BB2
+5AB0         7E96
+5AB1         87FE
+5AB2         8D0D
+5AB3         66B9
+5AB4         9583
+5AB5         71EE
+5AB6         651D
+5AB7         6D89
+5AB8         F96E
+5AB9         57CE
+5ABA         59D3
+5ABB         6027
+5ABC         60FA
+5ABD         6210
+5ABE         661F
+5ABF         665F
+5AC0         7329
+5AC1         76DB
+5AC2         7701
+5AC3         7B6C
+5AC4         8056
+5AC5         8072
+5AC6         8165
+5AC7         8AA0
+5AC8         9192
+5AC9         4E16
+5ACA         52E2
+5ACB         6B72
+5ACC         6D17
+5ACD         7A05
+5ACE         7B39
+5ACF         7D30
+5AD0         F96F
+5AD1         8CB0
+5AD2         53EC
+5AD3         562F
+5AD4         5851
+5AD5         5C0F
+5AD6         5C11
+5AD7         5BB5
+5AD8         5DE2
+5AD9         6383
+5ADA         6414
+5ADB         6240
+5ADC         662D
+5ADD         68B3
+5ADE         6CBC
+5ADF         6D88
+5AE0         6EAF
+5AE1         701F
+5AE2         70A4
+5AE3         71D2
+5AE4         7526
+5AE5         758E
+5AE6         758F
+5AE7         7B11
+5AE8         7C2B
+5AE9         7D20
+5AEA         7D39
+5AEB         8258
+5AEC         852C
+5AED         856D
+5AEE         8607
+5AEF         8A34
+5AF0         900D
+5AF1         9061
+5AF2         90B5
+5AF3         92B7
+5AF4         9704
+5AF5         97F6
+5AF6         9A37
+5AF7         4FD7
+5AF8         5C6C
+5AF9         675F
+5AFA         7C9F
+5AFB         7E8C
+5AFC         901F
+5AFD         5B6B
+5AFE         640D
+5B41         905C
+5B42         7387
+5B43         87C0
+5B44         5B8B
+5B45         677E
+5B46         8A1F
+5B47         8AA6
+5B48         9001
+5B49         980C
+5B4A         5237
+5B4B         F970
+5B4C         7051
+5B4D         7463
+5B4E         788E
+5B4F         9396
+5B50         8870
+5B51         91D7
+5B52         4FEE
+5B53         53D7
+5B54         53DF
+5B55         56DA
+5B56         55FD
+5B57         5782
+5B58         58FD
+5B59         5AC2
+5B5A         5B88
+5B5B         F85C
+5B5C         5CAB
+5B5D         5E25
+5B5E         620D
+5B5F         6101
+5B60         624B
+5B61         6388
+5B62         641C
+5B63         6536
+5B64         6578
+5B65         666C
+5B66         6A39
+5B67         6B8A
+5B68         71E7
+5B69         6C34
+5B6A         6D19
+5B6B         6EB2
+5B6C         6F31
+5B6D         72E9
+5B6E         7378
+5B6F         795F
+5B70         7626
+5B71         7761
+5B72         F85D
+5B73         79C0
+5B74         7A57
+5B75         7AEA
+5B76         7CB9
+5B77         7D8F
+5B78         7DAC
+5B79         7E61
+5B7A         7F9E
+5B7B         8129
+5B7C         8331
+5B7D         8490
+5B7E         84DA
+5B7F         85EA
+5B80         8896
+5B81         8AB0
+5B82         8F38
+5B83         9042
+5B84         9083
+5B85         916C
+5B86         9296
+5B87         92B9
+5B88         968B
+5B89         96A8
+5B8A         96D6
+5B8B         9700
+5B8C         9808
+5B8D         9996
+5B8E         9AD3
+5B8F         9B1A
+5B90         53D4
+5B91         587E
+5B92         5919
+5B93         5B70
+5B94         5BBF
+5B95         6DD1
+5B96         719F
+5B97         8085
+5B98         83FD
+5B99         5FAA
+5B9A         6042
+5B9B         65EC
+5B9C         696F
+5B9D         6B89
+5B9E         6D35
+5B9F         6DF3
+5BA0         73E3
+5BA1         76FE
+5BA2         77AC
+5BA3         7B4D
+5BA4         7D14
+5BA5         8123
+5BA6         821C
+5BA7         8340
+5BA8         8A62
+5BA9         5DE1
+5BAA         9187
+5BAB         931E
+5BAC         9806
+5BAD         99B4
+5BAE         9D89
+5BAF         620C
+5BB0         8853
+5BB1         8FF0
+5BB2         5D07
+5BB3         5D27
+5BB4         5D69
+5BB5         745F
+5BB6         819D
+5BB7         8671
+5BB8         8768
+5BB9         62FE
+5BBA         6FD5
+5BBB         7FD2
+5BBC         8936
+5BBD         8972
+5BBE         4E1E
+5BBF         4E58
+5BC0         50E7
+5BC1         5347
+5BC2         627F
+5BC3         6607
+5BC4         52DD
+5BC5         7E69
+5BC6         8805
+5BC7         965E
+5BC8         4F8D
+5BC9         5319
+5BCA         557B
+5BCB         5636
+5BCC         59CB
+5BCD         5AA4
+5BCE         F85E
+5BCF         5C38
+5BD0         5C4D
+5BD1         5E02
+5BD2         5F11
+5BD3         6043
+5BD4         65BD
+5BD5         662F
+5BD6         6642
+5BD7         67BE
+5BD8         67F4
+5BD9         731C
+5BDA         77E2
+5BDB         793A
+5BDC         8996
+5BDD         7DE6
+5BDE         7FC5
+5BDF         8494
+5BE0         84CD
+5BE1         8A69
+5BE2         8A66
+5BE3         8AE1
+5BE4         8C7A
+5BE5         57F4
+5BE6         5BD4
+5BE7         5F0F
+5BE8         606F
+5BE9         62ED
+5BEA         690D
+5BEB         6B96
+5BEC         6E5C
+5BED         7184
+5BEE         8B58
+5BEF         8EFE
+5BF0         98DF
+5BF1         98FE
+5BF2         4F38
+5BF3         4FE1
+5BF4         547B
+5BF5         5A20
+5BF6         5BB8
+5BF7         613C
+5BF8         65B0
+5BF9         6668
+5BFA         71FC
+5BFB         7533
+5BFC         77E7
+5BFD         795E
+5BFE         7D33
+5C41         814E
+5C42         81E3
+5C43         8398
+5C44         85AA
+5C45         8703
+5C46         8A0A
+5C47         8EAB
+5C48         8F9B
+5C49         F971
+5C4A         8FC5
+5C4B         5931
+5C4C         5BA4
+5C4D         5BE6
+5C4E         6089
+5C4F         F85F
+5C50         5BE9
+5C51         5C0B
+5C52         5FC3
+5C53         F972
+5C54         6C81
+5C55         6DF1
+5C56         700B
+5C57         751A
+5C58         82AF
+5C59         4EC0
+5C5A         5341
+5C5B         F973
+5C5C         96D9
+5C5D         6C0F
+5C5E         4E9E
+5C5F         4FC4
+5C60         5152
+5C61         5A25
+5C62         5CE8
+5C63         6211
+5C64         7259
+5C65         82BD
+5C66         86FE
+5C67         8859
+5C68         8A1D
+5C69         963F
+5C6A         96C5
+5C6B         9913
+5C6C         9D09
+5C6D         9D5D
+5C6E         580A
+5C6F         5CB3
+5C70         5DBD
+5C71         6115
+5C72         60E1
+5C73         63E1
+5C74         6A02
+5C75         6E25
+5C76         843C
+5C77         984E
+5C78         9F77
+5C79         5B89
+5C7A         5CB8
+5C7B         6309
+5C7C         664F
+5C7D         6848
+5C7E         773C
+5C7F         96C1
+5C80         8D0B
+5C81         978D
+5C82         9854
+5C83         9D08
+5C84         621E
+5C85         65A1
+5C86         8B01
+5C87         8ECB
+5C88         904F
+5C89         95BC
+5C8A         5D52
+5C8B         5DD6
+5C8C         5EB5
+5C8D         6697
+5C8E         764C
+5C8F         83F4
+5C90         8AF3
+5C91         95C7
+5C92         9EEF
+5C93         58D3
+5C94         62BC
+5C95         72CE
+5C96         9D28
+5C97         4EF0
+5C98         592E
+5C99         600F
+5C9A         663B
+5C9B         6B83
+5C9C         79E7
+5C9D         9785
+5C9E         9D26
+5C9F         5393
+5CA0         57C3
+5CA1         5D16
+5CA2         611B
+5CA3         6B38
+5CA4         6DAF
+5CA5         769A
+5CA6         66D6
+5CA7         788D
+5CA8         7919
+5CA9         827E
+5CAA         54C0
+5CAB         9698
+5CAC         9744
+5CAD         9749
+5CAE         5384
+5CAF         6396
+5CB0         6DB2
+5CB1         814B
+5CB2         9628
+5CB3         984D
+5CB4         6AFB
+5CB5         7F4C
+5CB6         9DAF
+5CB7         9E1A
+5CB8         4E5F
+5CB9         503B
+5CBA         51B6
+5CBB         591C
+5CBC         F860
+5CBD         63F6
+5CBE         6930
+5CBF         723A
+5CC0         8036
+5CC1         F974
+5CC2         60F9
+5CC3         91CE
+5CC4         5F31
+5CC5         7BDB
+5CC6         7C65
+5CC7         7D04
+5CC8         82E5
+5CC9         846F
+5CCA         85E5
+5CCB         8E8D
+5CCC         4F6F
+5CCD         58E4
+5CCE         5B43
+5CCF         6059
+5CD0         63DA
+5CD1         6518
+5CD2         656D
+5CD3         6698
+5CD4         694A
+5CD5         6A23
+5CD6         6D0B
+5CD7         7001
+5CD8         716C
+5CD9         7A70
+5CDA         75D2
+5CDB         760D
+5CDC         7F8A
+5CDD         7F98
+5CDE         8944
+5CDF         8B93
+5CE0         91C0
+5CE1         967D
+5CE2         990A
+5CE3         5704
+5CE4         5FA1
+5CE5         6554
+5CE6         65BC
+5CE7         6F01
+5CE8         79A6
+5CE9         8A9E
+5CEA         99AD
+5CEB         9B5A
+5CEC         9F6C
+5CED         5104
+5CEE         61B6
+5CEF         6291
+5CF0         6A8D
+5CF1         81C6
+5CF2         5043
+5CF3         5830
+5CF4         5F66
+5CF5         7109
+5CF6         8A00
+5CF7         8AFA
+5CF8         5B7C
+5CF9         513C
+5CFA         56B4
+5CFB         5944
+5CFC         63A9
+5CFD         6DF9
+5CFE         5DAA
+5D41         696D
+5D42         605A
+5D43         4E88
+5D44         4F59
+5D45         5982
+5D46         6B5F
+5D47         6C5D
+5D48         8207
+5D49         9918
+5D4A         4EA6
+5D4B         57DF
+5D4C         F861
+5D4D         5F79
+5D4E         6613
+5D4F         75AB
+5D50         7E79
+5D51         8B6F
+5D52         9006
+5D53         9A5B
+5D54         56A5
+5D55         5827
+5D56         59F8
+5D57         5A1F
+5D58         5BB4
+5D59         5EF6
+5D5A         6350
+5D5B         F991
+5D5C         693D
+5D5D         6CBF
+5D5E         6D93
+5D5F         6D8E
+5D60         6DF5
+5D61         6F14
+5D62         70DF
+5D63         7136
+5D64         7159
+5D65         71C3
+5D66         71D5
+5D67         784F
+5D68         786F
+5D69         7B75
+5D6A         7DE3
+5D6B         F862
+5D6C         81D9
+5D6D         8815
+5D6E         884D
+5D6F         8B8C
+5D70         8EDF
+5D71         925B
+5D72         9CF6
+5D73         F99E
+5D74         6085
+5D75         6D85
+5D76         71B1
+5D77         F9A1
+5D78         95B1
+5D79         53AD
+5D7A         5869
+5D7B         67D3
+5D7C         708E
+5D7D         7130
+5D7E         9E7D
+5D7F         82D2
+5D80         8276
+5D81         95BB
+5D82         995C
+5D83         9AE5
+5D84         66C4
+5D85         71C1
+5D86         8449
+5D87         584B
+5D88         5B30
+5D89         5F71
+5D8A         6620
+5D8B         668E
+5D8C         6979
+5D8D         69AE
+5D8E         6C38
+5D8F         6CF3
+5D90         6F41
+5D91         701B
+5D92         71DF
+5D93         745B
+5D94         F9AE
+5D95         74D4
+5D96         76C8
+5D97         7E93
+5D98         82F1
+5D99         8A60
+5D9A         8FCE
+5D9B         502A
+5D9C         5208
+5D9D         53E1
+5D9E         66F3
+5D9F         6FCA
+5DA0         730A
+5DA1         7768
+5DA2         777F
+5DA3         7FF3
+5DA4         82AE
+5DA5         854B
+5DA6         85DD
+5DA7         8602
+5DA8         88D4
+5DA9         8A63
+5DAA         8B7D
+5DAB         8C6B
+5DAC         92B3
+5DAD         9713
+5DAE         9810
+5DAF         4E94
+5DB0         4F0D
+5DB1         50B2
+5DB2         5348
+5DB3         5433
+5DB4         55DA
+5DB5         58BA
+5DB6         5967
+5DB7         5A1B
+5DB8         5BE4
+5DB9         609F
+5DBA         F9B9
+5DBB         65FF
+5DBC         6664
+5DBD         68A7
+5DBE         6C5A
+5DBF         70CF
+5DC0         7352
+5DC1         8708
+5DC2         8AA4
+5DC3         9068
+5DC4         543E
+5DC5         5C4B
+5DC6         6C83
+5DC7         7344
+5DC8         7389
+5DC9         923A
+5DCA         5ABC
+5DCB         6EAB
+5DCC         7465
+5DCD         761F
+5DCE         7A69
+5DCF         8580
+5DD0         860A
+5DD1         9C2E
+5DD2         5140
+5DD3         58C5
+5DD4         74EE
+5DD5         7670
+5DD6         64C1
+5DD7         7515
+5DD8         7FC1
+5DD9         9095
+5DDA         96CD
+5DDB         6E26
+5DDC         74E6
+5DDD         7AA9
+5DDE         86D9
+5DDF         8778
+5DE0         8A1B
+5DE1         81E5
+5DE2         5A49
+5DE3         5B8C
+5DE4         5B9B
+5DE5         6D63
+5DE6         73A9
+5DE7         742C
+5DE8         7897
+5DE9         7DE9
+5DEA         7FEB
+5DEB         8155
+5DEC         839E
+5DED         8C4C
+5DEE         962E
+5DEF         9811
+5DF0         66F0
+5DF1         5F80
+5DF2         65FA
+5DF3         6789
+5DF4         6C6A
+5DF5         738B
+5DF6         502D
+5DF7         6B6A
+5DF8         77EE
+5DF9         5916
+5DFA         5DCD
+5DFB         7325
+5DFC         754F
+5DFD         50E5
+5DFE         51F9
+5E41         582F
+5E42         592D
+5E43         5996
+5E44         59DA
+5E45         5DA2
+5E46         62D7
+5E47         6416
+5E48         64FE
+5E49         66DC
+5E4A         8170
+5E4B         F9BF
+5E4C         6A48
+5E4D         7464
+5E4E         7A88
+5E4F         7AAF
+5E50         7E47
+5E51         7E5E
+5E52         8000
+5E53         8558
+5E54         87EF
+5E55         8981
+5E56         8B20
+5E57         9059
+5E58         9080
+5E59         9952
+5E5A         8FB1
+5E5B         617E
+5E5C         6B32
+5E5D         6D74
+5E5E         8925
+5E5F         50AD
+5E60         52C7
+5E61         5BB9
+5E62         5EB8
+5E63         5197
+5E64         6995
+5E65         6E67
+5E66         6EB6
+5E67         7194
+5E68         7462
+5E69         7528
+5E6A         8073
+5E6B         8202
+5E6C         8338
+5E6D         84C9
+5E6E         86F9
+5E6F         8E0A
+5E70         9394
+5E71         93DE
+5E72         4F51
+5E73         5076
+5E74         512A
+5E75         53C8
+5E76         53CB
+5E77         53F3
+5E78         5401
+5E79         5B87
+5E7A         5BD3
+5E7B         5C24
+5E7C         4E8E
+5E7D         611A
+5E7E         6182
+5E7F         725B
+5E80         76C2
+5E81         7950
+5E82         7991
+5E83         79B9
+5E84         7FBD
+5E85         828B
+5E86         865E
+5E87         8FC2
+5E88         9047
+5E89         90F5
+5E8A         9685
+5E8B         96E8
+5E8C         96E9
+5E8D         65ED
+5E8E         6631
+5E8F         715C
+5E90         7A36
+5E91         90C1
+5E92         980A
+5E93         4E91
+5E94         F9C5
+5E95         6B9E
+5E96         8018
+5E97         82B8
+5E98         904B
+5E99         9695
+5E9A         96F2
+5E9B         97FB
+5E9C         71A8
+5E9D         851A
+5E9E         9B31
+5E9F         718A
+5EA0         96C4
+5EA1         5143
+5EA2         539F
+5EA3         54E1
+5EA4         5712
+5EA5         5713
+5EA6         7230
+5EA7         57A3
+5EA8         5A9B
+5EA9         5BC3
+5EAA         6028
+5EAB         613F
+5EAC         63F4
+5EAD         6E90
+5EAE         733F
+5EAF         7457
+5EB0         82D1
+5EB1         873F
+5EB2         8881
+5EB3         8F45
+5EB4         9060
+5EB5         9662
+5EB6         9858
+5EB7         9D1B
+5EB8         6708
+5EB9         8D8A
+5EBA         925E
+5EBB         4F4D
+5EBC         5049
+5EBD         50DE
+5EBE         5371
+5EBF         570D
+5EC0         59D4
+5EC1         5C09
+5EC2         5E43
+5EC3         6170
+5EC4         5A01
+5EC5         6E2D
+5EC6         7232
+5EC7         744B
+5EC8         7DEF
+5EC9         80C3
+5ECA         840E
+5ECB         8466
+5ECC         875F
+5ECD         885B
+5ECE         885E
+5ECF         8B02
+5ED0         9055
+5ED1         97CB
+5ED2         9B4F
+5ED3         4E73
+5ED4         6538
+5ED5         4F91
+5ED6         5112
+5ED7         516A
+5ED8         5E7C
+5ED9         552F
+5EDA         55A9
+5EDB         56FF
+5EDC         5B7A
+5EDD         5BA5
+5EDE         5E37
+5EDF         5E7D
+5EE0         5EBE
+5EE1         60A0
+5EE2         60DF
+5EE3         6109
+5EE4         6108
+5EE5         63C4
+5EE6         6709
+5EE7         67D4
+5EE8         67DA
+5EE9         6961
+5EEA         6CB9
+5EEB         6E38
+5EEC         6FE1
+5EED         7336
+5EEE         745C
+5EEF         7531
+5EF0         7652
+5EF1         7DAD
+5EF2         81FE
+5EF3         8438
+5EF4         8564
+5EF5         88D5
+5EF6         8A98
+5EF7         8ADB
+5EF8         8AED
+5EF9         8E42
+5EFA         8E30
+5EFB         904A
+5EFC         903E
+5EFD         907A
+5EFE         9149
+5F41         91C9
+5F42         936E
+5F43         9EDD
+5F44         6BD3
+5F45         8089
+5F46         80B2
+5F47         9B3B
+5F48         5141
+5F49         596B
+5F4A         5C39
+5F4B         6F64
+5F4C         73A7
+5F4D         80E4
+5F4E         958F
+5F4F         807F
+5F50         620E
+5F51         7D68
+5F52         878D
+5F53         57A0
+5F54         6069
+5F55         6147
+5F56         6ABC
+5F57         6BB7
+5F58         73E2
+5F59         9280
+5F5A         8ABE
+5F5B         96B1
+5F5C         9F66
+5F5D         4E59
+5F5E         541F
+5F5F         6DEB
+5F60         852D
+5F61         9670
+5F62         98EE
+5F63         97F3
+5F64         6339
+5F65         63D6
+5F66         6CE3
+5F67         9091
+5F68         51DD
+5F69         61C9
+5F6A         81BA
+5F6B         9DF9
+5F6C         4F9D
+5F6D         501A
+5F6E         5100
+5F6F         7591
+5F70         77E3
+5F71         5B9C
+5F72         610F
+5F73         61FF
+5F74         64EC
+5F75         6BC5
+5F76         7FA9
+5F77         8264
+5F78         87FB
+5F79         8863
+5F7A         8ABC
+5F7B         8B70
+5F7C         91AB
+5F7D         4E8C
+5F7E         4EE5
+5F7F         4F0A
+5F80         5937
+5F81         59E8
+5F82         5DF2
+5F83         8CB3
+5F84         5F1B
+5F85         5F5B
+5F86         6021
+5F87         F9E0
+5F88         682E
+5F89         723E
+5F8A         73E5
+5F8B         7570
+5F8C         75CD
+5F8D         79FB
+5F8E         800C
+5F8F         8033
+5F90         8351
+5F91         98F4
+5F92         990C
+5F93         9823
+5F94         7037
+5F95         7FFC
+5F96         76CA
+5F97         7FCA
+5F98         7FCC
+5F99         4EBA
+5F9A         4EC1
+5F9B         4EDE
+5F9C         5203
+5F9D         5370
+5F9E         54BD
+5F9F         56E0
+5FA0         59FB
+5FA1         5BC5
+5FA2         5F15
+5FA3         5FCD
+5FA4         6E6E
+5FA5         8A8D
+5FA6         976D
+5FA7         9777
+5FA8         4E00
+5FA9         4F7E
+5FAA         58F9
+5FAB         65E5
+5FAC         6EA2
+5FAD         9038
+5FAE         93B0
+5FAF         99B9
+5FB0         4EFB
+5FB1         58EC
+5FB2         598A
+5FB3         59D9
+5FB4         7A14
+5FB5         834F
+5FB6         8CC3
+5FB7         5165
+5FB8         4ECD
+5FB9         5B55
+5FBA         5269
+5FBB         4ED4
+5FBC         523A
+5FBD         54A8
+5FBE         59C9
+5FBF         59FF
+5FC0         5B50
+5FC1         5B5C
+5FC2         5B57
+5FC3         6063
+5FC4         6148
+5FC5         6ECB
+5FC6         7099
+5FC7         716E
+5FC8         7386
+5FC9         74F7
+5FCA         75B5
+5FCB         7725
+5FCC         78C1
+5FCD         7CA2
+5FCE         7D2B
+5FCF         8005
+5FD0         8014
+5FD1         81EA
+5FD2         8517
+5FD3         85C9
+5FD4         89DC
+5FD5         8AEE
+5FD6         8CC7
+5FD7         8D6D
+5FD8         96CC
+5FD9         4F5C
+5FDA         52FA
+5FDB         56BC
+5FDC         65AB
+5FDD         6628
+5FDE         67DE
+5FDF         707C
+5FE0         70B8
+5FE1         7235
+5FE2         7DBD
+5FE3         828D
+5FE4         914C
+5FE5         96C0
+5FE6         9D72
+5FE7         68E7
+5FE8         6B98
+5FE9         6F7A
+5FEA         76DE
+5FEB         5C91
+5FEC         66AB
+5FED         6F5B
+5FEE         6F5C
+5FEF         7BB4
+5FF0         7C2A
+5FF1         8695
+5FF2         8836
+5FF3         96DC
+5FF4         4E08
+5FF5         4ED7
+5FF6         5320
+5FF7         5834
+5FF8         58BB
+5FF9         596C
+5FFA         5D82
+5FFB         5E33
+5FFC         5E84
+5FFD         5F35
+5FFE         638C
+6041         66B2
+6042         6756
+6043         6A1F
+6044         6AA3
+6045         6B0C
+6046         6F3F
+6047         58EF
+6048         5C07
+6049         7246
+604A         F9FA
+604B         7350
+604C         748B
+604D         7634
+604E         7AE0
+604F         7CA7
+6050         8178
+6051         81DF
+6052         838A
+6053         846C
+6054         8523
+6055         8594
+6056         85CF
+6057         88C5
+6058         88DD
+6059         8D13
+605A         91AC
+605B         9577
+605C         969C
+605D         518D
+605E         54C9
+605F         5728
+6060         5BB0
+6061         624D
+6062         6750
+6063         683D
+6064         6893
+6065         6ED3
+6066         707D
+6067         7E94
+6068         88C1
+6069         8CA1
+606A         8F09
+606B         9F4B
+606C         9F4E
+606D         722D
+606E         7B8F
+606F         8ACD
+6070         931A
+6071         4F4E
+6072         4F47
+6073         5132
+6074         5480
+6075         59D0
+6076         5E95
+6077         62B5
+6078         6775
+6079         67E2
+607A         696E
+607B         6A17
+607C         6CAE
+607D         6E1A
+607E         72D9
+607F         732A
+6080         75BD
+6081         7BB8
+6082         82E7
+6083         8457
+6084         85F7
+6085         86C6
+6086         8A5B
+6087         8C6C
+6088         8CAF
+6089         8E87
+608A         9019
+608B         90B8
+608C         52E3
+608D         5AE1
+608E         5BC2
+608F         6458
+6090         6575
+6091         6EF4
+6092         72C4
+6093         7684
+6094         7A4D
+6095         7B1B
+6096         7C4D
+6097         7CF4
+6098         7E3E
+6099         837B
+609A         8B2B
+609B         8CCA
+609C         8D64
+609D         8DE1
+609E         8E5F
+609F         8FEA
+60A0         8FF9
+60A1         9069
+60A2         50B3
+60A3         5168
+60A4         5178
+60A5         524D
+60A6         526A
+60A7         56C0
+60A8         5861
+60A9         5960
+60AA         5C08
+60AB         5C55
+60AC         5DD3
+60AD         5EDB
+60AE         609B
+60AF         6230
+60B0         6813
+60B1         6BBF
+60B2         6C08
+60B3         6FB1
+60B4         714E
+60B5         7530
+60B6         7538
+60B7         7672
+60B8         78DA
+60B9         7B8B
+60BA         7BAD
+60BB         7BC6
+60BC         7E8F
+60BD         7FE6
+60BE         8A6E
+60BF         8F3E
+60C0         8F49
+60C1         923F
+60C2         9293
+60C3         9322
+60C4         96FB
+60C5         985A
+60C6         986B
+60C7         991E
+60C8         5207
+60C9         622A
+60CA         6298
+60CB         6D59
+60CC         7A83
+60CD         7ACA
+60CE         7BC0
+60CF         7D76
+60D0         5360
+60D1         5CBE
+60D2         5E97
+60D3         6F38
+60D4         70B9
+60D5         9EDE
+60D6         7C98
+60D7         9711
+60D8         63A5
+60D9         647A
+60DA         6904
+60DB         8776
+60DC         4E01
+60DD         4E95
+60DE         4EAD
+60DF         505C
+60E0         5075
+60E1         5448
+60E2         59C3
+60E3         5E40
+60E4         5EF7
+60E5         5F81
+60E6         5B9A
+60E7         5EAD
+60E8         60C5
+60E9         633A
+60EA         653F
+60EB         6574
+60EC         65CC
+60ED         6676
+60EE         6678
+60EF         6883
+60F0         6968
+60F1         6B63
+60F2         6C40
+60F3         6DE8
+60F4         6E1F
+60F5         753A
+60F6         775B
+60F7         7887
+60F8         798E
+60F9         7A0B
+60FA         7A7D
+60FB         9756
+60FC         7CBE
+60FD         8247
+60FE         8A02
+6141         8AEA
+6142         8C9E
+6143         912D
+6144         914A
+6145         91D8
+6146         9266
+6147         9320
+6148         9706
+6149         975C
+614A         9802
+614B         9F0E
+614C         5236
+614D         5291
+614E         557C
+614F         5824
+6150         5E1D
+6151         5F1F
+6152         608C
+6153         63D0
+6154         6662
+6155         68AF
+6156         6FDF
+6157         7445
+6158         81CD
+6159         796D
+615A         7B2C
+615B         85BA
+615C         88FD
+615D         8AF8
+615E         8E36
+615F         8E44
+6160         918D
+6161         9664
+6162         969B
+6163         973D
+6164         984C
+6165         9F4A
+6166         4FCE
+6167         51CB
+6168         5146
+6169         52A9
+616A         F863
+616B         5632
+616C         566A
+616D         5F14
+616E         5F6B
+616F         63AA
+6170         64CD
+6171         65E9
+6172         6641
+6173         66FA
+6174         66F9
+6175         671D
+6176         689D
+6177         68D7
+6178         69FD
+6179         6F15
+617A         6F6E
+617B         7167
+617C         71E5
+617D         722A
+617E         7681
+617F         773A
+6180         7956
+6181         795A
+6182         79DF
+6183         7A20
+6184         7A95
+6185         7AC8
+6186         7B0A
+6187         7C97
+6188         7CDF
+6189         7CF6
+618A         7D44
+618B         7D5B
+618C         7E70
+618D         8087
+618E         85FB
+618F         86A4
+6190         8A54
+6191         8ABF
+6192         8D99
+6193         8E81
+6194         9020
+6195         906D
+6196         91E3
+6197         963B
+6198         9BDB
+6199         9CE5
+619A         65CF
+619B         7C07
+619C         8DB3
+619D         93C3
+619E         5B58
+619F         5C0A
+61A0         5352
+61A1         62D9
+61A2         731D
+61A3         5027
+61A4         5B97
+61A5         5F9E
+61A6         616B
+61A7         68D5
+61A8         6A05
+61A9         6DD9
+61AA         742E
+61AB         7A2E
+61AC         7D42
+61AD         7D9C
+61AE         7E31
+61AF         816B
+61B0         8E35
+61B1         8E64
+61B2         937E
+61B3         9418
+61B4         4F50
+61B5         5750
+61B6         5DE6
+61B7         5EA7
+61B8         632B
+61B9         7F6A
+61BA         4E3B
+61BB         4F4F
+61BC         4F8F
+61BD         505A
+61BE         5EDA
+61BF         546A
+61C0         5468
+61C1         55FE
+61C2         594F
+61C3         5B99
+61C4         5DDE
+61C5         665D
+61C6         6731
+61C7         67F1
+61C8         682A
+61C9         70B7
+61CA         6CE8
+61CB         6D32
+61CC         9152
+61CD         73E0
+61CE         7587
+61CF         851F
+61D0         7C4C
+61D1         7D02
+61D2         7D2C
+61D3         7DA2
+61D4         8098
+61D5         80C4
+61D6         821F
+61D7         86DB
+61D8         8A3B
+61D9         8A85
+61DA         8D70
+61DB         8E8A
+61DC         8F33
+61DD         914E
+61DE         9031
+61DF         9444
+61E0         99D0
+61E1         7AF9
+61E2         7CA5
+61E3         4FCA
+61E4         5101
+61E5         51C6
+61E6         57C8
+61E7         5CFB
+61E8         6659
+61E9         6A3D
+61EA         6D5A
+61EB         6E96
+61EC         6FEC
+61ED         756F
+61EE         7AE3
+61EF         8822
+61F0         9021
+61F1         9075
+61F2         96BC
+61F3         99FF
+61F4         8301
+61F5         4E2D
+61F6         4EF2
+61F7         8846
+61F8         91CD
+61F9         F864
+61FA         537D
+61FB         6ADB
+61FC         696B
+61FD         6C41
+61FE         847A
+6241         589E
+6242         618E
+6243         62EF
+6244         70DD
+6245         66FE
+6246         7511
+6247         75C7
+6248         84B8
+6249         8A3C
+624A         8B49
+624B         8D08
+624C         4E4B
+624D         53EA
+624E         54AB
+624F         5730
+6250         5740
+6251         5FD7
+6252         6301
+6253         6307
+6254         646F
+6255         652F
+6256         65E8
+6257         667A
+6258         679D
+6259         67B3
+625A         6B62
+625B         6C60
+625C         6F2C
+625D         75E3
+625E         77E5
+625F         7825
+6260         7957
+6261         7949
+6262         7D19
+6263         80A2
+6264         8102
+6265         81F3
+6266         829D
+6267         8718
+6268         8A8C
+6269         F9FC
+626A         8D04
+626B         8DBE
+626C         9072
+626D         76F4
+626E         7A19
+626F         7A37
+6270         7E54
+6271         8077
+6272         8FB0
+6273         55D4
+6274         5875
+6275         632F
+6276         6649
+6277         699B
+6278         6D25
+6279         6EB1
+627A         73CD
+627B         7468
+627C         74A1
+627D         75B9
+627E         76E1
+627F         771E
+6280         778B
+6281         79E6
+6282         7E09
+6283         8A3A
+6284         8CD1
+6285         8EEB
+6286         9032
+6287         93AD
+6288         9663
+6289         9673
+628A         9707
+628B         53F1
+628C         7A92
+628D         59EA
+628E         5AC9
+628F         5E19
+6290         684E
+6291         75BE
+6292         79E9
+6293         81A3
+6294         86ED
+6295         8CEA
+6296         8DCC
+6297         8FED
+6298         659F
+6299         6715
+629A         57F7
+629B         96C6
+629C         7DDD
+629D         8F2F
+629E         5FB5
+629F         61F2
+62A0         6F84
+62A1         4E14
+62A2         501F
+62A3         7B9A
+62A4         53C9
+62A5         55DF
+62A6         5DEE
+62A7         5D6F
+62A8         6B21
+62A9         6B64
+62AA         78CB
+62AB         F9FE
+62AC         8E49
+62AD         906E
+62AE         8ECA
+62AF         6349
+62B0         643E
+62B1         7740
+62B2         7A84
+62B3         932F
+62B4         947F
+62B5         9F6A
+62B6         64B0
+62B7         6FAF
+62B8         71E6
+62B9         74A8
+62BA         74DA
+62BB         7AC4
+62BC         7E82
+62BD         7CB2
+62BE         7E98
+62BF         8B9A
+62C0         8D0A
+62C1         947D
+62C2         F865
+62C3         9910
+62C4         994C
+62C5         5239
+62C6         5BDF
+62C7         64E6
+62C8         672D
+62C9         50ED
+62CA         53C3
+62CB         5879
+62CC         6158
+62CD         6159
+62CE         615A
+62CF         61FA
+62D0         65AC
+62D1         7AD9
+62D2         8B92
+62D3         5021
+62D4         5009
+62D5         5231
+62D6         5275
+62D7         5531
+62D8         5A3C
+62D9         5EE0
+62DA         5F70
+62DB         60B5
+62DC         655E
+62DD         660C
+62DE         6636
+62DF         66A2
+62E0         69CD
+62E1         6C05
+62E2         6EC4
+62E3         6F32
+62E4         7621
+62E5         7A93
+62E6         8139
+62E7         8259
+62E8         83D6
+62E9         84BC
+62EA         50B5
+62EB         57F0
+62EC         5F69
+62ED         63A1
+62EE         7826
+62EF         7DB5
+62F0         83DC
+62F1         8521
+62F2         91C7
+62F3         91F5
+62F4         518A
+62F5         67F5
+62F6         7B56
+62F7         7C00
+62F8         8CAC
+62F9         51C4
+62FA         59BB
+62FB         60BD
+62FC         8655
+62FD         F9FF
+62FE         5254
+6341         5C3A
+6342         617D
+6343         621A
+6344         62D3
+6345         64F2
+6346         65A5
+6347         6ECC
+6348         7620
+6349         810A
+634A         8734
+634B         8E91
+634C         965F
+634D         96BB
+634E         4EDF
+634F         5343
+6350         5598
+6351         5929
+6352         5DDD
+6353         64C5
+6354         6CC9
+6355         6DFA
+6356         6FFA
+6357         7A7F
+6358         821B
+6359         85A6
+635A         8CE4
+635B         8E10
+635C         9077
+635D         91E7
+635E         95E1
+635F         9621
+6360         97C6
+6361         51F8
+6362         5FB9
+6363         54F2
+6364         5586
+6365         64A4
+6366         6F88
+6367         7DB4
+6368         8F4D
+6369         9435
+636A         50C9
+636B         5C16
+636C         6CBE
+636D         6DFB
+636E         751B
+636F         77BB
+6370         7C37
+6371         7C64
+6372         8AC2
+6373         59BE
+6374         5E16
+6375         6377
+6376         7252
+6377         758A
+6378         776B
+6379         8ADC
+637A         8CBC
+637B         8F12
+637C         5EF3
+637D         6674
+637E         6DF8
+637F         807D
+6380         83C1
+6381         873B
+6382         8ACB
+6383         9751
+6384         9BD6
+6385         FA00
+6386         5243
+6387         66FF
+6388         6D95
+6389         6EEF
+638A         780C
+638B         7DE0
+638C         8AE6
+638D         902E
+638E         905E
+638F         9746
+6390         9AD4
+6391         521D
+6392         54E8
+6393         5CED
+6394         6194
+6395         6284
+6396         62DB
+6397         68A2
+6398         6912
+6399         695A
+639A         6A35
+639B         7092
+639C         7126
+639D         785D
+639E         7901
+639F         790E
+63A0         79D2
+63A1         7A0D
+63A2         7D83
+63A3         8096
+63A4         8349
+63A5         8549
+63A6         8C82
+63A7         8D85
+63A8         9162
+63A9         918B
+63AA         91AE
+63AB         9214
+63AC         9798
+63AD         4FC3
+63AE         56D1
+63AF         F866
+63B0         71ED
+63B1         77D7
+63B2         8700
+63B3         89F8
+63B4         8E85
+63B5         9AD1
+63B6         5BF8
+63B7         5FD6
+63B8         6751
+63B9         53E2
+63BA         585A
+63BB         5BF5
+63BC         6031
+63BD         6460
+63BE         7E3D
+63BF         8070
+63C0         8471
+63C1         9283
+63C2         64AE
+63C3         50AC
+63C4         5D14
+63C5         6467
+63C6         6700
+63C7         589C
+63C8         62BD
+63C9         63A8
+63CA         690E
+63CB         6978
+63CC         F867
+63CD         6A1E
+63CE         6E6B
+63CF         7503
+63D0         76BA
+63D1         79CB
+63D2         7B92
+63D3         82BB
+63D4         8429
+63D5         8DA8
+63D6         8FFD
+63D7         9112
+63D8         914B
+63D9         919C
+63DA         9318
+63DB         9310
+63DC         96DB
+63DD         97A6
+63DE         9C0D
+63DF         9E81
+63E0         9EA4
+63E1         4E11
+63E2         F868
+63E3         795D
+63E4         755C
+63E5         7AFA
+63E6         7B51
+63E7         7BC9
+63E8         7E2E
+63E9         8233
+63EA         84C4
+63EB         8E74
+63EC         8EF8
+63ED         9010
+63EE         6625
+63EF         693F
+63F0         51FA
+63F1         9EDC
+63F2         5145
+63F3         51B2
+63F4         5FE0
+63F5         6C96
+63F6         87F2
+63F7         885D
+63F8         8877
+63F9         60B4
+63FA         81B5
+63FB         8403
+63FC         53D6
+63FD         5439
+63FE         5634
+6441         5A36
+6442         5C31
+6443         6A47
+6444         708A
+6445         7FE0
+6446         805A
+6447         8106
+6448         81ED
+6449         F869
+644A         8DA3
+644B         9189
+644C         9A5F
+644D         9DF2
+644E         4EC4
+644F         5074
+6450         60FB
+6451         6E2C
+6452         5C64
+6453         4F88
+6454         5024
+6455         55E4
+6456         5CD9
+6457         5DF5
+6458         5E5F
+6459         5FB4
+645A         6894
+645B         6CBB
+645C         6DC4
+645D         71BE
+645E         75D4
+645F         75F4
+6460         7661
+6461         96C9
+6462         7A1A
+6463         7DC7
+6464         7DFB
+6465         7F6E
+6466         6065
+6467         81F4
+6468         8F1C
+6469         99B3
+646A         9D44
+646B         9F52
+646C         5247
+646D         52C5
+646E         98ED
+646F         89AA
+6470         4E03
+6471         67D2
+6472         6F06
+6473         4FB5
+6474         5BE2
+6475         5FF1
+6476         6795
+6477         6C88
+6478         6D78
+6479         7827
+647A         91DD
+647B         937C
+647C         87C4
+647D         79E4
+647E         7A31
+647F         5FEB
+6480         4ED6
+6481         553E
+6482         58AE
+6483         59A5
+6484         60F0
+6485         6253
+6486         6736
+6487         6955
+6488         8235
+6489         9640
+648A         99DD
+648B         502C
+648C         5353
+648D         5544
+648E         FA01
+648F         6258
+6490         62C6
+6491         FA02
+6492         64E2
+6493         67DD
+6494         6A50
+6495         6FC1
+6496         6FEF
+6497         7422
+6498         8A17
+6499         9438
+649A         5451
+649B         5606
+649C         5766
+649D         5F48
+649E         619A
+649F         6B4E
+64A0         7058
+64A1         70AD
+64A2         7DBB
+64A3         8A95
+64A4         596A
+64A5         812B
+64A6         63A2
+64A7         803D
+64A8         8CAA
+64A9         5854
+64AA         642D
+64AB         69BB
+64AC         5B95
+64AD         5E11
+64AE         6E6F
+64AF         8569
+64B0         514C
+64B1         53F0
+64B2         592A
+64B3         6020
+64B4         614B
+64B5         6B86
+64B6         6C70
+64B7         6CF0
+64B8         7B1E
+64B9         80CE
+64BA         82D4
+64BB         8DC6
+64BC         90B0
+64BD         98B1
+64BE         99C4
+64BF         FA04
+64C0         64C7
+64C1         6FA4
+64C2         F86A
+64C3         6491
+64C4         6504
+64C5         514E
+64C6         5410
+64C7         571F
+64C8         8A0E
+64C9         615F
+64CA         6876
+64CB         FA05
+64CC         75DB
+64CD         7B52
+64CE         7D71
+64CF         901A
+64D0         5806
+64D1         817F
+64D2         892A
+64D3         9000
+64D4         9839
+64D5         5078
+64D6         5957
+64D7         59AC
+64D8         6295
+64D9         900F
+64DA         9B2A
+64DB         615D
+64DC         7279
+64DD         5A46
+64DE         5761
+64DF         5DF4
+64E0         628A
+64E1         64AD
+64E2         6777
+64E3         6CE2
+64E4         6D3E
+64E5         722C
+64E6         7436
+64E7         7834
+64E8         7F77
+64E9         82AD
+64EA         8DDB
+64EB         9817
+64EC         5742
+64ED         5224
+64EE         677F
+64EF         7248
+64F0         8CA9
+64F1         8FA6
+64F2         74E3
+64F3         962A
+64F4         516B
+64F5         53ED
+64F6         634C
+64F7         4F69
+64F8         5504
+64F9         6096
+64FA         6C9B
+64FB         6D7F
+64FC         724C
+64FD         72FD
+64FE         7A17
+6541         8C9D
+6542         6557
+6543         8987
+6544         5F6D
+6545         6F8E
+6546         70F9
+6547         81A8
+6548         610E
+6549         4FBF
+654A         504F
+654B         6241
+654C         7247
+654D         7BC7
+654E         7DE8
+654F         7FE9
+6550         8759
+6551         904D
+6552         97AD
+6553         8CB6
+6554         576A
+6555         5E73
+6556         840D
+6557         8A55
+6558         5420
+6559         5B16
+655A         5E63
+655B         5EE2
+655C         5F0A
+655D         6583
+655E         80BA
+655F         853D
+6560         9589
+6561         965B
+6562         4F48
+6563         5305
+6564         530D
+6565         530F
+6566         5486
+6567         54FA
+6568         5703
+6569         5E96
+656A         5E03
+656B         6016
+656C         62B1
+656D         629B
+656E         6355
+656F         6CE1
+6570         6D66
+6571         70AE
+6572         75B1
+6573         7832
+6574         80DE
+6575         812F
+6576         8216
+6577         8461
+6578         84B2
+6579         888D
+657A         8912
+657B         924B
+657C         92EA
+657D         9784
+657E         98FD
+657F         9B91
+6580         5E45
+6581         66B4
+6582         7011
+6583         7206
+6584         4FF5
+6585         527D
+6586         5F6A
+6587         6153
+6588         6753
+6589         6A19
+658A         6F02
+658B         74E2
+658C         7968
+658D         8868
+658E         8C79
+658F         98C4
+6590         F86B
+6591         54C1
+6592         7A1F
+6593         99AE
+6594         6953
+6595         8AF7
+6596         8C4A
+6597         98A8
+6598         5F7C
+6599         62AB
+659A         75B2
+659B         76AE
+659C         84D6
+659D         88AB
+659E         907F
+659F         5339
+65A0         5F3C
+65A1         5FC5
+65A2         6CCC
+65A3         7562
+65A4         758B
+65A5         7B46
+65A6         8E55
+65A7         4E4F
+65A8         903C
+65A9         4E0B
+65AA         4F55
+65AB         590F
+65AC         5EC8
+65AD         6630
+65AE         6CB3
+65AF         7455
+65B0         8766
+65B1         8377
+65B2         8CC0
+65B3         9050
+65B4         971E
+65B5         9C15
+65B6         58D1
+65B7         5B78
+65B8         7627
+65B9         8650
+65BA         8B14
+65BB         9DB4
+65BC         5BD2
+65BD         6068
+65BE         608D
+65BF         65F1
+65C0         6C57
+65C1         6F22
+65C2         6FA3
+65C3         7F55
+65C4         7FF0
+65C5         F86C
+65C6         9592
+65C7         9591
+65C8         9650
+65C9         97D3
+65CA         9DF3
+65CB         5272
+65CC         8F44
+65CD         51FD
+65CE         542B
+65CF         54B8
+65D0         5563
+65D1         558A
+65D2         6ABB
+65D3         6DB5
+65D4         7DD8
+65D5         8266
+65D6         9677
+65D7         5408
+65D8         54C8
+65D9         76D2
+65DA         86E4
+65DB         95A4
+65DC         965C
+65DD         4EA2
+65DE         4F09
+65DF         59EE
+65E0         5DF7
+65E1         6052
+65E2         6297
+65E3         676D
+65E4         6841
+65E5         6C86
+65E6         6E2F
+65E7         7095
+65E8         7F38
+65E9         809B
+65EA         822A
+65EB         FA09
+65EC         9805
+65ED         4EA5
+65EE         5055
+65EF         54B3
+65F0         595A
+65F1         5793
+65F2         5B69
+65F3         5BB3
+65F4         5EE8
+65F5         61C8
+65F6         6977
+65F7         6D77
+65F8         87F9
+65F9         89E3
+65FA         8A72
+65FB         8AE7
+65FC         9082
+65FD         99ED
+65FE         9AB8
+6641         52BE
+6642         6838
+6643         5016
+6644         5E78
+6645         674F
+6646         884C
+6647         4EAB
+6648         5411
+6649         56AE
+664A         9115
+664B         73E6
+664C         97FF
+664D         9909
+664E         9957
+664F         9999
+6650         5653
+6651         589F
+6652         865B
+6653         8A31
+6654         61B2
+6655         8ED2
+6656         737B
+6657         6B47
+6658         96AA
+6659         9A57
+665A         5955
+665B         7200
+665C         8D6B
+665D         9769
+665E         5CF4
+665F         5F26
+6660         61F8
+6661         70AB
+6662         73FE
+6663         7384
+6664         7729
+6665         7D43
+6666         7D62
+6667         7E23
+6668         8237
+6669         8852
+666A         FA0A
+666B         8CE2
+666C         9249
+666D         986F
+666E         5B51
+666F         7A74
+6670         8840
+6671         9801
+6672         5ACC
+6673         F86D
+6674         4FE0
+6675         5354
+6676         593E
+6677         5CFD
+6678         633E
+6679         6D79
+667A         72F9
+667B         7BCB
+667C         8107
+667D         8105
+667E         83A2
+667F         F86E
+6680         92CF
+6681         9830
+6682         4EA8
+6683         5211
+6684         578B
+6685         5F62
+6686         5144
+6687         7005
+6688         70AF
+6689         73E9
+668A         834A
+668B         87A2
+668C         8861
+668D         90A2
+668E         93A3
+668F         99A8
+6690         516E
+6691         5F57
+6692         60E0
+6693         6167
+6694         8559
+6695         91AF
+6696         978B
+6697         4E4E
+6698         4E92
+6699         8C6A
+669A         547C
+669B         58FA
+669C         58D5
+669D         597D
+669E         5F27
+669F         660A
+66A0         6236
+66A1         6BEB
+66A2         6D69
+66A3         6DCF
+66A4         6E56
+66A5         6EF8
+66A6         6F94
+66A7         6FE9
+66A8         6FE0
+66A9         705D
+66AA         72D0
+66AB         745A
+66AC         74E0
+66AD         7693
+66AE         769E
+66AF         795C
+66B0         7CCA
+66B1         7E1E
+66B2         80E1
+66B3         846B
+66B4         864E
+66B5         865F
+66B6         8774
+66B7         8B77
+66B8         6248
+66B9         9190
+66BA         93AC
+66BB         9800
+66BC         9865
+66BD         60D1
+66BE         6216
+66BF         9177
+66C0         5A5A
+66C1         660F
+66C2         6DF7
+66C3         6E3E
+66C4         743F
+66C5         9B42
+66C6         5FFD
+66C7         60DA
+66C8         7B0F
+66C9         9DBB
+66CA         5F18
+66CB         54C4
+66CC         6C5E
+66CD         6CD3
+66CE         6D2A
+66CF         9D3B
+66D0         7D05
+66D1         8679
+66D2         8A0C
+66D3         5316
+66D4         5B05
+66D5         6A3A
+66D6         706B
+66D7         798D
+66D8         7575
+66D9         79BE
+66DA         548C
+66DB         82B1
+66DC         83EF
+66DD         8A71
+66DE         9774
+66DF         8CA8
+66E0         FA0B
+66E1         64F4
+66E2         652B
+66E3         78BA
+66E4         78BB
+66E5         7A6B
+66E6         944A
+66E7         4E38
+66E8         559A
+66E9         571C
+66EA         5BA6
+66EB         5E7B
+66EC         60A3
+66ED         61FD
+66EE         63DB
+66EF         6853
+66F0         6B61
+66F1         6E19
+66F2         7165
+66F3         74B0
+66F4         7D08
+66F5         9084
+66F6         9A69
+66F7         9C25
+66F8         9B1F
+66F9         6D3B
+66FA         6ED1
+66FB         733E
+66FC         8C41
+66FD         95CA
+66FE         51F0
+6741         5A93
+6742         5FA8
+6743         6033
+6744         604D
+6745         614C
+6746         60F6
+6747         6643
+6748         6CC1
+6749         6EC9
+674A         714C
+674B         7687
+674C         7BC1
+674D         8352
+674E         8757
+674F         9051
+6750         968D
+6751         9EC3
+6752         56DE
+6753         5EFB
+6754         5F8A
+6755         6062
+6756         6094
+6757         61F7
+6758         6666
+6759         6703
+675A         6A9C
+675B         6DEE
+675C         6FAE
+675D         7070
+675E         736A
+675F         7E6A
+6760         81BE
+6761         86D4
+6762         8AA8
+6763         8CC4
+6764         5283
+6765         7372
+6766         6A6B
+6767         54EE
+6768         5686
+6769         56C2
+676A         5B5D
+676B         6548
+676C         66C9
+676D         689F
+676E         723B
+676F         80B4
+6770         9175
+6771         4FAF
+6772         5019
+6773         539A
+6774         540E
+6775         543C
+6776         5589
+6777         55C5
+6778         5F8C
+6779         673D
+677A         7334
+677B         9005
+677C         7BCC
+677D         52F3
+677E         5864
+677F         58CE
+6780         6688
+6781         7104
+6782         718F
+6783         71FB
+6784         85B0
+6785         8A13
+6786         85A8
+6787         55A7
+6788         8431
+6789         5349
+678A         5599
+678B         6BC1
+678C         5F59
+678D         5FBD
+678E         63EE
+678F         6689
+6790         7147
+6791         8AF1
+6792         8F1D
+6793         9EBE
+6794         4F11
+6795         643A
+6796         70CB
+6797         7566
+6798         8667
+6799         6064
+679A         8B4E
+679B         9DF8
+679C         51F6
+679D         5308
+679E         5147
+679F         6D36
+67A0         80F8
+67A1         9ED1
+67A2         5FFB
+67A3         6615
+67A4         6B23
+67A5         75D5
+67A6         5403
+67A7         5C79
+67A8         7D07
+67A9         8FC4
+67AA         6B20
+67AB         6B46
+67AC         6B3D
+67AD         5438
+67AE         6070
+67AF         6D3D
+67B0         8208
+67B1         50D6
+67B2         559C
+67B3         566B
+67B4         59EC
+67B5         5B09
+67B6         5E0C
+67B7         66E6
+67B8         6199
+67B9         6231
+67BA         72A7
+67BB         7199
+67BC         51DE
+67BD         71B9
+67BE         79A7
+67BF         7A00
+67C0         7FB2
+67C1         8A70
+67C2         9821
+6841         67B7
+6842         73C2
+6843         75C2
+6844         6164
+6845         4F83
+6846         67EC
+6847         687F
+6848         78F5
+6849         874E
+684A         6221
+684B         77B0
+684C         90AF
+684D         9452
+684E         5808
+684F         757A
+6850         7D73
+6851         7F8C
+6852         8221
+6853         9C47
+6854         584F
+6855         F900
+6856         93A7
+6857         5580
+6858         5028
+6859         795B
+685A         8E1E
+685B         9245
+685C         6957
+685D         8171
+685E         6840
+685F         5292
+6860         9210
+6861         8FF2
+6862         8188
+6863         6289
+6864         9257
+6865         4FD3
+6866         501E
+6867         5106
+6868         5770
+6869         61AC
+686A         70F1
+686B         74A5
+686C         583A
+686D         68E8
+686E         5C3B
+686F         66A0
+6870         69C1
+6871         7F94
+6872         82FD
+6873         83F0
+6874         7428
+6875         9BE4
+6876         73D9
+6877         86A3
+6878         978F
+6879         4E32
+687A         8DE8
+687B         934B
+687C         742F
+687D         4F8A
+687E         709A
+687F         5775
+6880         8009
+6881         92B6
+6882         97AB
+6883         88D9
+6884         828E
+6885         6372
+6886         6DC3
+6887         7357
+6888         8568
+6889         F906
+688A         6677
+688B         69FB
+688C         7AC5
+688D         52FB
+688E         7547
+688F         52A4
+6890         5997
+6891         6611
+6892         82A9
+6893         4F0B
+6894         57FC
+6895         7398
+6896         7482
+6897         7941
+6898         7F88
+6899         9324
+689A         F90B
+689B         F90C
+689C         5A1C
+689D         F90D
+689E         F90E
+689F         F90F
+68A0         F910
+68A1         F911
+68A2         F912
+68A3         F913
+68A4         F914
+68A5         F915
+68A6         F916
+68A7         F917
+68A8         F918
+68A9         F919
+68AA         F91A
+68AB         F91B
+68AC         F91C
+68AD         F91D
+68AE         F91E
+68AF         F91F
+68B0         F920
+68B1         F921
+68B2         678F
+68B3         6960
+68B4         6E73
+68B5         F922
+68B6         F923
+68B7         F924
+68B8         F925
+68B9         F926
+68BA         F927
+68BB         8872
+68BC         F928
+68BD         F929
+68BE         F92A
+68BF         F92B
+68C0         F92C
+68C1         F92D
+68C2         F92E
+68C3         649A
+68C4         5BD7
+68C5         F92F
+68C6         F930
+68C7         F931
+68C8         F932
+68C9         F933
+68CA         F934
+68CB         F935
+68CC         F936
+68CD         F937
+68CE         F938
+68CF         99D1
+68D0         F939
+68D1         F93A
+68D2         F93B
+68D3         F93C
+68D4         F93D
+68D5         F93E
+68D6         F93F
+68D7         F940
+68D8         F941
+68D9         F942
+68DA         F943
+68DB         F944
+68DC         F945
+68DD         F946
+68DE         F947
+68DF         F948
+68E0         F949
+68E1         F94A
+68E2         F94B
+68E3         F94C
+68E4         F94D
+68E5         F94E
+68E6         F94F
+68E7         F950
+68E8         F951
+68E9         677B
+68EA         F952
+68EB         F953
+68EC         F954
+68ED         F955
+68EE         F956
+68EF         F957
+68F0         F958
+68F1         F959
+68F2         4EB6
+68F3         5F56
+68F4         6FBE
+68F5         574D
+68F6         61BA
+68F7         6E5B
+68F8         8541
+68F9         931F
+68FA         7553
+68FB         6207
+68FC         87B3
+68FD         576E
+68FE         5D8B
+6941         6389
+6942         6AC2
+6943         89A9
+6944         65FD
+6945         711E
+6946         9017
+6947         829A
+6948         5D9D
+6949         F95B
+694A         F95D
+694B         F95E
+694C         5D0D
+694D         5FA0
+694E         5137
+694F         7489
+6950         F95F
+6951         5CBA
+6952         7B2D
+6953         8046
+6954         6FA7
+6955         F960
+6956         64C4
+6957         6F5E
+6958         797F
+6959         83C9
+695A         7028
+695B         8CDA
+695C         9B27
+695D         5A41
+695E         763B
+695F         851E
+6960         93E4
+6961         65D2
+6962         700F
+6963         4F96
+6964         51DC
+6965         550E
+6966         6D6C
+6967         F962
+6968         7FB8
+6969         8389
+696A         88E1
+696B         6F7E
+696C         78BC
+696D         9088
+696E         4E07
+696F         534D
+6970         551C
+6971         8309
+6972         8F1E
+6973         6C94
+6974         6927
+6975         7791
+6976         84C2
+6977         6479
+6978         7441
+6979         82BC
+697A         9DA9
+697B         7AD7
+697C         61AE
+697D         6959
+697E         73F7
+697F         5011
+6980         96EF
+6981         6C95
+6982         68B6
+6983         6963
+6984         6E44
+6985         9EF4
+6986         5CB7
+6987         7DE1
+6988         7622
+6989         76FC
+698A         78D0
+698B         6E24
+698C         678B
+698D         6EC2
+698E         78C5
+698F         7119
+6990         5E61
+6991         71D4
+6992         6A97
+6993         8617
+6994         68C5
+6995         9A08
+6996         73E4
+6997         83E9
+6998         8F39
+6999         71A2
+699A         4E0D
+699B         4FEF
+699C         5490
+699D         5B5A
+699E         8240
+699F         83A9
+69A0         5429
+69A1         6610
+69A2         8CC1
+69A3         5F7F
+69A4         6787
+69A5         6BD6
+69A6         6BD7
+69A7         79D5
+69A8         7C83
+69A9         56AC
+69AA         6D5C
+69AB         73AD
+69AC         4FDF
+69AD         67F6
+69AE         9E9D
+69AF         9730
+69B0         715E
+69B1         9212
+69B2         5CE0
+69B3         55C7
+69B4         637F
+69B5         7B6E
+69B6         5B0B
+69B7         657E
+69B8         6E32
+69B9         7401
+69BA         9425
+69BB         994D
+69BC         6CC4
+69BD         893B
+69BE         9F67
+69BF         5261
+69C0         965D
+69C1         5BAC
+69C2         73F9
+69C3         7619
+69C4         7BE0
+69C5         6D91
+69C6         8B16
+69C7         8D16
+69C8         5DFD
+69C9         84C0
+69CA         98E1
+69CB         609A
+69CC         6DDE
+69CD         5CC0
+69CE         7407
+69CF         74B2
+69D0         8B90
+69D1         96A7
+69D2         6F5A
+69D3         7421
+69D4         74B9
+69D5         5F87
+69D6         6812
+69D7         6A53
+69D8         84F4
+69D9         8563
+69DA         8AC4
+69DB         9265
+69DC         5C4E
+69DD         8C55
+69DE         7BD2
+69DF         8755
+69E0         4F81
+69E1         85CE
+69E2         8AF6
+69E3         555E
+69E4         83AA
+69E5         5E44
+69E6         9102
+69E7         9354
+69E8         9C10
+69E9         9B9F
+69EA         5535
+69EB         5CA9
+69EC         627C
+69ED         7E0A
+69EE         F975
+69EF         F976
+69F0         84BB
+69F1         F977
+69F2         F978
+69F3         F979
+69F4         F97A
+69F5         79B3
+69F6         F97B
+69F7         F97C
+69F8         F97D
+69F9         F97E
+69FA         7600
+69FB         8616
+69FC         4FFA
+69FD         5186
+69FE         F97F
+6A41         F980
+6A42         F981
+6A43         F982
+6A44         F983
+6A45         F984
+6A46         74B5
+6A47         7916
+6A48         F985
+6A49         8245
+6A4A         8339
+6A4B         8F3F
+6A4C         8F5D
+6A4D         F986
+6A4E         F987
+6A4F         F988
+6A50         F989
+6A51         F98A
+6A52         F98B
+6A53         F98C
+6A54         F98D
+6A55         F98E
+6A56         F98F
+6A57         F990
+6A58         633B
+6A59         6C87
+6A5A         F992
+6A5B         F993
+6A5C         F994
+6A5D         F995
+6A5E         F996
+6A5F         7E2F
+6A60         F997
+6A61         F998
+6A62         F999
+6A63         F99A
+6A64         F99B
+6A65         F99C
+6A66         F99D
+6A67         F99F
+6A68         F9A0
+6A69         F9A2
+6A6A         F9A3
+6A6B         F9A4
+6A6C         F9A5
+6A6D         7430
+6A6E         F9A6
+6A6F         F9A7
+6A70         F9A8
+6A71         F9A9
+6A72         F9AA
+6A73         F9AB
+6A74         5DB8
+6A75         F9AC
+6A76         6E36
+6A77         6FDA
+6A78         702F
+6A79         7150
+6A7A         7370
+6A7B         F9AD
+6A7C         7A4E
+6A7D         F9AF
+6A7E         F9B0
+6A7F         F9B1
+6A80         9348
+6A81         F9B2
+6A82         9719
+6A83         F9B3
+6A84         F9B4
+6A85         4E42
+6A86         F9B5
+6A87         6C6D
+6A88         7A62
+6A89         F9B6
+6A8A         F9B7
+6A8B         F9B8
+6A8C         4FC9
+6A8D         5862
+6A8E         61CA
+6A8F         6556
+6A90         6FB3
+6A91         71AC
+6A92         7B7D
+6A93         9C32
+6A94         9F07
+6A95         7E15
+6A96         9954
+6A97         7AAA
+6A98         68A1
+6A99         6900
+6A9A         7413
+6A9B         8118
+6A9C         5A03
+6A9D         5D6C
+6A9E         F9BA
+6A9F         F9BB
+6AA0         5BE5
+6AA1         F9BC
+6AA2         F9BD
+6AA3         6493
+6AA4         F9BE
+6AA5         F9C0
+6AA6         71FF
+6AA7         F9C1
+6AA8         F9C2
+6AA9         F9C3
+6AAA         7E1F
+6AAB         4FD1
+6AAC         57C7
+6AAD         5889
+6AAE         6142
+6AAF         6D8C
+6AB0         752C
+6AB1         F9C4
+6AB2         65F4
+6AB3         7397
+6AB4         7440
+6AB5         7D06
+6AB6         85D5
+6AB7         91EA
+6AB8         52D6
+6AB9         5F67
+6ABA         682F
+6ABB         6A52
+6ABC         6F90
+6ABD         7189
+6ABE         8553
+6ABF         4E90
+6AC0         5AC4
+6AC1         6C85
+6AC2         6D39
+6AC3         6E72
+6AC4         F9C6
+6AC5         6690
+6AC6         853F
+6AC7         8918
+6AC8         F9C7
+6AC9         F9C8
+6ACA         F9C9
+6ACB         6962
+6ACC         6D27
+6ACD         F9CA
+6ACE         F9CB
+6ACF         7337
+6AD0         F9CC
+6AD1         F9CD
+6AD2         F9CE
+6AD3         F9CF
+6AD4         F9D0
+6AD5         F9D1
+6AD6         5809
+6AD7         F9D2
+6AD8         F9D3
+6AD9         F9D4
+6ADA         F9D5
+6ADB         F9D6
+6ADC         8D07
+6ADD         F9D7
+6ADE         9217
+6ADF         F9D8
+6AE0         F9D9
+6AE1         F9DA
+6AE2         F9DB
+6AE3         701C
+6AE4         F9DC
+6AE5         6905
+6AE6         858F
+6AE7         F9DD
+6AE8         F9DE
+6AE9         F9DF
+6AEA         F9E1
+6AEB         F9E2
+6AEC         F9E3
+6AED         F9E4
+6AEE         F9E5
+6AEF         F9E6
+6AF0         8084
+6AF1         82E1
+6AF2         F9E7
+6AF3         F9E8
+6AF4         8CBD
+6AF5         9087
+6AF6         F9E9
+6AF7         F9EA
+6AF8         F9EB
+6AF9         F9EC
+6AFA         8B1A
+6AFB         F9ED
+6AFC         F9EE
+6AFD         F9EF
+6AFE         7D6A
+6B41         8335
+6B42         F9F0
+6B43         8693
+6B44         F9F1
+6B45         F9F2
+6B46         F9F3
+6B47         4F5A
+6B48         6041
+6B49         F9F4
+6B4A         F9F5
+6B4B         F9F6
+6B4C         5344
+6B4D         F9F7
+6B4E         F9F8
+6B4F         F9F9
+6B50         82BF
+6B51         8328
+6B52         5B71
+6B53         81E7
+6B54         6E3D
+6B55         7E21
+6B56         7D35
+6B57         83F9
+6B58         96CE
+6B59         9F5F
+6B5A         540A
+6B5B         F9FB
+6B5C         7FDF
+6B5D         93D1
+6B5E         4F43
+6B5F         4F7A
+6B60         587C
+6B61         7420
+6B62         7551
+6B63         7B4C
+6B64         942B
+6B65         7664
+6B66         9B8E
+6B67         67FE
+6B68         6A89
+6B69         6DC0
+6B6A         6E5E
+6B6B         701E
+6B6C         70A1
+6B6D         738E
+6B6E         73FD
+6B6F         7D8E
+6B70         92CC
+6B71         74AA
+6B72         96D5
+6B73         60B0
+6B74         8E2A
+6B75         59DD
+6B76         6E4A
+6B77         6F8D
+6B78         5BEF
+6B79         710C
+6B7A         96CB
+6B7B         7E52
+6B7C         6C9A
+6B7D         82B7
+6B7E         5507
+6B7F         6422
+6B80         664B
+6B81         686D
+6B82         6B84
+6B83         755B
+6B84         7E1D
+6B85         81FB
+6B86         852F
+6B87         8897
+6B88         4F84
+6B89         74C6
+6B8A         F9FD
+6B8B         6F57
+6B8C         93F6
+6B8D         4F98
+6B8E         7C12
+6B8F         7D2E
+6B90         8B96
+6B91         6134
+6B92         7316
+6B93         5BC0
+6B94         5BE8
+6B95         501C
+6B96         8E60
+6B97         7394
+6B98         8F1F
+6B99         7C3D
+6B9A         8A79
+6B9B         581E
+6B9C         527F
+6B9D         8278
+6B9E         82D5
+6B9F         90A8
+6BA0         60A4
+6BA1         6181
+6BA2         8525
+6BA3         8ACF
+6BA4         939A
+6BA5         9A36
+6BA6         8E59
+6BA7         7443
+6BA8         672E
+6BA9         8D05
+6BAA         53A0
+6BAB         7A49
+6BAC         86A9
+6BAD         741B
+6BAE         54A4
+6BAF         62D6
+6BB0         99B1
+6BB1         577C
+6BB2         666B
+6BB3         7438
+6BB4         7708
+6BB5         FA03
+6BB6         69CC
+6BB7         95D6
+6BB8         64FA
+6BB9         9211
+6BBA         9A19
+6BBB         67B0
+6BBC         FA06
+6BBD         82DE
+6BBE         900B
+6BBF         66DD
+6BC0         FA07
+6BC1         98C7
+6BC2         9A43
+6BC3         9642
+6BC4         73CC
+6BC5         82FE
+6BC6         999D
+6BC7         53A6
+6BC8         701A
+6BC9         929C
+6BCA         9E79
+6BCB         95D4
+6BCC         5AE6
+6BCD         FA08
+6BCE         7023
+6BCF         8347
+6BD0         6AF6
+6BD1         4FD4
+6BD2         774D
+6BD3         6CEB
+6BD4         73B9
+6BD5         665B
+6BD6         6CC2
+6BD7         6ECE
+6BD8         7050
+6BD9         7192
+6BDA         7469
+6BDB         9008
+6BDC         66B3
+6BDD         8E4A
+6BDE         5CB5
+6BDF         6667
+6BE0         7425
+6BE1         82A6
+6BE2         84BF
+6BE3         70D8
+6BE4         8B41
+6BE5         5950
+6BE6         6665
+6BE7         5E4C
+6BE8         6130
+6BE9         6644
+6BEA         69A5
+6BEB         6E5F
+6BEC         6F62
+6BED         749C
+6BEE         7C27
+6BEF         532F
+6BF0         8334
+6BF1         5B96
+6BF2         9404
+6BF3         6585
+6BF4         6D8D
+6BF5         6DC6
+6BF6         9A4D
+6BF7         5E3F
+6BF8         7166
+6BF9         73DD
+6BFA         52DB
+6BFB         6684
+6BFC         714A
+6BFD         7098
+6BFE         8A16
+6C41         7FD5
+6C42         56CD
+6C43         6198
+6C44         665E
+6C45         71BA
+8441         3164
+8444         3133
+8446         3135
+8447         3136
+844A         313A
+844B         313B
+844C         313C
+844D         313D
+844E         313E
+844F         313F
+8450         3140
+8454         3144
+8461         314F
+8481         3150
+84A1         3151
+84C1         3152
+84E1         3153
+8541         3154
+8561         3155
+8581         3156
+85A1         3157
+85C1         3158
+85E1         3159
+8641         315A
+8661         315B
+8681         315C
+86A1         315D
+86C1         315E
+86E1         315F
+8741         3160
+8761         3161
+8781         3162
+87A1         3163
+8841         3131
+8861         AC00
+8862         AC01
+8863         AC02
+8864         AC03
+8865         AC04
+8866         AC05
+8867         AC06
+8868         AC07
+8869         AC08
+886A         AC09
+886B         AC0A
+886C         AC0B
+886D         AC0C
+886E         AC0D
+886F         AC0E
+8870         AC0F
+8871         AC10
+8873         AC11
+8874         AC12
+8875         AC13
+8876         AC14
+8877         AC15
+8878         AC16
+8879         AC17
+887A         AC18
+887B         AC19
+887C         AC1A
+887D         AC1B
+8881         AC1C
+8882         AC1D
+8883         AC1E
+8884         AC1F
+8885         AC20
+8886         AC21
+8887         AC22
+8888         AC23
+8889         AC24
+888A         AC25
+888B         AC26
+888C         AC27
+888D         AC28
+888E         AC29
+888F         AC2A
+8890         AC2B
+8891         AC2C
+8893         AC2D
+8894         AC2E
+8895         AC2F
+8896         AC30
+8897         AC31
+8898         AC32
+8899         AC33
+889A         AC34
+889B         AC35
+889C         AC36
+889D         AC37
+88A1         AC38
+88A2         AC39
+88A3         AC3A
+88A4         AC3B
+88A5         AC3C
+88A6         AC3D
+88A7         AC3E
+88A8         AC3F
+88A9         AC40
+88AA         AC41
+88AB         AC42
+88AC         AC43
+88AD         AC44
+88AE         AC45
+88AF         AC46
+88B0         AC47
+88B1         AC48
+88B3         AC49
+88B4         AC4A
+88B5         AC4B
+88B6         AC4C
+88B7         AC4D
+88B8         AC4E
+88B9         AC4F
+88BA         AC50
+88BB         AC51
+88BC         AC52
+88BD         AC53
+88C1         AC54
+88C2         AC55
+88C3         AC56
+88C4         AC57
+88C5         AC58
+88C6         AC59
+88C7         AC5A
+88C8         AC5B
+88C9         AC5C
+88CA         AC5D
+88CB         AC5E
+88CC         AC5F
+88CD         AC60
+88CE         AC61
+88CF         AC62
+88D0         AC63
+88D1         AC64
+88D3         AC65
+88D4         AC66
+88D5         AC67
+88D6         AC68
+88D7         AC69
+88D8         AC6A
+88D9         AC6B
+88DA         AC6C
+88DB         AC6D
+88DC         AC6E
+88DD         AC6F
+88E1         AC70
+88E2         AC71
+88E3         AC72
+88E4         AC73
+88E5         AC74
+88E6         AC75
+88E7         AC76
+88E8         AC77
+88E9         AC78
+88EA         AC79
+88EB         AC7A
+88EC         AC7B
+88ED         AC7C
+88EE         AC7D
+88EF         AC7E
+88F0         AC7F
+88F1         AC80
+88F3         AC81
+88F4         AC82
+88F5         AC83
+88F6         AC84
+88F7         AC85
+88F8         AC86
+88F9         AC87
+88FA         AC88
+88FB         AC89
+88FC         AC8A
+88FD         AC8B
+8941         AC8C
+8942         AC8D
+8943         AC8E
+8944         AC8F
+8945         AC90
+8946         AC91
+8947         AC92
+8948         AC93
+8949         AC94
+894A         AC95
+894B         AC96
+894C         AC97
+894D         AC98
+894E         AC99
+894F         AC9A
+8950         AC9B
+8951         AC9C
+8953         AC9D
+8954         AC9E
+8955         AC9F
+8956         ACA0
+8957         ACA1
+8958         ACA2
+8959         ACA3
+895A         ACA4
+895B         ACA5
+895C         ACA6
+895D         ACA7
+8961         ACA8
+8962         ACA9
+8963         ACAA
+8964         ACAB
+8965         ACAC
+8966         ACAD
+8967         ACAE
+8968         ACAF
+8969         ACB0
+896A         ACB1
+896B         ACB2
+896C         ACB3
+896D         ACB4
+896E         ACB5
+896F         ACB6
+8970         ACB7
+8971         ACB8
+8973         ACB9
+8974         ACBA
+8975         ACBB
+8976         ACBC
+8977         ACBD
+8978         ACBE
+8979         ACBF
+897A         ACC0
+897B         ACC1
+897C         ACC2
+897D         ACC3
+8981         ACC4
+8982         ACC5
+8983         ACC6
+8984         ACC7
+8985         ACC8
+8986         ACC9
+8987         ACCA
+8988         ACCB
+8989         ACCC
+898A         ACCD
+898B         ACCE
+898C         ACCF
+898D         ACD0
+898E         ACD1
+898F         ACD2
+8990         ACD3
+8991         ACD4
+8993         ACD5
+8994         ACD6
+8995         ACD7
+8996         ACD8
+8997         ACD9
+8998         ACDA
+8999         ACDB
+899A         ACDC
+899B         ACDD
+899C         ACDE
+899D         ACDF
+89A1         ACE0
+89A2         ACE1
+89A3         ACE2
+89A4         ACE3
+89A5         ACE4
+89A6         ACE5
+89A7         ACE6
+89A8         ACE7
+89A9         ACE8
+89AA         ACE9
+89AB         ACEA
+89AC         ACEB
+89AD         ACEC
+89AE         ACED
+89AF         ACEE
+89B0         ACEF
+89B1         ACF0
+89B3         ACF1
+89B4         ACF2
+89B5         ACF3
+89B6         ACF4
+89B7         ACF5
+89B8         ACF6
+89B9         ACF7
+89BA         ACF8
+89BB         ACF9
+89BC         ACFA
+89BD         ACFB
+89C1         ACFC
+89C2         ACFD
+89C3         ACFE
+89C4         ACFF
+89C5         AD00
+89C6         AD01
+89C7         AD02
+89C8         AD03
+89C9         AD04
+89CA         AD05
+89CB         AD06
+89CC         AD07
+89CD         AD08
+89CE         AD09
+89CF         AD0A
+89D0         AD0B
+89D1         AD0C
+89D3         AD0D
+89D4         AD0E
+89D5         AD0F
+89D6         AD10
+89D7         AD11
+89D8         AD12
+89D9         AD13
+89DA         AD14
+89DB         AD15
+89DC         AD16
+89DD         AD17
+89E1         AD18
+89E2         AD19
+89E3         AD1A
+89E4         AD1B
+89E5         AD1C
+89E6         AD1D
+89E7         AD1E
+89E8         AD1F
+89E9         AD20
+89EA         AD21
+89EB         AD22
+89EC         AD23
+89ED         AD24
+89EE         AD25
+89EF         AD26
+89F0         AD27
+89F1         AD28
+89F3         AD29
+89F4         AD2A
+89F5         AD2B
+89F6         AD2C
+89F7         AD2D
+89F8         AD2E
+89F9         AD2F
+89FA         AD30
+89FB         AD31
+89FC         AD32
+89FD         AD33
+8A41         AD34
+8A42         AD35
+8A43         AD36
+8A44         AD37
+8A45         AD38
+8A46         AD39
+8A47         AD3A
+8A48         AD3B
+8A49         AD3C
+8A4A         AD3D
+8A4B         AD3E
+8A4C         AD3F
+8A4D         AD40
+8A4E         AD41
+8A4F         AD42
+8A50         AD43
+8A51         AD44
+8A53         AD45
+8A54         AD46
+8A55         AD47
+8A56         AD48
+8A57         AD49
+8A58         AD4A
+8A59         AD4B
+8A5A         AD4C
+8A5B         AD4D
+8A5C         AD4E
+8A5D         AD4F
+8A61         AD50
+8A62         AD51
+8A63         AD52
+8A64         AD53
+8A65         AD54
+8A66         AD55
+8A67         AD56
+8A68         AD57
+8A69         AD58
+8A6A         AD59
+8A6B         AD5A
+8A6C         AD5B
+8A6D         AD5C
+8A6E         AD5D
+8A6F         AD5E
+8A70         AD5F
+8A71         AD60
+8A73         AD61
+8A74         AD62
+8A75         AD63
+8A76         AD64
+8A77         AD65
+8A78         AD66
+8A79         AD67
+8A7A         AD68
+8A7B         AD69
+8A7C         AD6A
+8A7D         AD6B
+8A81         AD6C
+8A82         AD6D
+8A83         AD6E
+8A84         AD6F
+8A85         AD70
+8A86         AD71
+8A87         AD72
+8A88         AD73
+8A89         AD74
+8A8A         AD75
+8A8B         AD76
+8A8C         AD77
+8A8D         AD78
+8A8E         AD79
+8A8F         AD7A
+8A90         AD7B
+8A91         AD7C
+8A93         AD7D
+8A94         AD7E
+8A95         AD7F
+8A96         AD80
+8A97         AD81
+8A98         AD82
+8A99         AD83
+8A9A         AD84
+8A9B         AD85
+8A9C         AD86
+8A9D         AD87
+8AA1         AD88
+8AA2         AD89
+8AA3         AD8A
+8AA4         AD8B
+8AA5         AD8C
+8AA6         AD8D
+8AA7         AD8E
+8AA8         AD8F
+8AA9         AD90
+8AAA         AD91
+8AAB         AD92
+8AAC         AD93
+8AAD         AD94
+8AAE         AD95
+8AAF         AD96
+8AB0         AD97
+8AB1         AD98
+8AB3         AD99
+8AB4         AD9A
+8AB5         AD9B
+8AB6         AD9C
+8AB7         AD9D
+8AB8         AD9E
+8AB9         AD9F
+8ABA         ADA0
+8ABB         ADA1
+8ABC         ADA2
+8ABD         ADA3
+8AC1         ADA4
+8AC2         ADA5
+8AC3         ADA6
+8AC4         ADA7
+8AC5         ADA8
+8AC6         ADA9
+8AC7         ADAA
+8AC8         ADAB
+8AC9         ADAC
+8ACA         ADAD
+8ACB         ADAE
+8ACC         ADAF
+8ACD         ADB0
+8ACE         ADB1
+8ACF         ADB2
+8AD0         ADB3
+8AD1         ADB4
+8AD3         ADB5
+8AD4         ADB6
+8AD5         ADB7
+8AD6         ADB8
+8AD7         ADB9
+8AD8         ADBA
+8AD9         ADBB
+8ADA         ADBC
+8ADB         ADBD
+8ADC         ADBE
+8ADD         ADBF
+8AE1         ADC0
+8AE2         ADC1
+8AE3         ADC2
+8AE4         ADC3
+8AE5         ADC4
+8AE6         ADC5
+8AE7         ADC6
+8AE8         ADC7
+8AE9         ADC8
+8AEA         ADC9
+8AEB         ADCA
+8AEC         ADCB
+8AED         ADCC
+8AEE         ADCD
+8AEF         ADCE
+8AF0         ADCF
+8AF1         ADD0
+8AF3         ADD1
+8AF4         ADD2
+8AF5         ADD3
+8AF6         ADD4
+8AF7         ADD5
+8AF8         ADD6
+8AF9         ADD7
+8AFA         ADD8
+8AFB         ADD9
+8AFC         ADDA
+8AFD         ADDB
+8B41         ADDC
+8B42         ADDD
+8B43         ADDE
+8B44         ADDF
+8B45         ADE0
+8B46         ADE1
+8B47         ADE2
+8B48         ADE3
+8B49         ADE4
+8B4A         ADE5
+8B4B         ADE6
+8B4C         ADE7
+8B4D         ADE8
+8B4E         ADE9
+8B4F         ADEA
+8B50         ADEB
+8B51         ADEC
+8B53         ADED
+8B54         ADEE
+8B55         ADEF
+8B56         ADF0
+8B57         ADF1
+8B58         ADF2
+8B59         ADF3
+8B5A         ADF4
+8B5B         ADF5
+8B5C         ADF6
+8B5D         ADF7
+8B61         ADF8
+8B62         ADF9
+8B63         ADFA
+8B64         ADFB
+8B65         ADFC
+8B66         ADFD
+8B67         ADFE
+8B68         ADFF
+8B69         AE00
+8B6A         AE01
+8B6B         AE02
+8B6C         AE03
+8B6D         AE04
+8B6E         AE05
+8B6F         AE06
+8B70         AE07
+8B71         AE08
+8B73         AE09
+8B74         AE0A
+8B75         AE0B
+8B76         AE0C
+8B77         AE0D
+8B78         AE0E
+8B79         AE0F
+8B7A         AE10
+8B7B         AE11
+8B7C         AE12
+8B7D         AE13
+8B81         AE14
+8B82         AE15
+8B83         AE16
+8B84         AE17
+8B85         AE18
+8B86         AE19
+8B87         AE1A
+8B88         AE1B
+8B89         AE1C
+8B8A         AE1D
+8B8B         AE1E
+8B8C         AE1F
+8B8D         AE20
+8B8E         AE21
+8B8F         AE22
+8B90         AE23
+8B91         AE24
+8B93         AE25
+8B94         AE26
+8B95         AE27
+8B96         AE28
+8B97         AE29
+8B98         AE2A
+8B99         AE2B
+8B9A         AE2C
+8B9B         AE2D
+8B9C         AE2E
+8B9D         AE2F
+8BA1         AE30
+8BA2         AE31
+8BA3         AE32
+8BA4         AE33
+8BA5         AE34
+8BA6         AE35
+8BA7         AE36
+8BA8         AE37
+8BA9         AE38
+8BAA         AE39
+8BAB         AE3A
+8BAC         AE3B
+8BAD         AE3C
+8BAE         AE3D
+8BAF         AE3E
+8BB0         AE3F
+8BB1         AE40
+8BB3         AE41
+8BB4         AE42
+8BB5         AE43
+8BB6         AE44
+8BB7         AE45
+8BB8         AE46
+8BB9         AE47
+8BBA         AE48
+8BBB         AE49
+8BBC         AE4A
+8BBD         AE4B
+8C41         3132
+8C61         AE4C
+8C62         AE4D
+8C63         AE4E
+8C64         AE4F
+8C65         AE50
+8C66         AE51
+8C67         AE52
+8C68         AE53
+8C69         AE54
+8C6A         AE55
+8C6B         AE56
+8C6C         AE57
+8C6D         AE58
+8C6E         AE59
+8C6F         AE5A
+8C70         AE5B
+8C71         AE5C
+8C73         AE5D
+8C74         AE5E
+8C75         AE5F
+8C76         AE60
+8C77         AE61
+8C78         AE62
+8C79         AE63
+8C7A         AE64
+8C7B         AE65
+8C7C         AE66
+8C7D         AE67
+8C81         AE68
+8C82         AE69
+8C83         AE6A
+8C84         AE6B
+8C85         AE6C
+8C86         AE6D
+8C87         AE6E
+8C88         AE6F
+8C89         AE70
+8C8A         AE71
+8C8B         AE72
+8C8C         AE73
+8C8D         AE74
+8C8E         AE75
+8C8F         AE76
+8C90         AE77
+8C91         AE78
+8C93         AE79
+8C94         AE7A
+8C95         AE7B
+8C96         AE7C
+8C97         AE7D
+8C98         AE7E
+8C99         AE7F
+8C9A         AE80
+8C9B         AE81
+8C9C         AE82
+8C9D         AE83
+8CA1         AE84
+8CA2         AE85
+8CA3         AE86
+8CA4         AE87
+8CA5         AE88
+8CA6         AE89
+8CA7         AE8A
+8CA8         AE8B
+8CA9         AE8C
+8CAA         AE8D
+8CAB         AE8E
+8CAC         AE8F
+8CAD         AE90
+8CAE         AE91
+8CAF         AE92
+8CB0         AE93
+8CB1         AE94
+8CB3         AE95
+8CB4         AE96
+8CB5         AE97
+8CB6         AE98
+8CB7         AE99
+8CB8         AE9A
+8CB9         AE9B
+8CBA         AE9C
+8CBB         AE9D
+8CBC         AE9E
+8CBD         AE9F
+8CC1         AEA0
+8CC2         AEA1
+8CC3         AEA2
+8CC4         AEA3
+8CC5         AEA4
+8CC6         AEA5
+8CC7         AEA6
+8CC8         AEA7
+8CC9         AEA8
+8CCA         AEA9
+8CCB         AEAA
+8CCC         AEAB
+8CCD         AEAC
+8CCE         AEAD
+8CCF         AEAE
+8CD0         AEAF
+8CD1         AEB0
+8CD3         AEB1
+8CD4         AEB2
+8CD5         AEB3
+8CD6         AEB4
+8CD7         AEB5
+8CD8         AEB6
+8CD9         AEB7
+8CDA         AEB8
+8CDB         AEB9
+8CDC         AEBA
+8CDD         AEBB
+8CE1         AEBC
+8CE2         AEBD
+8CE3         AEBE
+8CE4         AEBF
+8CE5         AEC0
+8CE6         AEC1
+8CE7         AEC2
+8CE8         AEC3
+8CE9         AEC4
+8CEA         AEC5
+8CEB         AEC6
+8CEC         AEC7
+8CED         AEC8
+8CEE         AEC9
+8CEF         AECA
+8CF0         AECB
+8CF1         AECC
+8CF3         AECD
+8CF4         AECE
+8CF5         AECF
+8CF6         AED0
+8CF7         AED1
+8CF8         AED2
+8CF9         AED3
+8CFA         AED4
+8CFB         AED5
+8CFC         AED6
+8CFD         AED7
+8D41         AED8
+8D42         AED9
+8D43         AEDA
+8D44         AEDB
+8D45         AEDC
+8D46         AEDD
+8D47         AEDE
+8D48         AEDF
+8D49         AEE0
+8D4A         AEE1
+8D4B         AEE2
+8D4C         AEE3
+8D4D         AEE4
+8D4E         AEE5
+8D4F         AEE6
+8D50         AEE7
+8D51         AEE8
+8D53         AEE9
+8D54         AEEA
+8D55         AEEB
+8D56         AEEC
+8D57         AEED
+8D58         AEEE
+8D59         AEEF
+8D5A         AEF0
+8D5B         AEF1
+8D5C         AEF2
+8D5D         AEF3
+8D61         AEF4
+8D62         AEF5
+8D63         AEF6
+8D64         AEF7
+8D65         AEF8
+8D66         AEF9
+8D67         AEFA
+8D68         AEFB
+8D69         AEFC
+8D6A         AEFD
+8D6B         AEFE
+8D6C         AEFF
+8D6D         AF00
+8D6E         AF01
+8D6F         AF02
+8D70         AF03
+8D71         AF04
+8D73         AF05
+8D74         AF06
+8D75         AF07
+8D76         AF08
+8D77         AF09
+8D78         AF0A
+8D79         AF0B
+8D7A         AF0C
+8D7B         AF0D
+8D7C         AF0E
+8D7D         AF0F
+8D81         AF10
+8D82         AF11
+8D83         AF12
+8D84         AF13
+8D85         AF14
+8D86         AF15
+8D87         AF16
+8D88         AF17
+8D89         AF18
+8D8A         AF19
+8D8B         AF1A
+8D8C         AF1B
+8D8D         AF1C
+8D8E         AF1D
+8D8F         AF1E
+8D90         AF1F
+8D91         AF20
+8D93         AF21
+8D94         AF22
+8D95         AF23
+8D96         AF24
+8D97         AF25
+8D98         AF26
+8D99         AF27
+8D9A         AF28
+8D9B         AF29
+8D9C         AF2A
+8D9D         AF2B
+8DA1         AF2C
+8DA2         AF2D
+8DA3         AF2E
+8DA4         AF2F
+8DA5         AF30
+8DA6         AF31
+8DA7         AF32
+8DA8         AF33
+8DA9         AF34
+8DAA         AF35
+8DAB         AF36
+8DAC         AF37
+8DAD         AF38
+8DAE         AF39
+8DAF         AF3A
+8DB0         AF3B
+8DB1         AF3C
+8DB3         AF3D
+8DB4         AF3E
+8DB5         AF3F
+8DB6         AF40
+8DB7         AF41
+8DB8         AF42
+8DB9         AF43
+8DBA         AF44
+8DBB         AF45
+8DBC         AF46
+8DBD         AF47
+8DC1         AF48
+8DC2         AF49
+8DC3         AF4A
+8DC4         AF4B
+8DC5         AF4C
+8DC6         AF4D
+8DC7         AF4E
+8DC8         AF4F
+8DC9         AF50
+8DCA         AF51
+8DCB         AF52
+8DCC         AF53
+8DCD         AF54
+8DCE         AF55
+8DCF         AF56
+8DD0         AF57
+8DD1         AF58
+8DD3         AF59
+8DD4         AF5A
+8DD5         AF5B
+8DD6         AF5C
+8DD7         AF5D
+8DD8         AF5E
+8DD9         AF5F
+8DDA         AF60
+8DDB         AF61
+8DDC         AF62
+8DDD         AF63
+8DE1         AF64
+8DE2         AF65
+8DE3         AF66
+8DE4         AF67
+8DE5         AF68
+8DE6         AF69
+8DE7         AF6A
+8DE8         AF6B
+8DE9         AF6C
+8DEA         AF6D
+8DEB         AF6E
+8DEC         AF6F
+8DED         AF70
+8DEE         AF71
+8DEF         AF72
+8DF0         AF73
+8DF1         AF74
+8DF3         AF75
+8DF4         AF76
+8DF5         AF77
+8DF6         AF78
+8DF7         AF79
+8DF8         AF7A
+8DF9         AF7B
+8DFA         AF7C
+8DFB         AF7D
+8DFC         AF7E
+8DFD         AF7F
+8E41         AF80
+8E42         AF81
+8E43         AF82
+8E44         AF83
+8E45         AF84
+8E46         AF85
+8E47         AF86
+8E48         AF87
+8E49         AF88
+8E4A         AF89
+8E4B         AF8A
+8E4C         AF8B
+8E4D         AF8C
+8E4E         AF8D
+8E4F         AF8E
+8E50         AF8F
+8E51         AF90
+8E53         AF91
+8E54         AF92
+8E55         AF93
+8E56         AF94
+8E57         AF95
+8E58         AF96
+8E59         AF97
+8E5A         AF98
+8E5B         AF99
+8E5C         AF9A
+8E5D         AF9B
+8E61         AF9C
+8E62         AF9D
+8E63         AF9E
+8E64         AF9F
+8E65         AFA0
+8E66         AFA1
+8E67         AFA2
+8E68         AFA3
+8E69         AFA4
+8E6A         AFA5
+8E6B         AFA6
+8E6C         AFA7
+8E6D         AFA8
+8E6E         AFA9
+8E6F         AFAA
+8E70         AFAB
+8E71         AFAC
+8E73         AFAD
+8E74         AFAE
+8E75         AFAF
+8E76         AFB0
+8E77         AFB1
+8E78         AFB2
+8E79         AFB3
+8E7A         AFB4
+8E7B         AFB5
+8E7C         AFB6
+8E7D         AFB7
+8E81         AFB8
+8E82         AFB9
+8E83         AFBA
+8E84         AFBB
+8E85         AFBC
+8E86         AFBD
+8E87         AFBE
+8E88         AFBF
+8E89         AFC0
+8E8A         AFC1
+8E8B         AFC2
+8E8C         AFC3
+8E8D         AFC4
+8E8E         AFC5
+8E8F         AFC6
+8E90         AFC7
+8E91         AFC8
+8E93         AFC9
+8E94         AFCA
+8E95         AFCB
+8E96         AFCC
+8E97         AFCD
+8E98         AFCE
+8E99         AFCF
+8E9A         AFD0
+8E9B         AFD1
+8E9C         AFD2
+8E9D         AFD3
+8EA1         AFD4
+8EA2         AFD5
+8EA3         AFD6
+8EA4         AFD7
+8EA5         AFD8
+8EA6         AFD9
+8EA7         AFDA
+8EA8         AFDB
+8EA9         AFDC
+8EAA         AFDD
+8EAB         AFDE
+8EAC         AFDF
+8EAD         AFE0
+8EAE         AFE1
+8EAF         AFE2
+8EB0         AFE3
+8EB1         AFE4
+8EB3         AFE5
+8EB4         AFE6
+8EB5         AFE7
+8EB6         AFE8
+8EB7         AFE9
+8EB8         AFEA
+8EB9         AFEB
+8EBA         AFEC
+8EBB         AFED
+8EBC         AFEE
+8EBD         AFEF
+8EC1         AFF0
+8EC2         AFF1
+8EC3         AFF2
+8EC4         AFF3
+8EC5         AFF4
+8EC6         AFF5
+8EC7         AFF6
+8EC8         AFF7
+8EC9         AFF8
+8ECA         AFF9
+8ECB         AFFA
+8ECC         AFFB
+8ECD         AFFC
+8ECE         AFFD
+8ECF         AFFE
+8ED0         AFFF
+8ED1         B000
+8ED3         B001
+8ED4         B002
+8ED5         B003
+8ED6         B004
+8ED7         B005
+8ED8         B006
+8ED9         B007
+8EDA         B008
+8EDB         B009
+8EDC         B00A
+8EDD         B00B
+8EE1         B00C
+8EE2         B00D
+8EE3         B00E
+8EE4         B00F
+8EE5         B010
+8EE6         B011
+8EE7         B012
+8EE8         B013
+8EE9         B014
+8EEA         B015
+8EEB         B016
+8EEC         B017
+8EED         B018
+8EEE         B019
+8EEF         B01A
+8EF0         B01B
+8EF1         B01C
+8EF3         B01D
+8EF4         B01E
+8EF5         B01F
+8EF6         B020
+8EF7         B021
+8EF8         B022
+8EF9         B023
+8EFA         B024
+8EFB         B025
+8EFC         B026
+8EFD         B027
+8F41         B028
+8F42         B029
+8F43         B02A
+8F44         B02B
+8F45         B02C
+8F46         B02D
+8F47         B02E
+8F48         B02F
+8F49         B030
+8F4A         B031
+8F4B         B032
+8F4C         B033
+8F4D         B034
+8F4E         B035
+8F4F         B036
+8F50         B037
+8F51         B038
+8F53         B039
+8F54         B03A
+8F55         B03B
+8F56         B03C
+8F57         B03D
+8F58         B03E
+8F59         B03F
+8F5A         B040
+8F5B         B041
+8F5C         B042
+8F5D         B043
+8F61         B044
+8F62         B045
+8F63         B046
+8F64         B047
+8F65         B048
+8F66         B049
+8F67         B04A
+8F68         B04B
+8F69         B04C
+8F6A         B04D
+8F6B         B04E
+8F6C         B04F
+8F6D         B050
+8F6E         B051
+8F6F         B052
+8F70         B053
+8F71         B054
+8F73         B055
+8F74         B056
+8F75         B057
+8F76         B058
+8F77         B059
+8F78         B05A
+8F79         B05B
+8F7A         B05C
+8F7B         B05D
+8F7C         B05E
+8F7D         B05F
+8F81         B060
+8F82         B061
+8F83         B062
+8F84         B063
+8F85         B064
+8F86         B065
+8F87         B066
+8F88         B067
+8F89         B068
+8F8A         B069
+8F8B         B06A
+8F8C         B06B
+8F8D         B06C
+8F8E         B06D
+8F8F         B06E
+8F90         B06F
+8F91         B070
+8F93         B071
+8F94         B072
+8F95         B073
+8F96         B074
+8F97         B075
+8F98         B076
+8F99         B077
+8F9A         B078
+8F9B         B079
+8F9C         B07A
+8F9D         B07B
+8FA1         B07C
+8FA2         B07D
+8FA3         B07E
+8FA4         B07F
+8FA5         B080
+8FA6         B081
+8FA7         B082
+8FA8         B083
+8FA9         B084
+8FAA         B085
+8FAB         B086
+8FAC         B087
+8FAD         B088
+8FAE         B089
+8FAF         B08A
+8FB0         B08B
+8FB1         B08C
+8FB3         B08D
+8FB4         B08E
+8FB5         B08F
+8FB6         B090
+8FB7         B091
+8FB8         B092
+8FB9         B093
+8FBA         B094
+8FBB         B095
+8FBC         B096
+8FBD         B097
+9041         3134
+9061         B098
+9062         B099
+9063         B09A
+9064         B09B
+9065         B09C
+9066         B09D
+9067         B09E
+9068         B09F
+9069         B0A0
+906A         B0A1
+906B         B0A2
+906C         B0A3
+906D         B0A4
+906E         B0A5
+906F         B0A6
+9070         B0A7
+9071         B0A8
+9073         B0A9
+9074         B0AA
+9075         B0AB
+9076         B0AC
+9077         B0AD
+9078         B0AE
+9079         B0AF
+907A         B0B0
+907B         B0B1
+907C         B0B2
+907D         B0B3
+9081         B0B4
+9082         B0B5
+9083         B0B6
+9084         B0B7
+9085         B0B8
+9086         B0B9
+9087         B0BA
+9088         B0BB
+9089         B0BC
+908A         B0BD
+908B         B0BE
+908C         B0BF
+908D         B0C0
+908E         B0C1
+908F         B0C2
+9090         B0C3
+9091         B0C4
+9093         B0C5
+9094         B0C6
+9095         B0C7
+9096         B0C8
+9097         B0C9
+9098         B0CA
+9099         B0CB
+909A         B0CC
+909B         B0CD
+909C         B0CE
+909D         B0CF
+90A1         B0D0
+90A2         B0D1
+90A3         B0D2
+90A4         B0D3
+90A5         B0D4
+90A6         B0D5
+90A7         B0D6
+90A8         B0D7
+90A9         B0D8
+90AA         B0D9
+90AB         B0DA
+90AC         B0DB
+90AD         B0DC
+90AE         B0DD
+90AF         B0DE
+90B0         B0DF
+90B1         B0E0
+90B3         B0E1
+90B4         B0E2
+90B5         B0E3
+90B6         B0E4
+90B7         B0E5
+90B8         B0E6
+90B9         B0E7
+90BA         B0E8
+90BB         B0E9
+90BC         B0EA
+90BD         B0EB
+90C1         B0EC
+90C2         B0ED
+90C3         B0EE
+90C4         B0EF
+90C5         B0F0
+90C6         B0F1
+90C7         B0F2
+90C8         B0F3
+90C9         B0F4
+90CA         B0F5
+90CB         B0F6
+90CC         B0F7
+90CD         B0F8
+90CE         B0F9
+90CF         B0FA
+90D0         B0FB
+90D1         B0FC
+90D3         B0FD
+90D4         B0FE
+90D5         B0FF
+90D6         B100
+90D7         B101
+90D8         B102
+90D9         B103
+90DA         B104
+90DB         B105
+90DC         B106
+90DD         B107
+90E1         B108
+90E2         B109
+90E3         B10A
+90E4         B10B
+90E5         B10C
+90E6         B10D
+90E7         B10E
+90E8         B10F
+90E9         B110
+90EA         B111
+90EB         B112
+90EC         B113
+90ED         B114
+90EE         B115
+90EF         B116
+90F0         B117
+90F1         B118
+90F3         B119
+90F4         B11A
+90F5         B11B
+90F6         B11C
+90F7         B11D
+90F8         B11E
+90F9         B11F
+90FA         B120
+90FB         B121
+90FC         B122
+90FD         B123
+9141         B124
+9142         B125
+9143         B126
+9144         B127
+9145         B128
+9146         B129
+9147         B12A
+9148         B12B
+9149         B12C
+914A         B12D
+914B         B12E
+914C         B12F
+914D         B130
+914E         B131
+914F         B132
+9150         B133
+9151         B134
+9153         B135
+9154         B136
+9155         B137
+9156         B138
+9157         B139
+9158         B13A
+9159         B13B
+915A         B13C
+915B         B13D
+915C         B13E
+915D         B13F
+9161         B140
+9162         B141
+9163         B142
+9164         B143
+9165         B144
+9166         B145
+9167         B146
+9168         B147
+9169         B148
+916A         B149
+916B         B14A
+916C         B14B
+916D         B14C
+916E         B14D
+916F         B14E
+9170         B14F
+9171         B150
+9173         B151
+9174         B152
+9175         B153
+9176         B154
+9177         B155
+9178         B156
+9179         B157
+917A         B158
+917B         B159
+917C         B15A
+917D         B15B
+9181         B15C
+9182         B15D
+9183         B15E
+9184         B15F
+9185         B160
+9186         B161
+9187         B162
+9188         B163
+9189         B164
+918A         B165
+918B         B166
+918C         B167
+918D         B168
+918E         B169
+918F         B16A
+9190         B16B
+9191         B16C
+9193         B16D
+9194         B16E
+9195         B16F
+9196         B170
+9197         B171
+9198         B172
+9199         B173
+919A         B174
+919B         B175
+919C         B176
+919D         B177
+91A1         B178
+91A2         B179
+91A3         B17A
+91A4         B17B
+91A5         B17C
+91A6         B17D
+91A7         B17E
+91A8         B17F
+91A9         B180
+91AA         B181
+91AB         B182
+91AC         B183
+91AD         B184
+91AE         B185
+91AF         B186
+91B0         B187
+91B1         B188
+91B3         B189
+91B4         B18A
+91B5         B18B
+91B6         B18C
+91B7         B18D
+91B8         B18E
+91B9         B18F
+91BA         B190
+91BB         B191
+91BC         B192
+91BD         B193
+91C1         B194
+91C2         B195
+91C3         B196
+91C4         B197
+91C5         B198
+91C6         B199
+91C7         B19A
+91C8         B19B
+91C9         B19C
+91CA         B19D
+91CB         B19E
+91CC         B19F
+91CD         B1A0
+91CE         B1A1
+91CF         B1A2
+91D0         B1A3
+91D1         B1A4
+91D3         B1A5
+91D4         B1A6
+91D5         B1A7
+91D6         B1A8
+91D7         B1A9
+91D8         B1AA
+91D9         B1AB
+91DA         B1AC
+91DB         B1AD
+91DC         B1AE
+91DD         B1AF
+91E1         B1B0
+91E2         B1B1
+91E3         B1B2
+91E4         B1B3
+91E5         B1B4
+91E6         B1B5
+91E7         B1B6
+91E8         B1B7
+91E9         B1B8
+91EA         B1B9
+91EB         B1BA
+91EC         B1BB
+91ED         B1BC
+91EE         B1BD
+91EF         B1BE
+91F0         B1BF
+91F1         B1C0
+91F3         B1C1
+91F4         B1C2
+91F5         B1C3
+91F6         B1C4
+91F7         B1C5
+91F8         B1C6
+91F9         B1C7
+91FA         B1C8
+91FB         B1C9
+91FC         B1CA
+91FD         B1CB
+9241         B1CC
+9242         B1CD
+9243         B1CE
+9244         B1CF
+9245         B1D0
+9246         B1D1
+9247         B1D2
+9248         B1D3
+9249         B1D4
+924A         B1D5
+924B         B1D6
+924C         B1D7
+924D         B1D8
+924E         B1D9
+924F         B1DA
+9250         B1DB
+9251         B1DC
+9253         B1DD
+9254         B1DE
+9255         B1DF
+9256         B1E0
+9257         B1E1
+9258         B1E2
+9259         B1E3
+925A         B1E4
+925B         B1E5
+925C         B1E6
+925D         B1E7
+9261         B1E8
+9262         B1E9
+9263         B1EA
+9264         B1EB
+9265         B1EC
+9266         B1ED
+9267         B1EE
+9268         B1EF
+9269         B1F0
+926A         B1F1
+926B         B1F2
+926C         B1F3
+926D         B1F4
+926E         B1F5
+926F         B1F6
+9270         B1F7
+9271         B1F8
+9273         B1F9
+9274         B1FA
+9275         B1FB
+9276         B1FC
+9277         B1FD
+9278         B1FE
+9279         B1FF
+927A         B200
+927B         B201
+927C         B202
+927D         B203
+9281         B204
+9282         B205
+9283         B206
+9284         B207
+9285         B208
+9286         B209
+9287         B20A
+9288         B20B
+9289         B20C
+928A         B20D
+928B         B20E
+928C         B20F
+928D         B210
+928E         B211
+928F         B212
+9290         B213
+9291         B214
+9293         B215
+9294         B216
+9295         B217
+9296         B218
+9297         B219
+9298         B21A
+9299         B21B
+929A         B21C
+929B         B21D
+929C         B21E
+929D         B21F
+92A1         B220
+92A2         B221
+92A3         B222
+92A4         B223
+92A5         B224
+92A6         B225
+92A7         B226
+92A8         B227
+92A9         B228
+92AA         B229
+92AB         B22A
+92AC         B22B
+92AD         B22C
+92AE         B22D
+92AF         B22E
+92B0         B22F
+92B1         B230
+92B3         B231
+92B4         B232
+92B5         B233
+92B6         B234
+92B7         B235
+92B8         B236
+92B9         B237
+92BA         B238
+92BB         B239
+92BC         B23A
+92BD         B23B
+92C1         B23C
+92C2         B23D
+92C3         B23E
+92C4         B23F
+92C5         B240
+92C6         B241
+92C7         B242
+92C8         B243
+92C9         B244
+92CA         B245
+92CB         B246
+92CC         B247
+92CD         B248
+92CE         B249
+92CF         B24A
+92D0         B24B
+92D1         B24C
+92D3         B24D
+92D4         B24E
+92D5         B24F
+92D6         B250
+92D7         B251
+92D8         B252
+92D9         B253
+92DA         B254
+92DB         B255
+92DC         B256
+92DD         B257
+92E1         B258
+92E2         B259
+92E3         B25A
+92E4         B25B
+92E5         B25C
+92E6         B25D
+92E7         B25E
+92E8         B25F
+92E9         B260
+92EA         B261
+92EB         B262
+92EC         B263
+92ED         B264
+92EE         B265
+92EF         B266
+92F0         B267
+92F1         B268
+92F3         B269
+92F4         B26A
+92F5         B26B
+92F6         B26C
+92F7         B26D
+92F8         B26E
+92F9         B26F
+92FA         B270
+92FB         B271
+92FC         B272
+92FD         B273
+9341         B274
+9342         B275
+9343         B276
+9344         B277
+9345         B278
+9346         B279
+9347         B27A
+9348         B27B
+9349         B27C
+934A         B27D
+934B         B27E
+934C         B27F
+934D         B280
+934E         B281
+934F         B282
+9350         B283
+9351         B284
+9353         B285
+9354         B286
+9355         B287
+9356         B288
+9357         B289
+9358         B28A
+9359         B28B
+935A         B28C
+935B         B28D
+935C         B28E
+935D         B28F
+9361         B290
+9362         B291
+9363         B292
+9364         B293
+9365         B294
+9366         B295
+9367         B296
+9368         B297
+9369         B298
+936A         B299
+936B         B29A
+936C         B29B
+936D         B29C
+936E         B29D
+936F         B29E
+9370         B29F
+9371         B2A0
+9373         B2A1
+9374         B2A2
+9375         B2A3
+9376         B2A4
+9377         B2A5
+9378         B2A6
+9379         B2A7
+937A         B2A8
+937B         B2A9
+937C         B2AA
+937D         B2AB
+9381         B2AC
+9382         B2AD
+9383         B2AE
+9384         B2AF
+9385         B2B0
+9386         B2B1
+9387         B2B2
+9388         B2B3
+9389         B2B4
+938A         B2B5
+938B         B2B6
+938C         B2B7
+938D         B2B8
+938E         B2B9
+938F         B2BA
+9390         B2BB
+9391         B2BC
+9393         B2BD
+9394         B2BE
+9395         B2BF
+9396         B2C0
+9397         B2C1
+9398         B2C2
+9399         B2C3
+939A         B2C4
+939B         B2C5
+939C         B2C6
+939D         B2C7
+93A1         B2C8
+93A2         B2C9
+93A3         B2CA
+93A4         B2CB
+93A5         B2CC
+93A6         B2CD
+93A7         B2CE
+93A8         B2CF
+93A9         B2D0
+93AA         B2D1
+93AB         B2D2
+93AC         B2D3
+93AD         B2D4
+93AE         B2D5
+93AF         B2D6
+93B0         B2D7
+93B1         B2D8
+93B3         B2D9
+93B4         B2DA
+93B5         B2DB
+93B6         B2DC
+93B7         B2DD
+93B8         B2DE
+93B9         B2DF
+93BA         B2E0
+93BB         B2E1
+93BC         B2E2
+93BD         B2E3
+9441         3137
+9461         B2E4
+9462         B2E5
+9463         B2E6
+9464         B2E7
+9465         B2E8
+9466         B2E9
+9467         B2EA
+9468         B2EB
+9469         B2EC
+946A         B2ED
+946B         B2EE
+946C         B2EF
+946D         B2F0
+946E         B2F1
+946F         B2F2
+9470         B2F3
+9471         B2F4
+9473         B2F5
+9474         B2F6
+9475         B2F7
+9476         B2F8
+9477         B2F9
+9478         B2FA
+9479         B2FB
+947A         B2FC
+947B         B2FD
+947C         B2FE
+947D         B2FF
+9481         B300
+9482         B301
+9483         B302
+9484         B303
+9485         B304
+9486         B305
+9487         B306
+9488         B307
+9489         B308
+948A         B309
+948B         B30A
+948C         B30B
+948D         B30C
+948E         B30D
+948F         B30E
+9490         B30F
+9491         B310
+9493         B311
+9494         B312
+9495         B313
+9496         B314
+9497         B315
+9498         B316
+9499         B317
+949A         B318
+949B         B319
+949C         B31A
+949D         B31B
+94A1         B31C
+94A2         B31D
+94A3         B31E
+94A4         B31F
+94A5         B320
+94A6         B321
+94A7         B322
+94A8         B323
+94A9         B324
+94AA         B325
+94AB         B326
+94AC         B327
+94AD         B328
+94AE         B329
+94AF         B32A
+94B0         B32B
+94B1         B32C
+94B3         B32D
+94B4         B32E
+94B5         B32F
+94B6         B330
+94B7         B331
+94B8         B332
+94B9         B333
+94BA         B334
+94BB         B335
+94BC         B336
+94BD         B337
+94C1         B338
+94C2         B339
+94C3         B33A
+94C4         B33B
+94C5         B33C
+94C6         B33D
+94C7         B33E
+94C8         B33F
+94C9         B340
+94CA         B341
+94CB         B342
+94CC         B343
+94CD         B344
+94CE         B345
+94CF         B346
+94D0         B347
+94D1         B348
+94D3         B349
+94D4         B34A
+94D5         B34B
+94D6         B34C
+94D7         B34D
+94D8         B34E
+94D9         B34F
+94DA         B350
+94DB         B351
+94DC         B352
+94DD         B353
+94E1         B354
+94E2         B355
+94E3         B356
+94E4         B357
+94E5         B358
+94E6         B359
+94E7         B35A
+94E8         B35B
+94E9         B35C
+94EA         B35D
+94EB         B35E
+94EC         B35F
+94ED         B360
+94EE         B361
+94EF         B362
+94F0         B363
+94F1         B364
+94F3         B365
+94F4         B366
+94F5         B367
+94F6         B368
+94F7         B369
+94F8         B36A
+94F9         B36B
+94FA         B36C
+94FB         B36D
+94FC         B36E
+94FD         B36F
+9541         B370
+9542         B371
+9543         B372
+9544         B373
+9545         B374
+9546         B375
+9547         B376
+9548         B377
+9549         B378
+954A         B379
+954B         B37A
+954C         B37B
+954D         B37C
+954E         B37D
+954F         B37E
+9550         B37F
+9551         B380
+9553         B381
+9554         B382
+9555         B383
+9556         B384
+9557         B385
+9558         B386
+9559         B387
+955A         B388
+955B         B389
+955C         B38A
+955D         B38B
+9561         B38C
+9562         B38D
+9563         B38E
+9564         B38F
+9565         B390
+9566         B391
+9567         B392
+9568         B393
+9569         B394
+956A         B395
+956B         B396
+956C         B397
+956D         B398
+956E         B399
+956F         B39A
+9570         B39B
+9571         B39C
+9573         B39D
+9574         B39E
+9575         B39F
+9576         B3A0
+9577         B3A1
+9578         B3A2
+9579         B3A3
+957A         B3A4
+957B         B3A5
+957C         B3A6
+957D         B3A7
+9581         B3A8
+9582         B3A9
+9583         B3AA
+9584         B3AB
+9585         B3AC
+9586         B3AD
+9587         B3AE
+9588         B3AF
+9589         B3B0
+958A         B3B1
+958B         B3B2
+958C         B3B3
+958D         B3B4
+958E         B3B5
+958F         B3B6
+9590         B3B7
+9591         B3B8
+9593         B3B9
+9594         B3BA
+9595         B3BB
+9596         B3BC
+9597         B3BD
+9598         B3BE
+9599         B3BF
+959A         B3C0
+959B         B3C1
+959C         B3C2
+959D         B3C3
+95A1         B3C4
+95A2         B3C5
+95A3         B3C6
+95A4         B3C7
+95A5         B3C8
+95A6         B3C9
+95A7         B3CA
+95A8         B3CB
+95A9         B3CC
+95AA         B3CD
+95AB         B3CE
+95AC         B3CF
+95AD         B3D0
+95AE         B3D1
+95AF         B3D2
+95B0         B3D3
+95B1         B3D4
+95B3         B3D5
+95B4         B3D6
+95B5         B3D7
+95B6         B3D8
+95B7         B3D9
+95B8         B3DA
+95B9         B3DB
+95BA         B3DC
+95BB         B3DD
+95BC         B3DE
+95BD         B3DF
+95C1         B3E0
+95C2         B3E1
+95C3         B3E2
+95C4         B3E3
+95C5         B3E4
+95C6         B3E5
+95C7         B3E6
+95C8         B3E7
+95C9         B3E8
+95CA         B3E9
+95CB         B3EA
+95CC         B3EB
+95CD         B3EC
+95CE         B3ED
+95CF         B3EE
+95D0         B3EF
+95D1         B3F0
+95D3         B3F1
+95D4         B3F2
+95D5         B3F3
+95D6         B3F4
+95D7         B3F5
+95D8         B3F6
+95D9         B3F7
+95DA         B3F8
+95DB         B3F9
+95DC         B3FA
+95DD         B3FB
+95E1         B3FC
+95E2         B3FD
+95E3         B3FE
+95E4         B3FF
+95E5         B400
+95E6         B401
+95E7         B402
+95E8         B403
+95E9         B404
+95EA         B405
+95EB         B406
+95EC         B407
+95ED         B408
+95EE         B409
+95EF         B40A
+95F0         B40B
+95F1         B40C
+95F3         B40D
+95F4         B40E
+95F5         B40F
+95F6         B410
+95F7         B411
+95F8         B412
+95F9         B413
+95FA         B414
+95FB         B415
+95FC         B416
+95FD         B417
+9641         B418
+9642         B419
+9643         B41A
+9644         B41B
+9645         B41C
+9646         B41D
+9647         B41E
+9648         B41F
+9649         B420
+964A         B421
+964B         B422
+964C         B423
+964D         B424
+964E         B425
+964F         B426
+9650         B427
+9651         B428
+9653         B429
+9654         B42A
+9655         B42B
+9656         B42C
+9657         B42D
+9658         B42E
+9659         B42F
+965A         B430
+965B         B431
+965C         B432
+965D         B433
+9661         B434
+9662         B435
+9663         B436
+9664         B437
+9665         B438
+9666         B439
+9667         B43A
+9668         B43B
+9669         B43C
+966A         B43D
+966B         B43E
+966C         B43F
+966D         B440
+966E         B441
+966F         B442
+9670         B443
+9671         B444
+9673         B445
+9674         B446
+9675         B447
+9676         B448
+9677         B449
+9678         B44A
+9679         B44B
+967A         B44C
+967B         B44D
+967C         B44E
+967D         B44F
+9681         B450
+9682         B451
+9683         B452
+9684         B453
+9685         B454
+9686         B455
+9687         B456
+9688         B457
+9689         B458
+968A         B459
+968B         B45A
+968C         B45B
+968D         B45C
+968E         B45D
+968F         B45E
+9690         B45F
+9691         B460
+9693         B461
+9694         B462
+9695         B463
+9696         B464
+9697         B465
+9698         B466
+9699         B467
+969A         B468
+969B         B469
+969C         B46A
+969D         B46B
+96A1         B46C
+96A2         B46D
+96A3         B46E
+96A4         B46F
+96A5         B470
+96A6         B471
+96A7         B472
+96A8         B473
+96A9         B474
+96AA         B475
+96AB         B476
+96AC         B477
+96AD         B478
+96AE         B479
+96AF         B47A
+96B0         B47B
+96B1         B47C
+96B3         B47D
+96B4         B47E
+96B5         B47F
+96B6         B480
+96B7         B481
+96B8         B482
+96B9         B483
+96BA         B484
+96BB         B485
+96BC         B486
+96BD         B487
+96C1         B488
+96C2         B489
+96C3         B48A
+96C4         B48B
+96C5         B48C
+96C6         B48D
+96C7         B48E
+96C8         B48F
+96C9         B490
+96CA         B491
+96CB         B492
+96CC         B493
+96CD         B494
+96CE         B495
+96CF         B496
+96D0         B497
+96D1         B498
+96D3         B499
+96D4         B49A
+96D5         B49B
+96D6         B49C
+96D7         B49D
+96D8         B49E
+96D9         B49F
+96DA         B4A0
+96DB         B4A1
+96DC         B4A2
+96DD         B4A3
+96E1         B4A4
+96E2         B4A5
+96E3         B4A6
+96E4         B4A7
+96E5         B4A8
+96E6         B4A9
+96E7         B4AA
+96E8         B4AB
+96E9         B4AC
+96EA         B4AD
+96EB         B4AE
+96EC         B4AF
+96ED         B4B0
+96EE         B4B1
+96EF         B4B2
+96F0         B4B3
+96F1         B4B4
+96F3         B4B5
+96F4         B4B6
+96F5         B4B7
+96F6         B4B8
+96F7         B4B9
+96F8         B4BA
+96F9         B4BB
+96FA         B4BC
+96FB         B4BD
+96FC         B4BE
+96FD         B4BF
+9741         B4C0
+9742         B4C1
+9743         B4C2
+9744         B4C3
+9745         B4C4
+9746         B4C5
+9747         B4C6
+9748         B4C7
+9749         B4C8
+974A         B4C9
+974B         B4CA
+974C         B4CB
+974D         B4CC
+974E         B4CD
+974F         B4CE
+9750         B4CF
+9751         B4D0
+9753         B4D1
+9754         B4D2
+9755         B4D3
+9756         B4D4
+9757         B4D5
+9758         B4D6
+9759         B4D7
+975A         B4D8
+975B         B4D9
+975C         B4DA
+975D         B4DB
+9761         B4DC
+9762         B4DD
+9763         B4DE
+9764         B4DF
+9765         B4E0
+9766         B4E1
+9767         B4E2
+9768         B4E3
+9769         B4E4
+976A         B4E5
+976B         B4E6
+976C         B4E7
+976D         B4E8
+976E         B4E9
+976F         B4EA
+9770         B4EB
+9771         B4EC
+9773         B4ED
+9774         B4EE
+9775         B4EF
+9776         B4F0
+9777         B4F1
+9778         B4F2
+9779         B4F3
+977A         B4F4
+977B         B4F5
+977C         B4F6
+977D         B4F7
+9781         B4F8
+9782         B4F9
+9783         B4FA
+9784         B4FB
+9785         B4FC
+9786         B4FD
+9787         B4FE
+9788         B4FF
+9789         B500
+978A         B501
+978B         B502
+978C         B503
+978D         B504
+978E         B505
+978F         B506
+9790         B507
+9791         B508
+9793         B509
+9794         B50A
+9795         B50B
+9796         B50C
+9797         B50D
+9798         B50E
+9799         B50F
+979A         B510
+979B         B511
+979C         B512
+979D         B513
+97A1         B514
+97A2         B515
+97A3         B516
+97A4         B517
+97A5         B518
+97A6         B519
+97A7         B51A
+97A8         B51B
+97A9         B51C
+97AA         B51D
+97AB         B51E
+97AC         B51F
+97AD         B520
+97AE         B521
+97AF         B522
+97B0         B523
+97B1         B524
+97B3         B525
+97B4         B526
+97B5         B527
+97B6         B528
+97B7         B529
+97B8         B52A
+97B9         B52B
+97BA         B52C
+97BB         B52D
+97BC         B52E
+97BD         B52F
+9841         3138
+9861         B530
+9862         B531
+9863         B532
+9864         B533
+9865         B534
+9866         B535
+9867         B536
+9868         B537
+9869         B538
+986A         B539
+986B         B53A
+986C         B53B
+986D         B53C
+986E         B53D
+986F         B53E
+9870         B53F
+9871         B540
+9873         B541
+9874         B542
+9875         B543
+9876         B544
+9877         B545
+9878         B546
+9879         B547
+987A         B548
+987B         B549
+987C         B54A
+987D         B54B
+9881         B54C
+9882         B54D
+9883         B54E
+9884         B54F
+9885         B550
+9886         B551
+9887         B552
+9888         B553
+9889         B554
+988A         B555
+988B         B556
+988C         B557
+988D         B558
+988E         B559
+988F         B55A
+9890         B55B
+9891         B55C
+9893         B55D
+9894         B55E
+9895         B55F
+9896         B560
+9897         B561
+9898         B562
+9899         B563
+989A         B564
+989B         B565
+989C         B566
+989D         B567
+98A1         B568
+98A2         B569
+98A3         B56A
+98A4         B56B
+98A5         B56C
+98A6         B56D
+98A7         B56E
+98A8         B56F
+98A9         B570
+98AA         B571
+98AB         B572
+98AC         B573
+98AD         B574
+98AE         B575
+98AF         B576
+98B0         B577
+98B1         B578
+98B3         B579
+98B4         B57A
+98B5         B57B
+98B6         B57C
+98B7         B57D
+98B8         B57E
+98B9         B57F
+98BA         B580
+98BB         B581
+98BC         B582
+98BD         B583
+98C1         B584
+98C2         B585
+98C3         B586
+98C4         B587
+98C5         B588
+98C6         B589
+98C7         B58A
+98C8         B58B
+98C9         B58C
+98CA         B58D
+98CB         B58E
+98CC         B58F
+98CD         B590
+98CE         B591
+98CF         B592
+98D0         B593
+98D1         B594
+98D3         B595
+98D4         B596
+98D5         B597
+98D6         B598
+98D7         B599
+98D8         B59A
+98D9         B59B
+98DA         B59C
+98DB         B59D
+98DC         B59E
+98DD         B59F
+98E1         B5A0
+98E2         B5A1
+98E3         B5A2
+98E4         B5A3
+98E5         B5A4
+98E6         B5A5
+98E7         B5A6
+98E8         B5A7
+98E9         B5A8
+98EA         B5A9
+98EB         B5AA
+98EC         B5AB
+98ED         B5AC
+98EE         B5AD
+98EF         B5AE
+98F0         B5AF
+98F1         B5B0
+98F3         B5B1
+98F4         B5B2
+98F5         B5B3
+98F6         B5B4
+98F7         B5B5
+98F8         B5B6
+98F9         B5B7
+98FA         B5B8
+98FB         B5B9
+98FC         B5BA
+98FD         B5BB
+9941         B5BC
+9942         B5BD
+9943         B5BE
+9944         B5BF
+9945         B5C0
+9946         B5C1
+9947         B5C2
+9948         B5C3
+9949         B5C4
+994A         B5C5
+994B         B5C6
+994C         B5C7
+994D         B5C8
+994E         B5C9
+994F         B5CA
+9950         B5CB
+9951         B5CC
+9953         B5CD
+9954         B5CE
+9955         B5CF
+9956         B5D0
+9957         B5D1
+9958         B5D2
+9959         B5D3
+995A         B5D4
+995B         B5D5
+995C         B5D6
+995D         B5D7
+9961         B5D8
+9962         B5D9
+9963         B5DA
+9964         B5DB
+9965         B5DC
+9966         B5DD
+9967         B5DE
+9968         B5DF
+9969         B5E0
+996A         B5E1
+996B         B5E2
+996C         B5E3
+996D         B5E4
+996E         B5E5
+996F         B5E6
+9970         B5E7
+9971         B5E8
+9973         B5E9
+9974         B5EA
+9975         B5EB
+9976         B5EC
+9977         B5ED
+9978         B5EE
+9979         B5EF
+997A         B5F0
+997B         B5F1
+997C         B5F2
+997D         B5F3
+9981         B5F4
+9982         B5F5
+9983         B5F6
+9984         B5F7
+9985         B5F8
+9986         B5F9
+9987         B5FA
+9988         B5FB
+9989         B5FC
+998A         B5FD
+998B         B5FE
+998C         B5FF
+998D         B600
+998E         B601
+998F         B602
+9990         B603
+9991         B604
+9993         B605
+9994         B606
+9995         B607
+9996         B608
+9997         B609
+9998         B60A
+9999         B60B
+999A         B60C
+999B         B60D
+999C         B60E
+999D         B60F
+99A1         B610
+99A2         B611
+99A3         B612
+99A4         B613
+99A5         B614
+99A6         B615
+99A7         B616
+99A8         B617
+99A9         B618
+99AA         B619
+99AB         B61A
+99AC         B61B
+99AD         B61C
+99AE         B61D
+99AF         B61E
+99B0         B61F
+99B1         B620
+99B3         B621
+99B4         B622
+99B5         B623
+99B6         B624
+99B7         B625
+99B8         B626
+99B9         B627
+99BA         B628
+99BB         B629
+99BC         B62A
+99BD         B62B
+99C1         B62C
+99C2         B62D
+99C3         B62E
+99C4         B62F
+99C5         B630
+99C6         B631
+99C7         B632
+99C8         B633
+99C9         B634
+99CA         B635
+99CB         B636
+99CC         B637
+99CD         B638
+99CE         B639
+99CF         B63A
+99D0         B63B
+99D1         B63C
+99D3         B63D
+99D4         B63E
+99D5         B63F
+99D6         B640
+99D7         B641
+99D8         B642
+99D9         B643
+99DA         B644
+99DB         B645
+99DC         B646
+99DD         B647
+99E1         B648
+99E2         B649
+99E3         B64A
+99E4         B64B
+99E5         B64C
+99E6         B64D
+99E7         B64E
+99E8         B64F
+99E9         B650
+99EA         B651
+99EB         B652
+99EC         B653
+99ED         B654
+99EE         B655
+99EF         B656
+99F0         B657
+99F1         B658
+99F3         B659
+99F4         B65A
+99F5         B65B
+99F6         B65C
+99F7         B65D
+99F8         B65E
+99F9         B65F
+99FA         B660
+99FB         B661
+99FC         B662
+99FD         B663
+9A41         B664
+9A42         B665
+9A43         B666
+9A44         B667
+9A45         B668
+9A46         B669
+9A47         B66A
+9A48         B66B
+9A49         B66C
+9A4A         B66D
+9A4B         B66E
+9A4C         B66F
+9A4D         B670
+9A4E         B671
+9A4F         B672
+9A50         B673
+9A51         B674
+9A53         B675
+9A54         B676
+9A55         B677
+9A56         B678
+9A57         B679
+9A58         B67A
+9A59         B67B
+9A5A         B67C
+9A5B         B67D
+9A5C         B67E
+9A5D         B67F
+9A61         B680
+9A62         B681
+9A63         B682
+9A64         B683
+9A65         B684
+9A66         B685
+9A67         B686
+9A68         B687
+9A69         B688
+9A6A         B689
+9A6B         B68A
+9A6C         B68B
+9A6D         B68C
+9A6E         B68D
+9A6F         B68E
+9A70         B68F
+9A71         B690
+9A73         B691
+9A74         B692
+9A75         B693
+9A76         B694
+9A77         B695
+9A78         B696
+9A79         B697
+9A7A         B698
+9A7B         B699
+9A7C         B69A
+9A7D         B69B
+9A81         B69C
+9A82         B69D
+9A83         B69E
+9A84         B69F
+9A85         B6A0
+9A86         B6A1
+9A87         B6A2
+9A88         B6A3
+9A89         B6A4
+9A8A         B6A5
+9A8B         B6A6
+9A8C         B6A7
+9A8D         B6A8
+9A8E         B6A9
+9A8F         B6AA
+9A90         B6AB
+9A91         B6AC
+9A93         B6AD
+9A94         B6AE
+9A95         B6AF
+9A96         B6B0
+9A97         B6B1
+9A98         B6B2
+9A99         B6B3
+9A9A         B6B4
+9A9B         B6B5
+9A9C         B6B6
+9A9D         B6B7
+9AA1         B6B8
+9AA2         B6B9
+9AA3         B6BA
+9AA4         B6BB
+9AA5         B6BC
+9AA6         B6BD
+9AA7         B6BE
+9AA8         B6BF
+9AA9         B6C0
+9AAA         B6C1
+9AAB         B6C2
+9AAC         B6C3
+9AAD         B6C4
+9AAE         B6C5
+9AAF         B6C6
+9AB0         B6C7
+9AB1         B6C8
+9AB3         B6C9
+9AB4         B6CA
+9AB5         B6CB
+9AB6         B6CC
+9AB7         B6CD
+9AB8         B6CE
+9AB9         B6CF
+9ABA         B6D0
+9ABB         B6D1
+9ABC         B6D2
+9ABD         B6D3
+9AC1         B6D4
+9AC2         B6D5
+9AC3         B6D6
+9AC4         B6D7
+9AC5         B6D8
+9AC6         B6D9
+9AC7         B6DA
+9AC8         B6DB
+9AC9         B6DC
+9ACA         B6DD
+9ACB         B6DE
+9ACC         B6DF
+9ACD         B6E0
+9ACE         B6E1
+9ACF         B6E2
+9AD0         B6E3
+9AD1         B6E4
+9AD3         B6E5
+9AD4         B6E6
+9AD5         B6E7
+9AD6         B6E8
+9AD7         B6E9
+9AD8         B6EA
+9AD9         B6EB
+9ADA         B6EC
+9ADB         B6ED
+9ADC         B6EE
+9ADD         B6EF
+9AE1         B6F0
+9AE2         B6F1
+9AE3         B6F2
+9AE4         B6F3
+9AE5         B6F4
+9AE6         B6F5
+9AE7         B6F6
+9AE8         B6F7
+9AE9         B6F8
+9AEA         B6F9
+9AEB         B6FA
+9AEC         B6FB
+9AED         B6FC
+9AEE         B6FD
+9AEF         B6FE
+9AF0         B6FF
+9AF1         B700
+9AF3         B701
+9AF4         B702
+9AF5         B703
+9AF6         B704
+9AF7         B705
+9AF8         B706
+9AF9         B707
+9AFA         B708
+9AFB         B709
+9AFC         B70A
+9AFD         B70B
+9B41         B70C
+9B42         B70D
+9B43         B70E
+9B44         B70F
+9B45         B710
+9B46         B711
+9B47         B712
+9B48         B713
+9B49         B714
+9B4A         B715
+9B4B         B716
+9B4C         B717
+9B4D         B718
+9B4E         B719
+9B4F         B71A
+9B50         B71B
+9B51         B71C
+9B53         B71D
+9B54         B71E
+9B55         B71F
+9B56         B720
+9B57         B721
+9B58         B722
+9B59         B723
+9B5A         B724
+9B5B         B725
+9B5C         B726
+9B5D         B727
+9B61         B728
+9B62         B729
+9B63         B72A
+9B64         B72B
+9B65         B72C
+9B66         B72D
+9B67         B72E
+9B68         B72F
+9B69         B730
+9B6A         B731
+9B6B         B732
+9B6C         B733
+9B6D         B734
+9B6E         B735
+9B6F         B736
+9B70         B737
+9B71         B738
+9B73         B739
+9B74         B73A
+9B75         B73B
+9B76         B73C
+9B77         B73D
+9B78         B73E
+9B79         B73F
+9B7A         B740
+9B7B         B741
+9B7C         B742
+9B7D         B743
+9B81         B744
+9B82         B745
+9B83         B746
+9B84         B747
+9B85         B748
+9B86         B749
+9B87         B74A
+9B88         B74B
+9B89         B74C
+9B8A         B74D
+9B8B         B74E
+9B8C         B74F
+9B8D         B750
+9B8E         B751
+9B8F         B752
+9B90         B753
+9B91         B754
+9B93         B755
+9B94         B756
+9B95         B757
+9B96         B758
+9B97         B759
+9B98         B75A
+9B99         B75B
+9B9A         B75C
+9B9B         B75D
+9B9C         B75E
+9B9D         B75F
+9BA1         B760
+9BA2         B761
+9BA3         B762
+9BA4         B763
+9BA5         B764
+9BA6         B765
+9BA7         B766
+9BA8         B767
+9BA9         B768
+9BAA         B769
+9BAB         B76A
+9BAC         B76B
+9BAD         B76C
+9BAE         B76D
+9BAF         B76E
+9BB0         B76F
+9BB1         B770
+9BB3         B771
+9BB4         B772
+9BB5         B773
+9BB6         B774
+9BB7         B775
+9BB8         B776
+9BB9         B777
+9BBA         B778
+9BBB         B779
+9BBC         B77A
+9BBD         B77B
+9C41         3139
+9C61         B77C
+9C62         B77D
+9C63         B77E
+9C64         B77F
+9C65         B780
+9C66         B781
+9C67         B782
+9C68         B783
+9C69         B784
+9C6A         B785
+9C6B         B786
+9C6C         B787
+9C6D         B788
+9C6E         B789
+9C6F         B78A
+9C70         B78B
+9C71         B78C
+9C73         B78D
+9C74         B78E
+9C75         B78F
+9C76         B790
+9C77         B791
+9C78         B792
+9C79         B793
+9C7A         B794
+9C7B         B795
+9C7C         B796
+9C7D         B797
+9C81         B798
+9C82         B799
+9C83         B79A
+9C84         B79B
+9C85         B79C
+9C86         B79D
+9C87         B79E
+9C88         B79F
+9C89         B7A0
+9C8A         B7A1
+9C8B         B7A2
+9C8C         B7A3
+9C8D         B7A4
+9C8E         B7A5
+9C8F         B7A6
+9C90         B7A7
+9C91         B7A8
+9C93         B7A9
+9C94         B7AA
+9C95         B7AB
+9C96         B7AC
+9C97         B7AD
+9C98         B7AE
+9C99         B7AF
+9C9A         B7B0
+9C9B         B7B1
+9C9C         B7B2
+9C9D         B7B3
+9CA1         B7B4
+9CA2         B7B5
+9CA3         B7B6
+9CA4         B7B7
+9CA5         B7B8
+9CA6         B7B9
+9CA7         B7BA
+9CA8         B7BB
+9CA9         B7BC
+9CAA         B7BD
+9CAB         B7BE
+9CAC         B7BF
+9CAD         B7C0
+9CAE         B7C1
+9CAF         B7C2
+9CB0         B7C3
+9CB1         B7C4
+9CB3         B7C5
+9CB4         B7C6
+9CB5         B7C7
+9CB6         B7C8
+9CB7         B7C9
+9CB8         B7CA
+9CB9         B7CB
+9CBA         B7CC
+9CBB         B7CD
+9CBC         B7CE
+9CBD         B7CF
+9CC1         B7D0
+9CC2         B7D1
+9CC3         B7D2
+9CC4         B7D3
+9CC5         B7D4
+9CC6         B7D5
+9CC7         B7D6
+9CC8         B7D7
+9CC9         B7D8
+9CCA         B7D9
+9CCB         B7DA
+9CCC         B7DB
+9CCD         B7DC
+9CCE         B7DD
+9CCF         B7DE
+9CD0         B7DF
+9CD1         B7E0
+9CD3         B7E1
+9CD4         B7E2
+9CD5         B7E3
+9CD6         B7E4
+9CD7         B7E5
+9CD8         B7E6
+9CD9         B7E7
+9CDA         B7E8
+9CDB         B7E9
+9CDC         B7EA
+9CDD         B7EB
+9CE1         B7EC
+9CE2         B7ED
+9CE3         B7EE
+9CE4         B7EF
+9CE5         B7F0
+9CE6         B7F1
+9CE7         B7F2
+9CE8         B7F3
+9CE9         B7F4
+9CEA         B7F5
+9CEB         B7F6
+9CEC         B7F7
+9CED         B7F8
+9CEE         B7F9
+9CEF         B7FA
+9CF0         B7FB
+9CF1         B7FC
+9CF3         B7FD
+9CF4         B7FE
+9CF5         B7FF
+9CF6         B800
+9CF7         B801
+9CF8         B802
+9CF9         B803
+9CFA         B804
+9CFB         B805
+9CFC         B806
+9CFD         B807
+9D41         B808
+9D42         B809
+9D43         B80A
+9D44         B80B
+9D45         B80C
+9D46         B80D
+9D47         B80E
+9D48         B80F
+9D49         B810
+9D4A         B811
+9D4B         B812
+9D4C         B813
+9D4D         B814
+9D4E         B815
+9D4F         B816
+9D50         B817
+9D51         B818
+9D53         B819
+9D54         B81A
+9D55         B81B
+9D56         B81C
+9D57         B81D
+9D58         B81E
+9D59         B81F
+9D5A         B820
+9D5B         B821
+9D5C         B822
+9D5D         B823
+9D61         B824
+9D62         B825
+9D63         B826
+9D64         B827
+9D65         B828
+9D66         B829
+9D67         B82A
+9D68         B82B
+9D69         B82C
+9D6A         B82D
+9D6B         B82E
+9D6C         B82F
+9D6D         B830
+9D6E         B831
+9D6F         B832
+9D70         B833
+9D71         B834
+9D73         B835
+9D74         B836
+9D75         B837
+9D76         B838
+9D77         B839
+9D78         B83A
+9D79         B83B
+9D7A         B83C
+9D7B         B83D
+9D7C         B83E
+9D7D         B83F
+9D81         B840
+9D82         B841
+9D83         B842
+9D84         B843
+9D85         B844
+9D86         B845
+9D87         B846
+9D88         B847
+9D89         B848
+9D8A         B849
+9D8B         B84A
+9D8C         B84B
+9D8D         B84C
+9D8E         B84D
+9D8F         B84E
+9D90         B84F
+9D91         B850
+9D93         B851
+9D94         B852
+9D95         B853
+9D96         B854
+9D97         B855
+9D98         B856
+9D99         B857
+9D9A         B858
+9D9B         B859
+9D9C         B85A
+9D9D         B85B
+9DA1         B85C
+9DA2         B85D
+9DA3         B85E
+9DA4         B85F
+9DA5         B860
+9DA6         B861
+9DA7         B862
+9DA8         B863
+9DA9         B864
+9DAA         B865
+9DAB         B866
+9DAC         B867
+9DAD         B868
+9DAE         B869
+9DAF         B86A
+9DB0         B86B
+9DB1         B86C
+9DB3         B86D
+9DB4         B86E
+9DB5         B86F
+9DB6         B870
+9DB7         B871
+9DB8         B872
+9DB9         B873
+9DBA         B874
+9DBB         B875
+9DBC         B876
+9DBD         B877
+9DC1         B878
+9DC2         B879
+9DC3         B87A
+9DC4         B87B
+9DC5         B87C
+9DC6         B87D
+9DC7         B87E
+9DC8         B87F
+9DC9         B880
+9DCA         B881
+9DCB         B882
+9DCC         B883
+9DCD         B884
+9DCE         B885
+9DCF         B886
+9DD0         B887
+9DD1         B888
+9DD3         B889
+9DD4         B88A
+9DD5         B88B
+9DD6         B88C
+9DD7         B88D
+9DD8         B88E
+9DD9         B88F
+9DDA         B890
+9DDB         B891
+9DDC         B892
+9DDD         B893
+9DE1         B894
+9DE2         B895
+9DE3         B896
+9DE4         B897
+9DE5         B898
+9DE6         B899
+9DE7         B89A
+9DE8         B89B
+9DE9         B89C
+9DEA         B89D
+9DEB         B89E
+9DEC         B89F
+9DED         B8A0
+9DEE         B8A1
+9DEF         B8A2
+9DF0         B8A3
+9DF1         B8A4
+9DF3         B8A5
+9DF4         B8A6
+9DF5         B8A7
+9DF6         B8A8
+9DF7         B8A9
+9DF8         B8AA
+9DF9         B8AB
+9DFA         B8AC
+9DFB         B8AD
+9DFC         B8AE
+9DFD         B8AF
+9E41         B8B0
+9E42         B8B1
+9E43         B8B2
+9E44         B8B3
+9E45         B8B4
+9E46         B8B5
+9E47         B8B6
+9E48         B8B7
+9E49         B8B8
+9E4A         B8B9
+9E4B         B8BA
+9E4C         B8BB
+9E4D         B8BC
+9E4E         B8BD
+9E4F         B8BE
+9E50         B8BF
+9E51         B8C0
+9E53         B8C1
+9E54         B8C2
+9E55         B8C3
+9E56         B8C4
+9E57         B8C5
+9E58         B8C6
+9E59         B8C7
+9E5A         B8C8
+9E5B         B8C9
+9E5C         B8CA
+9E5D         B8CB
+9E61         B8CC
+9E62         B8CD
+9E63         B8CE
+9E64         B8CF
+9E65         B8D0
+9E66         B8D1
+9E67         B8D2
+9E68         B8D3
+9E69         B8D4
+9E6A         B8D5
+9E6B         B8D6
+9E6C         B8D7
+9E6D         B8D8
+9E6E         B8D9
+9E6F         B8DA
+9E70         B8DB
+9E71         B8DC
+9E73         B8DD
+9E74         B8DE
+9E75         B8DF
+9E76         B8E0
+9E77         B8E1
+9E78         B8E2
+9E79         B8E3
+9E7A         B8E4
+9E7B         B8E5
+9E7C         B8E6
+9E7D         B8E7
+9E81         B8E8
+9E82         B8E9
+9E83         B8EA
+9E84         B8EB
+9E85         B8EC
+9E86         B8ED
+9E87         B8EE
+9E88         B8EF
+9E89         B8F0
+9E8A         B8F1
+9E8B         B8F2
+9E8C         B8F3
+9E8D         B8F4
+9E8E         B8F5
+9E8F         B8F6
+9E90         B8F7
+9E91         B8F8
+9E93         B8F9
+9E94         B8FA
+9E95         B8FB
+9E96         B8FC
+9E97         B8FD
+9E98         B8FE
+9E99         B8FF
+9E9A         B900
+9E9B         B901
+9E9C         B902
+9E9D         B903
+9EA1         B904
+9EA2         B905
+9EA3         B906
+9EA4         B907
+9EA5         B908
+9EA6         B909
+9EA7         B90A
+9EA8         B90B
+9EA9         B90C
+9EAA         B90D
+9EAB         B90E
+9EAC         B90F
+9EAD         B910
+9EAE         B911
+9EAF         B912
+9EB0         B913
+9EB1         B914
+9EB3         B915
+9EB4         B916
+9EB5         B917
+9EB6         B918
+9EB7         B919
+9EB8         B91A
+9EB9         B91B
+9EBA         B91C
+9EBB         B91D
+9EBC         B91E
+9EBD         B91F
+9EC1         B920
+9EC2         B921
+9EC3         B922
+9EC4         B923
+9EC5         B924
+9EC6         B925
+9EC7         B926
+9EC8         B927
+9EC9         B928
+9ECA         B929
+9ECB         B92A
+9ECC         B92B
+9ECD         B92C
+9ECE         B92D
+9ECF         B92E
+9ED0         B92F
+9ED1         B930
+9ED3         B931
+9ED4         B932
+9ED5         B933
+9ED6         B934
+9ED7         B935
+9ED8         B936
+9ED9         B937
+9EDA         B938
+9EDB         B939
+9EDC         B93A
+9EDD         B93B
+9EE1         B93C
+9EE2         B93D
+9EE3         B93E
+9EE4         B93F
+9EE5         B940
+9EE6         B941
+9EE7         B942
+9EE8         B943
+9EE9         B944
+9EEA         B945
+9EEB         B946
+9EEC         B947
+9EED         B948
+9EEE         B949
+9EEF         B94A
+9EF0         B94B
+9EF1         B94C
+9EF3         B94D
+9EF4         B94E
+9EF5         B94F
+9EF6         B950
+9EF7         B951
+9EF8         B952
+9EF9         B953
+9EFA         B954
+9EFB         B955
+9EFC         B956
+9EFD         B957
+9F41         B958
+9F42         B959
+9F43         B95A
+9F44         B95B
+9F45         B95C
+9F46         B95D
+9F47         B95E
+9F48         B95F
+9F49         B960
+9F4A         B961
+9F4B         B962
+9F4C         B963
+9F4D         B964
+9F4E         B965
+9F4F         B966
+9F50         B967
+9F51         B968
+9F53         B969
+9F54         B96A
+9F55         B96B
+9F56         B96C
+9F57         B96D
+9F58         B96E
+9F59         B96F
+9F5A         B970
+9F5B         B971
+9F5C         B972
+9F5D         B973
+9F61         B974
+9F62         B975
+9F63         B976
+9F64         B977
+9F65         B978
+9F66         B979
+9F67         B97A
+9F68         B97B
+9F69         B97C
+9F6A         B97D
+9F6B         B97E
+9F6C         B97F
+9F6D         B980
+9F6E         B981
+9F6F         B982
+9F70         B983
+9F71         B984
+9F73         B985
+9F74         B986
+9F75         B987
+9F76         B988
+9F77         B989
+9F78         B98A
+9F79         B98B
+9F7A         B98C
+9F7B         B98D
+9F7C         B98E
+9F7D         B98F
+9F81         B990
+9F82         B991
+9F83         B992
+9F84         B993
+9F85         B994
+9F86         B995
+9F87         B996
+9F88         B997
+9F89         B998
+9F8A         B999
+9F8B         B99A
+9F8C         B99B
+9F8D         B99C
+9F8E         B99D
+9F8F         B99E
+9F90         B99F
+9F91         B9A0
+9F93         B9A1
+9F94         B9A2
+9F95         B9A3
+9F96         B9A4
+9F97         B9A5
+9F98         B9A6
+9F99         B9A7
+9F9A         B9A8
+9F9B         B9A9
+9F9C         B9AA
+9F9D         B9AB
+9FA1         B9AC
+9FA2         B9AD
+9FA3         B9AE
+9FA4         B9AF
+9FA5         B9B0
+9FA6         B9B1
+9FA7         B9B2
+9FA8         B9B3
+9FA9         B9B4
+9FAA         B9B5
+9FAB         B9B6
+9FAC         B9B7
+9FAD         B9B8
+9FAE         B9B9
+9FAF         B9BA
+9FB0         B9BB
+9FB1         B9BC
+9FB3         B9BD
+9FB4         B9BE
+9FB5         B9BF
+9FB6         B9C0
+9FB7         B9C1
+9FB8         B9C2
+9FB9         B9C3
+9FBA         B9C4
+9FBB         B9C5
+9FBC         B9C6
+9FBD         B9C7
+A041         3141
+A061         B9C8
+A062         B9C9
+A063         B9CA
+A064         B9CB
+A065         B9CC
+A066         B9CD
+A067         B9CE
+A068         B9CF
+A069         B9D0
+A06A         B9D1
+A06B         B9D2
+A06C         B9D3
+A06D         B9D4
+A06E         B9D5
+A06F         B9D6
+A070         B9D7
+A071         B9D8
+A073         B9D9
+A074         B9DA
+A075         B9DB
+A076         B9DC
+A077         B9DD
+A078         B9DE
+A079         B9DF
+A07A         B9E0
+A07B         B9E1
+A07C         B9E2
+A07D         B9E3
+A081         B9E4
+A082         B9E5
+A083         B9E6
+A084         B9E7
+A085         B9E8
+A086         B9E9
+A087         B9EA
+A088         B9EB
+A089         B9EC
+A08A         B9ED
+A08B         B9EE
+A08C         B9EF
+A08D         B9F0
+A08E         B9F1
+A08F         B9F2
+A090         B9F3
+A091         B9F4
+A093         B9F5
+A094         B9F6
+A095         B9F7
+A096         B9F8
+A097         B9F9
+A098         B9FA
+A099         B9FB
+A09A         B9FC
+A09B         B9FD
+A09C         B9FE
+A09D         B9FF
+A0A1         BA00
+A0A2         BA01
+A0A3         BA02
+A0A4         BA03
+A0A5         BA04
+A0A6         BA05
+A0A7         BA06
+A0A8         BA07
+A0A9         BA08
+A0AA         BA09
+A0AB         BA0A
+A0AC         BA0B
+A0AD         BA0C
+A0AE         BA0D
+A0AF         BA0E
+A0B0         BA0F
+A0B1         BA10
+A0B3         BA11
+A0B4         BA12
+A0B5         BA13
+A0B6         BA14
+A0B7         BA15
+A0B8         BA16
+A0B9         BA17
+A0BA         BA18
+A0BB         BA19
+A0BC         BA1A
+A0BD         BA1B
+A0C1         BA1C
+A0C2         BA1D
+A0C3         BA1E
+A0C4         BA1F
+A0C5         BA20
+A0C6         BA21
+A0C7         BA22
+A0C8         BA23
+A0C9         BA24
+A0CA         BA25
+A0CB         BA26
+A0CC         BA27
+A0CD         BA28
+A0CE         BA29
+A0CF         BA2A
+A0D0         BA2B
+A0D1         BA2C
+A0D3         BA2D
+A0D4         BA2E
+A0D5         BA2F
+A0D6         BA30
+A0D7         BA31
+A0D8         BA32
+A0D9         BA33
+A0DA         BA34
+A0DB         BA35
+A0DC         BA36
+A0DD         BA37
+A0E1         BA38
+A0E2         BA39
+A0E3         BA3A
+A0E4         BA3B
+A0E5         BA3C
+A0E6         BA3D
+A0E7         BA3E
+A0E8         BA3F
+A0E9         BA40
+A0EA         BA41
+A0EB         BA42
+A0EC         BA43
+A0ED         BA44
+A0EE         BA45
+A0EF         BA46
+A0F0         BA47
+A0F1         BA48
+A0F3         BA49
+A0F4         BA4A
+A0F5         BA4B
+A0F6         BA4C
+A0F7         BA4D
+A0F8         BA4E
+A0F9         BA4F
+A0FA         BA50
+A0FB         BA51
+A0FC         BA52
+A0FD         BA53
+A141         BA54
+A142         BA55
+A143         BA56
+A144         BA57
+A145         BA58
+A146         BA59
+A147         BA5A
+A148         BA5B
+A149         BA5C
+A14A         BA5D
+A14B         BA5E
+A14C         BA5F
+A14D         BA60
+A14E         BA61
+A14F         BA62
+A150         BA63
+A151         BA64
+A153         BA65
+A154         BA66
+A155         BA67
+A156         BA68
+A157         BA69
+A158         BA6A
+A159         BA6B
+A15A         BA6C
+A15B         BA6D
+A15C         BA6E
+A15D         BA6F
+A161         BA70
+A162         BA71
+A163         BA72
+A164         BA73
+A165         BA74
+A166         BA75
+A167         BA76
+A168         BA77
+A169         BA78
+A16A         BA79
+A16B         BA7A
+A16C         BA7B
+A16D         BA7C
+A16E         BA7D
+A16F         BA7E
+A170         BA7F
+A171         BA80
+A173         BA81
+A174         BA82
+A175         BA83
+A176         BA84
+A177         BA85
+A178         BA86
+A179         BA87
+A17A         BA88
+A17B         BA89
+A17C         BA8A
+A17D         BA8B
+A181         BA8C
+A182         BA8D
+A183         BA8E
+A184         BA8F
+A185         BA90
+A186         BA91
+A187         BA92
+A188         BA93
+A189         BA94
+A18A         BA95
+A18B         BA96
+A18C         BA97
+A18D         BA98
+A18E         BA99
+A18F         BA9A
+A190         BA9B
+A191         BA9C
+A193         BA9D
+A194         BA9E
+A195         BA9F
+A196         BAA0
+A197         BAA1
+A198         BAA2
+A199         BAA3
+A19A         BAA4
+A19B         BAA5
+A19C         BAA6
+A19D         BAA7
+A1A1         BAA8
+A1A2         BAA9
+A1A3         BAAA
+A1A4         BAAB
+A1A5         BAAC
+A1A6         BAAD
+A1A7         BAAE
+A1A8         BAAF
+A1A9         BAB0
+A1AA         BAB1
+A1AB         BAB2
+A1AC         BAB3
+A1AD         BAB4
+A1AE         BAB5
+A1AF         BAB6
+A1B0         BAB7
+A1B1         BAB8
+A1B3         BAB9
+A1B4         BABA
+A1B5         BABB
+A1B6         BABC
+A1B7         BABD
+A1B8         BABE
+A1B9         BABF
+A1BA         BAC0
+A1BB         BAC1
+A1BC         BAC2
+A1BD         BAC3
+A1C1         BAC4
+A1C2         BAC5
+A1C3         BAC6
+A1C4         BAC7
+A1C5         BAC8
+A1C6         BAC9
+A1C7         BACA
+A1C8         BACB
+A1C9         BACC
+A1CA         BACD
+A1CB         BACE
+A1CC         BACF
+A1CD         BAD0
+A1CE         BAD1
+A1CF         BAD2
+A1D0         BAD3
+A1D1         BAD4
+A1D3         BAD5
+A1D4         BAD6
+A1D5         BAD7
+A1D6         BAD8
+A1D7         BAD9
+A1D8         BADA
+A1D9         BADB
+A1DA         BADC
+A1DB         BADD
+A1DC         BADE
+A1DD         BADF
+A1E1         BAE0
+A1E2         BAE1
+A1E3         BAE2
+A1E4         BAE3
+A1E5         BAE4
+A1E6         BAE5
+A1E7         BAE6
+A1E8         BAE7
+A1E9         BAE8
+A1EA         BAE9
+A1EB         BAEA
+A1EC         BAEB
+A1ED         BAEC
+A1EE         BAED
+A1EF         BAEE
+A1F0         BAEF
+A1F1         BAF0
+A1F3         BAF1
+A1F4         BAF2
+A1F5         BAF3
+A1F6         BAF4
+A1F7         BAF5
+A1F8         BAF6
+A1F9         BAF7
+A1FA         BAF8
+A1FB         BAF9
+A1FC         BAFA
+A1FD         BAFB
+A241         BAFC
+A242         BAFD
+A243         BAFE
+A244         BAFF
+A245         BB00
+A246         BB01
+A247         BB02
+A248         BB03
+A249         BB04
+A24A         BB05
+A24B         BB06
+A24C         BB07
+A24D         BB08
+A24E         BB09
+A24F         BB0A
+A250         BB0B
+A251         BB0C
+A253         BB0D
+A254         BB0E
+A255         BB0F
+A256         BB10
+A257         BB11
+A258         BB12
+A259         BB13
+A25A         BB14
+A25B         BB15
+A25C         BB16
+A25D         BB17
+A261         BB18
+A262         BB19
+A263         BB1A
+A264         BB1B
+A265         BB1C
+A266         BB1D
+A267         BB1E
+A268         BB1F
+A269         BB20
+A26A         BB21
+A26B         BB22
+A26C         BB23
+A26D         BB24
+A26E         BB25
+A26F         BB26
+A270         BB27
+A271         BB28
+A273         BB29
+A274         BB2A
+A275         BB2B
+A276         BB2C
+A277         BB2D
+A278         BB2E
+A279         BB2F
+A27A         BB30
+A27B         BB31
+A27C         BB32
+A27D         BB33
+A281         BB34
+A282         BB35
+A283         BB36
+A284         BB37
+A285         BB38
+A286         BB39
+A287         BB3A
+A288         BB3B
+A289         BB3C
+A28A         BB3D
+A28B         BB3E
+A28C         BB3F
+A28D         BB40
+A28E         BB41
+A28F         BB42
+A290         BB43
+A291         BB44
+A293         BB45
+A294         BB46
+A295         BB47
+A296         BB48
+A297         BB49
+A298         BB4A
+A299         BB4B
+A29A         BB4C
+A29B         BB4D
+A29C         BB4E
+A29D         BB4F
+A2A1         BB50
+A2A2         BB51
+A2A3         BB52
+A2A4         BB53
+A2A5         BB54
+A2A6         BB55
+A2A7         BB56
+A2A8         BB57
+A2A9         BB58
+A2AA         BB59
+A2AB         BB5A
+A2AC         BB5B
+A2AD         BB5C
+A2AE         BB5D
+A2AF         BB5E
+A2B0         BB5F
+A2B1         BB60
+A2B3         BB61
+A2B4         BB62
+A2B5         BB63
+A2B6         BB64
+A2B7         BB65
+A2B8         BB66
+A2B9         BB67
+A2BA         BB68
+A2BB         BB69
+A2BC         BB6A
+A2BD         BB6B
+A2C1         BB6C
+A2C2         BB6D
+A2C3         BB6E
+A2C4         BB6F
+A2C5         BB70
+A2C6         BB71
+A2C7         BB72
+A2C8         BB73
+A2C9         BB74
+A2CA         BB75
+A2CB         BB76
+A2CC         BB77
+A2CD         BB78
+A2CE         BB79
+A2CF         BB7A
+A2D0         BB7B
+A2D1         BB7C
+A2D3         BB7D
+A2D4         BB7E
+A2D5         BB7F
+A2D6         BB80
+A2D7         BB81
+A2D8         BB82
+A2D9         BB83
+A2DA         BB84
+A2DB         BB85
+A2DC         BB86
+A2DD         BB87
+A2E1         BB88
+A2E2         BB89
+A2E3         BB8A
+A2E4         BB8B
+A2E5         BB8C
+A2E6         BB8D
+A2E7         BB8E
+A2E8         BB8F
+A2E9         BB90
+A2EA         BB91
+A2EB         BB92
+A2EC         BB93
+A2ED         BB94
+A2EE         BB95
+A2EF         BB96
+A2F0         BB97
+A2F1         BB98
+A2F3         BB99
+A2F4         BB9A
+A2F5         BB9B
+A2F6         BB9C
+A2F7         BB9D
+A2F8         BB9E
+A2F9         BB9F
+A2FA         BBA0
+A2FB         BBA1
+A2FC         BBA2
+A2FD         BBA3
+A341         BBA4
+A342         BBA5
+A343         BBA6
+A344         BBA7
+A345         BBA8
+A346         BBA9
+A347         BBAA
+A348         BBAB
+A349         BBAC
+A34A         BBAD
+A34B         BBAE
+A34C         BBAF
+A34D         BBB0
+A34E         BBB1
+A34F         BBB2
+A350         BBB3
+A351         BBB4
+A353         BBB5
+A354         BBB6
+A355         BBB7
+A356         BBB8
+A357         BBB9
+A358         BBBA
+A359         BBBB
+A35A         BBBC
+A35B         BBBD
+A35C         BBBE
+A35D         BBBF
+A361         BBC0
+A362         BBC1
+A363         BBC2
+A364         BBC3
+A365         BBC4
+A366         BBC5
+A367         BBC6
+A368         BBC7
+A369         BBC8
+A36A         BBC9
+A36B         BBCA
+A36C         BBCB
+A36D         BBCC
+A36E         BBCD
+A36F         BBCE
+A370         BBCF
+A371         BBD0
+A373         BBD1
+A374         BBD2
+A375         BBD3
+A376         BBD4
+A377         BBD5
+A378         BBD6
+A379         BBD7
+A37A         BBD8
+A37B         BBD9
+A37C         BBDA
+A37D         BBDB
+A381         BBDC
+A382         BBDD
+A383         BBDE
+A384         BBDF
+A385         BBE0
+A386         BBE1
+A387         BBE2
+A388         BBE3
+A389         BBE4
+A38A         BBE5
+A38B         BBE6
+A38C         BBE7
+A38D         BBE8
+A38E         BBE9
+A38F         BBEA
+A390         BBEB
+A391         BBEC
+A393         BBED
+A394         BBEE
+A395         BBEF
+A396         BBF0
+A397         BBF1
+A398         BBF2
+A399         BBF3
+A39A         BBF4
+A39B         BBF5
+A39C         BBF6
+A39D         BBF7
+A3A1         BBF8
+A3A2         BBF9
+A3A3         BBFA
+A3A4         BBFB
+A3A5         BBFC
+A3A6         BBFD
+A3A7         BBFE
+A3A8         BBFF
+A3A9         BC00
+A3AA         BC01
+A3AB         BC02
+A3AC         BC03
+A3AD         BC04
+A3AE         BC05
+A3AF         BC06
+A3B0         BC07
+A3B1         BC08
+A3B3         BC09
+A3B4         BC0A
+A3B5         BC0B
+A3B6         BC0C
+A3B7         BC0D
+A3B8         BC0E
+A3B9         BC0F
+A3BA         BC10
+A3BB         BC11
+A3BC         BC12
+A3BD         BC13
+A441         3142
+A461         BC14
+A462         BC15
+A463         BC16
+A464         BC17
+A465         BC18
+A466         BC19
+A467         BC1A
+A468         BC1B
+A469         BC1C
+A46A         BC1D
+A46B         BC1E
+A46C         BC1F
+A46D         BC20
+A46E         BC21
+A46F         BC22
+A470         BC23
+A471         BC24
+A473         BC25
+A474         BC26
+A475         BC27
+A476         BC28
+A477         BC29
+A478         BC2A
+A479         BC2B
+A47A         BC2C
+A47B         BC2D
+A47C         BC2E
+A47D         BC2F
+A481         BC30
+A482         BC31
+A483         BC32
+A484         BC33
+A485         BC34
+A486         BC35
+A487         BC36
+A488         BC37
+A489         BC38
+A48A         BC39
+A48B         BC3A
+A48C         BC3B
+A48D         BC3C
+A48E         BC3D
+A48F         BC3E
+A490         BC3F
+A491         BC40
+A493         BC41
+A494         BC42
+A495         BC43
+A496         BC44
+A497         BC45
+A498         BC46
+A499         BC47
+A49A         BC48
+A49B         BC49
+A49C         BC4A
+A49D         BC4B
+A4A1         BC4C
+A4A2         BC4D
+A4A3         BC4E
+A4A4         BC4F
+A4A5         BC50
+A4A6         BC51
+A4A7         BC52
+A4A8         BC53
+A4A9         BC54
+A4AA         BC55
+A4AB         BC56
+A4AC         BC57
+A4AD         BC58
+A4AE         BC59
+A4AF         BC5A
+A4B0         BC5B
+A4B1         BC5C
+A4B3         BC5D
+A4B4         BC5E
+A4B5         BC5F
+A4B6         BC60
+A4B7         BC61
+A4B8         BC62
+A4B9         BC63
+A4BA         BC64
+A4BB         BC65
+A4BC         BC66
+A4BD         BC67
+A4C1         BC68
+A4C2         BC69
+A4C3         BC6A
+A4C4         BC6B
+A4C5         BC6C
+A4C6         BC6D
+A4C7         BC6E
+A4C8         BC6F
+A4C9         BC70
+A4CA         BC71
+A4CB         BC72
+A4CC         BC73
+A4CD         BC74
+A4CE         BC75
+A4CF         BC76
+A4D0         BC77
+A4D1         BC78
+A4D3         BC79
+A4D4         BC7A
+A4D5         BC7B
+A4D6         BC7C
+A4D7         BC7D
+A4D8         BC7E
+A4D9         BC7F
+A4DA         BC80
+A4DB         BC81
+A4DC         BC82
+A4DD         BC83
+A4E1         BC84
+A4E2         BC85
+A4E3         BC86
+A4E4         BC87
+A4E5         BC88
+A4E6         BC89
+A4E7         BC8A
+A4E8         BC8B
+A4E9         BC8C
+A4EA         BC8D
+A4EB         BC8E
+A4EC         BC8F
+A4ED         BC90
+A4EE         BC91
+A4EF         BC92
+A4F0         BC93
+A4F1         BC94
+A4F3         BC95
+A4F4         BC96
+A4F5         BC97
+A4F6         BC98
+A4F7         BC99
+A4F8         BC9A
+A4F9         BC9B
+A4FA         BC9C
+A4FB         BC9D
+A4FC         BC9E
+A4FD         BC9F
+A541         BCA0
+A542         BCA1
+A543         BCA2
+A544         BCA3
+A545         BCA4
+A546         BCA5
+A547         BCA6
+A548         BCA7
+A549         BCA8
+A54A         BCA9
+A54B         BCAA
+A54C         BCAB
+A54D         BCAC
+A54E         BCAD
+A54F         BCAE
+A550         BCAF
+A551         BCB0
+A553         BCB1
+A554         BCB2
+A555         BCB3
+A556         BCB4
+A557         BCB5
+A558         BCB6
+A559         BCB7
+A55A         BCB8
+A55B         BCB9
+A55C         BCBA
+A55D         BCBB
+A561         BCBC
+A562         BCBD
+A563         BCBE
+A564         BCBF
+A565         BCC0
+A566         BCC1
+A567         BCC2
+A568         BCC3
+A569         BCC4
+A56A         BCC5
+A56B         BCC6
+A56C         BCC7
+A56D         BCC8
+A56E         BCC9
+A56F         BCCA
+A570         BCCB
+A571         BCCC
+A573         BCCD
+A574         BCCE
+A575         BCCF
+A576         BCD0
+A577         BCD1
+A578         BCD2
+A579         BCD3
+A57A         BCD4
+A57B         BCD5
+A57C         BCD6
+A57D         BCD7
+A581         BCD8
+A582         BCD9
+A583         BCDA
+A584         BCDB
+A585         BCDC
+A586         BCDD
+A587         BCDE
+A588         BCDF
+A589         BCE0
+A58A         BCE1
+A58B         BCE2
+A58C         BCE3
+A58D         BCE4
+A58E         BCE5
+A58F         BCE6
+A590         BCE7
+A591         BCE8
+A593         BCE9
+A594         BCEA
+A595         BCEB
+A596         BCEC
+A597         BCED
+A598         BCEE
+A599         BCEF
+A59A         BCF0
+A59B         BCF1
+A59C         BCF2
+A59D         BCF3
+A5A1         BCF4
+A5A2         BCF5
+A5A3         BCF6
+A5A4         BCF7
+A5A5         BCF8
+A5A6         BCF9
+A5A7         BCFA
+A5A8         BCFB
+A5A9         BCFC
+A5AA         BCFD
+A5AB         BCFE
+A5AC         BCFF
+A5AD         BD00
+A5AE         BD01
+A5AF         BD02
+A5B0         BD03
+A5B1         BD04
+A5B3         BD05
+A5B4         BD06
+A5B5         BD07
+A5B6         BD08
+A5B7         BD09
+A5B8         BD0A
+A5B9         BD0B
+A5BA         BD0C
+A5BB         BD0D
+A5BC         BD0E
+A5BD         BD0F
+A5C1         BD10
+A5C2         BD11
+A5C3         BD12
+A5C4         BD13
+A5C5         BD14
+A5C6         BD15
+A5C7         BD16
+A5C8         BD17
+A5C9         BD18
+A5CA         BD19
+A5CB         BD1A
+A5CC         BD1B
+A5CD         BD1C
+A5CE         BD1D
+A5CF         BD1E
+A5D0         BD1F
+A5D1         BD20
+A5D3         BD21
+A5D4         BD22
+A5D5         BD23
+A5D6         BD24
+A5D7         BD25
+A5D8         BD26
+A5D9         BD27
+A5DA         BD28
+A5DB         BD29
+A5DC         BD2A
+A5DD         BD2B
+A5E1         BD2C
+A5E2         BD2D
+A5E3         BD2E
+A5E4         BD2F
+A5E5         BD30
+A5E6         BD31
+A5E7         BD32
+A5E8         BD33
+A5E9         BD34
+A5EA         BD35
+A5EB         BD36
+A5EC         BD37
+A5ED         BD38
+A5EE         BD39
+A5EF         BD3A
+A5F0         BD3B
+A5F1         BD3C
+A5F3         BD3D
+A5F4         BD3E
+A5F5         BD3F
+A5F6         BD40
+A5F7         BD41
+A5F8         BD42
+A5F9         BD43
+A5FA         BD44
+A5FB         BD45
+A5FC         BD46
+A5FD         BD47
+A641         BD48
+A642         BD49
+A643         BD4A
+A644         BD4B
+A645         BD4C
+A646         BD4D
+A647         BD4E
+A648         BD4F
+A649         BD50
+A64A         BD51
+A64B         BD52
+A64C         BD53
+A64D         BD54
+A64E         BD55
+A64F         BD56
+A650         BD57
+A651         BD58
+A653         BD59
+A654         BD5A
+A655         BD5B
+A656         BD5C
+A657         BD5D
+A658         BD5E
+A659         BD5F
+A65A         BD60
+A65B         BD61
+A65C         BD62
+A65D         BD63
+A661         BD64
+A662         BD65
+A663         BD66
+A664         BD67
+A665         BD68
+A666         BD69
+A667         BD6A
+A668         BD6B
+A669         BD6C
+A66A         BD6D
+A66B         BD6E
+A66C         BD6F
+A66D         BD70
+A66E         BD71
+A66F         BD72
+A670         BD73
+A671         BD74
+A673         BD75
+A674         BD76
+A675         BD77
+A676         BD78
+A677         BD79
+A678         BD7A
+A679         BD7B
+A67A         BD7C
+A67B         BD7D
+A67C         BD7E
+A67D         BD7F
+A681         BD80
+A682         BD81
+A683         BD82
+A684         BD83
+A685         BD84
+A686         BD85
+A687         BD86
+A688         BD87
+A689         BD88
+A68A         BD89
+A68B         BD8A
+A68C         BD8B
+A68D         BD8C
+A68E         BD8D
+A68F         BD8E
+A690         BD8F
+A691         BD90
+A693         BD91
+A694         BD92
+A695         BD93
+A696         BD94
+A697         BD95
+A698         BD96
+A699         BD97
+A69A         BD98
+A69B         BD99
+A69C         BD9A
+A69D         BD9B
+A6A1         BD9C
+A6A2         BD9D
+A6A3         BD9E
+A6A4         BD9F
+A6A5         BDA0
+A6A6         BDA1
+A6A7         BDA2
+A6A8         BDA3
+A6A9         BDA4
+A6AA         BDA5
+A6AB         BDA6
+A6AC         BDA7
+A6AD         BDA8
+A6AE         BDA9
+A6AF         BDAA
+A6B0         BDAB
+A6B1         BDAC
+A6B3         BDAD
+A6B4         BDAE
+A6B5         BDAF
+A6B6         BDB0
+A6B7         BDB1
+A6B8         BDB2
+A6B9         BDB3
+A6BA         BDB4
+A6BB         BDB5
+A6BC         BDB6
+A6BD         BDB7
+A6C1         BDB8
+A6C2         BDB9
+A6C3         BDBA
+A6C4         BDBB
+A6C5         BDBC
+A6C6         BDBD
+A6C7         BDBE
+A6C8         BDBF
+A6C9         BDC0
+A6CA         BDC1
+A6CB         BDC2
+A6CC         BDC3
+A6CD         BDC4
+A6CE         BDC5
+A6CF         BDC6
+A6D0         BDC7
+A6D1         BDC8
+A6D3         BDC9
+A6D4         BDCA
+A6D5         BDCB
+A6D6         BDCC
+A6D7         BDCD
+A6D8         BDCE
+A6D9         BDCF
+A6DA         BDD0
+A6DB         BDD1
+A6DC         BDD2
+A6DD         BDD3
+A6E1         BDD4
+A6E2         BDD5
+A6E3         BDD6
+A6E4         BDD7
+A6E5         BDD8
+A6E6         BDD9
+A6E7         BDDA
+A6E8         BDDB
+A6E9         BDDC
+A6EA         BDDD
+A6EB         BDDE
+A6EC         BDDF
+A6ED         BDE0
+A6EE         BDE1
+A6EF         BDE2
+A6F0         BDE3
+A6F1         BDE4
+A6F3         BDE5
+A6F4         BDE6
+A6F5         BDE7
+A6F6         BDE8
+A6F7         BDE9
+A6F8         BDEA
+A6F9         BDEB
+A6FA         BDEC
+A6FB         BDED
+A6FC         BDEE
+A6FD         BDEF
+A741         BDF0
+A742         BDF1
+A743         BDF2
+A744         BDF3
+A745         BDF4
+A746         BDF5
+A747         BDF6
+A748         BDF7
+A749         BDF8
+A74A         BDF9
+A74B         BDFA
+A74C         BDFB
+A74D         BDFC
+A74E         BDFD
+A74F         BDFE
+A750         BDFF
+A751         BE00
+A753         BE01
+A754         BE02
+A755         BE03
+A756         BE04
+A757         BE05
+A758         BE06
+A759         BE07
+A75A         BE08
+A75B         BE09
+A75C         BE0A
+A75D         BE0B
+A761         BE0C
+A762         BE0D
+A763         BE0E
+A764         BE0F
+A765         BE10
+A766         BE11
+A767         BE12
+A768         BE13
+A769         BE14
+A76A         BE15
+A76B         BE16
+A76C         BE17
+A76D         BE18
+A76E         BE19
+A76F         BE1A
+A770         BE1B
+A771         BE1C
+A773         BE1D
+A774         BE1E
+A775         BE1F
+A776         BE20
+A777         BE21
+A778         BE22
+A779         BE23
+A77A         BE24
+A77B         BE25
+A77C         BE26
+A77D         BE27
+A781         BE28
+A782         BE29
+A783         BE2A
+A784         BE2B
+A785         BE2C
+A786         BE2D
+A787         BE2E
+A788         BE2F
+A789         BE30
+A78A         BE31
+A78B         BE32
+A78C         BE33
+A78D         BE34
+A78E         BE35
+A78F         BE36
+A790         BE37
+A791         BE38
+A793         BE39
+A794         BE3A
+A795         BE3B
+A796         BE3C
+A797         BE3D
+A798         BE3E
+A799         BE3F
+A79A         BE40
+A79B         BE41
+A79C         BE42
+A79D         BE43
+A7A1         BE44
+A7A2         BE45
+A7A3         BE46
+A7A4         BE47
+A7A5         BE48
+A7A6         BE49
+A7A7         BE4A
+A7A8         BE4B
+A7A9         BE4C
+A7AA         BE4D
+A7AB         BE4E
+A7AC         BE4F
+A7AD         BE50
+A7AE         BE51
+A7AF         BE52
+A7B0         BE53
+A7B1         BE54
+A7B3         BE55
+A7B4         BE56
+A7B5         BE57
+A7B6         BE58
+A7B7         BE59
+A7B8         BE5A
+A7B9         BE5B
+A7BA         BE5C
+A7BB         BE5D
+A7BC         BE5E
+A7BD         BE5F
+A841         3143
+A861         BE60
+A862         BE61
+A863         BE62
+A864         BE63
+A865         BE64
+A866         BE65
+A867         BE66
+A868         BE67
+A869         BE68
+A86A         BE69
+A86B         BE6A
+A86C         BE6B
+A86D         BE6C
+A86E         BE6D
+A86F         BE6E
+A870         BE6F
+A871         BE70
+A873         BE71
+A874         BE72
+A875         BE73
+A876         BE74
+A877         BE75
+A878         BE76
+A879         BE77
+A87A         BE78
+A87B         BE79
+A87C         BE7A
+A87D         BE7B
+A881         BE7C
+A882         BE7D
+A883         BE7E
+A884         BE7F
+A885         BE80
+A886         BE81
+A887         BE82
+A888         BE83
+A889         BE84
+A88A         BE85
+A88B         BE86
+A88C         BE87
+A88D         BE88
+A88E         BE89
+A88F         BE8A
+A890         BE8B
+A891         BE8C
+A893         BE8D
+A894         BE8E
+A895         BE8F
+A896         BE90
+A897         BE91
+A898         BE92
+A899         BE93
+A89A         BE94
+A89B         BE95
+A89C         BE96
+A89D         BE97
+A8A1         BE98
+A8A2         BE99
+A8A3         BE9A
+A8A4         BE9B
+A8A5         BE9C
+A8A6         BE9D
+A8A7         BE9E
+A8A8         BE9F
+A8A9         BEA0
+A8AA         BEA1
+A8AB         BEA2
+A8AC         BEA3
+A8AD         BEA4
+A8AE         BEA5
+A8AF         BEA6
+A8B0         BEA7
+A8B1         BEA8
+A8B3         BEA9
+A8B4         BEAA
+A8B5         BEAB
+A8B6         BEAC
+A8B7         BEAD
+A8B8         BEAE
+A8B9         BEAF
+A8BA         BEB0
+A8BB         BEB1
+A8BC         BEB2
+A8BD         BEB3
+A8C1         BEB4
+A8C2         BEB5
+A8C3         BEB6
+A8C4         BEB7
+A8C5         BEB8
+A8C6         BEB9
+A8C7         BEBA
+A8C8         BEBB
+A8C9         BEBC
+A8CA         BEBD
+A8CB         BEBE
+A8CC         BEBF
+A8CD         BEC0
+A8CE         BEC1
+A8CF         BEC2
+A8D0         BEC3
+A8D1         BEC4
+A8D3         BEC5
+A8D4         BEC6
+A8D5         BEC7
+A8D6         BEC8
+A8D7         BEC9
+A8D8         BECA
+A8D9         BECB
+A8DA         BECC
+A8DB         BECD
+A8DC         BECE
+A8DD         BECF
+A8E1         BED0
+A8E2         BED1
+A8E3         BED2
+A8E4         BED3
+A8E5         BED4
+A8E6         BED5
+A8E7         BED6
+A8E8         BED7
+A8E9         BED8
+A8EA         BED9
+A8EB         BEDA
+A8EC         BEDB
+A8ED         BEDC
+A8EE         BEDD
+A8EF         BEDE
+A8F0         BEDF
+A8F1         BEE0
+A8F3         BEE1
+A8F4         BEE2
+A8F5         BEE3
+A8F6         BEE4
+A8F7         BEE5
+A8F8         BEE6
+A8F9         BEE7
+A8FA         BEE8
+A8FB         BEE9
+A8FC         BEEA
+A8FD         BEEB
+A941         BEEC
+A942         BEED
+A943         BEEE
+A944         BEEF
+A945         BEF0
+A946         BEF1
+A947         BEF2
+A948         BEF3
+A949         BEF4
+A94A         BEF5
+A94B         BEF6
+A94C         BEF7
+A94D         BEF8
+A94E         BEF9
+A94F         BEFA
+A950         BEFB
+A951         BEFC
+A953         BEFD
+A954         BEFE
+A955         BEFF
+A956         BF00
+A957         BF01
+A958         BF02
+A959         BF03
+A95A         BF04
+A95B         BF05
+A95C         BF06
+A95D         BF07
+A961         BF08
+A962         BF09
+A963         BF0A
+A964         BF0B
+A965         BF0C
+A966         BF0D
+A967         BF0E
+A968         BF0F
+A969         BF10
+A96A         BF11
+A96B         BF12
+A96C         BF13
+A96D         BF14
+A96E         BF15
+A96F         BF16
+A970         BF17
+A971         BF18
+A973         BF19
+A974         BF1A
+A975         BF1B
+A976         BF1C
+A977         BF1D
+A978         BF1E
+A979         BF1F
+A97A         BF20
+A97B         BF21
+A97C         BF22
+A97D         BF23
+A981         BF24
+A982         BF25
+A983         BF26
+A984         BF27
+A985         BF28
+A986         BF29
+A987         BF2A
+A988         BF2B
+A989         BF2C
+A98A         BF2D
+A98B         BF2E
+A98C         BF2F
+A98D         BF30
+A98E         BF31
+A98F         BF32
+A990         BF33
+A991         BF34
+A993         BF35
+A994         BF36
+A995         BF37
+A996         BF38
+A997         BF39
+A998         BF3A
+A999         BF3B
+A99A         BF3C
+A99B         BF3D
+A99C         BF3E
+A99D         BF3F
+A9A1         BF40
+A9A2         BF41
+A9A3         BF42
+A9A4         BF43
+A9A5         BF44
+A9A6         BF45
+A9A7         BF46
+A9A8         BF47
+A9A9         BF48
+A9AA         BF49
+A9AB         BF4A
+A9AC         BF4B
+A9AD         BF4C
+A9AE         BF4D
+A9AF         BF4E
+A9B0         BF4F
+A9B1         BF50
+A9B3         BF51
+A9B4         BF52
+A9B5         BF53
+A9B6         BF54
+A9B7         BF55
+A9B8         BF56
+A9B9         BF57
+A9BA         BF58
+A9BB         BF59
+A9BC         BF5A
+A9BD         BF5B
+A9C1         BF5C
+A9C2         BF5D
+A9C3         BF5E
+A9C4         BF5F
+A9C5         BF60
+A9C6         BF61
+A9C7         BF62
+A9C8         BF63
+A9C9         BF64
+A9CA         BF65
+A9CB         BF66
+A9CC         BF67
+A9CD         BF68
+A9CE         BF69
+A9CF         BF6A
+A9D0         BF6B
+A9D1         BF6C
+A9D3         BF6D
+A9D4         BF6E
+A9D5         BF6F
+A9D6         BF70
+A9D7         BF71
+A9D8         BF72
+A9D9         BF73
+A9DA         BF74
+A9DB         BF75
+A9DC         BF76
+A9DD         BF77
+A9E1         BF78
+A9E2         BF79
+A9E3         BF7A
+A9E4         BF7B
+A9E5         BF7C
+A9E6         BF7D
+A9E7         BF7E
+A9E8         BF7F
+A9E9         BF80
+A9EA         BF81
+A9EB         BF82
+A9EC         BF83
+A9ED         BF84
+A9EE         BF85
+A9EF         BF86
+A9F0         BF87
+A9F1         BF88
+A9F3         BF89
+A9F4         BF8A
+A9F5         BF8B
+A9F6         BF8C
+A9F7         BF8D
+A9F8         BF8E
+A9F9         BF8F
+A9FA         BF90
+A9FB         BF91
+A9FC         BF92
+A9FD         BF93
+AA41         BF94
+AA42         BF95
+AA43         BF96
+AA44         BF97
+AA45         BF98
+AA46         BF99
+AA47         BF9A
+AA48         BF9B
+AA49         BF9C
+AA4A         BF9D
+AA4B         BF9E
+AA4C         BF9F
+AA4D         BFA0
+AA4E         BFA1
+AA4F         BFA2
+AA50         BFA3
+AA51         BFA4
+AA53         BFA5
+AA54         BFA6
+AA55         BFA7
+AA56         BFA8
+AA57         BFA9
+AA58         BFAA
+AA59         BFAB
+AA5A         BFAC
+AA5B         BFAD
+AA5C         BFAE
+AA5D         BFAF
+AA61         BFB0
+AA62         BFB1
+AA63         BFB2
+AA64         BFB3
+AA65         BFB4
+AA66         BFB5
+AA67         BFB6
+AA68         BFB7
+AA69         BFB8
+AA6A         BFB9
+AA6B         BFBA
+AA6C         BFBB
+AA6D         BFBC
+AA6E         BFBD
+AA6F         BFBE
+AA70         BFBF
+AA71         BFC0
+AA73         BFC1
+AA74         BFC2
+AA75         BFC3
+AA76         BFC4
+AA77         BFC5
+AA78         BFC6
+AA79         BFC7
+AA7A         BFC8
+AA7B         BFC9
+AA7C         BFCA
+AA7D         BFCB
+AA81         BFCC
+AA82         BFCD
+AA83         BFCE
+AA84         BFCF
+AA85         BFD0
+AA86         BFD1
+AA87         BFD2
+AA88         BFD3
+AA89         BFD4
+AA8A         BFD5
+AA8B         BFD6
+AA8C         BFD7
+AA8D         BFD8
+AA8E         BFD9
+AA8F         BFDA
+AA90         BFDB
+AA91         BFDC
+AA93         BFDD
+AA94         BFDE
+AA95         BFDF
+AA96         BFE0
+AA97         BFE1
+AA98         BFE2
+AA99         BFE3
+AA9A         BFE4
+AA9B         BFE5
+AA9C         BFE6
+AA9D         BFE7
+AAA1         BFE8
+AAA2         BFE9
+AAA3         BFEA
+AAA4         BFEB
+AAA5         BFEC
+AAA6         BFED
+AAA7         BFEE
+AAA8         BFEF
+AAA9         BFF0
+AAAA         BFF1
+AAAB         BFF2
+AAAC         BFF3
+AAAD         BFF4
+AAAE         BFF5
+AAAF         BFF6
+AAB0         BFF7
+AAB1         BFF8
+AAB3         BFF9
+AAB4         BFFA
+AAB5         BFFB
+AAB6         BFFC
+AAB7         BFFD
+AAB8         BFFE
+AAB9         BFFF
+AABA         C000
+AABB         C001
+AABC         C002
+AABD         C003
+AAC1         C004
+AAC2         C005
+AAC3         C006
+AAC4         C007
+AAC5         C008
+AAC6         C009
+AAC7         C00A
+AAC8         C00B
+AAC9         C00C
+AACA         C00D
+AACB         C00E
+AACC         C00F
+AACD         C010
+AACE         C011
+AACF         C012
+AAD0         C013
+AAD1         C014
+AAD3         C015
+AAD4         C016
+AAD5         C017
+AAD6         C018
+AAD7         C019
+AAD8         C01A
+AAD9         C01B
+AADA         C01C
+AADB         C01D
+AADC         C01E
+AADD         C01F
+AAE1         C020
+AAE2         C021
+AAE3         C022
+AAE4         C023
+AAE5         C024
+AAE6         C025
+AAE7         C026
+AAE8         C027
+AAE9         C028
+AAEA         C029
+AAEB         C02A
+AAEC         C02B
+AAED         C02C
+AAEE         C02D
+AAEF         C02E
+AAF0         C02F
+AAF1         C030
+AAF3         C031
+AAF4         C032
+AAF5         C033
+AAF6         C034
+AAF7         C035
+AAF8         C036
+AAF9         C037
+AAFA         C038
+AAFB         C039
+AAFC         C03A
+AAFD         C03B
+AB41         C03C
+AB42         C03D
+AB43         C03E
+AB44         C03F
+AB45         C040
+AB46         C041
+AB47         C042
+AB48         C043
+AB49         C044
+AB4A         C045
+AB4B         C046
+AB4C         C047
+AB4D         C048
+AB4E         C049
+AB4F         C04A
+AB50         C04B
+AB51         C04C
+AB53         C04D
+AB54         C04E
+AB55         C04F
+AB56         C050
+AB57         C051
+AB58         C052
+AB59         C053
+AB5A         C054
+AB5B         C055
+AB5C         C056
+AB5D         C057
+AB61         C058
+AB62         C059
+AB63         C05A
+AB64         C05B
+AB65         C05C
+AB66         C05D
+AB67         C05E
+AB68         C05F
+AB69         C060
+AB6A         C061
+AB6B         C062
+AB6C         C063
+AB6D         C064
+AB6E         C065
+AB6F         C066
+AB70         C067
+AB71         C068
+AB73         C069
+AB74         C06A
+AB75         C06B
+AB76         C06C
+AB77         C06D
+AB78         C06E
+AB79         C06F
+AB7A         C070
+AB7B         C071
+AB7C         C072
+AB7D         C073
+AB81         C074
+AB82         C075
+AB83         C076
+AB84         C077
+AB85         C078
+AB86         C079
+AB87         C07A
+AB88         C07B
+AB89         C07C
+AB8A         C07D
+AB8B         C07E
+AB8C         C07F
+AB8D         C080
+AB8E         C081
+AB8F         C082
+AB90         C083
+AB91         C084
+AB93         C085
+AB94         C086
+AB95         C087
+AB96         C088
+AB97         C089
+AB98         C08A
+AB99         C08B
+AB9A         C08C
+AB9B         C08D
+AB9C         C08E
+AB9D         C08F
+ABA1         C090
+ABA2         C091
+ABA3         C092
+ABA4         C093
+ABA5         C094
+ABA6         C095
+ABA7         C096
+ABA8         C097
+ABA9         C098
+ABAA         C099
+ABAB         C09A
+ABAC         C09B
+ABAD         C09C
+ABAE         C09D
+ABAF         C09E
+ABB0         C09F
+ABB1         C0A0
+ABB3         C0A1
+ABB4         C0A2
+ABB5         C0A3
+ABB6         C0A4
+ABB7         C0A5
+ABB8         C0A6
+ABB9         C0A7
+ABBA         C0A8
+ABBB         C0A9
+ABBC         C0AA
+ABBD         C0AB
+AC41         3145
+AC61         C0AC
+AC62         C0AD
+AC63         C0AE
+AC64         C0AF
+AC65         C0B0
+AC66         C0B1
+AC67         C0B2
+AC68         C0B3
+AC69         C0B4
+AC6A         C0B5
+AC6B         C0B6
+AC6C         C0B7
+AC6D         C0B8
+AC6E         C0B9
+AC6F         C0BA
+AC70         C0BB
+AC71         C0BC
+AC73         C0BD
+AC74         C0BE
+AC75         C0BF
+AC76         C0C0
+AC77         C0C1
+AC78         C0C2
+AC79         C0C3
+AC7A         C0C4
+AC7B         C0C5
+AC7C         C0C6
+AC7D         C0C7
+AC81         C0C8
+AC82         C0C9
+AC83         C0CA
+AC84         C0CB
+AC85         C0CC
+AC86         C0CD
+AC87         C0CE
+AC88         C0CF
+AC89         C0D0
+AC8A         C0D1
+AC8B         C0D2
+AC8C         C0D3
+AC8D         C0D4
+AC8E         C0D5
+AC8F         C0D6
+AC90         C0D7
+AC91         C0D8
+AC93         C0D9
+AC94         C0DA
+AC95         C0DB
+AC96         C0DC
+AC97         C0DD
+AC98         C0DE
+AC99         C0DF
+AC9A         C0E0
+AC9B         C0E1
+AC9C         C0E2
+AC9D         C0E3
+ACA1         C0E4
+ACA2         C0E5
+ACA3         C0E6
+ACA4         C0E7
+ACA5         C0E8
+ACA6         C0E9
+ACA7         C0EA
+ACA8         C0EB
+ACA9         C0EC
+ACAA         C0ED
+ACAB         C0EE
+ACAC         C0EF
+ACAD         C0F0
+ACAE         C0F1
+ACAF         C0F2
+ACB0         C0F3
+ACB1         C0F4
+ACB3         C0F5
+ACB4         C0F6
+ACB5         C0F7
+ACB6         C0F8
+ACB7         C0F9
+ACB8         C0FA
+ACB9         C0FB
+ACBA         C0FC
+ACBB         C0FD
+ACBC         C0FE
+ACBD         C0FF
+ACC1         C100
+ACC2         C101
+ACC3         C102
+ACC4         C103
+ACC5         C104
+ACC6         C105
+ACC7         C106
+ACC8         C107
+ACC9         C108
+ACCA         C109
+ACCB         C10A
+ACCC         C10B
+ACCD         C10C
+ACCE         C10D
+ACCF         C10E
+ACD0         C10F
+ACD1         C110
+ACD3         C111
+ACD4         C112
+ACD5         C113
+ACD6         C114
+ACD7         C115
+ACD8         C116
+ACD9         C117
+ACDA         C118
+ACDB         C119
+ACDC         C11A
+ACDD         C11B
+ACE1         C11C
+ACE2         C11D
+ACE3         C11E
+ACE4         C11F
+ACE5         C120
+ACE6         C121
+ACE7         C122
+ACE8         C123
+ACE9         C124
+ACEA         C125
+ACEB         C126
+ACEC         C127
+ACED         C128
+ACEE         C129
+ACEF         C12A
+ACF0         C12B
+ACF1         C12C
+ACF3         C12D
+ACF4         C12E
+ACF5         C12F
+ACF6         C130
+ACF7         C131
+ACF8         C132
+ACF9         C133
+ACFA         C134
+ACFB         C135
+ACFC         C136
+ACFD         C137
+AD41         C138
+AD42         C139
+AD43         C13A
+AD44         C13B
+AD45         C13C
+AD46         C13D
+AD47         C13E
+AD48         C13F
+AD49         C140
+AD4A         C141
+AD4B         C142
+AD4C         C143
+AD4D         C144
+AD4E         C145
+AD4F         C146
+AD50         C147
+AD51         C148
+AD53         C149
+AD54         C14A
+AD55         C14B
+AD56         C14C
+AD57         C14D
+AD58         C14E
+AD59         C14F
+AD5A         C150
+AD5B         C151
+AD5C         C152
+AD5D         C153
+AD61         C154
+AD62         C155
+AD63         C156
+AD64         C157
+AD65         C158
+AD66         C159
+AD67         C15A
+AD68         C15B
+AD69         C15C
+AD6A         C15D
+AD6B         C15E
+AD6C         C15F
+AD6D         C160
+AD6E         C161
+AD6F         C162
+AD70         C163
+AD71         C164
+AD73         C165
+AD74         C166
+AD75         C167
+AD76         C168
+AD77         C169
+AD78         C16A
+AD79         C16B
+AD7A         C16C
+AD7B         C16D
+AD7C         C16E
+AD7D         C16F
+AD81         C170
+AD82         C171
+AD83         C172
+AD84         C173
+AD85         C174
+AD86         C175
+AD87         C176
+AD88         C177
+AD89         C178
+AD8A         C179
+AD8B         C17A
+AD8C         C17B
+AD8D         C17C
+AD8E         C17D
+AD8F         C17E
+AD90         C17F
+AD91         C180
+AD93         C181
+AD94         C182
+AD95         C183
+AD96         C184
+AD97         C185
+AD98         C186
+AD99         C187
+AD9A         C188
+AD9B         C189
+AD9C         C18A
+AD9D         C18B
+ADA1         C18C
+ADA2         C18D
+ADA3         C18E
+ADA4         C18F
+ADA5         C190
+ADA6         C191
+ADA7         C192
+ADA8         C193
+ADA9         C194
+ADAA         C195
+ADAB         C196
+ADAC         C197
+ADAD         C198
+ADAE         C199
+ADAF         C19A
+ADB0         C19B
+ADB1         C19C
+ADB3         C19D
+ADB4         C19E
+ADB5         C19F
+ADB6         C1A0
+ADB7         C1A1
+ADB8         C1A2
+ADB9         C1A3
+ADBA         C1A4
+ADBB         C1A5
+ADBC         C1A6
+ADBD         C1A7
+ADC1         C1A8
+ADC2         C1A9
+ADC3         C1AA
+ADC4         C1AB
+ADC5         C1AC
+ADC6         C1AD
+ADC7         C1AE
+ADC8         C1AF
+ADC9         C1B0
+ADCA         C1B1
+ADCB         C1B2
+ADCC         C1B3
+ADCD         C1B4
+ADCE         C1B5
+ADCF         C1B6
+ADD0         C1B7
+ADD1         C1B8
+ADD3         C1B9
+ADD4         C1BA
+ADD5         C1BB
+ADD6         C1BC
+ADD7         C1BD
+ADD8         C1BE
+ADD9         C1BF
+ADDA         C1C0
+ADDB         C1C1
+ADDC         C1C2
+ADDD         C1C3
+ADE1         C1C4
+ADE2         C1C5
+ADE3         C1C6
+ADE4         C1C7
+ADE5         C1C8
+ADE6         C1C9
+ADE7         C1CA
+ADE8         C1CB
+ADE9         C1CC
+ADEA         C1CD
+ADEB         C1CE
+ADEC         C1CF
+ADED         C1D0
+ADEE         C1D1
+ADEF         C1D2
+ADF0         C1D3
+ADF1         C1D4
+ADF3         C1D5
+ADF4         C1D6
+ADF5         C1D7
+ADF6         C1D8
+ADF7         C1D9
+ADF8         C1DA
+ADF9         C1DB
+ADFA         C1DC
+ADFB         C1DD
+ADFC         C1DE
+ADFD         C1DF
+AE41         C1E0
+AE42         C1E1
+AE43         C1E2
+AE44         C1E3
+AE45         C1E4
+AE46         C1E5
+AE47         C1E6
+AE48         C1E7
+AE49         C1E8
+AE4A         C1E9
+AE4B         C1EA
+AE4C         C1EB
+AE4D         C1EC
+AE4E         C1ED
+AE4F         C1EE
+AE50         C1EF
+AE51         C1F0
+AE53         C1F1
+AE54         C1F2
+AE55         C1F3
+AE56         C1F4
+AE57         C1F5
+AE58         C1F6
+AE59         C1F7
+AE5A         C1F8
+AE5B         C1F9
+AE5C         C1FA
+AE5D         C1FB
+AE61         C1FC
+AE62         C1FD
+AE63         C1FE
+AE64         C1FF
+AE65         C200
+AE66         C201
+AE67         C202
+AE68         C203
+AE69         C204
+AE6A         C205
+AE6B         C206
+AE6C         C207
+AE6D         C208
+AE6E         C209
+AE6F         C20A
+AE70         C20B
+AE71         C20C
+AE73         C20D
+AE74         C20E
+AE75         C20F
+AE76         C210
+AE77         C211
+AE78         C212
+AE79         C213
+AE7A         C214
+AE7B         C215
+AE7C         C216
+AE7D         C217
+AE81         C218
+AE82         C219
+AE83         C21A
+AE84         C21B
+AE85         C21C
+AE86         C21D
+AE87         C21E
+AE88         C21F
+AE89         C220
+AE8A         C221
+AE8B         C222
+AE8C         C223
+AE8D         C224
+AE8E         C225
+AE8F         C226
+AE90         C227
+AE91         C228
+AE93         C229
+AE94         C22A
+AE95         C22B
+AE96         C22C
+AE97         C22D
+AE98         C22E
+AE99         C22F
+AE9A         C230
+AE9B         C231
+AE9C         C232
+AE9D         C233
+AEA1         C234
+AEA2         C235
+AEA3         C236
+AEA4         C237
+AEA5         C238
+AEA6         C239
+AEA7         C23A
+AEA8         C23B
+AEA9         C23C
+AEAA         C23D
+AEAB         C23E
+AEAC         C23F
+AEAD         C240
+AEAE         C241
+AEAF         C242
+AEB0         C243
+AEB1         C244
+AEB3         C245
+AEB4         C246
+AEB5         C247
+AEB6         C248
+AEB7         C249
+AEB8         C24A
+AEB9         C24B
+AEBA         C24C
+AEBB         C24D
+AEBC         C24E
+AEBD         C24F
+AEC1         C250
+AEC2         C251
+AEC3         C252
+AEC4         C253
+AEC5         C254
+AEC6         C255
+AEC7         C256
+AEC8         C257
+AEC9         C258
+AECA         C259
+AECB         C25A
+AECC         C25B
+AECD         C25C
+AECE         C25D
+AECF         C25E
+AED0         C25F
+AED1         C260
+AED3         C261
+AED4         C262
+AED5         C263
+AED6         C264
+AED7         C265
+AED8         C266
+AED9         C267
+AEDA         C268
+AEDB         C269
+AEDC         C26A
+AEDD         C26B
+AEE1         C26C
+AEE2         C26D
+AEE3         C26E
+AEE4         C26F
+AEE5         C270
+AEE6         C271
+AEE7         C272
+AEE8         C273
+AEE9         C274
+AEEA         C275
+AEEB         C276
+AEEC         C277
+AEED         C278
+AEEE         C279
+AEEF         C27A
+AEF0         C27B
+AEF1         C27C
+AEF3         C27D
+AEF4         C27E
+AEF5         C27F
+AEF6         C280
+AEF7         C281
+AEF8         C282
+AEF9         C283
+AEFA         C284
+AEFB         C285
+AEFC         C286
+AEFD         C287
+AF41         C288
+AF42         C289
+AF43         C28A
+AF44         C28B
+AF45         C28C
+AF46         C28D
+AF47         C28E
+AF48         C28F
+AF49         C290
+AF4A         C291
+AF4B         C292
+AF4C         C293
+AF4D         C294
+AF4E         C295
+AF4F         C296
+AF50         C297
+AF51         C298
+AF53         C299
+AF54         C29A
+AF55         C29B
+AF56         C29C
+AF57         C29D
+AF58         C29E
+AF59         C29F
+AF5A         C2A0
+AF5B         C2A1
+AF5C         C2A2
+AF5D         C2A3
+AF61         C2A4
+AF62         C2A5
+AF63         C2A6
+AF64         C2A7
+AF65         C2A8
+AF66         C2A9
+AF67         C2AA
+AF68         C2AB
+AF69         C2AC
+AF6A         C2AD
+AF6B         C2AE
+AF6C         C2AF
+AF6D         C2B0
+AF6E         C2B1
+AF6F         C2B2
+AF70         C2B3
+AF71         C2B4
+AF73         C2B5
+AF74         C2B6
+AF75         C2B7
+AF76         C2B8
+AF77         C2B9
+AF78         C2BA
+AF79         C2BB
+AF7A         C2BC
+AF7B         C2BD
+AF7C         C2BE
+AF7D         C2BF
+AF81         C2C0
+AF82         C2C1
+AF83         C2C2
+AF84         C2C3
+AF85         C2C4
+AF86         C2C5
+AF87         C2C6
+AF88         C2C7
+AF89         C2C8
+AF8A         C2C9
+AF8B         C2CA
+AF8C         C2CB
+AF8D         C2CC
+AF8E         C2CD
+AF8F         C2CE
+AF90         C2CF
+AF91         C2D0
+AF93         C2D1
+AF94         C2D2
+AF95         C2D3
+AF96         C2D4
+AF97         C2D5
+AF98         C2D6
+AF99         C2D7
+AF9A         C2D8
+AF9B         C2D9
+AF9C         C2DA
+AF9D         C2DB
+AFA1         C2DC
+AFA2         C2DD
+AFA3         C2DE
+AFA4         C2DF
+AFA5         C2E0
+AFA6         C2E1
+AFA7         C2E2
+AFA8         C2E3
+AFA9         C2E4
+AFAA         C2E5
+AFAB         C2E6
+AFAC         C2E7
+AFAD         C2E8
+AFAE         C2E9
+AFAF         C2EA
+AFB0         C2EB
+AFB1         C2EC
+AFB3         C2ED
+AFB4         C2EE
+AFB5         C2EF
+AFB6         C2F0
+AFB7         C2F1
+AFB8         C2F2
+AFB9         C2F3
+AFBA         C2F4
+AFBB         C2F5
+AFBC         C2F6
+AFBD         C2F7
+B041         3146
+B061         C2F8
+B062         C2F9
+B063         C2FA
+B064         C2FB
+B065         C2FC
+B066         C2FD
+B067         C2FE
+B068         C2FF
+B069         C300
+B06A         C301
+B06B         C302
+B06C         C303
+B06D         C304
+B06E         C305
+B06F         C306
+B070         C307
+B071         C308
+B073         C309
+B074         C30A
+B075         C30B
+B076         C30C
+B077         C30D
+B078         C30E
+B079         C30F
+B07A         C310
+B07B         C311
+B07C         C312
+B07D         C313
+B081         C314
+B082         C315
+B083         C316
+B084         C317
+B085         C318
+B086         C319
+B087         C31A
+B088         C31B
+B089         C31C
+B08A         C31D
+B08B         C31E
+B08C         C31F
+B08D         C320
+B08E         C321
+B08F         C322
+B090         C323
+B091         C324
+B093         C325
+B094         C326
+B095         C327
+B096         C328
+B097         C329
+B098         C32A
+B099         C32B
+B09A         C32C
+B09B         C32D
+B09C         C32E
+B09D         C32F
+B0A1         C330
+B0A2         C331
+B0A3         C332
+B0A4         C333
+B0A5         C334
+B0A6         C335
+B0A7         C336
+B0A8         C337
+B0A9         C338
+B0AA         C339
+B0AB         C33A
+B0AC         C33B
+B0AD         C33C
+B0AE         C33D
+B0AF         C33E
+B0B0         C33F
+B0B1         C340
+B0B3         C341
+B0B4         C342
+B0B5         C343
+B0B6         C344
+B0B7         C345
+B0B8         C346
+B0B9         C347
+B0BA         C348
+B0BB         C349
+B0BC         C34A
+B0BD         C34B
+B0C1         C34C
+B0C2         C34D
+B0C3         C34E
+B0C4         C34F
+B0C5         C350
+B0C6         C351
+B0C7         C352
+B0C8         C353
+B0C9         C354
+B0CA         C355
+B0CB         C356
+B0CC         C357
+B0CD         C358
+B0CE         C359
+B0CF         C35A
+B0D0         C35B
+B0D1         C35C
+B0D3         C35D
+B0D4         C35E
+B0D5         C35F
+B0D6         C360
+B0D7         C361
+B0D8         C362
+B0D9         C363
+B0DA         C364
+B0DB         C365
+B0DC         C366
+B0DD         C367
+B0E1         C368
+B0E2         C369
+B0E3         C36A
+B0E4         C36B
+B0E5         C36C
+B0E6         C36D
+B0E7         C36E
+B0E8         C36F
+B0E9         C370
+B0EA         C371
+B0EB         C372
+B0EC         C373
+B0ED         C374
+B0EE         C375
+B0EF         C376
+B0F0         C377
+B0F1         C378
+B0F3         C379
+B0F4         C37A
+B0F5         C37B
+B0F6         C37C
+B0F7         C37D
+B0F8         C37E
+B0F9         C37F
+B0FA         C380
+B0FB         C381
+B0FC         C382
+B0FD         C383
+B141         C384
+B142         C385
+B143         C386
+B144         C387
+B145         C388
+B146         C389
+B147         C38A
+B148         C38B
+B149         C38C
+B14A         C38D
+B14B         C38E
+B14C         C38F
+B14D         C390
+B14E         C391
+B14F         C392
+B150         C393
+B151         C394
+B153         C395
+B154         C396
+B155         C397
+B156         C398
+B157         C399
+B158         C39A
+B159         C39B
+B15A         C39C
+B15B         C39D
+B15C         C39E
+B15D         C39F
+B161         C3A0
+B162         C3A1
+B163         C3A2
+B164         C3A3
+B165         C3A4
+B166         C3A5
+B167         C3A6
+B168         C3A7
+B169         C3A8
+B16A         C3A9
+B16B         C3AA
+B16C         C3AB
+B16D         C3AC
+B16E         C3AD
+B16F         C3AE
+B170         C3AF
+B171         C3B0
+B173         C3B1
+B174         C3B2
+B175         C3B3
+B176         C3B4
+B177         C3B5
+B178         C3B6
+B179         C3B7
+B17A         C3B8
+B17B         C3B9
+B17C         C3BA
+B17D         C3BB
+B181         C3BC
+B182         C3BD
+B183         C3BE
+B184         C3BF
+B185         C3C0
+B186         C3C1
+B187         C3C2
+B188         C3C3
+B189         C3C4
+B18A         C3C5
+B18B         C3C6
+B18C         C3C7
+B18D         C3C8
+B18E         C3C9
+B18F         C3CA
+B190         C3CB
+B191         C3CC
+B193         C3CD
+B194         C3CE
+B195         C3CF
+B196         C3D0
+B197         C3D1
+B198         C3D2
+B199         C3D3
+B19A         C3D4
+B19B         C3D5
+B19C         C3D6
+B19D         C3D7
+B1A1         C3D8
+B1A2         C3D9
+B1A3         C3DA
+B1A4         C3DB
+B1A5         C3DC
+B1A6         C3DD
+B1A7         C3DE
+B1A8         C3DF
+B1A9         C3E0
+B1AA         C3E1
+B1AB         C3E2
+B1AC         C3E3
+B1AD         C3E4
+B1AE         C3E5
+B1AF         C3E6
+B1B0         C3E7
+B1B1         C3E8
+B1B3         C3E9
+B1B4         C3EA
+B1B5         C3EB
+B1B6         C3EC
+B1B7         C3ED
+B1B8         C3EE
+B1B9         C3EF
+B1BA         C3F0
+B1BB         C3F1
+B1BC         C3F2
+B1BD         C3F3
+B1C1         C3F4
+B1C2         C3F5
+B1C3         C3F6
+B1C4         C3F7
+B1C5         C3F8
+B1C6         C3F9
+B1C7         C3FA
+B1C8         C3FB
+B1C9         C3FC
+B1CA         C3FD
+B1CB         C3FE
+B1CC         C3FF
+B1CD         C400
+B1CE         C401
+B1CF         C402
+B1D0         C403
+B1D1         C404
+B1D3         C405
+B1D4         C406
+B1D5         C407
+B1D6         C408
+B1D7         C409
+B1D8         C40A
+B1D9         C40B
+B1DA         C40C
+B1DB         C40D
+B1DC         C40E
+B1DD         C40F
+B1E1         C410
+B1E2         C411
+B1E3         C412
+B1E4         C413
+B1E5         C414
+B1E6         C415
+B1E7         C416
+B1E8         C417
+B1E9         C418
+B1EA         C419
+B1EB         C41A
+B1EC         C41B
+B1ED         C41C
+B1EE         C41D
+B1EF         C41E
+B1F0         C41F
+B1F1         C420
+B1F3         C421
+B1F4         C422
+B1F5         C423
+B1F6         C424
+B1F7         C425
+B1F8         C426
+B1F9         C427
+B1FA         C428
+B1FB         C429
+B1FC         C42A
+B1FD         C42B
+B241         C42C
+B242         C42D
+B243         C42E
+B244         C42F
+B245         C430
+B246         C431
+B247         C432
+B248         C433
+B249         C434
+B24A         C435
+B24B         C436
+B24C         C437
+B24D         C438
+B24E         C439
+B24F         C43A
+B250         C43B
+B251         C43C
+B253         C43D
+B254         C43E
+B255         C43F
+B256         C440
+B257         C441
+B258         C442
+B259         C443
+B25A         C444
+B25B         C445
+B25C         C446
+B25D         C447
+B261         C448
+B262         C449
+B263         C44A
+B264         C44B
+B265         C44C
+B266         C44D
+B267         C44E
+B268         C44F
+B269         C450
+B26A         C451
+B26B         C452
+B26C         C453
+B26D         C454
+B26E         C455
+B26F         C456
+B270         C457
+B271         C458
+B273         C459
+B274         C45A
+B275         C45B
+B276         C45C
+B277         C45D
+B278         C45E
+B279         C45F
+B27A         C460
+B27B         C461
+B27C         C462
+B27D         C463
+B281         C464
+B282         C465
+B283         C466
+B284         C467
+B285         C468
+B286         C469
+B287         C46A
+B288         C46B
+B289         C46C
+B28A         C46D
+B28B         C46E
+B28C         C46F
+B28D         C470
+B28E         C471
+B28F         C472
+B290         C473
+B291         C474
+B293         C475
+B294         C476
+B295         C477
+B296         C478
+B297         C479
+B298         C47A
+B299         C47B
+B29A         C47C
+B29B         C47D
+B29C         C47E
+B29D         C47F
+B2A1         C480
+B2A2         C481
+B2A3         C482
+B2A4         C483
+B2A5         C484
+B2A6         C485
+B2A7         C486
+B2A8         C487
+B2A9         C488
+B2AA         C489
+B2AB         C48A
+B2AC         C48B
+B2AD         C48C
+B2AE         C48D
+B2AF         C48E
+B2B0         C48F
+B2B1         C490
+B2B3         C491
+B2B4         C492
+B2B5         C493
+B2B6         C494
+B2B7         C495
+B2B8         C496
+B2B9         C497
+B2BA         C498
+B2BB         C499
+B2BC         C49A
+B2BD         C49B
+B2C1         C49C
+B2C2         C49D
+B2C3         C49E
+B2C4         C49F
+B2C5         C4A0
+B2C6         C4A1
+B2C7         C4A2
+B2C8         C4A3
+B2C9         C4A4
+B2CA         C4A5
+B2CB         C4A6
+B2CC         C4A7
+B2CD         C4A8
+B2CE         C4A9
+B2CF         C4AA
+B2D0         C4AB
+B2D1         C4AC
+B2D3         C4AD
+B2D4         C4AE
+B2D5         C4AF
+B2D6         C4B0
+B2D7         C4B1
+B2D8         C4B2
+B2D9         C4B3
+B2DA         C4B4
+B2DB         C4B5
+B2DC         C4B6
+B2DD         C4B7
+B2E1         C4B8
+B2E2         C4B9
+B2E3         C4BA
+B2E4         C4BB
+B2E5         C4BC
+B2E6         C4BD
+B2E7         C4BE
+B2E8         C4BF
+B2E9         C4C0
+B2EA         C4C1
+B2EB         C4C2
+B2EC         C4C3
+B2ED         C4C4
+B2EE         C4C5
+B2EF         C4C6
+B2F0         C4C7
+B2F1         C4C8
+B2F3         C4C9
+B2F4         C4CA
+B2F5         C4CB
+B2F6         C4CC
+B2F7         C4CD
+B2F8         C4CE
+B2F9         C4CF
+B2FA         C4D0
+B2FB         C4D1
+B2FC         C4D2
+B2FD         C4D3
+B341         C4D4
+B342         C4D5
+B343         C4D6
+B344         C4D7
+B345         C4D8
+B346         C4D9
+B347         C4DA
+B348         C4DB
+B349         C4DC
+B34A         C4DD
+B34B         C4DE
+B34C         C4DF
+B34D         C4E0
+B34E         C4E1
+B34F         C4E2
+B350         C4E3
+B351         C4E4
+B353         C4E5
+B354         C4E6
+B355         C4E7
+B356         C4E8
+B357         C4E9
+B358         C4EA
+B359         C4EB
+B35A         C4EC
+B35B         C4ED
+B35C         C4EE
+B35D         C4EF
+B361         C4F0
+B362         C4F1
+B363         C4F2
+B364         C4F3
+B365         C4F4
+B366         C4F5
+B367         C4F6
+B368         C4F7
+B369         C4F8
+B36A         C4F9
+B36B         C4FA
+B36C         C4FB
+B36D         C4FC
+B36E         C4FD
+B36F         C4FE
+B370         C4FF
+B371         C500
+B373         C501
+B374         C502
+B375         C503
+B376         C504
+B377         C505
+B378         C506
+B379         C507
+B37A         C508
+B37B         C509
+B37C         C50A
+B37D         C50B
+B381         C50C
+B382         C50D
+B383         C50E
+B384         C50F
+B385         C510
+B386         C511
+B387         C512
+B388         C513
+B389         C514
+B38A         C515
+B38B         C516
+B38C         C517
+B38D         C518
+B38E         C519
+B38F         C51A
+B390         C51B
+B391         C51C
+B393         C51D
+B394         C51E
+B395         C51F
+B396         C520
+B397         C521
+B398         C522
+B399         C523
+B39A         C524
+B39B         C525
+B39C         C526
+B39D         C527
+B3A1         C528
+B3A2         C529
+B3A3         C52A
+B3A4         C52B
+B3A5         C52C
+B3A6         C52D
+B3A7         C52E
+B3A8         C52F
+B3A9         C530
+B3AA         C531
+B3AB         C532
+B3AC         C533
+B3AD         C534
+B3AE         C535
+B3AF         C536
+B3B0         C537
+B3B1         C538
+B3B3         C539
+B3B4         C53A
+B3B5         C53B
+B3B6         C53C
+B3B7         C53D
+B3B8         C53E
+B3B9         C53F
+B3BA         C540
+B3BB         C541
+B3BC         C542
+B3BD         C543
+B441         3147
+B461         C544
+B462         C545
+B463         C546
+B464         C547
+B465         C548
+B466         C549
+B467         C54A
+B468         C54B
+B469         C54C
+B46A         C54D
+B46B         C54E
+B46C         C54F
+B46D         C550
+B46E         C551
+B46F         C552
+B470         C553
+B471         C554
+B473         C555
+B474         C556
+B475         C557
+B476         C558
+B477         C559
+B478         C55A
+B479         C55B
+B47A         C55C
+B47B         C55D
+B47C         C55E
+B47D         C55F
+B481         C560
+B482         C561
+B483         C562
+B484         C563
+B485         C564
+B486         C565
+B487         C566
+B488         C567
+B489         C568
+B48A         C569
+B48B         C56A
+B48C         C56B
+B48D         C56C
+B48E         C56D
+B48F         C56E
+B490         C56F
+B491         C570
+B493         C571
+B494         C572
+B495         C573
+B496         C574
+B497         C575
+B498         C576
+B499         C577
+B49A         C578
+B49B         C579
+B49C         C57A
+B49D         C57B
+B4A1         C57C
+B4A2         C57D
+B4A3         C57E
+B4A4         C57F
+B4A5         C580
+B4A6         C581
+B4A7         C582
+B4A8         C583
+B4A9         C584
+B4AA         C585
+B4AB         C586
+B4AC         C587
+B4AD         C588
+B4AE         C589
+B4AF         C58A
+B4B0         C58B
+B4B1         C58C
+B4B3         C58D
+B4B4         C58E
+B4B5         C58F
+B4B6         C590
+B4B7         C591
+B4B8         C592
+B4B9         C593
+B4BA         C594
+B4BB         C595
+B4BC         C596
+B4BD         C597
+B4C1         C598
+B4C2         C599
+B4C3         C59A
+B4C4         C59B
+B4C5         C59C
+B4C6         C59D
+B4C7         C59E
+B4C8         C59F
+B4C9         C5A0
+B4CA         C5A1
+B4CB         C5A2
+B4CC         C5A3
+B4CD         C5A4
+B4CE         C5A5
+B4CF         C5A6
+B4D0         C5A7
+B4D1         C5A8
+B4D3         C5A9
+B4D4         C5AA
+B4D5         C5AB
+B4D6         C5AC
+B4D7         C5AD
+B4D8         C5AE
+B4D9         C5AF
+B4DA         C5B0
+B4DB         C5B1
+B4DC         C5B2
+B4DD         C5B3
+B4E1         C5B4
+B4E2         C5B5
+B4E3         C5B6
+B4E4         C5B7
+B4E5         C5B8
+B4E6         C5B9
+B4E7         C5BA
+B4E8         C5BB
+B4E9         C5BC
+B4EA         C5BD
+B4EB         C5BE
+B4EC         C5BF
+B4ED         C5C0
+B4EE         C5C1
+B4EF         C5C2
+B4F0         C5C3
+B4F1         C5C4
+B4F3         C5C5
+B4F4         C5C6
+B4F5         C5C7
+B4F6         C5C8
+B4F7         C5C9
+B4F8         C5CA
+B4F9         C5CB
+B4FA         C5CC
+B4FB         C5CD
+B4FC         C5CE
+B4FD         C5CF
+B541         C5D0
+B542         C5D1
+B543         C5D2
+B544         C5D3
+B545         C5D4
+B546         C5D5
+B547         C5D6
+B548         C5D7
+B549         C5D8
+B54A         C5D9
+B54B         C5DA
+B54C         C5DB
+B54D         C5DC
+B54E         C5DD
+B54F         C5DE
+B550         C5DF
+B551         C5E0
+B553         C5E1
+B554         C5E2
+B555         C5E3
+B556         C5E4
+B557         C5E5
+B558         C5E6
+B559         C5E7
+B55A         C5E8
+B55B         C5E9
+B55C         C5EA
+B55D         C5EB
+B561         C5EC
+B562         C5ED
+B563         C5EE
+B564         C5EF
+B565         C5F0
+B566         C5F1
+B567         C5F2
+B568         C5F3
+B569         C5F4
+B56A         C5F5
+B56B         C5F6
+B56C         C5F7
+B56D         C5F8
+B56E         C5F9
+B56F         C5FA
+B570         C5FB
+B571         C5FC
+B573         C5FD
+B574         C5FE
+B575         C5FF
+B576         C600
+B577         C601
+B578         C602
+B579         C603
+B57A         C604
+B57B         C605
+B57C         C606
+B57D         C607
+B581         C608
+B582         C609
+B583         C60A
+B584         C60B
+B585         C60C
+B586         C60D
+B587         C60E
+B588         C60F
+B589         C610
+B58A         C611
+B58B         C612
+B58C         C613
+B58D         C614
+B58E         C615
+B58F         C616
+B590         C617
+B591         C618
+B593         C619
+B594         C61A
+B595         C61B
+B596         C61C
+B597         C61D
+B598         C61E
+B599         C61F
+B59A         C620
+B59B         C621
+B59C         C622
+B59D         C623
+B5A1         C624
+B5A2         C625
+B5A3         C626
+B5A4         C627
+B5A5         C628
+B5A6         C629
+B5A7         C62A
+B5A8         C62B
+B5A9         C62C
+B5AA         C62D
+B5AB         C62E
+B5AC         C62F
+B5AD         C630
+B5AE         C631
+B5AF         C632
+B5B0         C633
+B5B1         C634
+B5B3         C635
+B5B4         C636
+B5B5         C637
+B5B6         C638
+B5B7         C639
+B5B8         C63A
+B5B9         C63B
+B5BA         C63C
+B5BB         C63D
+B5BC         C63E
+B5BD         C63F
+B5C1         C640
+B5C2         C641
+B5C3         C642
+B5C4         C643
+B5C5         C644
+B5C6         C645
+B5C7         C646
+B5C8         C647
+B5C9         C648
+B5CA         C649
+B5CB         C64A
+B5CC         C64B
+B5CD         C64C
+B5CE         C64D
+B5CF         C64E
+B5D0         C64F
+B5D1         C650
+B5D3         C651
+B5D4         C652
+B5D5         C653
+B5D6         C654
+B5D7         C655
+B5D8         C656
+B5D9         C657
+B5DA         C658
+B5DB         C659
+B5DC         C65A
+B5DD         C65B
+B5E1         C65C
+B5E2         C65D
+B5E3         C65E
+B5E4         C65F
+B5E5         C660
+B5E6         C661
+B5E7         C662
+B5E8         C663
+B5E9         C664
+B5EA         C665
+B5EB         C666
+B5EC         C667
+B5ED         C668
+B5EE         C669
+B5EF         C66A
+B5F0         C66B
+B5F1         C66C
+B5F3         C66D
+B5F4         C66E
+B5F5         C66F
+B5F6         C670
+B5F7         C671
+B5F8         C672
+B5F9         C673
+B5FA         C674
+B5FB         C675
+B5FC         C676
+B5FD         C677
+B641         C678
+B642         C679
+B643         C67A
+B644         C67B
+B645         C67C
+B646         C67D
+B647         C67E
+B648         C67F
+B649         C680
+B64A         C681
+B64B         C682
+B64C         C683
+B64D         C684
+B64E         C685
+B64F         C686
+B650         C687
+B651         C688
+B653         C689
+B654         C68A
+B655         C68B
+B656         C68C
+B657         C68D
+B658         C68E
+B659         C68F
+B65A         C690
+B65B         C691
+B65C         C692
+B65D         C693
+B661         C694
+B662         C695
+B663         C696
+B664         C697
+B665         C698
+B666         C699
+B667         C69A
+B668         C69B
+B669         C69C
+B66A         C69D
+B66B         C69E
+B66C         C69F
+B66D         C6A0
+B66E         C6A1
+B66F         C6A2
+B670         C6A3
+B671         C6A4
+B673         C6A5
+B674         C6A6
+B675         C6A7
+B676         C6A8
+B677         C6A9
+B678         C6AA
+B679         C6AB
+B67A         C6AC
+B67B         C6AD
+B67C         C6AE
+B67D         C6AF
+B681         C6B0
+B682         C6B1
+B683         C6B2
+B684         C6B3
+B685         C6B4
+B686         C6B5
+B687         C6B6
+B688         C6B7
+B689         C6B8
+B68A         C6B9
+B68B         C6BA
+B68C         C6BB
+B68D         C6BC
+B68E         C6BD
+B68F         C6BE
+B690         C6BF
+B691         C6C0
+B693         C6C1
+B694         C6C2
+B695         C6C3
+B696         C6C4
+B697         C6C5
+B698         C6C6
+B699         C6C7
+B69A         C6C8
+B69B         C6C9
+B69C         C6CA
+B69D         C6CB
+B6A1         C6CC
+B6A2         C6CD
+B6A3         C6CE
+B6A4         C6CF
+B6A5         C6D0
+B6A6         C6D1
+B6A7         C6D2
+B6A8         C6D3
+B6A9         C6D4
+B6AA         C6D5
+B6AB         C6D6
+B6AC         C6D7
+B6AD         C6D8
+B6AE         C6D9
+B6AF         C6DA
+B6B0         C6DB
+B6B1         C6DC
+B6B3         C6DD
+B6B4         C6DE
+B6B5         C6DF
+B6B6         C6E0
+B6B7         C6E1
+B6B8         C6E2
+B6B9         C6E3
+B6BA         C6E4
+B6BB         C6E5
+B6BC         C6E6
+B6BD         C6E7
+B6C1         C6E8
+B6C2         C6E9
+B6C3         C6EA
+B6C4         C6EB
+B6C5         C6EC
+B6C6         C6ED
+B6C7         C6EE
+B6C8         C6EF
+B6C9         C6F0
+B6CA         C6F1
+B6CB         C6F2
+B6CC         C6F3
+B6CD         C6F4
+B6CE         C6F5
+B6CF         C6F6
+B6D0         C6F7
+B6D1         C6F8
+B6D3         C6F9
+B6D4         C6FA
+B6D5         C6FB
+B6D6         C6FC
+B6D7         C6FD
+B6D8         C6FE
+B6D9         C6FF
+B6DA         C700
+B6DB         C701
+B6DC         C702
+B6DD         C703
+B6E1         C704
+B6E2         C705
+B6E3         C706
+B6E4         C707
+B6E5         C708
+B6E6         C709
+B6E7         C70A
+B6E8         C70B
+B6E9         C70C
+B6EA         C70D
+B6EB         C70E
+B6EC         C70F
+B6ED         C710
+B6EE         C711
+B6EF         C712
+B6F0         C713
+B6F1         C714
+B6F3         C715
+B6F4         C716
+B6F5         C717
+B6F6         C718
+B6F7         C719
+B6F8         C71A
+B6F9         C71B
+B6FA         C71C
+B6FB         C71D
+B6FC         C71E
+B6FD         C71F
+B741         C720
+B742         C721
+B743         C722
+B744         C723
+B745         C724
+B746         C725
+B747         C726
+B748         C727
+B749         C728
+B74A         C729
+B74B         C72A
+B74C         C72B
+B74D         C72C
+B74E         C72D
+B74F         C72E
+B750         C72F
+B751         C730
+B753         C731
+B754         C732
+B755         C733
+B756         C734
+B757         C735
+B758         C736
+B759         C737
+B75A         C738
+B75B         C739
+B75C         C73A
+B75D         C73B
+B761         C73C
+B762         C73D
+B763         C73E
+B764         C73F
+B765         C740
+B766         C741
+B767         C742
+B768         C743
+B769         C744
+B76A         C745
+B76B         C746
+B76C         C747
+B76D         C748
+B76E         C749
+B76F         C74A
+B770         C74B
+B771         C74C
+B773         C74D
+B774         C74E
+B775         C74F
+B776         C750
+B777         C751
+B778         C752
+B779         C753
+B77A         C754
+B77B         C755
+B77C         C756
+B77D         C757
+B781         C758
+B782         C759
+B783         C75A
+B784         C75B
+B785         C75C
+B786         C75D
+B787         C75E
+B788         C75F
+B789         C760
+B78A         C761
+B78B         C762
+B78C         C763
+B78D         C764
+B78E         C765
+B78F         C766
+B790         C767
+B791         C768
+B793         C769
+B794         C76A
+B795         C76B
+B796         C76C
+B797         C76D
+B798         C76E
+B799         C76F
+B79A         C770
+B79B         C771
+B79C         C772
+B79D         C773
+B7A1         C774
+B7A2         C775
+B7A3         C776
+B7A4         C777
+B7A5         C778
+B7A6         C779
+B7A7         C77A
+B7A8         C77B
+B7A9         C77C
+B7AA         C77D
+B7AB         C77E
+B7AC         C77F
+B7AD         C780
+B7AE         C781
+B7AF         C782
+B7B0         C783
+B7B1         C784
+B7B3         C785
+B7B4         C786
+B7B5         C787
+B7B6         C788
+B7B7         C789
+B7B8         C78A
+B7B9         C78B
+B7BA         C78C
+B7BB         C78D
+B7BC         C78E
+B7BD         C78F
+B841         3148
+B861         C790
+B862         C791
+B863         C792
+B864         C793
+B865         C794
+B866         C795
+B867         C796
+B868         C797
+B869         C798
+B86A         C799
+B86B         C79A
+B86C         C79B
+B86D         C79C
+B86E         C79D
+B86F         C79E
+B870         C79F
+B871         C7A0
+B873         C7A1
+B874         C7A2
+B875         C7A3
+B876         C7A4
+B877         C7A5
+B878         C7A6
+B879         C7A7
+B87A         C7A8
+B87B         C7A9
+B87C         C7AA
+B87D         C7AB
+B881         C7AC
+B882         C7AD
+B883         C7AE
+B884         C7AF
+B885         C7B0
+B886         C7B1
+B887         C7B2
+B888         C7B3
+B889         C7B4
+B88A         C7B5
+B88B         C7B6
+B88C         C7B7
+B88D         C7B8
+B88E         C7B9
+B88F         C7BA
+B890         C7BB
+B891         C7BC
+B893         C7BD
+B894         C7BE
+B895         C7BF
+B896         C7C0
+B897         C7C1
+B898         C7C2
+B899         C7C3
+B89A         C7C4
+B89B         C7C5
+B89C         C7C6
+B89D         C7C7
+B8A1         C7C8
+B8A2         C7C9
+B8A3         C7CA
+B8A4         C7CB
+B8A5         C7CC
+B8A6         C7CD
+B8A7         C7CE
+B8A8         C7CF
+B8A9         C7D0
+B8AA         C7D1
+B8AB         C7D2
+B8AC         C7D3
+B8AD         C7D4
+B8AE         C7D5
+B8AF         C7D6
+B8B0         C7D7
+B8B1         C7D8
+B8B3         C7D9
+B8B4         C7DA
+B8B5         C7DB
+B8B6         C7DC
+B8B7         C7DD
+B8B8         C7DE
+B8B9         C7DF
+B8BA         C7E0
+B8BB         C7E1
+B8BC         C7E2
+B8BD         C7E3
+B8C1         C7E4
+B8C2         C7E5
+B8C3         C7E6
+B8C4         C7E7
+B8C5         C7E8
+B8C6         C7E9
+B8C7         C7EA
+B8C8         C7EB
+B8C9         C7EC
+B8CA         C7ED
+B8CB         C7EE
+B8CC         C7EF
+B8CD         C7F0
+B8CE         C7F1
+B8CF         C7F2
+B8D0         C7F3
+B8D1         C7F4
+B8D3         C7F5
+B8D4         C7F6
+B8D5         C7F7
+B8D6         C7F8
+B8D7         C7F9
+B8D8         C7FA
+B8D9         C7FB
+B8DA         C7FC
+B8DB         C7FD
+B8DC         C7FE
+B8DD         C7FF
+B8E1         C800
+B8E2         C801
+B8E3         C802
+B8E4         C803
+B8E5         C804
+B8E6         C805
+B8E7         C806
+B8E8         C807
+B8E9         C808
+B8EA         C809
+B8EB         C80A
+B8EC         C80B
+B8ED         C80C
+B8EE         C80D
+B8EF         C80E
+B8F0         C80F
+B8F1         C810
+B8F3         C811
+B8F4         C812
+B8F5         C813
+B8F6         C814
+B8F7         C815
+B8F8         C816
+B8F9         C817
+B8FA         C818
+B8FB         C819
+B8FC         C81A
+B8FD         C81B
+B941         C81C
+B942         C81D
+B943         C81E
+B944         C81F
+B945         C820
+B946         C821
+B947         C822
+B948         C823
+B949         C824
+B94A         C825
+B94B         C826
+B94C         C827
+B94D         C828
+B94E         C829
+B94F         C82A
+B950         C82B
+B951         C82C
+B953         C82D
+B954         C82E
+B955         C82F
+B956         C830
+B957         C831
+B958         C832
+B959         C833
+B95A         C834
+B95B         C835
+B95C         C836
+B95D         C837
+B961         C838
+B962         C839
+B963         C83A
+B964         C83B
+B965         C83C
+B966         C83D
+B967         C83E
+B968         C83F
+B969         C840
+B96A         C841
+B96B         C842
+B96C         C843
+B96D         C844
+B96E         C845
+B96F         C846
+B970         C847
+B971         C848
+B973         C849
+B974         C84A
+B975         C84B
+B976         C84C
+B977         C84D
+B978         C84E
+B979         C84F
+B97A         C850
+B97B         C851
+B97C         C852
+B97D         C853
+B981         C854
+B982         C855
+B983         C856
+B984         C857
+B985         C858
+B986         C859
+B987         C85A
+B988         C85B
+B989         C85C
+B98A         C85D
+B98B         C85E
+B98C         C85F
+B98D         C860
+B98E         C861
+B98F         C862
+B990         C863
+B991         C864
+B993         C865
+B994         C866
+B995         C867
+B996         C868
+B997         C869
+B998         C86A
+B999         C86B
+B99A         C86C
+B99B         C86D
+B99C         C86E
+B99D         C86F
+B9A1         C870
+B9A2         C871
+B9A3         C872
+B9A4         C873
+B9A5         C874
+B9A6         C875
+B9A7         C876
+B9A8         C877
+B9A9         C878
+B9AA         C879
+B9AB         C87A
+B9AC         C87B
+B9AD         C87C
+B9AE         C87D
+B9AF         C87E
+B9B0         C87F
+B9B1         C880
+B9B3         C881
+B9B4         C882
+B9B5         C883
+B9B6         C884
+B9B7         C885
+B9B8         C886
+B9B9         C887
+B9BA         C888
+B9BB         C889
+B9BC         C88A
+B9BD         C88B
+B9C1         C88C
+B9C2         C88D
+B9C3         C88E
+B9C4         C88F
+B9C5         C890
+B9C6         C891
+B9C7         C892
+B9C8         C893
+B9C9         C894
+B9CA         C895
+B9CB         C896
+B9CC         C897
+B9CD         C898
+B9CE         C899
+B9CF         C89A
+B9D0         C89B
+B9D1         C89C
+B9D3         C89D
+B9D4         C89E
+B9D5         C89F
+B9D6         C8A0
+B9D7         C8A1
+B9D8         C8A2
+B9D9         C8A3
+B9DA         C8A4
+B9DB         C8A5
+B9DC         C8A6
+B9DD         C8A7
+B9E1         C8A8
+B9E2         C8A9
+B9E3         C8AA
+B9E4         C8AB
+B9E5         C8AC
+B9E6         C8AD
+B9E7         C8AE
+B9E8         C8AF
+B9E9         C8B0
+B9EA         C8B1
+B9EB         C8B2
+B9EC         C8B3
+B9ED         C8B4
+B9EE         C8B5
+B9EF         C8B6
+B9F0         C8B7
+B9F1         C8B8
+B9F3         C8B9
+B9F4         C8BA
+B9F5         C8BB
+B9F6         C8BC
+B9F7         C8BD
+B9F8         C8BE
+B9F9         C8BF
+B9FA         C8C0
+B9FB         C8C1
+B9FC         C8C2
+B9FD         C8C3
+BA41         C8C4
+BA42         C8C5
+BA43         C8C6
+BA44         C8C7
+BA45         C8C8
+BA46         C8C9
+BA47         C8CA
+BA48         C8CB
+BA49         C8CC
+BA4A         C8CD
+BA4B         C8CE
+BA4C         C8CF
+BA4D         C8D0
+BA4E         C8D1
+BA4F         C8D2
+BA50         C8D3
+BA51         C8D4
+BA53         C8D5
+BA54         C8D6
+BA55         C8D7
+BA56         C8D8
+BA57         C8D9
+BA58         C8DA
+BA59         C8DB
+BA5A         C8DC
+BA5B         C8DD
+BA5C         C8DE
+BA5D         C8DF
+BA61         C8E0
+BA62         C8E1
+BA63         C8E2
+BA64         C8E3
+BA65         C8E4
+BA66         C8E5
+BA67         C8E6
+BA68         C8E7
+BA69         C8E8
+BA6A         C8E9
+BA6B         C8EA
+BA6C         C8EB
+BA6D         C8EC
+BA6E         C8ED
+BA6F         C8EE
+BA70         C8EF
+BA71         C8F0
+BA73         C8F1
+BA74         C8F2
+BA75         C8F3
+BA76         C8F4
+BA77         C8F5
+BA78         C8F6
+BA79         C8F7
+BA7A         C8F8
+BA7B         C8F9
+BA7C         C8FA
+BA7D         C8FB
+BA81         C8FC
+BA82         C8FD
+BA83         C8FE
+BA84         C8FF
+BA85         C900
+BA86         C901
+BA87         C902
+BA88         C903
+BA89         C904
+BA8A         C905
+BA8B         C906
+BA8C         C907
+BA8D         C908
+BA8E         C909
+BA8F         C90A
+BA90         C90B
+BA91         C90C
+BA93         C90D
+BA94         C90E
+BA95         C90F
+BA96         C910
+BA97         C911
+BA98         C912
+BA99         C913
+BA9A         C914
+BA9B         C915
+BA9C         C916
+BA9D         C917
+BAA1         C918
+BAA2         C919
+BAA3         C91A
+BAA4         C91B
+BAA5         C91C
+BAA6         C91D
+BAA7         C91E
+BAA8         C91F
+BAA9         C920
+BAAA         C921
+BAAB         C922
+BAAC         C923
+BAAD         C924
+BAAE         C925
+BAAF         C926
+BAB0         C927
+BAB1         C928
+BAB3         C929
+BAB4         C92A
+BAB5         C92B
+BAB6         C92C
+BAB7         C92D
+BAB8         C92E
+BAB9         C92F
+BABA         C930
+BABB         C931
+BABC         C932
+BABD         C933
+BAC1         C934
+BAC2         C935
+BAC3         C936
+BAC4         C937
+BAC5         C938
+BAC6         C939
+BAC7         C93A
+BAC8         C93B
+BAC9         C93C
+BACA         C93D
+BACB         C93E
+BACC         C93F
+BACD         C940
+BACE         C941
+BACF         C942
+BAD0         C943
+BAD1         C944
+BAD3         C945
+BAD4         C946
+BAD5         C947
+BAD6         C948
+BAD7         C949
+BAD8         C94A
+BAD9         C94B
+BADA         C94C
+BADB         C94D
+BADC         C94E
+BADD         C94F
+BAE1         C950
+BAE2         C951
+BAE3         C952
+BAE4         C953
+BAE5         C954
+BAE6         C955
+BAE7         C956
+BAE8         C957
+BAE9         C958
+BAEA         C959
+BAEB         C95A
+BAEC         C95B
+BAED         C95C
+BAEE         C95D
+BAEF         C95E
+BAF0         C95F
+BAF1         C960
+BAF3         C961
+BAF4         C962
+BAF5         C963
+BAF6         C964
+BAF7         C965
+BAF8         C966
+BAF9         C967
+BAFA         C968
+BAFB         C969
+BAFC         C96A
+BAFD         C96B
+BB41         C96C
+BB42         C96D
+BB43         C96E
+BB44         C96F
+BB45         C970
+BB46         C971
+BB47         C972
+BB48         C973
+BB49         C974
+BB4A         C975
+BB4B         C976
+BB4C         C977
+BB4D         C978
+BB4E         C979
+BB4F         C97A
+BB50         C97B
+BB51         C97C
+BB53         C97D
+BB54         C97E
+BB55         C97F
+BB56         C980
+BB57         C981
+BB58         C982
+BB59         C983
+BB5A         C984
+BB5B         C985
+BB5C         C986
+BB5D         C987
+BB61         C988
+BB62         C989
+BB63         C98A
+BB64         C98B
+BB65         C98C
+BB66         C98D
+BB67         C98E
+BB68         C98F
+BB69         C990
+BB6A         C991
+BB6B         C992
+BB6C         C993
+BB6D         C994
+BB6E         C995
+BB6F         C996
+BB70         C997
+BB71         C998
+BB73         C999
+BB74         C99A
+BB75         C99B
+BB76         C99C
+BB77         C99D
+BB78         C99E
+BB79         C99F
+BB7A         C9A0
+BB7B         C9A1
+BB7C         C9A2
+BB7D         C9A3
+BB81         C9A4
+BB82         C9A5
+BB83         C9A6
+BB84         C9A7
+BB85         C9A8
+BB86         C9A9
+BB87         C9AA
+BB88         C9AB
+BB89         C9AC
+BB8A         C9AD
+BB8B         C9AE
+BB8C         C9AF
+BB8D         C9B0
+BB8E         C9B1
+BB8F         C9B2
+BB90         C9B3
+BB91         C9B4
+BB93         C9B5
+BB94         C9B6
+BB95         C9B7
+BB96         C9B8
+BB97         C9B9
+BB98         C9BA
+BB99         C9BB
+BB9A         C9BC
+BB9B         C9BD
+BB9C         C9BE
+BB9D         C9BF
+BBA1         C9C0
+BBA2         C9C1
+BBA3         C9C2
+BBA4         C9C3
+BBA5         C9C4
+BBA6         C9C5
+BBA7         C9C6
+BBA8         C9C7
+BBA9         C9C8
+BBAA         C9C9
+BBAB         C9CA
+BBAC         C9CB
+BBAD         C9CC
+BBAE         C9CD
+BBAF         C9CE
+BBB0         C9CF
+BBB1         C9D0
+BBB3         C9D1
+BBB4         C9D2
+BBB5         C9D3
+BBB6         C9D4
+BBB7         C9D5
+BBB8         C9D6
+BBB9         C9D7
+BBBA         C9D8
+BBBB         C9D9
+BBBC         C9DA
+BBBD         C9DB
+BC41         3149
+BC61         C9DC
+BC62         C9DD
+BC63         C9DE
+BC64         C9DF
+BC65         C9E0
+BC66         C9E1
+BC67         C9E2
+BC68         C9E3
+BC69         C9E4
+BC6A         C9E5
+BC6B         C9E6
+BC6C         C9E7
+BC6D         C9E8
+BC6E         C9E9
+BC6F         C9EA
+BC70         C9EB
+BC71         C9EC
+BC73         C9ED
+BC74         C9EE
+BC75         C9EF
+BC76         C9F0
+BC77         C9F1
+BC78         C9F2
+BC79         C9F3
+BC7A         C9F4
+BC7B         C9F5
+BC7C         C9F6
+BC7D         C9F7
+BC81         C9F8
+BC82         C9F9
+BC83         C9FA
+BC84         C9FB
+BC85         C9FC
+BC86         C9FD
+BC87         C9FE
+BC88         C9FF
+BC89         CA00
+BC8A         CA01
+BC8B         CA02
+BC8C         CA03
+BC8D         CA04
+BC8E         CA05
+BC8F         CA06
+BC90         CA07
+BC91         CA08
+BC93         CA09
+BC94         CA0A
+BC95         CA0B
+BC96         CA0C
+BC97         CA0D
+BC98         CA0E
+BC99         CA0F
+BC9A         CA10
+BC9B         CA11
+BC9C         CA12
+BC9D         CA13
+BCA1         CA14
+BCA2         CA15
+BCA3         CA16
+BCA4         CA17
+BCA5         CA18
+BCA6         CA19
+BCA7         CA1A
+BCA8         CA1B
+BCA9         CA1C
+BCAA         CA1D
+BCAB         CA1E
+BCAC         CA1F
+BCAD         CA20
+BCAE         CA21
+BCAF         CA22
+BCB0         CA23
+BCB1         CA24
+BCB3         CA25
+BCB4         CA26
+BCB5         CA27
+BCB6         CA28
+BCB7         CA29
+BCB8         CA2A
+BCB9         CA2B
+BCBA         CA2C
+BCBB         CA2D
+BCBC         CA2E
+BCBD         CA2F
+BCC1         CA30
+BCC2         CA31
+BCC3         CA32
+BCC4         CA33
+BCC5         CA34
+BCC6         CA35
+BCC7         CA36
+BCC8         CA37
+BCC9         CA38
+BCCA         CA39
+BCCB         CA3A
+BCCC         CA3B
+BCCD         CA3C
+BCCE         CA3D
+BCCF         CA3E
+BCD0         CA3F
+BCD1         CA40
+BCD3         CA41
+BCD4         CA42
+BCD5         CA43
+BCD6         CA44
+BCD7         CA45
+BCD8         CA46
+BCD9         CA47
+BCDA         CA48
+BCDB         CA49
+BCDC         CA4A
+BCDD         CA4B
+BCE1         CA4C
+BCE2         CA4D
+BCE3         CA4E
+BCE4         CA4F
+BCE5         CA50
+BCE6         CA51
+BCE7         CA52
+BCE8         CA53
+BCE9         CA54
+BCEA         CA55
+BCEB         CA56
+BCEC         CA57
+BCED         CA58
+BCEE         CA59
+BCEF         CA5A
+BCF0         CA5B
+BCF1         CA5C
+BCF3         CA5D
+BCF4         CA5E
+BCF5         CA5F
+BCF6         CA60
+BCF7         CA61
+BCF8         CA62
+BCF9         CA63
+BCFA         CA64
+BCFB         CA65
+BCFC         CA66
+BCFD         CA67
+BD41         CA68
+BD42         CA69
+BD43         CA6A
+BD44         CA6B
+BD45         CA6C
+BD46         CA6D
+BD47         CA6E
+BD48         CA6F
+BD49         CA70
+BD4A         CA71
+BD4B         CA72
+BD4C         CA73
+BD4D         CA74
+BD4E         CA75
+BD4F         CA76
+BD50         CA77
+BD51         CA78
+BD53         CA79
+BD54         CA7A
+BD55         CA7B
+BD56         CA7C
+BD57         CA7D
+BD58         CA7E
+BD59         CA7F
+BD5A         CA80
+BD5B         CA81
+BD5C         CA82
+BD5D         CA83
+BD61         CA84
+BD62         CA85
+BD63         CA86
+BD64         CA87
+BD65         CA88
+BD66         CA89
+BD67         CA8A
+BD68         CA8B
+BD69         CA8C
+BD6A         CA8D
+BD6B         CA8E
+BD6C         CA8F
+BD6D         CA90
+BD6E         CA91
+BD6F         CA92
+BD70         CA93
+BD71         CA94
+BD73         CA95
+BD74         CA96
+BD75         CA97
+BD76         CA98
+BD77         CA99
+BD78         CA9A
+BD79         CA9B
+BD7A         CA9C
+BD7B         CA9D
+BD7C         CA9E
+BD7D         CA9F
+BD81         CAA0
+BD82         CAA1
+BD83         CAA2
+BD84         CAA3
+BD85         CAA4
+BD86         CAA5
+BD87         CAA6
+BD88         CAA7
+BD89         CAA8
+BD8A         CAA9
+BD8B         CAAA
+BD8C         CAAB
+BD8D         CAAC
+BD8E         CAAD
+BD8F         CAAE
+BD90         CAAF
+BD91         CAB0
+BD93         CAB1
+BD94         CAB2
+BD95         CAB3
+BD96         CAB4
+BD97         CAB5
+BD98         CAB6
+BD99         CAB7
+BD9A         CAB8
+BD9B         CAB9
+BD9C         CABA
+BD9D         CABB
+BDA1         CABC
+BDA2         CABD
+BDA3         CABE
+BDA4         CABF
+BDA5         CAC0
+BDA6         CAC1
+BDA7         CAC2
+BDA8         CAC3
+BDA9         CAC4
+BDAA         CAC5
+BDAB         CAC6
+BDAC         CAC7
+BDAD         CAC8
+BDAE         CAC9
+BDAF         CACA
+BDB0         CACB
+BDB1         CACC
+BDB3         CACD
+BDB4         CACE
+BDB5         CACF
+BDB6         CAD0
+BDB7         CAD1
+BDB8         CAD2
+BDB9         CAD3
+BDBA         CAD4
+BDBB         CAD5
+BDBC         CAD6
+BDBD         CAD7
+BDC1         CAD8
+BDC2         CAD9
+BDC3         CADA
+BDC4         CADB
+BDC5         CADC
+BDC6         CADD
+BDC7         CADE
+BDC8         CADF
+BDC9         CAE0
+BDCA         CAE1
+BDCB         CAE2
+BDCC         CAE3
+BDCD         CAE4
+BDCE         CAE5
+BDCF         CAE6
+BDD0         CAE7
+BDD1         CAE8
+BDD3         CAE9
+BDD4         CAEA
+BDD5         CAEB
+BDD6         CAEC
+BDD7         CAED
+BDD8         CAEE
+BDD9         CAEF
+BDDA         CAF0
+BDDB         CAF1
+BDDC         CAF2
+BDDD         CAF3
+BDE1         CAF4
+BDE2         CAF5
+BDE3         CAF6
+BDE4         CAF7
+BDE5         CAF8
+BDE6         CAF9
+BDE7         CAFA
+BDE8         CAFB
+BDE9         CAFC
+BDEA         CAFD
+BDEB         CAFE
+BDEC         CAFF
+BDED         CB00
+BDEE         CB01
+BDEF         CB02
+BDF0         CB03
+BDF1         CB04
+BDF3         CB05
+BDF4         CB06
+BDF5         CB07
+BDF6         CB08
+BDF7         CB09
+BDF8         CB0A
+BDF9         CB0B
+BDFA         CB0C
+BDFB         CB0D
+BDFC         CB0E
+BDFD         CB0F
+BE41         CB10
+BE42         CB11
+BE43         CB12
+BE44         CB13
+BE45         CB14
+BE46         CB15
+BE47         CB16
+BE48         CB17
+BE49         CB18
+BE4A         CB19
+BE4B         CB1A
+BE4C         CB1B
+BE4D         CB1C
+BE4E         CB1D
+BE4F         CB1E
+BE50         CB1F
+BE51         CB20
+BE53         CB21
+BE54         CB22
+BE55         CB23
+BE56         CB24
+BE57         CB25
+BE58         CB26
+BE59         CB27
+BE5A         CB28
+BE5B         CB29
+BE5C         CB2A
+BE5D         CB2B
+BE61         CB2C
+BE62         CB2D
+BE63         CB2E
+BE64         CB2F
+BE65         CB30
+BE66         CB31
+BE67         CB32
+BE68         CB33
+BE69         CB34
+BE6A         CB35
+BE6B         CB36
+BE6C         CB37
+BE6D         CB38
+BE6E         CB39
+BE6F         CB3A
+BE70         CB3B
+BE71         CB3C
+BE73         CB3D
+BE74         CB3E
+BE75         CB3F
+BE76         CB40
+BE77         CB41
+BE78         CB42
+BE79         CB43
+BE7A         CB44
+BE7B         CB45
+BE7C         CB46
+BE7D         CB47
+BE81         CB48
+BE82         CB49
+BE83         CB4A
+BE84         CB4B
+BE85         CB4C
+BE86         CB4D
+BE87         CB4E
+BE88         CB4F
+BE89         CB50
+BE8A         CB51
+BE8B         CB52
+BE8C         CB53
+BE8D         CB54
+BE8E         CB55
+BE8F         CB56
+BE90         CB57
+BE91         CB58
+BE93         CB59
+BE94         CB5A
+BE95         CB5B
+BE96         CB5C
+BE97         CB5D
+BE98         CB5E
+BE99         CB5F
+BE9A         CB60
+BE9B         CB61
+BE9C         CB62
+BE9D         CB63
+BEA1         CB64
+BEA2         CB65
+BEA3         CB66
+BEA4         CB67
+BEA5         CB68
+BEA6         CB69
+BEA7         CB6A
+BEA8         CB6B
+BEA9         CB6C
+BEAA         CB6D
+BEAB         CB6E
+BEAC         CB6F
+BEAD         CB70
+BEAE         CB71
+BEAF         CB72
+BEB0         CB73
+BEB1         CB74
+BEB3         CB75
+BEB4         CB76
+BEB5         CB77
+BEB6         CB78
+BEB7         CB79
+BEB8         CB7A
+BEB9         CB7B
+BEBA         CB7C
+BEBB         CB7D
+BEBC         CB7E
+BEBD         CB7F
+BEC1         CB80
+BEC2         CB81
+BEC3         CB82
+BEC4         CB83
+BEC5         CB84
+BEC6         CB85
+BEC7         CB86
+BEC8         CB87
+BEC9         CB88
+BECA         CB89
+BECB         CB8A
+BECC         CB8B
+BECD         CB8C
+BECE         CB8D
+BECF         CB8E
+BED0         CB8F
+BED1         CB90
+BED3         CB91
+BED4         CB92
+BED5         CB93
+BED6         CB94
+BED7         CB95
+BED8         CB96
+BED9         CB97
+BEDA         CB98
+BEDB         CB99
+BEDC         CB9A
+BEDD         CB9B
+BEE1         CB9C
+BEE2         CB9D
+BEE3         CB9E
+BEE4         CB9F
+BEE5         CBA0
+BEE6         CBA1
+BEE7         CBA2
+BEE8         CBA3
+BEE9         CBA4
+BEEA         CBA5
+BEEB         CBA6
+BEEC         CBA7
+BEED         CBA8
+BEEE         CBA9
+BEEF         CBAA
+BEF0         CBAB
+BEF1         CBAC
+BEF3         CBAD
+BEF4         CBAE
+BEF5         CBAF
+BEF6         CBB0
+BEF7         CBB1
+BEF8         CBB2
+BEF9         CBB3
+BEFA         CBB4
+BEFB         CBB5
+BEFC         CBB6
+BEFD         CBB7
+BF41         CBB8
+BF42         CBB9
+BF43         CBBA
+BF44         CBBB
+BF45         CBBC
+BF46         CBBD
+BF47         CBBE
+BF48         CBBF
+BF49         CBC0
+BF4A         CBC1
+BF4B         CBC2
+BF4C         CBC3
+BF4D         CBC4
+BF4E         CBC5
+BF4F         CBC6
+BF50         CBC7
+BF51         CBC8
+BF53         CBC9
+BF54         CBCA
+BF55         CBCB
+BF56         CBCC
+BF57         CBCD
+BF58         CBCE
+BF59         CBCF
+BF5A         CBD0
+BF5B         CBD1
+BF5C         CBD2
+BF5D         CBD3
+BF61         CBD4
+BF62         CBD5
+BF63         CBD6
+BF64         CBD7
+BF65         CBD8
+BF66         CBD9
+BF67         CBDA
+BF68         CBDB
+BF69         CBDC
+BF6A         CBDD
+BF6B         CBDE
+BF6C         CBDF
+BF6D         CBE0
+BF6E         CBE1
+BF6F         CBE2
+BF70         CBE3
+BF71         CBE4
+BF73         CBE5
+BF74         CBE6
+BF75         CBE7
+BF76         CBE8
+BF77         CBE9
+BF78         CBEA
+BF79         CBEB
+BF7A         CBEC
+BF7B         CBED
+BF7C         CBEE
+BF7D         CBEF
+BF81         CBF0
+BF82         CBF1
+BF83         CBF2
+BF84         CBF3
+BF85         CBF4
+BF86         CBF5
+BF87         CBF6
+BF88         CBF7
+BF89         CBF8
+BF8A         CBF9
+BF8B         CBFA
+BF8C         CBFB
+BF8D         CBFC
+BF8E         CBFD
+BF8F         CBFE
+BF90         CBFF
+BF91         CC00
+BF93         CC01
+BF94         CC02
+BF95         CC03
+BF96         CC04
+BF97         CC05
+BF98         CC06
+BF99         CC07
+BF9A         CC08
+BF9B         CC09
+BF9C         CC0A
+BF9D         CC0B
+BFA1         CC0C
+BFA2         CC0D
+BFA3         CC0E
+BFA4         CC0F
+BFA5         CC10
+BFA6         CC11
+BFA7         CC12
+BFA8         CC13
+BFA9         CC14
+BFAA         CC15
+BFAB         CC16
+BFAC         CC17
+BFAD         CC18
+BFAE         CC19
+BFAF         CC1A
+BFB0         CC1B
+BFB1         CC1C
+BFB3         CC1D
+BFB4         CC1E
+BFB5         CC1F
+BFB6         CC20
+BFB7         CC21
+BFB8         CC22
+BFB9         CC23
+BFBA         CC24
+BFBB         CC25
+BFBC         CC26
+BFBD         CC27
+C041         314A
+C061         CC28
+C062         CC29
+C063         CC2A
+C064         CC2B
+C065         CC2C
+C066         CC2D
+C067         CC2E
+C068         CC2F
+C069         CC30
+C06A         CC31
+C06B         CC32
+C06C         CC33
+C06D         CC34
+C06E         CC35
+C06F         CC36
+C070         CC37
+C071         CC38
+C073         CC39
+C074         CC3A
+C075         CC3B
+C076         CC3C
+C077         CC3D
+C078         CC3E
+C079         CC3F
+C07A         CC40
+C07B         CC41
+C07C         CC42
+C07D         CC43
+C081         CC44
+C082         CC45
+C083         CC46
+C084         CC47
+C085         CC48
+C086         CC49
+C087         CC4A
+C088         CC4B
+C089         CC4C
+C08A         CC4D
+C08B         CC4E
+C08C         CC4F
+C08D         CC50
+C08E         CC51
+C08F         CC52
+C090         CC53
+C091         CC54
+C093         CC55
+C094         CC56
+C095         CC57
+C096         CC58
+C097         CC59
+C098         CC5A
+C099         CC5B
+C09A         CC5C
+C09B         CC5D
+C09C         CC5E
+C09D         CC5F
+C0A1         CC60
+C0A2         CC61
+C0A3         CC62
+C0A4         CC63
+C0A5         CC64
+C0A6         CC65
+C0A7         CC66
+C0A8         CC67
+C0A9         CC68
+C0AA         CC69
+C0AB         CC6A
+C0AC         CC6B
+C0AD         CC6C
+C0AE         CC6D
+C0AF         CC6E
+C0B0         CC6F
+C0B1         CC70
+C0B3         CC71
+C0B4         CC72
+C0B5         CC73
+C0B6         CC74
+C0B7         CC75
+C0B8         CC76
+C0B9         CC77
+C0BA         CC78
+C0BB         CC79
+C0BC         CC7A
+C0BD         CC7B
+C0C1         CC7C
+C0C2         CC7D
+C0C3         CC7E
+C0C4         CC7F
+C0C5         CC80
+C0C6         CC81
+C0C7         CC82
+C0C8         CC83
+C0C9         CC84
+C0CA         CC85
+C0CB         CC86
+C0CC         CC87
+C0CD         CC88
+C0CE         CC89
+C0CF         CC8A
+C0D0         CC8B
+C0D1         CC8C
+C0D3         CC8D
+C0D4         CC8E
+C0D5         CC8F
+C0D6         CC90
+C0D7         CC91
+C0D8         CC92
+C0D9         CC93
+C0DA         CC94
+C0DB         CC95
+C0DC         CC96
+C0DD         CC97
+C0E1         CC98
+C0E2         CC99
+C0E3         CC9A
+C0E4         CC9B
+C0E5         CC9C
+C0E6         CC9D
+C0E7         CC9E
+C0E8         CC9F
+C0E9         CCA0
+C0EA         CCA1
+C0EB         CCA2
+C0EC         CCA3
+C0ED         CCA4
+C0EE         CCA5
+C0EF         CCA6
+C0F0         CCA7
+C0F1         CCA8
+C0F3         CCA9
+C0F4         CCAA
+C0F5         CCAB
+C0F6         CCAC
+C0F7         CCAD
+C0F8         CCAE
+C0F9         CCAF
+C0FA         CCB0
+C0FB         CCB1
+C0FC         CCB2
+C0FD         CCB3
+C141         CCB4
+C142         CCB5
+C143         CCB6
+C144         CCB7
+C145         CCB8
+C146         CCB9
+C147         CCBA
+C148         CCBB
+C149         CCBC
+C14A         CCBD
+C14B         CCBE
+C14C         CCBF
+C14D         CCC0
+C14E         CCC1
+C14F         CCC2
+C150         CCC3
+C151         CCC4
+C153         CCC5
+C154         CCC6
+C155         CCC7
+C156         CCC8
+C157         CCC9
+C158         CCCA
+C159         CCCB
+C15A         CCCC
+C15B         CCCD
+C15C         CCCE
+C15D         CCCF
+C161         CCD0
+C162         CCD1
+C163         CCD2
+C164         CCD3
+C165         CCD4
+C166         CCD5
+C167         CCD6
+C168         CCD7
+C169         CCD8
+C16A         CCD9
+C16B         CCDA
+C16C         CCDB
+C16D         CCDC
+C16E         CCDD
+C16F         CCDE
+C170         CCDF
+C171         CCE0
+C173         CCE1
+C174         CCE2
+C175         CCE3
+C176         CCE4
+C177         CCE5
+C178         CCE6
+C179         CCE7
+C17A         CCE8
+C17B         CCE9
+C17C         CCEA
+C17D         CCEB
+C181         CCEC
+C182         CCED
+C183         CCEE
+C184         CCEF
+C185         CCF0
+C186         CCF1
+C187         CCF2
+C188         CCF3
+C189         CCF4
+C18A         CCF5
+C18B         CCF6
+C18C         CCF7
+C18D         CCF8
+C18E         CCF9
+C18F         CCFA
+C190         CCFB
+C191         CCFC
+C193         CCFD
+C194         CCFE
+C195         CCFF
+C196         CD00
+C197         CD01
+C198         CD02
+C199         CD03
+C19A         CD04
+C19B         CD05
+C19C         CD06
+C19D         CD07
+C1A1         CD08
+C1A2         CD09
+C1A3         CD0A
+C1A4         CD0B
+C1A5         CD0C
+C1A6         CD0D
+C1A7         CD0E
+C1A8         CD0F
+C1A9         CD10
+C1AA         CD11
+C1AB         CD12
+C1AC         CD13
+C1AD         CD14
+C1AE         CD15
+C1AF         CD16
+C1B0         CD17
+C1B1         CD18
+C1B3         CD19
+C1B4         CD1A
+C1B5         CD1B
+C1B6         CD1C
+C1B7         CD1D
+C1B8         CD1E
+C1B9         CD1F
+C1BA         CD20
+C1BB         CD21
+C1BC         CD22
+C1BD         CD23
+C1C1         CD24
+C1C2         CD25
+C1C3         CD26
+C1C4         CD27
+C1C5         CD28
+C1C6         CD29
+C1C7         CD2A
+C1C8         CD2B
+C1C9         CD2C
+C1CA         CD2D
+C1CB         CD2E
+C1CC         CD2F
+C1CD         CD30
+C1CE         CD31
+C1CF         CD32
+C1D0         CD33
+C1D1         CD34
+C1D3         CD35
+C1D4         CD36
+C1D5         CD37
+C1D6         CD38
+C1D7         CD39
+C1D8         CD3A
+C1D9         CD3B
+C1DA         CD3C
+C1DB         CD3D
+C1DC         CD3E
+C1DD         CD3F
+C1E1         CD40
+C1E2         CD41
+C1E3         CD42
+C1E4         CD43
+C1E5         CD44
+C1E6         CD45
+C1E7         CD46
+C1E8         CD47
+C1E9         CD48
+C1EA         CD49
+C1EB         CD4A
+C1EC         CD4B
+C1ED         CD4C
+C1EE         CD4D
+C1EF         CD4E
+C1F0         CD4F
+C1F1         CD50
+C1F3         CD51
+C1F4         CD52
+C1F5         CD53
+C1F6         CD54
+C1F7         CD55
+C1F8         CD56
+C1F9         CD57
+C1FA         CD58
+C1FB         CD59
+C1FC         CD5A
+C1FD         CD5B
+C241         CD5C
+C242         CD5D
+C243         CD5E
+C244         CD5F
+C245         CD60
+C246         CD61
+C247         CD62
+C248         CD63
+C249         CD64
+C24A         CD65
+C24B         CD66
+C24C         CD67
+C24D         CD68
+C24E         CD69
+C24F         CD6A
+C250         CD6B
+C251         CD6C
+C253         CD6D
+C254         CD6E
+C255         CD6F
+C256         CD70
+C257         CD71
+C258         CD72
+C259         CD73
+C25A         CD74
+C25B         CD75
+C25C         CD76
+C25D         CD77
+C261         CD78
+C262         CD79
+C263         CD7A
+C264         CD7B
+C265         CD7C
+C266         CD7D
+C267         CD7E
+C268         CD7F
+C269         CD80
+C26A         CD81
+C26B         CD82
+C26C         CD83
+C26D         CD84
+C26E         CD85
+C26F         CD86
+C270         CD87
+C271         CD88
+C273         CD89
+C274         CD8A
+C275         CD8B
+C276         CD8C
+C277         CD8D
+C278         CD8E
+C279         CD8F
+C27A         CD90
+C27B         CD91
+C27C         CD92
+C27D         CD93
+C281         CD94
+C282         CD95
+C283         CD96
+C284         CD97
+C285         CD98
+C286         CD99
+C287         CD9A
+C288         CD9B
+C289         CD9C
+C28A         CD9D
+C28B         CD9E
+C28C         CD9F
+C28D         CDA0
+C28E         CDA1
+C28F         CDA2
+C290         CDA3
+C291         CDA4
+C293         CDA5
+C294         CDA6
+C295         CDA7
+C296         CDA8
+C297         CDA9
+C298         CDAA
+C299         CDAB
+C29A         CDAC
+C29B         CDAD
+C29C         CDAE
+C29D         CDAF
+C2A1         CDB0
+C2A2         CDB1
+C2A3         CDB2
+C2A4         CDB3
+C2A5         CDB4
+C2A6         CDB5
+C2A7         CDB6
+C2A8         CDB7
+C2A9         CDB8
+C2AA         CDB9
+C2AB         CDBA
+C2AC         CDBB
+C2AD         CDBC
+C2AE         CDBD
+C2AF         CDBE
+C2B0         CDBF
+C2B1         CDC0
+C2B3         CDC1
+C2B4         CDC2
+C2B5         CDC3
+C2B6         CDC4
+C2B7         CDC5
+C2B8         CDC6
+C2B9         CDC7
+C2BA         CDC8
+C2BB         CDC9
+C2BC         CDCA
+C2BD         CDCB
+C2C1         CDCC
+C2C2         CDCD
+C2C3         CDCE
+C2C4         CDCF
+C2C5         CDD0
+C2C6         CDD1
+C2C7         CDD2
+C2C8         CDD3
+C2C9         CDD4
+C2CA         CDD5
+C2CB         CDD6
+C2CC         CDD7
+C2CD         CDD8
+C2CE         CDD9
+C2CF         CDDA
+C2D0         CDDB
+C2D1         CDDC
+C2D3         CDDD
+C2D4         CDDE
+C2D5         CDDF
+C2D6         CDE0
+C2D7         CDE1
+C2D8         CDE2
+C2D9         CDE3
+C2DA         CDE4
+C2DB         CDE5
+C2DC         CDE6
+C2DD         CDE7
+C2E1         CDE8
+C2E2         CDE9
+C2E3         CDEA
+C2E4         CDEB
+C2E5         CDEC
+C2E6         CDED
+C2E7         CDEE
+C2E8         CDEF
+C2E9         CDF0
+C2EA         CDF1
+C2EB         CDF2
+C2EC         CDF3
+C2ED         CDF4
+C2EE         CDF5
+C2EF         CDF6
+C2F0         CDF7
+C2F1         CDF8
+C2F3         CDF9
+C2F4         CDFA
+C2F5         CDFB
+C2F6         CDFC
+C2F7         CDFD
+C2F8         CDFE
+C2F9         CDFF
+C2FA         CE00
+C2FB         CE01
+C2FC         CE02
+C2FD         CE03
+C341         CE04
+C342         CE05
+C343         CE06
+C344         CE07
+C345         CE08
+C346         CE09
+C347         CE0A
+C348         CE0B
+C349         CE0C
+C34A         CE0D
+C34B         CE0E
+C34C         CE0F
+C34D         CE10
+C34E         CE11
+C34F         CE12
+C350         CE13
+C351         CE14
+C353         CE15
+C354         CE16
+C355         CE17
+C356         CE18
+C357         CE19
+C358         CE1A
+C359         CE1B
+C35A         CE1C
+C35B         CE1D
+C35C         CE1E
+C35D         CE1F
+C361         CE20
+C362         CE21
+C363         CE22
+C364         CE23
+C365         CE24
+C366         CE25
+C367         CE26
+C368         CE27
+C369         CE28
+C36A         CE29
+C36B         CE2A
+C36C         CE2B
+C36D         CE2C
+C36E         CE2D
+C36F         CE2E
+C370         CE2F
+C371         CE30
+C373         CE31
+C374         CE32
+C375         CE33
+C376         CE34
+C377         CE35
+C378         CE36
+C379         CE37
+C37A         CE38
+C37B         CE39
+C37C         CE3A
+C37D         CE3B
+C381         CE3C
+C382         CE3D
+C383         CE3E
+C384         CE3F
+C385         CE40
+C386         CE41
+C387         CE42
+C388         CE43
+C389         CE44
+C38A         CE45
+C38B         CE46
+C38C         CE47
+C38D         CE48
+C38E         CE49
+C38F         CE4A
+C390         CE4B
+C391         CE4C
+C393         CE4D
+C394         CE4E
+C395         CE4F
+C396         CE50
+C397         CE51
+C398         CE52
+C399         CE53
+C39A         CE54
+C39B         CE55
+C39C         CE56
+C39D         CE57
+C3A1         CE58
+C3A2         CE59
+C3A3         CE5A
+C3A4         CE5B
+C3A5         CE5C
+C3A6         CE5D
+C3A7         CE5E
+C3A8         CE5F
+C3A9         CE60
+C3AA         CE61
+C3AB         CE62
+C3AC         CE63
+C3AD         CE64
+C3AE         CE65
+C3AF         CE66
+C3B0         CE67
+C3B1         CE68
+C3B3         CE69
+C3B4         CE6A
+C3B5         CE6B
+C3B6         CE6C
+C3B7         CE6D
+C3B8         CE6E
+C3B9         CE6F
+C3BA         CE70
+C3BB         CE71
+C3BC         CE72
+C3BD         CE73
+C441         314B
+C461         CE74
+C462         CE75
+C463         CE76
+C464         CE77
+C465         CE78
+C466         CE79
+C467         CE7A
+C468         CE7B
+C469         CE7C
+C46A         CE7D
+C46B         CE7E
+C46C         CE7F
+C46D         CE80
+C46E         CE81
+C46F         CE82
+C470         CE83
+C471         CE84
+C473         CE85
+C474         CE86
+C475         CE87
+C476         CE88
+C477         CE89
+C478         CE8A
+C479         CE8B
+C47A         CE8C
+C47B         CE8D
+C47C         CE8E
+C47D         CE8F
+C481         CE90
+C482         CE91
+C483         CE92
+C484         CE93
+C485         CE94
+C486         CE95
+C487         CE96
+C488         CE97
+C489         CE98
+C48A         CE99
+C48B         CE9A
+C48C         CE9B
+C48D         CE9C
+C48E         CE9D
+C48F         CE9E
+C490         CE9F
+C491         CEA0
+C493         CEA1
+C494         CEA2
+C495         CEA3
+C496         CEA4
+C497         CEA5
+C498         CEA6
+C499         CEA7
+C49A         CEA8
+C49B         CEA9
+C49C         CEAA
+C49D         CEAB
+C4A1         CEAC
+C4A2         CEAD
+C4A3         CEAE
+C4A4         CEAF
+C4A5         CEB0
+C4A6         CEB1
+C4A7         CEB2
+C4A8         CEB3
+C4A9         CEB4
+C4AA         CEB5
+C4AB         CEB6
+C4AC         CEB7
+C4AD         CEB8
+C4AE         CEB9
+C4AF         CEBA
+C4B0         CEBB
+C4B1         CEBC
+C4B3         CEBD
+C4B4         CEBE
+C4B5         CEBF
+C4B6         CEC0
+C4B7         CEC1
+C4B8         CEC2
+C4B9         CEC3
+C4BA         CEC4
+C4BB         CEC5
+C4BC         CEC6
+C4BD         CEC7
+C4C1         CEC8
+C4C2         CEC9
+C4C3         CECA
+C4C4         CECB
+C4C5         CECC
+C4C6         CECD
+C4C7         CECE
+C4C8         CECF
+C4C9         CED0
+C4CA         CED1
+C4CB         CED2
+C4CC         CED3
+C4CD         CED4
+C4CE         CED5
+C4CF         CED6
+C4D0         CED7
+C4D1         CED8
+C4D3         CED9
+C4D4         CEDA
+C4D5         CEDB
+C4D6         CEDC
+C4D7         CEDD
+C4D8         CEDE
+C4D9         CEDF
+C4DA         CEE0
+C4DB         CEE1
+C4DC         CEE2
+C4DD         CEE3
+C4E1         CEE4
+C4E2         CEE5
+C4E3         CEE6
+C4E4         CEE7
+C4E5         CEE8
+C4E6         CEE9
+C4E7         CEEA
+C4E8         CEEB
+C4E9         CEEC
+C4EA         CEED
+C4EB         CEEE
+C4EC         CEEF
+C4ED         CEF0
+C4EE         CEF1
+C4EF         CEF2
+C4F0         CEF3
+C4F1         CEF4
+C4F3         CEF5
+C4F4         CEF6
+C4F5         CEF7
+C4F6         CEF8
+C4F7         CEF9
+C4F8         CEFA
+C4F9         CEFB
+C4FA         CEFC
+C4FB         CEFD
+C4FC         CEFE
+C4FD         CEFF
+C541         CF00
+C542         CF01
+C543         CF02
+C544         CF03
+C545         CF04
+C546         CF05
+C547         CF06
+C548         CF07
+C549         CF08
+C54A         CF09
+C54B         CF0A
+C54C         CF0B
+C54D         CF0C
+C54E         CF0D
+C54F         CF0E
+C550         CF0F
+C551         CF10
+C553         CF11
+C554         CF12
+C555         CF13
+C556         CF14
+C557         CF15
+C558         CF16
+C559         CF17
+C55A         CF18
+C55B         CF19
+C55C         CF1A
+C55D         CF1B
+C561         CF1C
+C562         CF1D
+C563         CF1E
+C564         CF1F
+C565         CF20
+C566         CF21
+C567         CF22
+C568         CF23
+C569         CF24
+C56A         CF25
+C56B         CF26
+C56C         CF27
+C56D         CF28
+C56E         CF29
+C56F         CF2A
+C570         CF2B
+C571         CF2C
+C573         CF2D
+C574         CF2E
+C575         CF2F
+C576         CF30
+C577         CF31
+C578         CF32
+C579         CF33
+C57A         CF34
+C57B         CF35
+C57C         CF36
+C57D         CF37
+C581         CF38
+C582         CF39
+C583         CF3A
+C584         CF3B
+C585         CF3C
+C586         CF3D
+C587         CF3E
+C588         CF3F
+C589         CF40
+C58A         CF41
+C58B         CF42
+C58C         CF43
+C58D         CF44
+C58E         CF45
+C58F         CF46
+C590         CF47
+C591         CF48
+C593         CF49
+C594         CF4A
+C595         CF4B
+C596         CF4C
+C597         CF4D
+C598         CF4E
+C599         CF4F
+C59A         CF50
+C59B         CF51
+C59C         CF52
+C59D         CF53
+C5A1         CF54
+C5A2         CF55
+C5A3         CF56
+C5A4         CF57
+C5A5         CF58
+C5A6         CF59
+C5A7         CF5A
+C5A8         CF5B
+C5A9         CF5C
+C5AA         CF5D
+C5AB         CF5E
+C5AC         CF5F
+C5AD         CF60
+C5AE         CF61
+C5AF         CF62
+C5B0         CF63
+C5B1         CF64
+C5B3         CF65
+C5B4         CF66
+C5B5         CF67
+C5B6         CF68
+C5B7         CF69
+C5B8         CF6A
+C5B9         CF6B
+C5BA         CF6C
+C5BB         CF6D
+C5BC         CF6E
+C5BD         CF6F
+C5C1         CF70
+C5C2         CF71
+C5C3         CF72
+C5C4         CF73
+C5C5         CF74
+C5C6         CF75
+C5C7         CF76
+C5C8         CF77
+C5C9         CF78
+C5CA         CF79
+C5CB         CF7A
+C5CC         CF7B
+C5CD         CF7C
+C5CE         CF7D
+C5CF         CF7E
+C5D0         CF7F
+C5D1         CF80
+C5D3         CF81
+C5D4         CF82
+C5D5         CF83
+C5D6         CF84
+C5D7         CF85
+C5D8         CF86
+C5D9         CF87
+C5DA         CF88
+C5DB         CF89
+C5DC         CF8A
+C5DD         CF8B
+C5E1         CF8C
+C5E2         CF8D
+C5E3         CF8E
+C5E4         CF8F
+C5E5         CF90
+C5E6         CF91
+C5E7         CF92
+C5E8         CF93
+C5E9         CF94
+C5EA         CF95
+C5EB         CF96
+C5EC         CF97
+C5ED         CF98
+C5EE         CF99
+C5EF         CF9A
+C5F0         CF9B
+C5F1         CF9C
+C5F3         CF9D
+C5F4         CF9E
+C5F5         CF9F
+C5F6         CFA0
+C5F7         CFA1
+C5F8         CFA2
+C5F9         CFA3
+C5FA         CFA4
+C5FB         CFA5
+C5FC         CFA6
+C5FD         CFA7
+C641         CFA8
+C642         CFA9
+C643         CFAA
+C644         CFAB
+C645         CFAC
+C646         CFAD
+C647         CFAE
+C648         CFAF
+C649         CFB0
+C64A         CFB1
+C64B         CFB2
+C64C         CFB3
+C64D         CFB4
+C64E         CFB5
+C64F         CFB6
+C650         CFB7
+C651         CFB8
+C653         CFB9
+C654         CFBA
+C655         CFBB
+C656         CFBC
+C657         CFBD
+C658         CFBE
+C659         CFBF
+C65A         CFC0
+C65B         CFC1
+C65C         CFC2
+C65D         CFC3
+C661         CFC4
+C662         CFC5
+C663         CFC6
+C664         CFC7
+C665         CFC8
+C666         CFC9
+C667         CFCA
+C668         CFCB
+C669         CFCC
+C66A         CFCD
+C66B         CFCE
+C66C         CFCF
+C66D         CFD0
+C66E         CFD1
+C66F         CFD2
+C670         CFD3
+C671         CFD4
+C673         CFD5
+C674         CFD6
+C675         CFD7
+C676         CFD8
+C677         CFD9
+C678         CFDA
+C679         CFDB
+C67A         CFDC
+C67B         CFDD
+C67C         CFDE
+C67D         CFDF
+C681         CFE0
+C682         CFE1
+C683         CFE2
+C684         CFE3
+C685         CFE4
+C686         CFE5
+C687         CFE6
+C688         CFE7
+C689         CFE8
+C68A         CFE9
+C68B         CFEA
+C68C         CFEB
+C68D         CFEC
+C68E         CFED
+C68F         CFEE
+C690         CFEF
+C691         CFF0
+C693         CFF1
+C694         CFF2
+C695         CFF3
+C696         CFF4
+C697         CFF5
+C698         CFF6
+C699         CFF7
+C69A         CFF8
+C69B         CFF9
+C69C         CFFA
+C69D         CFFB
+C6A1         CFFC
+C6A2         CFFD
+C6A3         CFFE
+C6A4         CFFF
+C6A5         D000
+C6A6         D001
+C6A7         D002
+C6A8         D003
+C6A9         D004
+C6AA         D005
+C6AB         D006
+C6AC         D007
+C6AD         D008
+C6AE         D009
+C6AF         D00A
+C6B0         D00B
+C6B1         D00C
+C6B3         D00D
+C6B4         D00E
+C6B5         D00F
+C6B6         D010
+C6B7         D011
+C6B8         D012
+C6B9         D013
+C6BA         D014
+C6BB         D015
+C6BC         D016
+C6BD         D017
+C6C1         D018
+C6C2         D019
+C6C3         D01A
+C6C4         D01B
+C6C5         D01C
+C6C6         D01D
+C6C7         D01E
+C6C8         D01F
+C6C9         D020
+C6CA         D021
+C6CB         D022
+C6CC         D023
+C6CD         D024
+C6CE         D025
+C6CF         D026
+C6D0         D027
+C6D1         D028
+C6D3         D029
+C6D4         D02A
+C6D5         D02B
+C6D6         D02C
+C6D7         D02D
+C6D8         D02E
+C6D9         D02F
+C6DA         D030
+C6DB         D031
+C6DC         D032
+C6DD         D033
+C6E1         D034
+C6E2         D035
+C6E3         D036
+C6E4         D037
+C6E5         D038
+C6E6         D039
+C6E7         D03A
+C6E8         D03B
+C6E9         D03C
+C6EA         D03D
+C6EB         D03E
+C6EC         D03F
+C6ED         D040
+C6EE         D041
+C6EF         D042
+C6F0         D043
+C6F1         D044
+C6F3         D045
+C6F4         D046
+C6F5         D047
+C6F6         D048
+C6F7         D049
+C6F8         D04A
+C6F9         D04B
+C6FA         D04C
+C6FB         D04D
+C6FC         D04E
+C6FD         D04F
+C741         D050
+C742         D051
+C743         D052
+C744         D053
+C745         D054
+C746         D055
+C747         D056
+C748         D057
+C749         D058
+C74A         D059
+C74B         D05A
+C74C         D05B
+C74D         D05C
+C74E         D05D
+C74F         D05E
+C750         D05F
+C751         D060
+C753         D061
+C754         D062
+C755         D063
+C756         D064
+C757         D065
+C758         D066
+C759         D067
+C75A         D068
+C75B         D069
+C75C         D06A
+C75D         D06B
+C761         D06C
+C762         D06D
+C763         D06E
+C764         D06F
+C765         D070
+C766         D071
+C767         D072
+C768         D073
+C769         D074
+C76A         D075
+C76B         D076
+C76C         D077
+C76D         D078
+C76E         D079
+C76F         D07A
+C770         D07B
+C771         D07C
+C773         D07D
+C774         D07E
+C775         D07F
+C776         D080
+C777         D081
+C778         D082
+C779         D083
+C77A         D084
+C77B         D085
+C77C         D086
+C77D         D087
+C781         D088
+C782         D089
+C783         D08A
+C784         D08B
+C785         D08C
+C786         D08D
+C787         D08E
+C788         D08F
+C789         D090
+C78A         D091
+C78B         D092
+C78C         D093
+C78D         D094
+C78E         D095
+C78F         D096
+C790         D097
+C791         D098
+C793         D099
+C794         D09A
+C795         D09B
+C796         D09C
+C797         D09D
+C798         D09E
+C799         D09F
+C79A         D0A0
+C79B         D0A1
+C79C         D0A2
+C79D         D0A3
+C7A1         D0A4
+C7A2         D0A5
+C7A3         D0A6
+C7A4         D0A7
+C7A5         D0A8
+C7A6         D0A9
+C7A7         D0AA
+C7A8         D0AB
+C7A9         D0AC
+C7AA         D0AD
+C7AB         D0AE
+C7AC         D0AF
+C7AD         D0B0
+C7AE         D0B1
+C7AF         D0B2
+C7B0         D0B3
+C7B1         D0B4
+C7B3         D0B5
+C7B4         D0B6
+C7B5         D0B7
+C7B6         D0B8
+C7B7         D0B9
+C7B8         D0BA
+C7B9         D0BB
+C7BA         D0BC
+C7BB         D0BD
+C7BC         D0BE
+C7BD         D0BF
+C841         314C
+C861         D0C0
+C862         D0C1
+C863         D0C2
+C864         D0C3
+C865         D0C4
+C866         D0C5
+C867         D0C6
+C868         D0C7
+C869         D0C8
+C86A         D0C9
+C86B         D0CA
+C86C         D0CB
+C86D         D0CC
+C86E         D0CD
+C86F         D0CE
+C870         D0CF
+C871         D0D0
+C873         D0D1
+C874         D0D2
+C875         D0D3
+C876         D0D4
+C877         D0D5
+C878         D0D6
+C879         D0D7
+C87A         D0D8
+C87B         D0D9
+C87C         D0DA
+C87D         D0DB
+C881         D0DC
+C882         D0DD
+C883         D0DE
+C884         D0DF
+C885         D0E0
+C886         D0E1
+C887         D0E2
+C888         D0E3
+C889         D0E4
+C88A         D0E5
+C88B         D0E6
+C88C         D0E7
+C88D         D0E8
+C88E         D0E9
+C88F         D0EA
+C890         D0EB
+C891         D0EC
+C893         D0ED
+C894         D0EE
+C895         D0EF
+C896         D0F0
+C897         D0F1
+C898         D0F2
+C899         D0F3
+C89A         D0F4
+C89B         D0F5
+C89C         D0F6
+C89D         D0F7
+C8A1         D0F8
+C8A2         D0F9
+C8A3         D0FA
+C8A4         D0FB
+C8A5         D0FC
+C8A6         D0FD
+C8A7         D0FE
+C8A8         D0FF
+C8A9         D100
+C8AA         D101
+C8AB         D102
+C8AC         D103
+C8AD         D104
+C8AE         D105
+C8AF         D106
+C8B0         D107
+C8B1         D108
+C8B3         D109
+C8B4         D10A
+C8B5         D10B
+C8B6         D10C
+C8B7         D10D
+C8B8         D10E
+C8B9         D10F
+C8BA         D110
+C8BB         D111
+C8BC         D112
+C8BD         D113
+C8C1         D114
+C8C2         D115
+C8C3         D116
+C8C4         D117
+C8C5         D118
+C8C6         D119
+C8C7         D11A
+C8C8         D11B
+C8C9         D11C
+C8CA         D11D
+C8CB         D11E
+C8CC         D11F
+C8CD         D120
+C8CE         D121
+C8CF         D122
+C8D0         D123
+C8D1         D124
+C8D3         D125
+C8D4         D126
+C8D5         D127
+C8D6         D128
+C8D7         D129
+C8D8         D12A
+C8D9         D12B
+C8DA         D12C
+C8DB         D12D
+C8DC         D12E
+C8DD         D12F
+C8E1         D130
+C8E2         D131
+C8E3         D132
+C8E4         D133
+C8E5         D134
+C8E6         D135
+C8E7         D136
+C8E8         D137
+C8E9         D138
+C8EA         D139
+C8EB         D13A
+C8EC         D13B
+C8ED         D13C
+C8EE         D13D
+C8EF         D13E
+C8F0         D13F
+C8F1         D140
+C8F3         D141
+C8F4         D142
+C8F5         D143
+C8F6         D144
+C8F7         D145
+C8F8         D146
+C8F9         D147
+C8FA         D148
+C8FB         D149
+C8FC         D14A
+C8FD         D14B
+C941         D14C
+C942         D14D
+C943         D14E
+C944         D14F
+C945         D150
+C946         D151
+C947         D152
+C948         D153
+C949         D154
+C94A         D155
+C94B         D156
+C94C         D157
+C94D         D158
+C94E         D159
+C94F         D15A
+C950         D15B
+C951         D15C
+C953         D15D
+C954         D15E
+C955         D15F
+C956         D160
+C957         D161
+C958         D162
+C959         D163
+C95A         D164
+C95B         D165
+C95C         D166
+C95D         D167
+C961         D168
+C962         D169
+C963         D16A
+C964         D16B
+C965         D16C
+C966         D16D
+C967         D16E
+C968         D16F
+C969         D170
+C96A         D171
+C96B         D172
+C96C         D173
+C96D         D174
+C96E         D175
+C96F         D176
+C970         D177
+C971         D178
+C973         D179
+C974         D17A
+C975         D17B
+C976         D17C
+C977         D17D
+C978         D17E
+C979         D17F
+C97A         D180
+C97B         D181
+C97C         D182
+C97D         D183
+C981         D184
+C982         D185
+C983         D186
+C984         D187
+C985         D188
+C986         D189
+C987         D18A
+C988         D18B
+C989         D18C
+C98A         D18D
+C98B         D18E
+C98C         D18F
+C98D         D190
+C98E         D191
+C98F         D192
+C990         D193
+C991         D194
+C993         D195
+C994         D196
+C995         D197
+C996         D198
+C997         D199
+C998         D19A
+C999         D19B
+C99A         D19C
+C99B         D19D
+C99C         D19E
+C99D         D19F
+C9A1         D1A0
+C9A2         D1A1
+C9A3         D1A2
+C9A4         D1A3
+C9A5         D1A4
+C9A6         D1A5
+C9A7         D1A6
+C9A8         D1A7
+C9A9         D1A8
+C9AA         D1A9
+C9AB         D1AA
+C9AC         D1AB
+C9AD         D1AC
+C9AE         D1AD
+C9AF         D1AE
+C9B0         D1AF
+C9B1         D1B0
+C9B3         D1B1
+C9B4         D1B2
+C9B5         D1B3
+C9B6         D1B4
+C9B7         D1B5
+C9B8         D1B6
+C9B9         D1B7
+C9BA         D1B8
+C9BB         D1B9
+C9BC         D1BA
+C9BD         D1BB
+C9C1         D1BC
+C9C2         D1BD
+C9C3         D1BE
+C9C4         D1BF
+C9C5         D1C0
+C9C6         D1C1
+C9C7         D1C2
+C9C8         D1C3
+C9C9         D1C4
+C9CA         D1C5
+C9CB         D1C6
+C9CC         D1C7
+C9CD         D1C8
+C9CE         D1C9
+C9CF         D1CA
+C9D0         D1CB
+C9D1         D1CC
+C9D3         D1CD
+C9D4         D1CE
+C9D5         D1CF
+C9D6         D1D0
+C9D7         D1D1
+C9D8         D1D2
+C9D9         D1D3
+C9DA         D1D4
+C9DB         D1D5
+C9DC         D1D6
+C9DD         D1D7
+C9E1         D1D8
+C9E2         D1D9
+C9E3         D1DA
+C9E4         D1DB
+C9E5         D1DC
+C9E6         D1DD
+C9E7         D1DE
+C9E8         D1DF
+C9E9         D1E0
+C9EA         D1E1
+C9EB         D1E2
+C9EC         D1E3
+C9ED         D1E4
+C9EE         D1E5
+C9EF         D1E6
+C9F0         D1E7
+C9F1         D1E8
+C9F3         D1E9
+C9F4         D1EA
+C9F5         D1EB
+C9F6         D1EC
+C9F7         D1ED
+C9F8         D1EE
+C9F9         D1EF
+C9FA         D1F0
+C9FB         D1F1
+C9FC         D1F2
+C9FD         D1F3
+CA41         D1F4
+CA42         D1F5
+CA43         D1F6
+CA44         D1F7
+CA45         D1F8
+CA46         D1F9
+CA47         D1FA
+CA48         D1FB
+CA49         D1FC
+CA4A         D1FD
+CA4B         D1FE
+CA4C         D1FF
+CA4D         D200
+CA4E         D201
+CA4F         D202
+CA50         D203
+CA51         D204
+CA53         D205
+CA54         D206
+CA55         D207
+CA56         D208
+CA57         D209
+CA58         D20A
+CA59         D20B
+CA5A         D20C
+CA5B         D20D
+CA5C         D20E
+CA5D         D20F
+CA61         D210
+CA62         D211
+CA63         D212
+CA64         D213
+CA65         D214
+CA66         D215
+CA67         D216
+CA68         D217
+CA69         D218
+CA6A         D219
+CA6B         D21A
+CA6C         D21B
+CA6D         D21C
+CA6E         D21D
+CA6F         D21E
+CA70         D21F
+CA71         D220
+CA73         D221
+CA74         D222
+CA75         D223
+CA76         D224
+CA77         D225
+CA78         D226
+CA79         D227
+CA7A         D228
+CA7B         D229
+CA7C         D22A
+CA7D         D22B
+CA81         D22C
+CA82         D22D
+CA83         D22E
+CA84         D22F
+CA85         D230
+CA86         D231
+CA87         D232
+CA88         D233
+CA89         D234
+CA8A         D235
+CA8B         D236
+CA8C         D237
+CA8D         D238
+CA8E         D239
+CA8F         D23A
+CA90         D23B
+CA91         D23C
+CA93         D23D
+CA94         D23E
+CA95         D23F
+CA96         D240
+CA97         D241
+CA98         D242
+CA99         D243
+CA9A         D244
+CA9B         D245
+CA9C         D246
+CA9D         D247
+CAA1         D248
+CAA2         D249
+CAA3         D24A
+CAA4         D24B
+CAA5         D24C
+CAA6         D24D
+CAA7         D24E
+CAA8         D24F
+CAA9         D250
+CAAA         D251
+CAAB         D252
+CAAC         D253
+CAAD         D254
+CAAE         D255
+CAAF         D256
+CAB0         D257
+CAB1         D258
+CAB3         D259
+CAB4         D25A
+CAB5         D25B
+CAB6         D25C
+CAB7         D25D
+CAB8         D25E
+CAB9         D25F
+CABA         D260
+CABB         D261
+CABC         D262
+CABD         D263
+CAC1         D264
+CAC2         D265
+CAC3         D266
+CAC4         D267
+CAC5         D268
+CAC6         D269
+CAC7         D26A
+CAC8         D26B
+CAC9         D26C
+CACA         D26D
+CACB         D26E
+CACC         D26F
+CACD         D270
+CACE         D271
+CACF         D272
+CAD0         D273
+CAD1         D274
+CAD3         D275
+CAD4         D276
+CAD5         D277
+CAD6         D278
+CAD7         D279
+CAD8         D27A
+CAD9         D27B
+CADA         D27C
+CADB         D27D
+CADC         D27E
+CADD         D27F
+CAE1         D280
+CAE2         D281
+CAE3         D282
+CAE4         D283
+CAE5         D284
+CAE6         D285
+CAE7         D286
+CAE8         D287
+CAE9         D288
+CAEA         D289
+CAEB         D28A
+CAEC         D28B
+CAED         D28C
+CAEE         D28D
+CAEF         D28E
+CAF0         D28F
+CAF1         D290
+CAF3         D291
+CAF4         D292
+CAF5         D293
+CAF6         D294
+CAF7         D295
+CAF8         D296
+CAF9         D297
+CAFA         D298
+CAFB         D299
+CAFC         D29A
+CAFD         D29B
+CB41         D29C
+CB42         D29D
+CB43         D29E
+CB44         D29F
+CB45         D2A0
+CB46         D2A1
+CB47         D2A2
+CB48         D2A3
+CB49         D2A4
+CB4A         D2A5
+CB4B         D2A6
+CB4C         D2A7
+CB4D         D2A8
+CB4E         D2A9
+CB4F         D2AA
+CB50         D2AB
+CB51         D2AC
+CB53         D2AD
+CB54         D2AE
+CB55         D2AF
+CB56         D2B0
+CB57         D2B1
+CB58         D2B2
+CB59         D2B3
+CB5A         D2B4
+CB5B         D2B5
+CB5C         D2B6
+CB5D         D2B7
+CB61         D2B8
+CB62         D2B9
+CB63         D2BA
+CB64         D2BB
+CB65         D2BC
+CB66         D2BD
+CB67         D2BE
+CB68         D2BF
+CB69         D2C0
+CB6A         D2C1
+CB6B         D2C2
+CB6C         D2C3
+CB6D         D2C4
+CB6E         D2C5
+CB6F         D2C6
+CB70         D2C7
+CB71         D2C8
+CB73         D2C9
+CB74         D2CA
+CB75         D2CB
+CB76         D2CC
+CB77         D2CD
+CB78         D2CE
+CB79         D2CF
+CB7A         D2D0
+CB7B         D2D1
+CB7C         D2D2
+CB7D         D2D3
+CB81         D2D4
+CB82         D2D5
+CB83         D2D6
+CB84         D2D7
+CB85         D2D8
+CB86         D2D9
+CB87         D2DA
+CB88         D2DB
+CB89         D2DC
+CB8A         D2DD
+CB8B         D2DE
+CB8C         D2DF
+CB8D         D2E0
+CB8E         D2E1
+CB8F         D2E2
+CB90         D2E3
+CB91         D2E4
+CB93         D2E5
+CB94         D2E6
+CB95         D2E7
+CB96         D2E8
+CB97         D2E9
+CB98         D2EA
+CB99         D2EB
+CB9A         D2EC
+CB9B         D2ED
+CB9C         D2EE
+CB9D         D2EF
+CBA1         D2F0
+CBA2         D2F1
+CBA3         D2F2
+CBA4         D2F3
+CBA5         D2F4
+CBA6         D2F5
+CBA7         D2F6
+CBA8         D2F7
+CBA9         D2F8
+CBAA         D2F9
+CBAB         D2FA
+CBAC         D2FB
+CBAD         D2FC
+CBAE         D2FD
+CBAF         D2FE
+CBB0         D2FF
+CBB1         D300
+CBB3         D301
+CBB4         D302
+CBB5         D303
+CBB6         D304
+CBB7         D305
+CBB8         D306
+CBB9         D307
+CBBA         D308
+CBBB         D309
+CBBC         D30A
+CBBD         D30B
+CC41         314D
+CC61         D30C
+CC62         D30D
+CC63         D30E
+CC64         D30F
+CC65         D310
+CC66         D311
+CC67         D312
+CC68         D313
+CC69         D314
+CC6A         D315
+CC6B         D316
+CC6C         D317
+CC6D         D318
+CC6E         D319
+CC6F         D31A
+CC70         D31B
+CC71         D31C
+CC73         D31D
+CC74         D31E
+CC75         D31F
+CC76         D320
+CC77         D321
+CC78         D322
+CC79         D323
+CC7A         D324
+CC7B         D325
+CC7C         D326
+CC7D         D327
+CC81         D328
+CC82         D329
+CC83         D32A
+CC84         D32B
+CC85         D32C
+CC86         D32D
+CC87         D32E
+CC88         D32F
+CC89         D330
+CC8A         D331
+CC8B         D332
+CC8C         D333
+CC8D         D334
+CC8E         D335
+CC8F         D336
+CC90         D337
+CC91         D338
+CC93         D339
+CC94         D33A
+CC95         D33B
+CC96         D33C
+CC97         D33D
+CC98         D33E
+CC99         D33F
+CC9A         D340
+CC9B         D341
+CC9C         D342
+CC9D         D343
+CCA1         D344
+CCA2         D345
+CCA3         D346
+CCA4         D347
+CCA5         D348
+CCA6         D349
+CCA7         D34A
+CCA8         D34B
+CCA9         D34C
+CCAA         D34D
+CCAB         D34E
+CCAC         D34F
+CCAD         D350
+CCAE         D351
+CCAF         D352
+CCB0         D353
+CCB1         D354
+CCB3         D355
+CCB4         D356
+CCB5         D357
+CCB6         D358
+CCB7         D359
+CCB8         D35A
+CCB9         D35B
+CCBA         D35C
+CCBB         D35D
+CCBC         D35E
+CCBD         D35F
+CCC1         D360
+CCC2         D361
+CCC3         D362
+CCC4         D363
+CCC5         D364
+CCC6         D365
+CCC7         D366
+CCC8         D367
+CCC9         D368
+CCCA         D369
+CCCB         D36A
+CCCC         D36B
+CCCD         D36C
+CCCE         D36D
+CCCF         D36E
+CCD0         D36F
+CCD1         D370
+CCD3         D371
+CCD4         D372
+CCD5         D373
+CCD6         D374
+CCD7         D375
+CCD8         D376
+CCD9         D377
+CCDA         D378
+CCDB         D379
+CCDC         D37A
+CCDD         D37B
+CCE1         D37C
+CCE2         D37D
+CCE3         D37E
+CCE4         D37F
+CCE5         D380
+CCE6         D381
+CCE7         D382
+CCE8         D383
+CCE9         D384
+CCEA         D385
+CCEB         D386
+CCEC         D387
+CCED         D388
+CCEE         D389
+CCEF         D38A
+CCF0         D38B
+CCF1         D38C
+CCF3         D38D
+CCF4         D38E
+CCF5         D38F
+CCF6         D390
+CCF7         D391
+CCF8         D392
+CCF9         D393
+CCFA         D394
+CCFB         D395
+CCFC         D396
+CCFD         D397
+CD41         D398
+CD42         D399
+CD43         D39A
+CD44         D39B
+CD45         D39C
+CD46         D39D
+CD47         D39E
+CD48         D39F
+CD49         D3A0
+CD4A         D3A1
+CD4B         D3A2
+CD4C         D3A3
+CD4D         D3A4
+CD4E         D3A5
+CD4F         D3A6
+CD50         D3A7
+CD51         D3A8
+CD53         D3A9
+CD54         D3AA
+CD55         D3AB
+CD56         D3AC
+CD57         D3AD
+CD58         D3AE
+CD59         D3AF
+CD5A         D3B0
+CD5B         D3B1
+CD5C         D3B2
+CD5D         D3B3
+CD61         D3B4
+CD62         D3B5
+CD63         D3B6
+CD64         D3B7
+CD65         D3B8
+CD66         D3B9
+CD67         D3BA
+CD68         D3BB
+CD69         D3BC
+CD6A         D3BD
+CD6B         D3BE
+CD6C         D3BF
+CD6D         D3C0
+CD6E         D3C1
+CD6F         D3C2
+CD70         D3C3
+CD71         D3C4
+CD73         D3C5
+CD74         D3C6
+CD75         D3C7
+CD76         D3C8
+CD77         D3C9
+CD78         D3CA
+CD79         D3CB
+CD7A         D3CC
+CD7B         D3CD
+CD7C         D3CE
+CD7D         D3CF
+CD81         D3D0
+CD82         D3D1
+CD83         D3D2
+CD84         D3D3
+CD85         D3D4
+CD86         D3D5
+CD87         D3D6
+CD88         D3D7
+CD89         D3D8
+CD8A         D3D9
+CD8B         D3DA
+CD8C         D3DB
+CD8D         D3DC
+CD8E         D3DD
+CD8F         D3DE
+CD90         D3DF
+CD91         D3E0
+CD93         D3E1
+CD94         D3E2
+CD95         D3E3
+CD96         D3E4
+CD97         D3E5
+CD98         D3E6
+CD99         D3E7
+CD9A         D3E8
+CD9B         D3E9
+CD9C         D3EA
+CD9D         D3EB
+CDA1         D3EC
+CDA2         D3ED
+CDA3         D3EE
+CDA4         D3EF
+CDA5         D3F0
+CDA6         D3F1
+CDA7         D3F2
+CDA8         D3F3
+CDA9         D3F4
+CDAA         D3F5
+CDAB         D3F6
+CDAC         D3F7
+CDAD         D3F8
+CDAE         D3F9
+CDAF         D3FA
+CDB0         D3FB
+CDB1         D3FC
+CDB3         D3FD
+CDB4         D3FE
+CDB5         D3FF
+CDB6         D400
+CDB7         D401
+CDB8         D402
+CDB9         D403
+CDBA         D404
+CDBB         D405
+CDBC         D406
+CDBD         D407
+CDC1         D408
+CDC2         D409
+CDC3         D40A
+CDC4         D40B
+CDC5         D40C
+CDC6         D40D
+CDC7         D40E
+CDC8         D40F
+CDC9         D410
+CDCA         D411
+CDCB         D412
+CDCC         D413
+CDCD         D414
+CDCE         D415
+CDCF         D416
+CDD0         D417
+CDD1         D418
+CDD3         D419
+CDD4         D41A
+CDD5         D41B
+CDD6         D41C
+CDD7         D41D
+CDD8         D41E
+CDD9         D41F
+CDDA         D420
+CDDB         D421
+CDDC         D422
+CDDD         D423
+CDE1         D424
+CDE2         D425
+CDE3         D426
+CDE4         D427
+CDE5         D428
+CDE6         D429
+CDE7         D42A
+CDE8         D42B
+CDE9         D42C
+CDEA         D42D
+CDEB         D42E
+CDEC         D42F
+CDED         D430
+CDEE         D431
+CDEF         D432
+CDF0         D433
+CDF1         D434
+CDF3         D435
+CDF4         D436
+CDF5         D437
+CDF6         D438
+CDF7         D439
+CDF8         D43A
+CDF9         D43B
+CDFA         D43C
+CDFB         D43D
+CDFC         D43E
+CDFD         D43F
+CE41         D440
+CE42         D441
+CE43         D442
+CE44         D443
+CE45         D444
+CE46         D445
+CE47         D446
+CE48         D447
+CE49         D448
+CE4A         D449
+CE4B         D44A
+CE4C         D44B
+CE4D         D44C
+CE4E         D44D
+CE4F         D44E
+CE50         D44F
+CE51         D450
+CE53         D451
+CE54         D452
+CE55         D453
+CE56         D454
+CE57         D455
+CE58         D456
+CE59         D457
+CE5A         D458
+CE5B         D459
+CE5C         D45A
+CE5D         D45B
+CE61         D45C
+CE62         D45D
+CE63         D45E
+CE64         D45F
+CE65         D460
+CE66         D461
+CE67         D462
+CE68         D463
+CE69         D464
+CE6A         D465
+CE6B         D466
+CE6C         D467
+CE6D         D468
+CE6E         D469
+CE6F         D46A
+CE70         D46B
+CE71         D46C
+CE73         D46D
+CE74         D46E
+CE75         D46F
+CE76         D470
+CE77         D471
+CE78         D472
+CE79         D473
+CE7A         D474
+CE7B         D475
+CE7C         D476
+CE7D         D477
+CE81         D478
+CE82         D479
+CE83         D47A
+CE84         D47B
+CE85         D47C
+CE86         D47D
+CE87         D47E
+CE88         D47F
+CE89         D480
+CE8A         D481
+CE8B         D482
+CE8C         D483
+CE8D         D484
+CE8E         D485
+CE8F         D486
+CE90         D487
+CE91         D488
+CE93         D489
+CE94         D48A
+CE95         D48B
+CE96         D48C
+CE97         D48D
+CE98         D48E
+CE99         D48F
+CE9A         D490
+CE9B         D491
+CE9C         D492
+CE9D         D493
+CEA1         D494
+CEA2         D495
+CEA3         D496
+CEA4         D497
+CEA5         D498
+CEA6         D499
+CEA7         D49A
+CEA8         D49B
+CEA9         D49C
+CEAA         D49D
+CEAB         D49E
+CEAC         D49F
+CEAD         D4A0
+CEAE         D4A1
+CEAF         D4A2
+CEB0         D4A3
+CEB1         D4A4
+CEB3         D4A5
+CEB4         D4A6
+CEB5         D4A7
+CEB6         D4A8
+CEB7         D4A9
+CEB8         D4AA
+CEB9         D4AB
+CEBA         D4AC
+CEBB         D4AD
+CEBC         D4AE
+CEBD         D4AF
+CEC1         D4B0
+CEC2         D4B1
+CEC3         D4B2
+CEC4         D4B3
+CEC5         D4B4
+CEC6         D4B5
+CEC7         D4B6
+CEC8         D4B7
+CEC9         D4B8
+CECA         D4B9
+CECB         D4BA
+CECC         D4BB
+CECD         D4BC
+CECE         D4BD
+CECF         D4BE
+CED0         D4BF
+CED1         D4C0
+CED3         D4C1
+CED4         D4C2
+CED5         D4C3
+CED6         D4C4
+CED7         D4C5
+CED8         D4C6
+CED9         D4C7
+CEDA         D4C8
+CEDB         D4C9
+CEDC         D4CA
+CEDD         D4CB
+CEE1         D4CC
+CEE2         D4CD
+CEE3         D4CE
+CEE4         D4CF
+CEE5         D4D0
+CEE6         D4D1
+CEE7         D4D2
+CEE8         D4D3
+CEE9         D4D4
+CEEA         D4D5
+CEEB         D4D6
+CEEC         D4D7
+CEED         D4D8
+CEEE         D4D9
+CEEF         D4DA
+CEF0         D4DB
+CEF1         D4DC
+CEF3         D4DD
+CEF4         D4DE
+CEF5         D4DF
+CEF6         D4E0
+CEF7         D4E1
+CEF8         D4E2
+CEF9         D4E3
+CEFA         D4E4
+CEFB         D4E5
+CEFC         D4E6
+CEFD         D4E7
+CF41         D4E8
+CF42         D4E9
+CF43         D4EA
+CF44         D4EB
+CF45         D4EC
+CF46         D4ED
+CF47         D4EE
+CF48         D4EF
+CF49         D4F0
+CF4A         D4F1
+CF4B         D4F2
+CF4C         D4F3
+CF4D         D4F4
+CF4E         D4F5
+CF4F         D4F6
+CF50         D4F7
+CF51         D4F8
+CF53         D4F9
+CF54         D4FA
+CF55         D4FB
+CF56         D4FC
+CF57         D4FD
+CF58         D4FE
+CF59         D4FF
+CF5A         D500
+CF5B         D501
+CF5C         D502
+CF5D         D503
+CF61         D504
+CF62         D505
+CF63         D506
+CF64         D507
+CF65         D508
+CF66         D509
+CF67         D50A
+CF68         D50B
+CF69         D50C
+CF6A         D50D
+CF6B         D50E
+CF6C         D50F
+CF6D         D510
+CF6E         D511
+CF6F         D512
+CF70         D513
+CF71         D514
+CF73         D515
+CF74         D516
+CF75         D517
+CF76         D518
+CF77         D519
+CF78         D51A
+CF79         D51B
+CF7A         D51C
+CF7B         D51D
+CF7C         D51E
+CF7D         D51F
+CF81         D520
+CF82         D521
+CF83         D522
+CF84         D523
+CF85         D524
+CF86         D525
+CF87         D526
+CF88         D527
+CF89         D528
+CF8A         D529
+CF8B         D52A
+CF8C         D52B
+CF8D         D52C
+CF8E         D52D
+CF8F         D52E
+CF90         D52F
+CF91         D530
+CF93         D531
+CF94         D532
+CF95         D533
+CF96         D534
+CF97         D535
+CF98         D536
+CF99         D537
+CF9A         D538
+CF9B         D539
+CF9C         D53A
+CF9D         D53B
+CFA1         D53C
+CFA2         D53D
+CFA3         D53E
+CFA4         D53F
+CFA5         D540
+CFA6         D541
+CFA7         D542
+CFA8         D543
+CFA9         D544
+CFAA         D545
+CFAB         D546
+CFAC         D547
+CFAD         D548
+CFAE         D549
+CFAF         D54A
+CFB0         D54B
+CFB1         D54C
+CFB3         D54D
+CFB4         D54E
+CFB5         D54F
+CFB6         D550
+CFB7         D551
+CFB8         D552
+CFB9         D553
+CFBA         D554
+CFBB         D555
+CFBC         D556
+CFBD         D557
+D041         314E
+D061         D558
+D062         D559
+D063         D55A
+D064         D55B
+D065         D55C
+D066         D55D
+D067         D55E
+D068         D55F
+D069         D560
+D06A         D561
+D06B         D562
+D06C         D563
+D06D         D564
+D06E         D565
+D06F         D566
+D070         D567
+D071         D568
+D073         D569
+D074         D56A
+D075         D56B
+D076         D56C
+D077         D56D
+D078         D56E
+D079         D56F
+D07A         D570
+D07B         D571
+D07C         D572
+D07D         D573
+D081         D574
+D082         D575
+D083         D576
+D084         D577
+D085         D578
+D086         D579
+D087         D57A
+D088         D57B
+D089         D57C
+D08A         D57D
+D08B         D57E
+D08C         D57F
+D08D         D580
+D08E         D581
+D08F         D582
+D090         D583
+D091         D584
+D093         D585
+D094         D586
+D095         D587
+D096         D588
+D097         D589
+D098         D58A
+D099         D58B
+D09A         D58C
+D09B         D58D
+D09C         D58E
+D09D         D58F
+D0A1         D590
+D0A2         D591
+D0A3         D592
+D0A4         D593
+D0A5         D594
+D0A6         D595
+D0A7         D596
+D0A8         D597
+D0A9         D598
+D0AA         D599
+D0AB         D59A
+D0AC         D59B
+D0AD         D59C
+D0AE         D59D
+D0AF         D59E
+D0B0         D59F
+D0B1         D5A0
+D0B3         D5A1
+D0B4         D5A2
+D0B5         D5A3
+D0B6         D5A4
+D0B7         D5A5
+D0B8         D5A6
+D0B9         D5A7
+D0BA         D5A8
+D0BB         D5A9
+D0BC         D5AA
+D0BD         D5AB
+D0C1         D5AC
+D0C2         D5AD
+D0C3         D5AE
+D0C4         D5AF
+D0C5         D5B0
+D0C6         D5B1
+D0C7         D5B2
+D0C8         D5B3
+D0C9         D5B4
+D0CA         D5B5
+D0CB         D5B6
+D0CC         D5B7
+D0CD         D5B8
+D0CE         D5B9
+D0CF         D5BA
+D0D0         D5BB
+D0D1         D5BC
+D0D3         D5BD
+D0D4         D5BE
+D0D5         D5BF
+D0D6         D5C0
+D0D7         D5C1
+D0D8         D5C2
+D0D9         D5C3
+D0DA         D5C4
+D0DB         D5C5
+D0DC         D5C6
+D0DD         D5C7
+D0E1         D5C8
+D0E2         D5C9
+D0E3         D5CA
+D0E4         D5CB
+D0E5         D5CC
+D0E6         D5CD
+D0E7         D5CE
+D0E8         D5CF
+D0E9         D5D0
+D0EA         D5D1
+D0EB         D5D2
+D0EC         D5D3
+D0ED         D5D4
+D0EE         D5D5
+D0EF         D5D6
+D0F0         D5D7
+D0F1         D5D8
+D0F3         D5D9
+D0F4         D5DA
+D0F5         D5DB
+D0F6         D5DC
+D0F7         D5DD
+D0F8         D5DE
+D0F9         D5DF
+D0FA         D5E0
+D0FB         D5E1
+D0FC         D5E2
+D0FD         D5E3
+D141         D5E4
+D142         D5E5
+D143         D5E6
+D144         D5E7
+D145         D5E8
+D146         D5E9
+D147         D5EA
+D148         D5EB
+D149         D5EC
+D14A         D5ED
+D14B         D5EE
+D14C         D5EF
+D14D         D5F0
+D14E         D5F1
+D14F         D5F2
+D150         D5F3
+D151         D5F4
+D153         D5F5
+D154         D5F6
+D155         D5F7
+D156         D5F8
+D157         D5F9
+D158         D5FA
+D159         D5FB
+D15A         D5FC
+D15B         D5FD
+D15C         D5FE
+D15D         D5FF
+D161         D600
+D162         D601
+D163         D602
+D164         D603
+D165         D604
+D166         D605
+D167         D606
+D168         D607
+D169         D608
+D16A         D609
+D16B         D60A
+D16C         D60B
+D16D         D60C
+D16E         D60D
+D16F         D60E
+D170         D60F
+D171         D610
+D173         D611
+D174         D612
+D175         D613
+D176         D614
+D177         D615
+D178         D616
+D179         D617
+D17A         D618
+D17B         D619
+D17C         D61A
+D17D         D61B
+D181         D61C
+D182         D61D
+D183         D61E
+D184         D61F
+D185         D620
+D186         D621
+D187         D622
+D188         D623
+D189         D624
+D18A         D625
+D18B         D626
+D18C         D627
+D18D         D628
+D18E         D629
+D18F         D62A
+D190         D62B
+D191         D62C
+D193         D62D
+D194         D62E
+D195         D62F
+D196         D630
+D197         D631
+D198         D632
+D199         D633
+D19A         D634
+D19B         D635
+D19C         D636
+D19D         D637
+D1A1         D638
+D1A2         D639
+D1A3         D63A
+D1A4         D63B
+D1A5         D63C
+D1A6         D63D
+D1A7         D63E
+D1A8         D63F
+D1A9         D640
+D1AA         D641
+D1AB         D642
+D1AC         D643
+D1AD         D644
+D1AE         D645
+D1AF         D646
+D1B0         D647
+D1B1         D648
+D1B3         D649
+D1B4         D64A
+D1B5         D64B
+D1B6         D64C
+D1B7         D64D
+D1B8         D64E
+D1B9         D64F
+D1BA         D650
+D1BB         D651
+D1BC         D652
+D1BD         D653
+D1C1         D654
+D1C2         D655
+D1C3         D656
+D1C4         D657
+D1C5         D658
+D1C6         D659
+D1C7         D65A
+D1C8         D65B
+D1C9         D65C
+D1CA         D65D
+D1CB         D65E
+D1CC         D65F
+D1CD         D660
+D1CE         D661
+D1CF         D662
+D1D0         D663
+D1D1         D664
+D1D3         D665
+D1D4         D666
+D1D5         D667
+D1D6         D668
+D1D7         D669
+D1D8         D66A
+D1D9         D66B
+D1DA         D66C
+D1DB         D66D
+D1DC         D66E
+D1DD         D66F
+D1E1         D670
+D1E2         D671
+D1E3         D672
+D1E4         D673
+D1E5         D674
+D1E6         D675
+D1E7         D676
+D1E8         D677
+D1E9         D678
+D1EA         D679
+D1EB         D67A
+D1EC         D67B
+D1ED         D67C
+D1EE         D67D
+D1EF         D67E
+D1F0         D67F
+D1F1         D680
+D1F3         D681
+D1F4         D682
+D1F5         D683
+D1F6         D684
+D1F7         D685
+D1F8         D686
+D1F9         D687
+D1FA         D688
+D1FB         D689
+D1FC         D68A
+D1FD         D68B
+D241         D68C
+D242         D68D
+D243         D68E
+D244         D68F
+D245         D690
+D246         D691
+D247         D692
+D248         D693
+D249         D694
+D24A         D695
+D24B         D696
+D24C         D697
+D24D         D698
+D24E         D699
+D24F         D69A
+D250         D69B
+D251         D69C
+D253         D69D
+D254         D69E
+D255         D69F
+D256         D6A0
+D257         D6A1
+D258         D6A2
+D259         D6A3
+D25A         D6A4
+D25B         D6A5
+D25C         D6A6
+D25D         D6A7
+D261         D6A8
+D262         D6A9
+D263         D6AA
+D264         D6AB
+D265         D6AC
+D266         D6AD
+D267         D6AE
+D268         D6AF
+D269         D6B0
+D26A         D6B1
+D26B         D6B2
+D26C         D6B3
+D26D         D6B4
+D26E         D6B5
+D26F         D6B6
+D270         D6B7
+D271         D6B8
+D273         D6B9
+D274         D6BA
+D275         D6BB
+D276         D6BC
+D277         D6BD
+D278         D6BE
+D279         D6BF
+D27A         D6C0
+D27B         D6C1
+D27C         D6C2
+D27D         D6C3
+D281         D6C4
+D282         D6C5
+D283         D6C6
+D284         D6C7
+D285         D6C8
+D286         D6C9
+D287         D6CA
+D288         D6CB
+D289         D6CC
+D28A         D6CD
+D28B         D6CE
+D28C         D6CF
+D28D         D6D0
+D28E         D6D1
+D28F         D6D2
+D290         D6D3
+D291         D6D4
+D293         D6D5
+D294         D6D6
+D295         D6D7
+D296         D6D8
+D297         D6D9
+D298         D6DA
+D299         D6DB
+D29A         D6DC
+D29B         D6DD
+D29C         D6DE
+D29D         D6DF
+D2A1         D6E0
+D2A2         D6E1
+D2A3         D6E2
+D2A4         D6E3
+D2A5         D6E4
+D2A6         D6E5
+D2A7         D6E6
+D2A8         D6E7
+D2A9         D6E8
+D2AA         D6E9
+D2AB         D6EA
+D2AC         D6EB
+D2AD         D6EC
+D2AE         D6ED
+D2AF         D6EE
+D2B0         D6EF
+D2B1         D6F0
+D2B3         D6F1
+D2B4         D6F2
+D2B5         D6F3
+D2B6         D6F4
+D2B7         D6F5
+D2B8         D6F6
+D2B9         D6F7
+D2BA         D6F8
+D2BB         D6F9
+D2BC         D6FA
+D2BD         D6FB
+D2C1         D6FC
+D2C2         D6FD
+D2C3         D6FE
+D2C4         D6FF
+D2C5         D700
+D2C6         D701
+D2C7         D702
+D2C8         D703
+D2C9         D704
+D2CA         D705
+D2CB         D706
+D2CC         D707
+D2CD         D708
+D2CE         D709
+D2CF         D70A
+D2D0         D70B
+D2D1         D70C
+D2D3         D70D
+D2D4         D70E
+D2D5         D70F
+D2D6         D710
+D2D7         D711
+D2D8         D712
+D2D9         D713
+D2DA         D714
+D2DB         D715
+D2DC         D716
+D2DD         D717
+D2E1         D718
+D2E2         D719
+D2E3         D71A
+D2E4         D71B
+D2E5         D71C
+D2E6         D71D
+D2E7         D71E
+D2E8         D71F
+D2E9         D720
+D2EA         D721
+D2EB         D722
+D2EC         D723
+D2ED         D724
+D2EE         D725
+D2EF         D726
+D2F0         D727
+D2F1         D728
+D2F3         D729
+D2F4         D72A
+D2F5         D72B
+D2F6         D72C
+D2F7         D72D
+D2F8         D72E
+D2F9         D72F
+D2FA         D730
+D2FB         D731
+D2FC         D732
+D2FD         D733
+D341         D734
+D342         D735
+D343         D736
+D344         D737
+D345         D738
+D346         D739
+D347         D73A
+D348         D73B
+D349         D73C
+D34A         D73D
+D34B         D73E
+D34C         D73F
+D34D         D740
+D34E         D741
+D34F         D742
+D350         D743
+D351         D744
+D353         D745
+D354         D746
+D355         D747
+D356         D748
+D357         D749
+D358         D74A
+D359         D74B
+D35A         D74C
+D35B         D74D
+D35C         D74E
+D35D         D74F
+D361         D750
+D362         D751
+D363         D752
+D364         D753
+D365         D754
+D366         D755
+D367         D756
+D368         D757
+D369         D758
+D36A         D759
+D36B         D75A
+D36C         D75B
+D36D         D75C
+D36E         D75D
+D36F         D75E
+D370         D75F
+D371         D760
+D373         D761
+D374         D762
+D375         D763
+D376         D764
+D377         D765
+D378         D766
+D379         D767
+D37A         D768
+D37B         D769
+D37C         D76A
+D37D         D76B
+D381         D76C
+D382         D76D
+D383         D76E
+D384         D76F
+D385         D770
+D386         D771
+D387         D772
+D388         D773
+D389         D774
+D38A         D775
+D38B         D776
+D38C         D777
+D38D         D778
+D38E         D779
+D38F         D77A
+D390         D77B
+D391         D77C
+D393         D77D
+D394         D77E
+D395         D77F
+D396         D780
+D397         D781
+D398         D782
+D399         D783
+D39A         D784
+D39B         D785
+D39C         D786
+D39D         D787
+D3A1         D788
+D3A2         D789
+D3A3         D78A
+D3A4         D78B
+D3A5         D78C
+D3A6         D78D
+D3A7         D78E
+D3A8         D78F
+D3A9         D790
+D3AA         D791
+D3AB         D792
+D3AC         D793
+D3AD         D794
+D3AE         D795
+D3AF         D796
+D3B0         D797
+D3B1         D798
+D3B3         D799
+D3B4         D79A
+D3B5         D79B
+D3B6         D79C
+D3B7         D79D
+D3B8         D79E
+D3B9         D79F
+D3BA         D7A0
+D3BB         D7A1
+D3BC         D7A2
+D3BD         D7A3
+D441         E000
+D442         E001
+D443         E002
+D444         E003
+D445         E004
+D446         E005
+D447         E006
+D448         E007
+D449         E008
+D44A         E009
+D44B         E00A
+D44C         E00B
+D44D         E00C
+D44E         E00D
+D44F         E00E
+D450         E00F
+D451         E010
+D452         E011
+D453         E012
+D454         E013
+D455         E014
+D456         E015
+D457         E016
+D458         E017
+D459         E018
+D45A         E019
+D45B         E01A
+D45C         E01B
+D45D         E01C
+D45E         E01D
+D45F         E01E
+D460         E01F
+D461         E020
+D462         E021
+D463         E022
+D464         E023
+D465         E024
+D466         E025
+D467         E026
+D468         E027
+D469         E028
+D46A         E029
+D46B         E02A
+D46C         E02B
+D46D         E02C
+D46E         E02D
+D46F         E02E
+D470         E02F
+D471         E030
+D472         E031
+D473         E032
+D474         E033
+D475         E034
+D476         E035
+D477         E036
+D478         E037
+D479         E038
+D47A         E039
+D47B         E03A
+D47C         E03B
+D47D         E03C
+D47E         E03D
+D47F         E03E
+D481         E03F
+D482         E040
+D483         E041
+D484         E042
+D485         E043
+D486         E044
+D487         E045
+D488         E046
+D489         E047
+D48A         E048
+D48B         E049
+D48C         E04A
+D48D         E04B
+D48E         E04C
+D48F         E04D
+D490         E04E
+D491         E04F
+D492         E050
+D493         E051
+D494         E052
+D495         E053
+D496         E054
+D497         E055
+D498         E056
+D499         E057
+D49A         E058
+D49B         E059
+D49C         E05A
+D49D         E05B
+D49E         E05C
+D49F         E05D
+D4A0         E05E
+D4A1         E05F
+D4A2         E060
+D4A3         E061
+D4A4         E062
+D4A5         E063
+D4A6         E064
+D4A7         E065
+D4A8         E066
+D4A9         E067
+D4AA         E068
+D4AB         E069
+D4AC         E06A
+D4AD         E06B
+D4AE         E06C
+D4AF         E06D
+D4B0         E06E
+D4B1         E06F
+D4B2         E070
+D4B3         E071
+D4B4         E072
+D4B5         E073
+D4B6         E074
+D4B7         E075
+D4B8         E076
+D4B9         E077
+D4BA         E078
+D4BB         E079
+D4BC         E07A
+D4BD         E07B
+D4BE         E07C
+D4BF         E07D
+D4C0         E07E
+D4C1         E07F
+D4C2         E080
+D4C3         E081
+D4C4         E082
+D4C5         E083
+D4C6         E084
+D4C7         E085
+D4C8         E086
+D4C9         E087
+D4CA         E088
+D4CB         E089
+D4CC         E08A
+D4CD         E08B
+D4CE         E08C
+D4CF         E08D
+D4D0         E08E
+D4D1         E08F
+D4D2         E090
+D4D3         E091
+D4D4         E092
+D4D5         E093
+D4D6         E094
+D4D7         E095
+D4D8         E096
+D4D9         E097
+D4DA         E098
+D4DB         E099
+D4DC         E09A
+D4DD         E09B
+D4DE         E09C
+D4DF         E09D
+D4E0         E09E
+D4E1         E09F
+D4E2         E0A0
+D4E3         E0A1
+D4E4         E0A2
+D4E5         E0A3
+D4E6         E0A4
+D4E7         E0A5
+D4E8         E0A6
+D4E9         E0A7
+D4EA         E0A8
+D4EB         E0A9
+D4EC         E0AA
+D4ED         E0AB
+D4EE         E0AC
+D4EF         E0AD
+D4F0         E0AE
+D4F1         E0AF
+D4F2         E0B0
+D4F3         E0B1
+D4F4         E0B2
+D4F5         E0B3
+D4F6         E0B4
+D4F7         E0B5
+D4F8         E0B6
+D4F9         E0B7
+D4FA         E0B8
+D4FB         E0B9
+D4FC         E0BA
+D4FD         E0BB
+D541         E0BC
+D542         E0BD
+D543         E0BE
+D544         E0BF
+D545         E0C0
+D546         E0C1
+D547         E0C2
+D548         E0C3
+D549         E0C4
+D54A         E0C5
+D54B         E0C6
+D54C         E0C7
+D54D         E0C8
+D54E         E0C9
+D54F         E0CA
+D550         E0CB
+D551         E0CC
+D552         E0CD
+D553         E0CE
+D554         E0CF
+D555         E0D0
+D556         E0D1
+D557         E0D2
+D558         E0D3
+D559         E0D4
+D55A         E0D5
+D55B         E0D6
+D55C         E0D7
+D55D         E0D8
+D55E         E0D9
+D55F         E0DA
+D560         E0DB
+D561         E0DC
+D562         E0DD
+D563         E0DE
+D564         E0DF
+D565         E0E0
+D566         E0E1
+D567         E0E2
+D568         E0E3
+D569         E0E4
+D56A         E0E5
+D56B         E0E6
+D56C         E0E7
+D56D         E0E8
+D56E         E0E9
+D56F         E0EA
+D570         E0EB
+D571         E0EC
+D572         E0ED
+D573         E0EE
+D574         E0EF
+D575         E0F0
+D576         E0F1
+D577         E0F2
+D578         E0F3
+D579         E0F4
+D57A         E0F5
+D57B         E0F6
+D57C         E0F7
+D57D         E0F8
+D57E         E0F9
+D57F         E0FA
+D581         E0FB
+D582         E0FC
+D583         E0FD
+D584         E0FE
+D585         E0FF
+D586         E100
+D587         E101
+D588         E102
+D589         E103
+D58A         E104
+D58B         E105
+D58C         E106
+D58D         E107
+D58E         E108
+D58F         E109
+D590         E10A
+D591         E10B
+D592         E10C
+D593         E10D
+D594         E10E
+D595         E10F
+D596         E110
+D597         E111
+D598         E112
+D599         E113
+D59A         E114
+D59B         E115
+D59C         E116
+D59D         E117
+D59E         E118
+D59F         E119
+D5A0         E11A
+D5A1         E11B
+D5A2         E11C
+D5A3         E11D
+D5A4         E11E
+D5A5         E11F
+D5A6         E120
+D5A7         E121
+D5A8         E122
+D5A9         E123
+D5AA         E124
+D5AB         E125
+D5AC         E126
+D5AD         E127
+D5AE         E128
+D5AF         E129
+D5B0         E12A
+D5B1         E12B
+D5B2         E12C
+D5B3         E12D
+D5B4         E12E
+D5B5         E12F
+D5B6         E130
+D5B7         E131
+D5B8         E132
+D5B9         E133
+D5BA         E134
+D5BB         E135
+D5BC         E136
+D5BD         E137
+D5BE         E138
+D5BF         E139
+D5C0         E13A
+D5C1         E13B
+D5C2         E13C
+D5C3         E13D
+D5C4         E13E
+D5C5         E13F
+D5C6         E140
+D5C7         E141
+D5C8         E142
+D5C9         E143
+D5CA         E144
+D5CB         E145
+D5CC         E146
+D5CD         E147
+D5CE         E148
+D5CF         E149
+D5D0         E14A
+D5D1         E14B
+D5D2         E14C
+D5D3         E14D
+D5D4         E14E
+D5D5         E14F
+D5D6         E150
+D5D7         E151
+D5D8         E152
+D5D9         E153
+D5DA         E154
+D5DB         E155
+D5DC         E156
+D5DD         E157
+D5DE         E158
+D5DF         E159
+D5E0         E15A
+D5E1         E15B
+D5E2         E15C
+D5E3         E15D
+D5E4         E15E
+D5E5         E15F
+D5E6         E160
+D5E7         E161
+D5E8         E162
+D5E9         E163
+D5EA         E164
+D5EB         E165
+D5EC         E166
+D5ED         E167
+D5EE         E168
+D5EF         E169
+D5F0         E16A
+D5F1         E16B
+D5F2         E16C
+D5F3         E16D
+D5F4         E16E
+D5F5         E16F
+D5F6         E170
+D5F7         E171
+D5F8         E172
+D5F9         E173
+D5FA         E174
+D5FB         E175
+D5FC         E176
+D5FD         E177
+D641         E178
+D642         E179
+D643         E17A
+D644         E17B
+D645         E17C
+D646         E17D
+D647         E17E
+D648         E17F
+D649         E180
+D64A         E181
+D64B         E182
+D64C         E183
+D64D         E184
+D64E         E185
+D64F         E186
+D650         E187
+D651         E188
+D652         E189
+D653         E18A
+D654         E18B
+D655         E18C
+D656         E18D
+D657         E18E
+D658         E18F
+D659         E190
+D65A         E191
+D65B         E192
+D65C         E193
+D65D         E194
+D65E         E195
+D65F         E196
+D660         E197
+D661         E198
+D662         E199
+D663         E19A
+D664         E19B
+D665         E19C
+D666         E19D
+D667         E19E
+D668         E19F
+D669         E1A0
+D66A         E1A1
+D66B         E1A2
+D66C         E1A3
+D66D         E1A4
+D66E         E1A5
+D66F         E1A6
+D670         E1A7
+D671         E1A8
+D672         E1A9
+D673         E1AA
+D674         E1AB
+D675         E1AC
+D676         E1AD
+D677         E1AE
+D678         E1AF
+D679         E1B0
+D67A         E1B1
+D67B         E1B2
+D67C         E1B3
+D67D         E1B4
+D67E         E1B5
+D67F         E1B6
+D681         E1B7
+D682         E1B8
+D683         E1B9
+D684         E1BA
+D685         E1BB
+D686         E1BC
+D687         E1BD
+D688         E1BE
+D689         E1BF
+D68A         E1C0
+D68B         E1C1
+D68C         E1C2
+D68D         E1C3
+D68E         E1C4
+D68F         E1C5
+D690         E1C6
+D691         E1C7
+D692         E1C8
+D693         E1C9
+D694         E1CA
+D695         E1CB
+D696         E1CC
+D697         E1CD
+D698         E1CE
+D699         E1CF
+D69A         E1D0
+D69B         E1D1
+D69C         E1D2
+D69D         E1D3
+D69E         E1D4
+D69F         E1D5
+D6A0         E1D6
+D6A1         E1D7
+D6A2         E1D8
+D6A3         E1D9
+D6A4         E1DA
+D6A5         E1DB
+D6A6         E1DC
+D6A7         E1DD
+D6A8         E1DE
+D6A9         E1DF
+D6AA         E1E0
+D6AB         E1E1
+D6AC         E1E2
+D6AD         E1E3
+D6AE         E1E4
+D6AF         E1E5
+D6B0         E1E6
+D6B1         E1E7
+D6B2         E1E8
+D6B3         E1E9
+D6B4         E1EA
+D6B5         E1EB
+D6B6         E1EC
+D6B7         E1ED
+D6B8         E1EE
+D6B9         E1EF
+D6BA         E1F0
+D6BB         E1F1
+D6BC         E1F2
+D6BD         E1F3
+D6BE         E1F4
+D6BF         E1F5
+D6C0         E1F6
+D6C1         E1F7
+D6C2         E1F8
+D6C3         E1F9
+D6C4         E1FA
+D6C5         E1FB
+D6C6         E1FC
+D6C7         E1FD
+D6C8         E1FE
+D6C9         E1FF
+D6CA         E200
+D6CB         E201
+D6CC         E202
+D6CD         E203
+D6CE         E204
+D6CF         E205
+D6D0         E206
+D6D1         E207
+D6D2         E208
+D6D3         E209
+D6D4         E20A
+D6D5         E20B
+D6D6         E20C
+D6D7         E20D
+D6D8         E20E
+D6D9         E20F
+D6DA         E210
+D6DB         E211
+D6DC         E212
+D6DD         E213
+D6DE         E214
+D6DF         E215
+D6E0         E216
+D6E1         E217
+D6E2         E218
+D6E3         E219
+D6E4         E21A
+D6E5         E21B
+D6E6         E21C
+D6E7         E21D
+D6E8         E21E
+D6E9         E21F
+D6EA         E220
+D6EB         E221
+D6EC         E222
+D6ED         E223
+D6EE         E224
+D6EF         E225
+D6F0         E226
+D6F1         E227
+D6F2         E228
+D6F3         E229
+D6F4         E22A
+D6F5         E22B
+D6F6         E22C
+D6F7         E22D
+D6F8         E22E
+D6F9         E22F
+D6FA         E230
+D6FB         E231
+D6FC         E232
+D6FD         E233
+D741         E234
+D742         E235
+D743         E236
+D744         E237
+D745         E238
+D746         E239
+D747         E23A
+D748         E23B
+D749         E23C
+D74A         E23D
+D74B         E23E
+D74C         E23F
+D74D         E240
+D74E         E241
+D74F         E242
+D750         E243
+D751         E244
+D752         E245
+D753         E246
+D754         E247
+D755         E248
+D756         E249
+D757         E24A
+D758         E24B
+D759         E24C
+D75A         E24D
+D75B         E24E
+D75C         E24F
+D75D         E250
+D75E         E251
+D75F         E252
+D760         E253
+D761         E254
+D762         E255
+D763         E256
+D764         E257
+D765         E258
+D766         E259
+D767         E25A
+D768         E25B
+D769         E25C
+D76A         E25D
+D76B         E25E
+D76C         E25F
+D76D         E260
+D76E         E261
+D76F         E262
+D770         E263
+D771         E264
+D772         E265
+D773         E266
+D774         E267
+D775         E268
+D776         E269
+D777         E26A
+D778         E26B
+D779         E26C
+D77A         E26D
+D77B         E26E
+D77C         E26F
+D77D         E270
+D77E         E271
+D77F         E272
+D781         E273
+D782         E274
+D783         E275
+D784         E276
+D785         E277
+D786         E278
+D787         E279
+D788         E27A
+D789         E27B
+D78A         E27C
+D78B         E27D
+D78C         E27E
+D78D         E27F
+D78E         E280
+D78F         E281
+D790         E282
+D791         E283
+D792         E284
+D793         E285
+D794         E286
+D795         E287
+D796         E288
+D797         E289
+D798         E28A
+D799         E28B
+D79A         E28C
+D79B         E28D
+D79C         E28E
+D79D         E28F
+D79E         E290
+D79F         E291
+D7A0         E292
+D7A1         E293
+D7A2         E294
+D7A3         E295
+D7A4         E296
+D7A5         E297
+D7A6         E298
+D7A7         E299
+D7A8         E29A
+D7A9         E29B
+D7AA         E29C
+D7AB         E29D
+D7AC         E29E
+D7AD         E29F
+D7AE         E2A0
+D7AF         E2A1
+D7B0         E2A2
+D7B1         E2A3
+D7B2         E2A4
+D7B3         E2A5
+D7B4         E2A6
+D7B5         E2A7
+D7B6         E2A8
+D7B7         E2A9
+D7B8         E2AA
+D7B9         E2AB
+D7BA         E2AC
+D7BB         E2AD
+D7BC         E2AE
+D7BD         E2AF
+D7BE         E2B0
+D7BF         E2B1
+D7C0         E2B2
+D7C1         E2B3
+D7C2         E2B4
+D7C3         E2B5
+D7C4         E2B6
+D7C5         E2B7
+D7C6         E2B8
+D7C7         E2B9
+D7C8         E2BA
+D7C9         E2BB
+D7CA         E2BC
+D7CB         E2BD
+D7CC         E2BE
+D7CD         E2BF
+D7CE         E2C0
+D7CF         E2C1
+D7D0         E2C2
+D7D1         E2C3
+D7D2         E2C4
+D7D3         E2C5
+D7D4         E2C6
+D7D5         E2C7
+D7D6         E2C8
+D7D7         E2C9
+D7D8         E2CA
+D7D9         E2CB
+D7DA         E2CC
+D7DB         E2CD
+D7DC         E2CE
+D7DD         E2CF
+D7DE         E2D0
+D7DF         E2D1
+D7E0         E2D2
+D7E1         E2D3
+D7E2         E2D4
+D7E3         E2D5
+D7E4         E2D6
+D7E5         E2D7
+D7E6         E2D8
+D7E7         E2D9
+D7E8         E2DA
+D7E9         E2DB
+D7EA         E2DC
+D7EB         E2DD
+D7EC         E2DE
+D7ED         E2DF
+D7EE         E2E0
+D7EF         E2E1
+D7F0         E2E2
+D7F1         E2E3
+D7F2         E2E4
+D7F3         E2E5
+D7F4         E2E6
+D7F5         E2E7
+D7F6         E2E8
+D7F7         E2E9
+D7F8         E2EA
+D7F9         E2EB
+D7FA         E2EC
+D7FB         E2ED
+D7FC         E2EE
+D7FD         E2EF
+D841         E2F0
+D842         E2F1
+D843         E2F2
+D844         E2F3
+D845         E2F4
+D846         E2F5
+D847         E2F6
+D848         E2F7
+D849         E2F8
+D84A         E2F9
+D84B         E2FA
+D84C         E2FB
+D84D         E2FC
+D84E         E2FD
+D84F         E2FE
+D850         E2FF
+D851         E300
+D852         E301
+D853         E302
+D854         E303
+D855         E304
+D856         E305
+D857         E306
+D858         E307
+D859         E308
+D85A         E309
+D85B         E30A
+D85C         E30B
+D85D         E30C
+D85E         E30D
+D85F         E30E
+D860         E30F
+D861         E310
+D862         E311
+D863         E312
+D864         E313
+D865         E314
+D866         E315
+D867         E316
+D868         E317
+D869         E318
+D86A         E319
+D86B         E31A
+D86C         E31B
+D86D         E31C
+D86E         E31D
+D86F         E31E
+D870         E31F
+D871         E320
+D872         E321
+D873         E322
+D874         E323
+D875         E324
+D876         E325
+D877         E326
+D878         E327
+D879         E328
+D87A         E329
+D87B         E32A
+D87C         E32B
+D87D         E32C
+D87E         E32D
+D87F         E32E
+D881         E32F
+D882         E330
+D883         E331
+D884         E332
+D885         E333
+D886         E334
+D887         E335
+D888         E336
+D889         E337
+D88A         E338
+D88B         E339
+D88C         E33A
+D88D         E33B
+D88E         E33C
+D88F         E33D
+D890         E33E
+D891         E33F
+D892         E340
+D893         E341
+D894         E342
+D895         E343
+D896         E344
+D897         E345
+D898         E346
+D899         E347
+D89A         E348
+D89B         E349
+D89C         E34A
+D89D         E34B
+D89E         E34C
+D89F         E34D
+D8A0         E34E
+D8A1         E34F
+D8A2         E350
+D8A3         E351
+D8A4         E352
+D8A5         E353
+D8A6         E354
+D8A7         E355
+D8A8         E356
+D8A9         E357
+D8AA         E358
+D8AB         E359
+D8AC         E35A
+D8AD         E35B
+D8AE         E35C
+D8AF         E35D
+D8B0         E35E
+D8B1         E35F
+D8B2         E360
+D8B3         E361
+D8B4         E362
+D8B5         E363
+D8B6         E364
+D8B7         E365
+D8B8         E366
+D8B9         E367
+D8BA         E368
+D8BB         E369
+D8BC         E36A
+D8BD         E36B
+D8BE         E36C
+D8BF         E36D
+D8C0         E36E
+D8C1         E36F
+D8C2         E370
+D8C3         E371
+D8C4         E372
+D8C5         E373
+D8C6         E374
+D8C7         E375
+D8C8         E376
+D8C9         E377
+D8CA         E378
+D8CB         E379
+D8CC         E37A
+D8CD         E37B
+D8CE         E37C
+D8CF         E37D
+D8D0         E37E
+D8D1         E37F
+D8D2         E380
+D8D3         E381
+D8D4         E382
+D8D5         E383
+D8D6         E384
+D8D7         E385
+D8D8         E386
+D8D9         E387
+D8DA         E388
+D8DB         E389
+D8DC         E38A
+D8DD         E38B
+D8DE         E38C
+D8DF         E38D
+D8E0         E38E
+D8E1         E38F
+D8E2         E390
+D8E3         E391
+D8E4         E392
+D8E5         E393
+D8E6         E394
+D8E7         E395
+D8E8         E396
+D8E9         E397
+D8EA         E398
+D8EB         E399
+D8EC         E39A
+D8ED         E39B
+D8EE         E39C
+D8EF         E39D
+D8F0         E39E
+D8F1         E39F
+D8F2         E3A0
+D8F3         E3A1
+D8F4         E3A2
+D8F5         E3A3
+D8F6         E3A4
+D8F7         E3A5
+D8F8         E3A6
+D8F9         E3A7
+D8FA         E3A8
+D8FB         E3A9
+D8FC         E3AA
+D8FD         E3AB
+D941         E3AC
+D942         E3AD
+D943         E3AE
+D944         E3AF
+D945         E3B0
+D946         E3B1
+D947         E3B2
+D948         E3B3
+D949         E3B4
+D94A         E3B5
+D94B         E3B6
+D94C         E3B7
+D94D         E3B8
+D94E         E3B9
+D94F         E3BA
+D950         E3BB
+D951         E3BC
+D952         E3BD
+D953         E3BE
+D954         E3BF
+D955         E3C0
+D956         E3C1
+D957         E3C2
+D958         E3C3
+D959         E3C4
+D95A         E3C5
+D95B         E3C6
+D95C         E3C7
+D95D         E3C8
+D95E         E3C9
+D95F         E3CA
+D960         E3CB
+D961         E3CC
+D962         E3CD
+D963         E3CE
+D964         E3CF
+D965         E3D0
+D966         E3D1
+D967         E3D2
+D968         E3D3
+D969         E3D4
+D96A         E3D5
+D96B         E3D6
+D96C         E3D7
+D96D         E3D8
+D96E         E3D9
+D96F         E3DA
+D970         E3DB
+D971         E3DC
+D972         E3DD
+D973         E3DE
+D974         E3DF
+D975         E3E0
+D976         E3E1
+D977         E3E2
+D978         E3E3
+D979         E3E4
+D97A         E3E5
+D97B         E3E6
+D97C         E3E7
+D97D         E3E8
+D97E         E3E9
+D97F         E3EA
+D981         E3EB
+D982         E3EC
+D983         E3ED
+D984         E3EE
+D985         E3EF
+D986         E3F0
+D987         E3F1
+D988         E3F2
+D989         E3F3
+D98A         E3F4
+D98B         E3F5
+D98C         E3F6
+D98D         E3F7
+D98E         E3F8
+D98F         E3F9
+D990         E3FA
+D991         E3FB
+D992         E3FC
+D993         E3FD
+D994         E3FE
+D995         E3FF
+D996         E400
+D997         E401
+D998         E402
+D999         E403
+D99A         E404
+D99B         E405
+D99C         E406
+D99D         E407
+D99E         E408
+D99F         E409
+D9A0         E40A
+D9A1         E40B
+D9A2         E40C
+D9A3         E40D
+D9A4         E40E
+D9A5         E40F
+D9A6         E410
+D9A7         E411
+D9A8         E412
+D9A9         E413
+D9AA         E414
+D9AB         E415
+D9AC         E416
+D9AD         E417
+D9AE         E418
+D9AF         E419
+D9B0         E41A
+D9B1         E41B
+D9B2         E41C
+D9B3         E41D
+D9B4         E41E
+D9B5         E41F
+D9B6         E420
+D9B7         E421
+D9B8         E422
+D9B9         E423
+D9BA         E424
+D9BB         E425
+D9BC         E426
+D9BD         E427
+D9BE         E428
+D9BF         E429
+D9C0         E42A
+D9C1         E42B
+D9C2         E42C
+D9C3         E42D
+D9C4         E42E
+D9C5         E42F
+D9C6         E430
+D9C7         E431
+D9C8         E432
+D9C9         E433
+D9CA         E434
+D9CB         E435
+D9CC         E436
+D9CD         E437
+D9CE         E438
+D9CF         E439
+D9D0         E43A
+D9D1         E43B
+D9D2         E43C
+D9D3         E43D
+D9D4         E43E
+D9D5         E43F
+D9D6         E440
+D9D7         E441
+D9D8         E442
+D9D9         E443
+D9DA         E444
+D9DB         E445
+D9DC         E446
+D9DD         E447
+D9DE         E448
+D9DF         E449
+D9E0         E44A
+D9E1         E44B
+D9E2         E44C
+D9E3         E44D
+D9E4         E44E
+D9E5         E44F
+D9E6         E450
+D9E7         E451
+D9E8         E452
+D9E9         E453
+D9EA         E454
+D9EB         E455
+D9EC         E456
+D9ED         E457
+D9EE         E458
+D9EF         E459
+D9F0         E45A
+D9F1         E45B
+D9F2         E45C
+D9F3         E45D
+D9F4         E45E
+D9F5         E45F
+D9F6         E460
+D9F7         E461
+D9F8         E462
+D9F9         E463
+D9FA         E464
+D9FB         E465
+D9FC         E466
+D9FD         E467
+DA41         E468
+DA42         E469
+DA43         E46A
+DA44         E46B
+DA45         E46C
+DA46         E46D
+DA47         E46E
+DA48         E46F
+DA49         E470
+DA4A         E471
+DA4B         E472
+DA4C         E473
+DA4D         E474
+DA4E         E475
+DA4F         E476
+DA50         E477
+DA51         E478
+DA52         E479
+DA53         E47A
+DA54         E47B
+DA55         E47C
+DA56         E47D
+DA57         E47E
+DA58         E47F
+DA59         E480
+DA5A         E481
+DA5B         E482
+DA5C         E483
+DA5D         E484
+DA5E         E485
+DA5F         E486
+DA60         E487
+DA61         E488
+DA62         E489
+DA63         E48A
+DA64         E48B
+DA65         E48C
+DA66         E48D
+DA67         E48E
+DA68         E48F
+DA69         E490
+DA6A         E491
+DA6B         E492
+DA6C         E493
+DA6D         E494
+DA6E         E495
+DA6F         E496
+DA70         E497
+DA71         E498
+DA72         E499
+DA73         E49A
+DA74         E49B
+DA75         E49C
+DA76         E49D
+DA77         E49E
+DA78         E49F
+DA79         E4A0
+DA7A         E4A1
+DA7B         E4A2
+DA7C         E4A3
+DA7D         E4A4
+DA7E         E4A5
+DA7F         E4A6
+DA81         E4A7
+DA82         E4A8
+DA83         E4A9
+DA84         E4AA
+DA85         E4AB
+DA86         E4AC
+DA87         E4AD
+DA88         E4AE
+DA89         E4AF
+DA8A         E4B0
+DA8B         E4B1
+DA8C         E4B2
+DA8D         E4B3
+DA8E         E4B4
+DA8F         E4B5
+DA90         E4B6
+DA91         E4B7
+DA92         E4B8
+DA93         E4B9
+DA94         E4BA
+DA95         E4BB
+DA96         E4BC
+DA97         E4BD
+DA98         E4BE
+DA99         E4BF
+DA9A         E4C0
+DA9B         E4C1
+DA9C         E4C2
+DA9D         E4C3
+DA9E         E4C4
+DA9F         E4C5
+DAA0         E4C6
+DAA1         E4C7
+DAA2         E4C8
+DAA3         E4C9
+DAA4         E4CA
+DAA5         E4CB
+DAA6         E4CC
+DAA7         E4CD
+DAA8         E4CE
+DAA9         E4CF
+DAAA         E4D0
+DAAB         E4D1
+DAAC         E4D2
+DAAD         E4D3
+DAAE         E4D4
+DAAF         E4D5
+DAB0         E4D6
+DAB1         E4D7
+DAB2         E4D8
+DAB3         E4D9
+DAB4         E4DA
+DAB5         E4DB
+DAB6         E4DC
+DAB7         E4DD
+DAB8         E4DE
+DAB9         E4DF
+DABA         E4E0
+DABB         E4E1
+DABC         E4E2
+DABD         E4E3
+DABE         E4E4
+DABF         E4E5
+DAC0         E4E6
+DAC1         E4E7
+DAC2         E4E8
+DAC3         E4E9
+DAC4         E4EA
+DAC5         E4EB
+DAC6         E4EC
+DAC7         E4ED
+DAC8         E4EE
+DAC9         E4EF
+DACA         E4F0
+DACB         E4F1
+DACC         E4F2
+DACD         E4F3
+DACE         E4F4
+DACF         E4F5
+DAD0         E4F6
+DAD1         E4F7
+DAD2         E4F8
+DAD3         E4F9
+DAD4         E4FA
+DAD5         E4FB
+DAD6         E4FC
+DAD7         E4FD
+DAD8         E4FE
+DAD9         E4FF
+DADA         E500
+DADB         E501
+DADC         E502
+DADD         E503
+DADE         E504
+DADF         E505
+DAE0         E506
+DAE1         E507
+DAE2         E508
+DAE3         E509
+DAE4         E50A
+DAE5         E50B
+DAE6         E50C
+DAE7         E50D
+DAE8         E50E
+DAE9         E50F
+DAEA         E510
+DAEB         E511
+DAEC         E512
+DAED         E513
+DAEE         E514
+DAEF         E515
+DAF0         E516
+DAF1         E517
+DAF2         E518
+DAF3         E519
+DAF4         E51A
+DAF5         E51B
+DAF6         E51C
+DAF7         E51D
+DAF8         E51E
+DAF9         E51F
+DAFA         E520
+DAFB         E521
+DAFC         E522
+DAFD         E523
+DB41         E524
+DB42         E525
+DB43         E526
+DB44         E527
+DB45         E528
+DB46         E529
+DB47         E52A
+DB48         E52B
+DB49         E52C
+DB4A         E52D
+DB4B         E52E
+DB4C         E52F
+DB4D         E530
+DB4E         E531
+DB4F         E532
+DB50         E533
+DB51         E534
+DB52         E535
+DB53         E536
+DB54         E537
+DB55         E538
+DB56         E539
+DB57         E53A
+DB58         E53B
+DB59         E53C
+DB5A         E53D
+DB5B         E53E
+DB5C         E53F
+DB5D         E540
+DB5E         E541
+DB5F         E542
+DB60         E543
+DB61         E544
+DB62         E545
+DB63         E546
+DB64         E547
+DB65         E548
+DB66         E549
+DB67         E54A
+DB68         E54B
+DB69         E54C
+DB6A         E54D
+DB6B         E54E
+DB6C         E54F
+DB6D         E550
+DB6E         E551
+DB6F         E552
+DB70         E553
+DB71         E554
+DB72         E555
+DB73         E556
+DB74         E557
+DB75         E558
+DB76         E559
+DB77         E55A
+DB78         E55B
+DB79         E55C
+DB7A         E55D
+DB7B         E55E
+DB7C         E55F
+DB7D         E560
+DB7E         E561
+DB7F         E562
+DB81         E563
+DB82         E564
+DB83         E565
+DB84         E566
+DB85         E567
+DB86         E568
+DB87         E569
+DB88         E56A
+DB89         E56B
+DB8A         E56C
+DB8B         E56D
+DB8C         E56E
+DB8D         E56F
+DB8E         E570
+DB8F         E571
+DB90         E572
+DB91         E573
+DB92         E574
+DB93         E575
+DB94         E576
+DB95         E577
+DB96         E578
+DB97         E579
+DB98         E57A
+DB99         E57B
+DB9A         E57C
+DB9B         E57D
+DB9C         E57E
+DB9D         E57F
+DB9E         E580
+DB9F         E581
+DBA0         E582
+DBA1         E583
+DBA2         E584
+DBA3         E585
+DBA4         E586
+DBA5         E587
+DBA6         E588
+DBA7         E589
+DBA8         E58A
+DBA9         E58B
+DBAA         E58C
+DBAB         E58D
+DBAC         E58E
+DBAD         E58F
+DBAE         E590
+DBAF         E591
+DBB0         E592
+DBB1         E593
+DBB2         E594
+DBB3         E595
+DBB4         E596
+DBB5         E597
+DBB6         E598
+DBB7         E599
+DBB8         E59A
+DBB9         E59B
+DBBA         E59C
+DBBB         E59D
+DBBC         E59E
+DBBD         E59F
+DBBE         E5A0
+DBBF         E5A1
+DBC0         E5A2
+DBC1         E5A3
+DBC2         E5A4
+DBC3         E5A5
+DBC4         E5A6
+DBC5         E5A7
+DBC6         E5A8
+DBC7         E5A9
+DBC8         E5AA
+DBC9         E5AB
+DBCA         E5AC
+DBCB         E5AD
+DBCC         E5AE
+DBCD         E5AF
+DBCE         E5B0
+DBCF         E5B1
+DBD0         E5B2
+DBD1         E5B3
+DBD2         E5B4
+DBD3         E5B5
+DBD4         E5B6
+DBD5         E5B7
+DBD6         E5B8
+DBD7         E5B9
+DBD8         E5BA
+DBD9         E5BB
+DBDA         E5BC
+DBDB         E5BD
+DBDC         E5BE
+DBDD         E5BF
+DBDE         E5C0
+DBDF         E5C1
+DBE0         E5C2
+DBE1         E5C3
+DBE2         E5C4
+DBE3         E5C5
+DBE4         E5C6
+DBE5         E5C7
+DBE6         E5C8
+DBE7         E5C9
+DBE8         E5CA
+DBE9         E5CB
+DBEA         E5CC
+DBEB         E5CD
+DBEC         E5CE
+DBED         E5CF
+DBEE         E5D0
+DBEF         E5D1
+DBF0         E5D2
+DBF1         E5D3
+DBF2         E5D4
+DBF3         E5D5
+DBF4         E5D6
+DBF5         E5D7
+DBF6         E5D8
+DBF7         E5D9
+DBF8         E5DA
+DBF9         E5DB
+DBFA         E5DC
+DBFB         E5DD
+DBFC         E5DE
+DBFD         E5DF
+DC41         E5E0
+DC42         E5E1
+DC43         E5E2
+DC44         E5E3
+DC45         E5E4
+DC46         E5E5
+DC47         E5E6
+DC48         E5E7
+DC49         E5E8
+DC4A         E5E9
+DC4B         E5EA
+DC4C         E5EB
+DC4D         E5EC
+DC4E         E5ED
+DC4F         E5EE
+DC50         E5EF
+DC51         E5F0
+DC52         E5F1
+DC53         E5F2
+DC54         E5F3
+DC55         E5F4
+DC56         E5F5
+DC57         E5F6
+DC58         E5F7
+DC59         E5F8
+DC5A         E5F9
+DC5B         E5FA
+DC5C         E5FB
+DC5D         E5FC
+DC5E         E5FD
+DC5F         E5FE
+DC60         E5FF
+DC61         E600
+DC62         E601
+DC63         E602
+DC64         E603
+DC65         E604
+DC66         E605
+DC67         E606
+DC68         E607
+DC69         E608
+DC6A         E609
+DC6B         E60A
+DC6C         E60B
+DC6D         E60C
+DC6E         E60D
+DC6F         E60E
+DC70         E60F
+DC71         E610
+DC72         E611
+DC73         E612
+DC74         E613
+DC75         E614
+DC76         E615
+DC77         E616
+DC78         E617
+DC79         E618
+DC7A         E619
+DC7B         E61A
+DC7C         E61B
+DC7D         E61C
+DC7E         E61D
+DC7F         E61E
+DC81         E61F
+DC82         E620
+DC83         E621
+DC84         E622
+DC85         E623
+DC86         E624
+DC87         E625
+DC88         E626
+DC89         E627
+DC8A         E628
+DC8B         E629
+DC8C         E62A
+DC8D         E62B
+DC8E         E62C
+DC8F         E62D
+DC90         E62E
+DC91         E62F
+DC92         E630
+DC93         E631
+DC94         E632
+DC95         E633
+DC96         E634
+DC97         E635
+DC98         E636
+DC99         E637
+DC9A         E638
+DC9B         E639
+DC9C         E63A
+DC9D         E63B
+DC9E         E63C
+DC9F         E63D
+DCA0         E63E
+DCA1         E63F
+DCA2         E640
+DCA3         E641
+DCA4         E642
+DCA5         E643
+DCA6         E644
+DCA7         E645
+DCA8         E646
+DCA9         E647
+DCAA         E648
+DCAB         E649
+DCAC         E64A
+DCAD         E64B
+DCAE         E64C
+DCAF         E64D
+DCB0         E64E
+DCB1         E64F
+DCB2         E650
+DCB3         E651
+DCB4         E652
+DCB5         E653
+DCB6         E654
+DCB7         E655
+DCB8         E656
+DCB9         E657
+DCBA         E658
+DCBB         E659
+DCBC         E65A
+DCBD         E65B
+DCBE         E65C
+DCBF         E65D
+DCC0         E65E
+DCC1         E65F
+DCC2         E660
+DCC3         E661
+DCC4         E662
+DCC5         E663
+DCC6         E664
+DCC7         E665
+DCC8         E666
+DCC9         E667
+DCCA         E668
+DCCB         E669
+DCCC         E66A
+DCCD         E66B
+DCCE         E66C
+DCCF         E66D
+DCD0         E66E
+DCD1         E66F
+DCD2         E670
+DCD3         E671
+DCD4         E672
+DCD5         E673
+DCD6         E674
+DCD7         E675
+DCD8         E676
+DCD9         E677
+DCDA         E678
+DCDB         E679
+DCDC         E67A
+DCDD         E67B
+DCDE         E67C
+DCDF         E67D
+DCE0         E67E
+DCE1         E67F
+DCE2         E680
+DCE3         E681
+DCE4         E682
+DCE5         E683
+DCE6         E684
+DCE7         E685
+DCE8         E686
+DCE9         E687
+DCEA         E688
+DCEB         E689
+DCEC         E68A
+DCED         E68B
+DCEE         E68C
+DCEF         E68D
+DCF0         E68E
+DCF1         E68F
+DCF2         E690
+DCF3         E691
+DCF4         E692
+DCF5         E693
+DCF6         E694
+DCF7         E695
+DCF8         E696
+DCF9         E697
+DCFA         E698
+DCFB         E699
+DCFC         E69A
+DCFD         E69B
+DD41         E69C
+DD42         E69D
+DD43         E69E
+DD44         E69F
+DD45         E6A0
+DD46         E6A1
+DD47         E6A2
+DD48         E6A3
+DD49         E6A4
+DD4A         E6A5
+DD4B         E6A6
+DD4C         E6A7
+DD4D         E6A8
+DD4E         E6A9
+DD4F         E6AA
+DD50         E6AB
+DD51         E6AC
+DD52         E6AD
+DD53         E6AE
+DD54         E6AF
+DD55         E6B0
+DD56         E6B1
+DD57         E6B2
+DD58         E6B3
+DD59         E6B4
+DD5A         E6B5
+DD5B         E6B6
+DD5C         E6B7
+DD5D         E6B8
+DD5E         E6B9
+DD5F         E6BA
+DD60         E6BB
+DD61         E6BC
+DD62         E6BD
+DD63         E6BE
+DD64         E6BF
+DD65         E6C0
+DD66         E6C1
+DD67         E6C2
+DD68         E6C3
+DD69         E6C4
+DD6A         E6C5
+DD6B         E6C6
+DD6C         E6C7
+DD6D         E6C8
+DD6E         E6C9
+DD6F         E6CA
+DD70         E6CB
+DD71         E6CC
+DD72         E6CD
+DD73         E6CE
+DD74         E6CF
+DD75         E6D0
+DD76         E6D1
+DD77         E6D2
+DD78         E6D3
+DD79         E6D4
+DD7A         E6D5
+DD7B         E6D6
+DD7C         E6D7
+DD7D         E6D8
+DD7E         E6D9
+DD7F         E6DA
+DD81         E6DB
+DD82         E6DC
+DD83         E6DD
+DD84         E6DE
+DD85         E6DF
+DD86         E6E0
+DD87         E6E1
+DD88         E6E2
+DD89         E6E3
+DD8A         E6E4
+DD8B         E6E5
+DD8C         E6E6
+DD8D         E6E7
+DD8E         E6E8
+DD8F         E6E9
+DD90         E6EA
+DD91         E6EB
+DD92         E6EC
+DD93         E6ED
+DD94         E6EE
+DD95         E6EF
+DD96         E6F0
+DD97         E6F1
+DD98         E6F2
+DD99         E6F3
+DD9A         E6F4
+DD9B         E6F5
+DD9C         E6F6
+DD9D         E6F7
+DD9E         E6F8
+DD9F         E6F9
+DDA0         E6FA
+DDA1         E6FB
+DDA2         E6FC
+DDA3         E6FD
+DDA4         E6FE
+DDA5         E6FF
+DDA6         E700
+DDA7         E701
+DDA8         E702
+DDA9         E703
+DDAA         E704
+DDAB         E705
+DDAC         E706
+DDAD         E707
+DDAE         E708
+DDAF         E709
+DDB0         E70A
+DDB1         E70B
+DDB2         E70C
+DDB3         E70D
+DDB4         E70E
+DDB5         E70F
+DDB6         E710
+DDB7         E711
+DDB8         E712
+DDB9         E713
+DDBA         E714
+DDBB         E715
+DDBC         E716
+DDBD         E717
+DDBE         E718
+DDBF         E719
+DDC0         E71A
+DDC1         E71B
+DDC2         E71C
+DDC3         E71D
+DDC4         E71E
+DDC5         E71F
+DDC6         E720
+DDC7         E721
+DDC8         E722
+DDC9         E723
+DDCA         E724
+DDCB         E725
+DDCC         E726
+DDCD         E727
+DDCE         E728
+DDCF         E729
+DDD0         E72A
+DDD1         E72B
+DDD2         E72C
+DDD3         E72D
+DDD4         E72E
+DDD5         E72F
+DDD6         E730
+DDD7         E731
+DDD8         E732
+DDD9         E733
+DDDA         E734
+DDDB         E735
+DDDC         E736
+DDDD         E737
+DDDE         E738
+DDDF         E739
+DDE0         E73A
+DDE1         E73B
+DDE2         E73C
+DDE3         E73D
+DDE4         E73E
+DDE5         E73F
+DDE6         E740
+DDE7         E741
+DDE8         E742
+DDE9         E743
+DDEA         E744
+DDEB         E745
+DDEC         E746
+DDED         E747
+DDEE         E748
+DDEF         E749
+DDF0         E74A
+DDF1         E74B
+DDF2         E74C
+DDF3         E74D
+DDF4         E74E
+DDF5         E74F
+DDF6         E750
+DDF7         E751
+DDF8         E752
+DDF9         E753
+DDFA         E754
+DDFB         E755
+DDFC         E756
+DDFD         E757
--- a/make/tools/CharsetMapping/dbcs	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/tools/CharsetMapping/dbcs	Wed Apr 20 04:38:36 2011 +0100
@@ -10,6 +10,7 @@
 MS949	  x-windows-949 MS949 basic     sun.nio.cs.ext    true    0x81   0xfe   0x41  0xfe
 MS950	  x-windows-950 MS950 basic     sun.nio.cs.ext    true    0x81   0xfe   0x40  0xfe
 GBK	  GBK        GBK      basic     sun.nio.cs.ext    true    0x81   0xfe   0x40  0xfe
+IBM1364	  x-IBM1364  Cp1364   ebcdic	sun.nio.cs.ext	  false   0x40   0xde   0x40  0xfe
 IBM1381	  x-IBM1381  Cp1381   basic     sun.nio.cs.ext    true    0x8c   0xf7   0xa1  0xfe
 IBM1383	  x-IBM1383  Cp1383   euc_sim   sun.nio.cs.ext    true    0xa1   0xfe   0xa1  0xfe
 IBM930	  x-IBM930   Cp930    ebcdic    sun.nio.cs.ext    false   0x40   0x7f   0x40  0xfe
--- a/make/tools/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/tools/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2011, 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 @@
 BUILDDIR = ..
 include $(BUILDDIR)/common/Defs.gmk
 
+# Note: freetypecheck is built by Sanity.gmk if needed
 SUBDIRS =                   \
   addjsum                   \
   buildmetaindex            \
@@ -38,7 +39,6 @@
   compile_properties        \
   dir_diff                  \
   dtdbuilder                \
-  freetypecheck             \
   generate_break_iterator   \
   GenerateCharacter         \
   generatecurrencydata      \
--- a/make/tools/manifest.mf	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/tools/manifest.mf	Wed Apr 20 04:38:36 2011 +0100
@@ -1,6 +1,6 @@
 Manifest-Version: 1.0
 Specification-Title: Java Platform API Specification
-Specification-Version: 1.6
+Specification-Version: 1.7
 Specification-Vendor: Oracle
 Implementation-Title: Java Runtime Environment
 Implementation-Version: @@RELEASE@@
--- a/make/tools/sharing/classlist.linux	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/tools/sharing/classlist.linux	Wed Apr 20 04:38:36 2011 +0100
@@ -104,9 +104,7 @@
 java/lang/ref/Reference$Lock
 java/lang/ref/Reference$ReferenceHandler
 java/lang/ref/Finalizer$FinalizerThread
-java/util/Hashtable$EmptyEnumerator
 java/util/Enumeration
-java/util/Hashtable$EmptyIterator
 java/util/Iterator
 java/util/Hashtable$Entry
 java/nio/charset/Charset
@@ -192,8 +190,6 @@
 java/util/LinkedHashMap
 java/util/LinkedHashMap$Entry
 java/lang/StringBuilder
-java/io/File$1
-sun/misc/JavaIODeleteOnExitAccess
 sun/misc/SharedSecrets
 java/lang/ClassLoader$3
 java/lang/StringCoding$StringEncoder
@@ -207,7 +203,6 @@
 java/io/Console
 java/io/Console$1
 sun/misc/JavaIOAccess
-java/io/Console$1$1
 java/lang/Shutdown
 java/util/ArrayList
 java/lang/Shutdown$Lock
@@ -330,7 +325,6 @@
 java/beans/PropertyChangeEvent
 java/util/EventObject
 java/awt/Component$AWTTreeLock
-sun/awt/DebugHelper
 sun/awt/NativeLibLoader
 sun/security/action/LoadLibraryAction
 java/awt/GraphicsEnvironment
@@ -341,7 +335,6 @@
 java/lang/ProcessEnvironment$Value
 java/lang/ProcessEnvironment$StringEnvironment
 java/util/Collections$UnmodifiableMap
-sun/awt/DebugHelperStub
 java/awt/Toolkit
 java/awt/Toolkit$3
 sun/util/CoreResourceBundleControl
@@ -391,9 +384,7 @@
 sun/java2d/SunGraphicsEnvironment
 sun/java2d/FontSupport
 sun/awt/DisplayChangedListener
-sun/java2d/SunGraphicsEnvironment$TTFilter
 java/io/FilenameFilter
-sun/java2d/SunGraphicsEnvironment$T1Filter
 sun/awt/X11GraphicsEnvironment$1
 sun/awt/SunToolkit
 sun/awt/WindowClosingSupport
@@ -403,7 +394,6 @@
 java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
 java/util/concurrent/locks/Condition
 sun/awt/AWTAutoShutdown
-sun/awt/AWTAutoShutdown$PeerMap
 sun/awt/SunToolkit$6
 java/awt/Dialog$ModalExclusionType
 java/lang/Enum
@@ -425,7 +415,6 @@
 java/util/HashMap$Values
 java/util/HashMap$ValueIterator
 java/util/HashMap$HashIterator
-sun/font/FontManager$1
 java/awt/Font
 java/awt/geom/AffineTransform
 sun/font/AttributeValues
@@ -463,13 +452,11 @@
 sun/java2d/Disposer
 sun/java2d/Disposer$1
 sun/font/StrikeCache$1
-sun/font/FontManager$FontRegistrationInfo
 sun/awt/motif/MFontConfiguration
 sun/awt/FontConfiguration
 sun/awt/FontDescriptor
 java/util/Scanner
 java/util/regex/Pattern
-java/util/regex/Pattern$8
 java/util/regex/Pattern$Node
 java/util/regex/Pattern$LastNode
 java/util/regex/Pattern$GroupHead
@@ -509,7 +496,6 @@
 java/util/regex/Pattern$BmpCharProperty
 java/util/regex/Pattern$6
 java/util/regex/Pattern$CharProperty$1
-java/util/regex/Pattern$10
 sun/nio/ch/FileChannelImpl
 java/nio/channels/FileChannel
 java/nio/channels/ByteChannel
@@ -565,7 +551,6 @@
 java/text/spi/DecimalFormatSymbolsProvider
 java/util/Currency
 java/util/Currency$1
-java/util/CurrencyData
 java/util/spi/CurrencyNameProvider
 sun/util/resources/CurrencyNames
 sun/util/resources/LocaleNamesBundle
@@ -582,7 +567,6 @@
 java/util/regex/Pattern$5
 java/util/regex/Pattern$Loop
 java/util/regex/Pattern$Prolog
-java/util/regex/Pattern$9
 java/util/regex/Pattern$BranchConn
 java/util/regex/Pattern$Branch
 java/nio/channels/spi/AbstractInterruptibleChannel$1
@@ -635,11 +619,8 @@
 java/awt/image/PackedColorModel
 java/awt/color/ColorSpace
 java/awt/color/ICC_Profile
-sun/awt/color/ProfileDeferralInfo
-sun/awt/color/ProfileDeferralMgr
 java/awt/color/ICC_ProfileRGB
 java/awt/color/ICC_Profile$1
-sun/awt/color/ProfileActivator
 java/awt/color/ICC_ColorSpace
 sun/java2d/pipe/NullPipe
 sun/java2d/pipe/PixelDrawPipe
@@ -662,8 +643,6 @@
 sun/java2d/pipe/SpanClipRenderer
 sun/java2d/pipe/Region
 sun/java2d/pipe/RegionIterator
-sun/java2d/pipe/DuctusShapeRenderer
-sun/java2d/pipe/DuctusRenderer
 sun/java2d/pipe/AlphaPaintPipe
 sun/java2d/pipe/SpanShapeRenderer$Composite
 sun/java2d/pipe/SpanShapeRenderer
@@ -737,7 +716,6 @@
 sun/awt/X11/Native
 sun/awt/X11/Native$1
 java/awt/EventQueue
-sun/awt/X11/XToolkit$7
 java/util/EmptyStackException
 java/lang/reflect/InvocationTargetException
 java/awt/EventDispatchThread
@@ -746,10 +724,7 @@
 sun/awt/PeerEvent
 java/awt/event/InvocationEvent
 java/awt/ActiveEvent
-java/awt/EventQueueItem
 sun/awt/X11/XToolkit$1
-sun/awt/X11/XToolkit$XErrorHandler
-sun/awt/X11/XToolkit$5
 sun/awt/X11/XEventDispatcher
 sun/awt/SunToolkit$ModalityListenerList
 sun/awt/ModalityListener
@@ -761,21 +736,18 @@
 java/util/Deque
 java/util/Queue
 java/util/AbstractSequentialList
-java/util/LinkedList$Entry
 sun/awt/X11/AwtScreenData
 sun/awt/X11/XWM
 sun/awt/X11/MWMConstants
 sun/awt/X11/XAtom
 java/awt/Insets
 sun/awt/X11/XWM$1
-sun/awt/X11/XWM$2
 sun/awt/X11/XSetWindowAttributes
 sun/awt/X11/XErrorEvent
 sun/awt/X11/XNETProtocol
 sun/awt/X11/XStateProtocol
 sun/awt/X11/XLayerProtocol
 sun/awt/X11/XProtocol
-sun/awt/X11/XProtocol$1
 sun/awt/X11/WindowPropertyGetter
 sun/awt/X11/UnsafeXDisposerRecord
 sun/awt/X11/XPropertyCache
@@ -783,7 +755,6 @@
 sun/awt/X11/XAtomList
 sun/awt/X11/XToolkit$3
 sun/awt/X11/XAnyEvent
-sun/awt/X11/IXAnyEvent
 java/awt/Window$WindowDisposerRecord
 java/awt/KeyboardFocusManager
 java/awt/KeyEventDispatcher
@@ -794,7 +765,6 @@
 java/awt/DefaultFocusTraversalPolicy
 java/awt/ContainerOrderFocusTraversalPolicy
 java/awt/FocusTraversalPolicy
-java/awt/MutableBoolean
 java/util/Collections$UnmodifiableSet
 sun/awt/HeadlessToolkit
 sun/awt/X11/XKeyboardFocusManagerPeer
@@ -856,7 +826,6 @@
 sun/java2d/x11/X11Renderer
 sun/awt/X11/XGlobalCursorManager
 sun/awt/GlobalCursorManager
-sun/awt/X11/XToolkit$6
 java/awt/Cursor$CursorDisposer
 java/awt/AWTException
 java/awt/HeadlessException
@@ -888,7 +857,6 @@
 java/awt/event/MouseMotionListener
 java/awt/event/MouseWheelListener
 java/awt/event/InputMethodListener
-java/awt/Component$NativeInLightFixer
 java/awt/event/ContainerListener
 javax/accessibility/AccessibleContext
 sun/reflect/UnsafeObjectFieldAccessorImpl
@@ -969,7 +937,6 @@
 javax/swing/SwingPaintEventDispatcher
 sun/awt/PaintEventDispatcher
 javax/swing/UIManager$2
-javax/swing/UIManager$3
 java/awt/PopupMenu
 java/awt/Menu
 java/awt/MenuItem
@@ -1062,8 +1029,6 @@
 javax/swing/plaf/LabelUI
 javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1
 javax/swing/plaf/basic/BasicHTML
-javax/swing/SystemEventQueueUtilities
-javax/swing/SystemEventQueueUtilities$SystemEventQueue
 sun/awt/NullComponentPeer
 java/awt/event/WindowEvent
 java/awt/EventQueue$1
@@ -1084,11 +1049,9 @@
 sun/misc/ExtensionDependency
 java/lang/Package
 sun/security/util/ManifestEntryVerifier
-sun/security/provider/Sun
 java/security/Provider
 java/security/Provider$ServiceKey
 java/security/Provider$EngineDescription
-sun/security/provider/Sun$1
 java/security/Security
 java/security/Security$1
 sun/misc/FloatingDecimal
@@ -1133,7 +1096,6 @@
 javax/swing/text/SimpleAttributeSet$EmptyAttributeSet
 javax/swing/text/StyleContext$NamedStyle
 javax/swing/text/Style
-javax/swing/text/SimpleAttributeSet$1
 javax/swing/text/StyleContext$SmallAttributeSet
 javax/swing/text/AbstractDocument$BidiRootElement
 javax/swing/text/AbstractDocument$BranchElement
@@ -1267,7 +1229,6 @@
 sun/nio/cs/UTF_16$Decoder
 sun/nio/cs/UnicodeDecoder
 sun/font/FileFontStrike
-sun/font/FileFont$FileFontDisposer
 sun/font/TrueTypeGlyphMapper
 sun/font/CMap
 sun/font/CMap$NullCMapClass
@@ -1281,20 +1242,12 @@
 sun/awt/EventQueueItem
 sun/awt/SunToolkit$3
 sun/awt/X11/XExposeEvent
-sun/awt/X11/ComponentAccessor
-sun/awt/X11/ComponentAccessor$1
 sun/reflect/UnsafeBooleanFieldAccessorImpl
 sun/awt/event/IgnorePaintEvent
 java/awt/image/DataBufferInt
 java/awt/image/SinglePixelPackedSampleModel
 sun/awt/image/IntegerInterleavedRaster
-sun/java2d/x11/X11RemoteOffScreenImage
-sun/awt/image/RemoteOffScreenImage
 sun/awt/image/OffScreenImage
-sun/java2d/x11/X11RemoteOffScreenImage$X11RemoteSurfaceManager
-sun/awt/image/OffScreenSurfaceManager
-sun/awt/image/CachingSurfaceManager
-sun/awt/image/RasterListener
 sun/awt/image/BufImgSurfaceData
 sun/java2d/opengl/GLXGraphicsConfig
 sun/java2d/opengl/OGLGraphicsConfig
@@ -1302,7 +1255,6 @@
 sun/awt/image/WritableRasterNative
 sun/awt/image/DataBufferNative
 sun/java2d/SurfaceManagerFactory
-sun/java2d/x11/X11CachingSurfaceManager
 sun/java2d/opengl/GLXSurfaceData
 sun/java2d/opengl/OGLSurfaceData
 sun/font/CompositeGlyphMapper
@@ -1332,10 +1284,7 @@
 java/lang/ProcessImpl
 java/lang/UNIXProcess
 java/lang/Process
-java/lang/UNIXProcess$Gate
 java/lang/UNIXProcess$1
-java/lang/UNIXProcess$1$1
-java/lang/UNIXProcess$1$1$1
 java/net/ServerSocket
 java/util/Random
 java/util/concurrent/atomic/AtomicLong
@@ -1422,7 +1371,6 @@
 javax/swing/ToolTipManager$insideTimerAction
 javax/swing/ToolTipManager$outsideTimerAction
 javax/swing/ToolTipManager$stillInsideTimerAction
-javax/swing/ToolTipManager$Actions
 sun/swing/UIAction
 javax/swing/Action
 javax/swing/ToolTipManager$MoveBeforeEnterListener
@@ -1715,7 +1663,6 @@
 javax/swing/border/EtchedBorder
 javax/swing/JToolBar$Separator
 javax/swing/plaf/basic/BasicToolBarSeparatorUI
-sun/awt/color/CMM
 java/applet/Applet
 java/awt/Panel
 com/sun/awt/AWTUtilities
@@ -1752,7 +1699,6 @@
 java/awt/LightweightDispatcher$2
 sun/awt/X11/XReparentEvent
 sun/awt/X11/XWindowAttributes
-javax/swing/SystemEventQueueUtilities$ComponentWorkRequest
 sun/awt/X11/XFocusChangeEvent
 sun/awt/X11/XComponentPeer$1
 sun/awt/X11/XUnmapEvent
@@ -1771,7 +1717,6 @@
 sun/net/www/MimeTable
 java/net/FileNameMap
 sun/net/www/MimeTable$1
-sun/net/www/MimeTable$2
 sun/net/www/MimeEntry
 java/net/URLConnection$1
 java/text/SimpleDateFormat
@@ -1957,7 +1902,6 @@
 javax/swing/tree/VariableHeightLayoutCache$TreeStateNode
 javax/swing/tree/DefaultMutableTreeNode
 javax/swing/tree/MutableTreeNode
-javax/swing/tree/DefaultMutableTreeNode$1
 javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration
 javax/swing/event/TableColumnModelEvent
 java/text/ParseException
@@ -2014,21 +1958,13 @@
 sun/java2d/HeadlessGraphicsEnvironment
 java/util/Hashtable$KeySet
 java/awt/FontFormatException
-sun/java2d/SunGraphicsEnvironment$2
 sun/font/Type1Font$1
 java/nio/channels/FileChannel$MapMode
 sun/nio/ch/FileChannelImpl$Unmapper
 sun/nio/ch/Util$3
 java/nio/DirectByteBufferR
 java/nio/charset/Charset$3
-sun/nio/cs/ext/ExtendedCharsets
 sun/nio/cs/AbstractCharsetProvider
-sun/nio/cs/ext/SJIS
-sun/nio/cs/ext/SJIS$Decoder
-sun/nio/cs/ext/DelegatableDecoder
-sun/nio/cs/ext/JIS_X_0208_Decoder
-sun/nio/cs/ext/DoubleByteDecoder
-sun/nio/cs/ext/JIS_X_0201$Decoder
 sun/nio/cs/SingleByteDecoder
 java/lang/CharacterData00
 javax/swing/DefaultListModel
@@ -2145,7 +2081,6 @@
 java/security/MessageDigest$Delegate
 sun/security/provider/ByteArrayAccess
 java/io/ObjectStreamClass$ClassDataSlot
-java/io/ObjectInputStream$CallbackContext
 sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl
 java/security/SignatureException
 java/security/InvalidKeyException
@@ -2194,8 +2129,6 @@
 java/math/MutableBigInteger
 java/math/SignedMutableBigInteger
 java/awt/EventQueue$1AWTInvocationLock
-javax/swing/SystemEventQueueUtilities$RunnableCanvas
-javax/swing/SystemEventQueueUtilities$RunnableCanvasGraphics
 java/awt/Component$FlipBufferStrategy
 java/awt/SentEvent
 sun/awt/X11/XDestroyWindowEvent
@@ -2231,18 +2164,13 @@
 javax/swing/plaf/synth/SynthLookAndFeel$Handler
 javax/swing/plaf/synth/SynthDefaultLookup
 com/sun/java/swing/plaf/gtk/GTKEngine
-com/sun/java/swing/plaf/gtk/GTKDefaultEngine
 com/sun/java/swing/plaf/gtk/GTKEngine$Settings
 com/sun/java/swing/plaf/gtk/GTKStyleFactory
 com/sun/java/swing/plaf/gtk/PangoFonts
-sun/font/FontManager$FontConfigInfo
 com/sun/java/swing/plaf/gtk/GTKLookAndFeel$WeakPCL
 javax/swing/plaf/synth/Region
 javax/swing/plaf/synth/SynthLookAndFeel$AATextListener
-com/sun/java/swing/plaf/gtk/GTKNativeEngine
-com/sun/java/swing/plaf/gtk/GTKNativeEngine$WidgetType
 com/sun/java/swing/plaf/gtk/GTKRegion
-com/sun/java/swing/plaf/gtk/GTKDefaultStyle
 com/sun/java/swing/plaf/gtk/GTKStyle
 com/sun/java/swing/plaf/gtk/GTKConstants
 javax/swing/plaf/synth/SynthStyle
@@ -2268,7 +2196,6 @@
 javax/swing/plaf/synth/SynthToggleButtonUI
 javax/swing/plaf/basic/BasicBorders$FieldBorder
 javax/swing/plaf/synth/SynthMenuBarUI
-javax/swing/plaf/synth/DefaultMenuLayout
 javax/swing/plaf/synth/SynthMenuUI
 javax/swing/plaf/synth/SynthUI
 com/sun/java/swing/plaf/gtk/GTKIconFactory
@@ -2332,7 +2259,6 @@
 javax/security/auth/AuthPermission
 java/lang/Thread$1
 java/util/logging/LogManager$5
-java/util/logging/LogManager$6
 sun/applet/StdAppletViewerFactory
 sun/applet/AppletViewerFactory
 sun/applet/AppletViewer$UserActionListener
@@ -2343,7 +2269,6 @@
 sun/applet/AppletPanel$10
 java/security/Policy$1
 sun/security/provider/PolicyFile$1
-sun/security/provider/PolicyInfo
 sun/security/provider/PolicyFile$3
 sun/security/util/PropertyExpander
 sun/security/provider/PolicyParser
@@ -2353,12 +2278,10 @@
 sun/security/provider/PolicyFile$PolicyEntry
 sun/security/provider/PolicyFile$6
 sun/security/provider/PolicyFile$7
-sun/security/provider/SelfPermission
 java/net/SocketPermissionCollection
 java/util/PropertyPermissionCollection
 sun/applet/AppletPanel$9
 sun/applet/AppletClassLoader
-sun/applet/AppletClassLoader$4
 sun/applet/AppletThreadGroup
 sun/applet/AppContextCreator
 sun/applet/AppletPanel$1
@@ -2372,10 +2295,8 @@
 sun/awt/X11/XMenuItemPeer
 java/awt/MenuShortcut
 sun/awt/X11/XMenuWindow
-sun/awt/X11/XMenuBarPeer$1
 sun/awt/X11/XMenuItemPeer$TextMetrics
 sun/awt/AppContext$3
-sun/awt/MostRecentThreadAppContext
 sun/awt/X11/XMenuBarPeer$MappingData
 sun/awt/X11/XBaseMenuWindow$MappingData
 sun/applet/AppletViewer$1
--- a/make/tools/sharing/classlist.solaris	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/tools/sharing/classlist.solaris	Wed Apr 20 04:38:36 2011 +0100
@@ -104,9 +104,7 @@
 java/lang/ref/Reference$Lock
 java/lang/ref/Reference$ReferenceHandler
 java/lang/ref/Finalizer$FinalizerThread
-java/util/Hashtable$EmptyEnumerator
 java/util/Enumeration
-java/util/Hashtable$EmptyIterator
 java/util/Iterator
 java/util/Hashtable$Entry
 java/nio/charset/Charset
@@ -198,8 +196,6 @@
 java/io/ExpiringCache$1
 java/util/LinkedHashMap
 java/util/LinkedHashMap$Entry
-java/io/File$1
-sun/misc/JavaIODeleteOnExitAccess
 sun/misc/SharedSecrets
 java/lang/ClassLoader$3
 java/lang/StringCoding$StringEncoder
@@ -213,7 +209,6 @@
 java/io/Console
 java/io/Console$1
 sun/misc/JavaIOAccess
-java/io/Console$1$1
 java/lang/Shutdown
 java/util/ArrayList
 java/lang/Shutdown$Lock
@@ -332,7 +327,6 @@
 java/beans/PropertyChangeEvent
 java/util/EventObject
 java/awt/Component$AWTTreeLock
-sun/awt/DebugHelper
 sun/awt/NativeLibLoader
 sun/security/action/LoadLibraryAction
 java/awt/GraphicsEnvironment
@@ -343,7 +337,6 @@
 java/lang/ProcessEnvironment$Value
 java/lang/ProcessEnvironment$StringEnvironment
 java/util/Collections$UnmodifiableMap
-sun/awt/DebugHelperStub
 java/awt/Toolkit
 java/awt/Toolkit$3
 sun/util/CoreResourceBundleControl
@@ -393,9 +386,7 @@
 sun/java2d/SunGraphicsEnvironment
 sun/java2d/FontSupport
 sun/awt/DisplayChangedListener
-sun/java2d/SunGraphicsEnvironment$TTFilter
 java/io/FilenameFilter
-sun/java2d/SunGraphicsEnvironment$T1Filter
 sun/awt/X11GraphicsEnvironment$1
 sun/awt/SunToolkit
 sun/awt/WindowClosingSupport
@@ -405,7 +396,6 @@
 java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
 java/util/concurrent/locks/Condition
 sun/awt/AWTAutoShutdown
-sun/awt/AWTAutoShutdown$PeerMap
 sun/awt/SunToolkit$6
 java/awt/Dialog$ModalExclusionType
 java/lang/Enum
@@ -426,7 +416,6 @@
 java/util/HashMap$Values
 java/util/HashMap$ValueIterator
 java/util/HashMap$HashIterator
-sun/font/FontManager$1
 java/awt/Font
 java/awt/geom/AffineTransform
 sun/font/AttributeValues
@@ -464,7 +453,6 @@
 sun/java2d/Disposer
 sun/java2d/Disposer$1
 sun/font/StrikeCache$1
-sun/font/FontManager$FontRegistrationInfo
 sun/awt/motif/MFontConfiguration
 sun/awt/FontConfiguration
 sun/awt/FontDescriptor
@@ -509,11 +497,8 @@
 java/awt/image/PackedColorModel
 java/awt/color/ColorSpace
 java/awt/color/ICC_Profile
-sun/awt/color/ProfileDeferralInfo
-sun/awt/color/ProfileDeferralMgr
 java/awt/color/ICC_ProfileRGB
 java/awt/color/ICC_Profile$1
-sun/awt/color/ProfileActivator
 java/awt/color/ICC_ColorSpace
 sun/java2d/pipe/NullPipe
 sun/java2d/pipe/PixelDrawPipe
@@ -536,8 +521,6 @@
 sun/java2d/pipe/SpanClipRenderer
 sun/java2d/pipe/Region
 sun/java2d/pipe/RegionIterator
-sun/java2d/pipe/DuctusShapeRenderer
-sun/java2d/pipe/DuctusRenderer
 sun/java2d/pipe/AlphaPaintPipe
 sun/java2d/pipe/SpanShapeRenderer$Composite
 sun/java2d/pipe/SpanShapeRenderer
@@ -611,7 +594,6 @@
 sun/awt/X11/Native
 sun/awt/X11/Native$1
 java/awt/EventQueue
-sun/awt/X11/XToolkit$7
 java/util/EmptyStackException
 java/lang/reflect/InvocationTargetException
 java/awt/EventDispatchThread
@@ -620,10 +602,7 @@
 sun/awt/PeerEvent
 java/awt/event/InvocationEvent
 java/awt/ActiveEvent
-java/awt/EventQueueItem
 sun/awt/X11/XToolkit$1
-sun/awt/X11/XToolkit$XErrorHandler
-sun/awt/X11/XToolkit$5
 sun/awt/X11/XEventDispatcher
 sun/awt/SunToolkit$ModalityListenerList
 sun/awt/ModalityListener
@@ -635,21 +614,18 @@
 java/util/Deque
 java/util/Queue
 java/util/AbstractSequentialList
-java/util/LinkedList$Entry
 sun/awt/X11/AwtScreenData
 sun/awt/X11/XWM
 sun/awt/X11/MWMConstants
 sun/awt/X11/XAtom
 java/awt/Insets
 sun/awt/X11/XWM$1
-sun/awt/X11/XWM$2
 sun/awt/X11/XSetWindowAttributes
 sun/awt/X11/XErrorEvent
 sun/awt/X11/XNETProtocol
 sun/awt/X11/XStateProtocol
 sun/awt/X11/XLayerProtocol
 sun/awt/X11/XProtocol
-sun/awt/X11/XProtocol$1
 java/lang/Long$LongCache
 sun/awt/X11/WindowPropertyGetter
 sun/awt/X11/UnsafeXDisposerRecord
@@ -659,7 +635,6 @@
 sun/awt/X11/XToolkit$3
 java/awt/Window$WindowDisposerRecord
 sun/awt/X11/XAnyEvent
-sun/awt/X11/IXAnyEvent
 java/awt/KeyboardFocusManager
 java/awt/KeyEventDispatcher
 java/awt/KeyEventPostProcessor
@@ -669,7 +644,6 @@
 java/awt/DefaultFocusTraversalPolicy
 java/awt/ContainerOrderFocusTraversalPolicy
 java/awt/FocusTraversalPolicy
-java/awt/MutableBoolean
 java/util/Collections$UnmodifiableSet
 sun/awt/HeadlessToolkit
 sun/awt/X11/XKeyboardFocusManagerPeer
@@ -728,7 +702,6 @@
 sun/java2d/x11/X11Renderer
 sun/awt/X11/XGlobalCursorManager
 sun/awt/GlobalCursorManager
-sun/awt/X11/XToolkit$6
 java/awt/Cursor$CursorDisposer
 java/awt/AWTException
 java/awt/HeadlessException
@@ -760,7 +733,6 @@
 java/awt/event/MouseMotionListener
 java/awt/event/MouseWheelListener
 java/awt/event/InputMethodListener
-java/awt/Component$NativeInLightFixer
 java/awt/event/ContainerListener
 javax/accessibility/AccessibleContext
 sun/reflect/UnsafeObjectFieldAccessorImpl
@@ -845,7 +817,6 @@
 javax/swing/SwingPaintEventDispatcher
 sun/awt/PaintEventDispatcher
 javax/swing/UIManager$2
-javax/swing/UIManager$3
 java/awt/PopupMenu
 java/awt/Menu
 java/awt/MenuItem
@@ -941,8 +912,6 @@
 javax/swing/plaf/LabelUI
 javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1
 javax/swing/plaf/basic/BasicHTML
-javax/swing/SystemEventQueueUtilities
-javax/swing/SystemEventQueueUtilities$SystemEventQueue
 sun/awt/NullComponentPeer
 java/awt/event/WindowEvent
 java/awt/EventQueue$1
@@ -954,11 +923,8 @@
 java/awt/event/ActionEvent
 sun/awt/X11/XReparentEvent
 sun/awt/X11/XWindowAttributes
-sun/awt/X11/ComponentAccessor
-sun/awt/X11/ComponentAccessor$1
 sun/awt/EventQueueItem
 sun/awt/SunToolkit$3
-javax/swing/SystemEventQueueUtilities$ComponentWorkRequest
 java/applet/Applet
 java/awt/Panel
 com/sun/awt/AWTUtilities
@@ -974,17 +940,14 @@
 sun/misc/ExtensionDependency
 java/lang/Package
 sun/security/util/ManifestEntryVerifier
-sun/security/provider/Sun
 java/security/Provider
 java/security/Provider$ServiceKey
 java/security/Provider$EngineDescription
-sun/security/provider/Sun$1
 java/security/Security
 java/security/Security$1
 sun/misc/FloatingDecimal
 sun/misc/FloatingDecimal$1
 java/util/regex/Pattern
-java/util/regex/Pattern$8
 java/util/regex/Pattern$Node
 java/util/regex/Pattern$LastNode
 java/util/regex/Pattern$GroupHead
@@ -1068,7 +1031,6 @@
 javax/swing/text/SimpleAttributeSet$EmptyAttributeSet
 javax/swing/text/StyleContext$NamedStyle
 javax/swing/text/Style
-javax/swing/text/SimpleAttributeSet$1
 javax/swing/text/StyleContext$SmallAttributeSet
 javax/swing/text/AbstractDocument$BidiRootElement
 javax/swing/text/AbstractDocument$BranchElement
@@ -1232,7 +1194,6 @@
 sun/nio/cs/UTF_16$Decoder
 sun/nio/cs/UnicodeDecoder
 sun/font/FileFontStrike
-sun/font/FileFont$FileFontDisposer
 sun/font/TrueTypeGlyphMapper
 sun/font/CMap
 sun/font/CMap$NullCMapClass
@@ -1242,17 +1203,9 @@
 java/awt/FontFormatException
 sun/java2d/HeadlessGraphicsEnvironment
 java/nio/charset/Charset$3
-sun/nio/cs/ext/ExtendedCharsets
 sun/nio/cs/AbstractCharsetProvider
-sun/nio/cs/ext/EUC_KR
-sun/nio/cs/ext/EUC_KR$Decoder
-sun/nio/cs/ext/DoubleByteDecoder
 sun/font/NativeFont
-sun/nio/cs/ext/MS950
-sun/nio/cs/ext/MS950$Decoder
 java/lang/CharacterData00
-sun/nio/cs/ext/GBK
-sun/nio/cs/ext/GBK$Decoder
 sun/font/CMap$CMapFormat2
 sun/font/FontDesignMetrics$KeyReference
 sun/awt/image/PNGImageDecoder
@@ -1264,13 +1217,7 @@
 java/awt/image/DataBufferInt
 java/awt/image/SinglePixelPackedSampleModel
 sun/awt/image/IntegerInterleavedRaster
-sun/java2d/x11/X11RemoteOffScreenImage
-sun/awt/image/RemoteOffScreenImage
 sun/awt/image/OffScreenImage
-sun/java2d/x11/X11RemoteOffScreenImage$X11RemoteSurfaceManager
-sun/awt/image/OffScreenSurfaceManager
-sun/awt/image/CachingSurfaceManager
-sun/awt/image/RasterListener
 sun/awt/image/BufImgSurfaceData
 sun/java2d/opengl/GLXGraphicsConfig
 sun/java2d/opengl/OGLGraphicsConfig
@@ -1278,7 +1225,6 @@
 sun/awt/image/WritableRasterNative
 sun/awt/image/DataBufferNative
 sun/java2d/SurfaceManagerFactory
-sun/java2d/x11/X11CachingSurfaceManager
 sun/java2d/opengl/GLXSurfaceData
 sun/java2d/opengl/OGLSurfaceData
 sun/font/CompositeGlyphMapper
@@ -1419,7 +1365,6 @@
 javax/swing/ToolTipManager$insideTimerAction
 javax/swing/ToolTipManager$outsideTimerAction
 javax/swing/ToolTipManager$stillInsideTimerAction
-javax/swing/ToolTipManager$Actions
 sun/swing/UIAction
 javax/swing/Action
 javax/swing/ToolTipManager$MoveBeforeEnterListener
@@ -1712,7 +1657,6 @@
 javax/swing/JToolBar$Separator
 javax/swing/plaf/basic/BasicToolBarSeparatorUI
 sun/font/FontDesignMetrics$MetricsKey
-sun/awt/color/CMM
 javax/swing/KeyboardManager$ComponentKeyStrokePair
 sun/awt/EmbeddedFrame
 sun/awt/im/InputMethodContext
@@ -1763,7 +1707,6 @@
 sun/net/www/MimeTable
 java/net/FileNameMap
 sun/net/www/MimeTable$1
-sun/net/www/MimeTable$2
 sun/net/www/MimeEntry
 java/net/URLConnection$1
 java/text/SimpleDateFormat
@@ -1785,7 +1728,6 @@
 java/text/spi/DecimalFormatSymbolsProvider
 java/util/Currency
 java/util/Currency$1
-java/util/CurrencyData
 java/util/spi/CurrencyNameProvider
 sun/util/resources/CurrencyNames
 sun/util/resources/CurrencyNames_en_US
@@ -1964,7 +1906,6 @@
 javax/swing/tree/VariableHeightLayoutCache$TreeStateNode
 javax/swing/tree/DefaultMutableTreeNode
 javax/swing/tree/MutableTreeNode
-javax/swing/tree/DefaultMutableTreeNode$1
 javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration
 javax/swing/event/TableColumnModelEvent
 java/text/ParseException
@@ -2019,7 +1960,6 @@
 javax/swing/plaf/metal/MetalSliderUI$MetalPropertyListener
 javax/swing/plaf/basic/BasicSliderUI$PropertyChangeHandler
 java/util/Hashtable$KeySet
-sun/java2d/SunGraphicsEnvironment$5
 sun/font/Type1Font$1
 java/nio/channels/FileChannel$MapMode
 sun/nio/ch/FileChannelImpl$Unmapper
@@ -2134,7 +2074,6 @@
 sun/security/jca/ProviderList$1
 sun/security/jca/ProviderList$2
 sun/security/jca/ProviderConfig$2
-sun/security/jca/ProviderConfig$4
 sun/security/util/PropertyExpander
 sun/security/jca/ProviderConfig$1
 sun/security/jca/ProviderConfig$3
@@ -2192,7 +2131,6 @@
 java/security/KeyFactory
 sun/security/jca/ProviderList$ServiceList
 sun/security/jca/ProviderList$ServiceList$1
-sun/security/rsa/SunRsaSign
 sun/security/rsa/RSAKeyFactory
 java/security/KeyFactorySpi
 java/security/spec/RSAPublicKeySpec
@@ -2276,9 +2214,7 @@
 java/io/NotSerializableException
 java/io/ObjectStreamException
 java/security/InvalidParameterException
-java/util/Collections$EmptySet$1
 java/io/ObjectStreamClass$ClassDataSlot
-java/io/ObjectInputStream$CallbackContext
 sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl
 java/io/ObjectOutputStream$BlockDataOutputStream
 java/io/ObjectOutputStream$HandleTable
@@ -2294,11 +2230,8 @@
 java/security/spec/InvalidKeySpecException
 java/security/spec/DSAParameterSpec
 java/security/spec/AlgorithmParameterSpec
-javax/crypto/SecretKey
 sun/security/util/MemoryCache$HardCacheEntry
 java/awt/EventQueue$1AWTInvocationLock
-javax/swing/SystemEventQueueUtilities$RunnableCanvas
-javax/swing/SystemEventQueueUtilities$RunnableCanvasGraphics
 java/awt/Component$FlipBufferStrategy
 java/awt/SentEvent
 sun/awt/X11/XDestroyWindowEvent
@@ -2331,18 +2264,14 @@
 javax/swing/plaf/synth/SynthLookAndFeel$Handler
 javax/swing/plaf/synth/SynthDefaultLookup
 com/sun/java/swing/plaf/gtk/GTKEngine
-com/sun/java/swing/plaf/gtk/GTKNativeEngine
 javax/swing/plaf/synth/Region
-com/sun/java/swing/plaf/gtk/GTKNativeEngine$WidgetType
 com/sun/java/swing/plaf/gtk/GTKRegion
 sun/swing/ImageCache
 com/sun/java/swing/plaf/gtk/GTKEngine$Settings
 com/sun/java/swing/plaf/gtk/GTKStyleFactory
 com/sun/java/swing/plaf/gtk/PangoFonts
-sun/font/FontManager$FontConfigInfo
 com/sun/java/swing/plaf/gtk/GTKLookAndFeel$WeakPCL
 javax/swing/plaf/synth/SynthLookAndFeel$AATextListener
-com/sun/java/swing/plaf/gtk/GTKNativeStyle
 com/sun/java/swing/plaf/gtk/GTKStyle
 com/sun/java/swing/plaf/gtk/GTKConstants
 javax/swing/plaf/synth/SynthStyle
@@ -2370,7 +2299,6 @@
 javax/swing/plaf/synth/SynthToggleButtonUI
 javax/swing/plaf/basic/BasicBorders$FieldBorder
 javax/swing/plaf/synth/SynthMenuBarUI
-javax/swing/plaf/synth/DefaultMenuLayout
 javax/swing/plaf/synth/SynthMenuUI
 javax/swing/plaf/synth/SynthUI
 com/sun/java/swing/plaf/gtk/GTKIconFactory
@@ -2424,7 +2352,6 @@
 javax/security/auth/AuthPermission
 java/lang/Thread$1
 java/util/logging/LogManager$5
-java/util/logging/LogManager$6
 sun/applet/StdAppletViewerFactory
 sun/applet/AppletViewerFactory
 sun/applet/AppletViewer$UserActionListener
@@ -2435,7 +2362,6 @@
 sun/applet/AppletPanel$10
 java/security/Policy$1
 sun/security/provider/PolicyFile$1
-sun/security/provider/PolicyInfo
 sun/security/provider/PolicyFile$3
 sun/security/provider/PolicyParser
 sun/security/util/PolicyUtil
@@ -2444,12 +2370,10 @@
 sun/security/provider/PolicyFile$PolicyEntry
 sun/security/provider/PolicyFile$6
 sun/security/provider/PolicyFile$7
-sun/security/provider/SelfPermission
 java/net/SocketPermissionCollection
 java/util/PropertyPermissionCollection
 sun/applet/AppletPanel$9
 sun/applet/AppletClassLoader
-sun/applet/AppletClassLoader$4
 sun/applet/AppletThreadGroup
 sun/applet/AppContextCreator
 sun/applet/AppletPanel$1
@@ -2463,9 +2387,7 @@
 sun/awt/X11/XMenuItemPeer
 java/awt/MenuShortcut
 sun/awt/X11/XMenuWindow
-sun/awt/X11/XMenuBarPeer$1
 sun/awt/AppContext$3
-sun/awt/MostRecentThreadAppContext
 sun/awt/X11/XMenuItemPeer$TextMetrics
 sun/awt/X11/XMenuBarPeer$MappingData
 sun/awt/X11/XBaseMenuWindow$MappingData
--- a/make/tools/sharing/classlist.windows	Mon Nov 01 11:32:50 2010 -0400
+++ b/make/tools/sharing/classlist.windows	Wed Apr 20 04:38:36 2011 +0100
@@ -104,9 +104,7 @@
 java/lang/ref/Reference$Lock
 java/lang/ref/Reference$ReferenceHandler
 java/lang/ref/Finalizer$FinalizerThread
-java/util/Hashtable$EmptyEnumerator
 java/util/Enumeration
-java/util/Hashtable$EmptyIterator
 java/util/Iterator
 java/util/Hashtable$Entry
 sun/misc/Version
@@ -165,11 +163,9 @@
 sun/reflect/NativeConstructorAccessorImpl
 sun/reflect/DelegatingConstructorAccessorImpl
 sun/misc/VM
-sun/nio/cs/MS1252$Encoder
 sun/nio/cs/SingleByteEncoder
 java/nio/charset/CharsetEncoder
 java/nio/charset/CodingErrorAction
-sun/nio/cs/MS1252$Decoder
 sun/nio/cs/SingleByteDecoder
 java/nio/charset/CharsetDecoder
 java/nio/ByteBuffer
@@ -195,8 +191,6 @@
 java/io/ExpiringCache$1
 java/util/LinkedHashMap
 java/util/LinkedHashMap$Entry
-java/io/File$1
-sun/misc/JavaIODeleteOnExitAccess
 sun/misc/SharedSecrets
 java/lang/ClassLoader$3
 java/io/ExpiringCache$Entry
@@ -209,7 +203,6 @@
 java/io/Console
 java/io/Console$1
 sun/misc/JavaIOAccess
-java/io/Console$1$1
 java/lang/Shutdown
 java/util/ArrayList
 java/lang/Shutdown$Lock
@@ -333,10 +326,8 @@
 java/beans/PropertyChangeEvent
 java/util/EventObject
 java/awt/Component$AWTTreeLock
-sun/awt/DebugHelper
 sun/awt/NativeLibLoader
 sun/security/action/LoadLibraryAction
-sun/awt/DebugHelperStub
 java/awt/Toolkit
 java/awt/Toolkit$3
 sun/util/CoreResourceBundleControl
@@ -402,9 +393,7 @@
 sun/awt/Win32GraphicsEnvironment
 sun/java2d/SunGraphicsEnvironment
 sun/java2d/FontSupport
-sun/java2d/SunGraphicsEnvironment$TTFilter
 java/io/FilenameFilter
-sun/java2d/SunGraphicsEnvironment$T1Filter
 sun/awt/windows/WToolkit
 sun/awt/SunToolkit
 sun/awt/WindowClosingSupport
@@ -414,7 +403,6 @@
 java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
 java/util/concurrent/locks/Condition
 sun/awt/AWTAutoShutdown
-sun/awt/AWTAutoShutdown$PeerMap
 sun/awt/SunToolkit$6
 java/awt/Dialog$ModalExclusionType
 java/awt/Dialog
@@ -429,7 +417,6 @@
 java/awt/peer/PanelPeer
 sun/awt/windows/WCanvasPeer
 java/awt/peer/CanvasPeer
-sun/awt/windows/WToolkit$5
 java/awt/Color
 java/awt/Paint
 java/awt/Transparency
@@ -446,11 +433,8 @@
 java/awt/event/MouseMotionListener
 java/awt/event/MouseWheelListener
 java/awt/event/InputMethodListener
-java/awt/EventQueueItem
-java/awt/Component$NativeInLightFixer
 java/awt/event/ContainerListener
 javax/accessibility/AccessibleContext
-sun/awt/windows/WToolkit$6
 java/io/ObjectOutputStream
 java/io/ObjectOutput
 java/io/DataOutput
@@ -509,11 +493,8 @@
 java/awt/image/PackedColorModel
 java/awt/color/ColorSpace
 java/awt/color/ICC_Profile
-sun/awt/color/ProfileDeferralInfo
-sun/awt/color/ProfileDeferralMgr
 java/awt/color/ICC_ProfileRGB
 java/awt/color/ICC_Profile$1
-sun/awt/color/ProfileActivator
 java/awt/color/ICC_ColorSpace
 sun/java2d/pipe/NullPipe
 sun/java2d/pipe/PixelDrawPipe
@@ -536,8 +517,6 @@
 sun/java2d/pipe/SpanClipRenderer
 sun/java2d/pipe/Region
 sun/java2d/pipe/RegionIterator
-sun/java2d/pipe/DuctusShapeRenderer
-sun/java2d/pipe/DuctusRenderer
 sun/java2d/pipe/AlphaPaintPipe
 sun/java2d/pipe/SpanShapeRenderer$Composite
 sun/java2d/pipe/SpanShapeRenderer
@@ -552,10 +531,8 @@
 sun/awt/image/SurfaceManager$ImageAccessor
 sun/awt/image/SurfaceManager
 sun/awt/image/VolatileSurfaceManager
-sun/java2d/windows/Win32OffScreenSurfaceData
 sun/java2d/windows/WindowsFlags
 sun/java2d/windows/WindowsFlags$1
-sun/java2d/windows/DDBlitLoops
 sun/java2d/loops/Blit
 sun/java2d/loops/GraphicsPrimitive
 sun/java2d/loops/GraphicsPrimitiveMgr
@@ -599,11 +576,8 @@
 sun/java2d/loops/GeneralRenderer
 sun/java2d/loops/GraphicsPrimitiveMgr$1
 sun/java2d/loops/GraphicsPrimitiveMgr$2
-sun/java2d/windows/Win32SurfaceData
 sun/java2d/windows/GDIBlitLoops
 sun/java2d/windows/GDIRenderer
-sun/java2d/windows/DDBlitLoops$DelegateBlitBgLoop
-sun/java2d/windows/DDRenderer
 sun/awt/windows/WToolkit$1
 sun/awt/SunDisplayChanger
 sun/java2d/SunGraphicsEnvironment$1
@@ -615,7 +589,6 @@
 java/util/HashMap$Values
 java/util/HashMap$ValueIterator
 java/util/HashMap$HashIterator
-sun/font/FontManager$1
 sun/font/TrueTypeFont
 java/awt/font/FontRenderContext
 java/awt/RenderingHints
@@ -632,7 +605,6 @@
 sun/java2d/Disposer
 sun/java2d/Disposer$1
 sun/font/StrikeCache$1
-sun/font/FontManager$FontRegistrationInfo
 sun/awt/windows/WFontConfiguration
 sun/awt/FontConfiguration
 sun/awt/FontDescriptor
@@ -670,12 +642,10 @@
 java/util/Deque
 java/util/Queue
 java/util/AbstractSequentialList
-java/util/LinkedList$Entry
 java/awt/DefaultKeyboardFocusManager
 java/awt/DefaultFocusTraversalPolicy
 java/awt/ContainerOrderFocusTraversalPolicy
 java/awt/FocusTraversalPolicy
-java/awt/MutableBoolean
 java/util/Collections$UnmodifiableSet
 sun/awt/HeadlessToolkit
 sun/awt/KeyboardFocusManagerPeerImpl
@@ -690,7 +660,6 @@
 java/awt/event/InvocationEvent
 java/awt/ActiveEvent
 java/awt/MenuComponent
-sun/awt/EventQueueItem
 sun/awt/SunToolkit$3
 java/util/EmptyStackException
 java/lang/reflect/InvocationTargetException
@@ -857,7 +826,6 @@
 javax/swing/RepaintManager$DisplayChangedHandler
 javax/swing/SwingPaintEventDispatcher
 javax/swing/UIManager$2
-javax/swing/UIManager$3
 com/sun/swing/internal/plaf/metal/resources/metal
 sun/util/ResourceBundleEnumeration
 com/sun/swing/internal/plaf/basic/resources/basic
@@ -921,9 +889,6 @@
 javax/swing/plaf/basic/BasicHTML
 sun/awt/AppContext$PostShutdownEventRunnable
 sun/awt/AWTAutoShutdown$1
-javax/swing/SystemEventQueueUtilities
-javax/swing/SystemEventQueueUtilities$ComponentWorkRequest
-javax/swing/SystemEventQueueUtilities$SystemEventQueue
 sun/awt/NullComponentPeer
 java/awt/GraphicsCallback$PaintCallback
 java/awt/GraphicsCallback
@@ -942,17 +907,14 @@
 sun/misc/ExtensionDependency
 java/lang/Package
 sun/security/util/ManifestEntryVerifier
-sun/security/provider/Sun
 java/security/Provider
 java/security/Provider$ServiceKey
 java/security/Provider$EngineDescription
-sun/security/provider/Sun$1
 java/security/Security
 java/security/Security$1
 sun/misc/FloatingDecimal
 sun/misc/FloatingDecimal$1
 java/util/regex/Pattern
-java/util/regex/Pattern$8
 java/util/regex/Pattern$Node
 java/util/regex/Pattern$LastNode
 java/util/regex/Pattern$GroupHead
@@ -1034,7 +996,6 @@
 javax/swing/text/SimpleAttributeSet$EmptyAttributeSet
 javax/swing/text/StyleContext$NamedStyle
 javax/swing/text/Style
-javax/swing/text/SimpleAttributeSet$1
 javax/swing/text/StyleContext$SmallAttributeSet
 javax/swing/text/AbstractDocument$BidiRootElement
 javax/swing/text/AbstractDocument$BranchElement
@@ -1153,7 +1114,6 @@
 sun/nio/cs/UTF_16
 sun/nio/cs/UTF_16$Decoder
 sun/font/FileFontStrike
-sun/font/FileFont$FileFontDisposer
 sun/font/TrueTypeGlyphMapper
 sun/font/CMap
 sun/font/CMap$NullCMapClass
@@ -1178,9 +1138,6 @@
 sun/util/calendar/CalendarSystem
 sun/awt/image/OffScreenImage
 sun/java2d/SurfaceManagerFactory
-sun/java2d/windows/WinCachingSurfaceManager
-sun/awt/image/CachingSurfaceManager
-sun/awt/image/RasterListener
 sun/util/calendar/Gregorian
 sun/util/calendar/BaseCalendar
 sun/util/calendar/AbstractCalendar
@@ -1297,7 +1254,6 @@
 javax/swing/ToolTipManager$insideTimerAction
 javax/swing/ToolTipManager$outsideTimerAction
 javax/swing/ToolTipManager$stillInsideTimerAction
-javax/swing/ToolTipManager$Actions
 sun/swing/UIAction
 javax/swing/Action
 javax/swing/ToolTipManager$MoveBeforeEnterListener
@@ -1665,7 +1621,6 @@
 sun/net/www/MimeTable
 java/net/FileNameMap
 sun/net/www/MimeTable$1
-sun/net/www/MimeTable$2
 sun/net/www/MimeEntry
 java/net/URLConnection$1
 java/text/SimpleDateFormat
@@ -1687,7 +1642,6 @@
 java/text/spi/DecimalFormatSymbolsProvider
 java/util/Currency
 java/util/Currency$1
-java/util/CurrencyData
 java/util/spi/CurrencyNameProvider
 sun/util/resources/CurrencyNames
 sun/util/resources/CurrencyNames_en_US
@@ -1707,7 +1661,6 @@
 java/util/zip/CRC32
 java/util/zip/Checksum
 java/awt/TrayIcon
-java/awt/EventDispatchThread$StopDispatchEvent
 java/lang/Thread$State
 javax/swing/SwingUtilities$SharedOwnerFrame
 javax/swing/JTable
@@ -1722,7 +1675,6 @@
 javax/swing/JRadioButton
 java/lang/ClassFormatError
 sun/java2d/opengl/OGLGraphicsConfig
-sun/java2d/windows/WinVolatileSurfaceManager
 java/awt/print/PrinterGraphics
 java/awt/PrintGraphics
 javax/swing/JTabbedPane
@@ -1863,7 +1815,6 @@
 javax/swing/tree/VariableHeightLayoutCache$TreeStateNode
 javax/swing/tree/DefaultMutableTreeNode
 javax/swing/tree/MutableTreeNode
-javax/swing/tree/DefaultMutableTreeNode$1
 javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration
 javax/swing/event/TableColumnModelEvent
 java/text/ParseException
@@ -1918,9 +1869,6 @@
 javax/swing/plaf/basic/BasicSliderUI$PropertyChangeHandler
 sun/java2d/HeadlessGraphicsEnvironment
 java/util/Hashtable$KeySet
-sun/font/FontManager$2
-sun/java2d/SunGraphicsEnvironment$2
-sun/java2d/SunGraphicsEnvironment$3
 javax/swing/DefaultListModel
 javax/swing/event/ListDataEvent
 javax/sound/sampled/DataLine
@@ -1959,7 +1907,6 @@
 sun/security/action/GetIntegerAction
 sun/net/InetAddressCachePolicy$2
 java/net/InetAddress$CacheEntry
-java/net/PlainDatagramSocketImpl
 java/net/DatagramSocketImpl
 java/text/Collator
 java/text/spi/CollatorProvider
@@ -2030,7 +1977,6 @@
 java/math/BigInteger
 java/security/interfaces/DSAParams
 java/io/ObjectStreamClass$ClassDataSlot
-java/io/ObjectInputStream$CallbackContext
 java/io/ObjectStreamClass$4
 java/io/ObjectStreamClass$5
 java/security/MessageDigest
@@ -2076,8 +2022,6 @@
 java/math/MutableBigInteger
 java/math/SignedMutableBigInteger
 java/awt/EventQueue$1AWTInvocationLock
-javax/swing/SystemEventQueueUtilities$RunnableCanvas
-javax/swing/SystemEventQueueUtilities$RunnableCanvasGraphics
 java/awt/LightweightDispatcher$2
 java/awt/Component$FlipBufferStrategy
 javax/swing/JTable$2
@@ -2191,7 +2135,6 @@
 javax/security/auth/AuthPermission
 java/lang/Thread$1
 java/util/logging/LogManager$5
-java/util/logging/LogManager$6
 sun/applet/StdAppletViewerFactory
 sun/applet/AppletViewerFactory
 sun/applet/AppletViewer$UserActionListener
@@ -2202,7 +2145,6 @@
 sun/applet/AppletPanel$10
 java/security/Policy$1
 sun/security/provider/PolicyFile$1
-sun/security/provider/PolicyInfo
 sun/security/provider/PolicyFile$3
 sun/security/util/PropertyExpander
 sun/security/provider/PolicyParser
@@ -2214,17 +2156,14 @@
 sun/security/provider/PolicyParser$ParsingException
 sun/security/provider/PolicyFile$6
 sun/security/provider/PolicyFile$7
-sun/security/provider/SelfPermission
 java/net/SocketPermissionCollection
 java/util/PropertyPermissionCollection
 sun/applet/AppletPanel$9
 sun/applet/AppletClassLoader
-sun/applet/AppletClassLoader$4
 sun/applet/AppletThreadGroup
 sun/applet/AppContextCreator
 sun/applet/AppletPanel$1
 sun/awt/AppContext$3
-sun/awt/MostRecentThreadAppContext
 sun/awt/windows/WMenuBarPeer
 java/awt/peer/MenuBarPeer
 java/awt/peer/MenuComponentPeer
--- a/src/share/bin/java.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/bin/java.c	Wed Apr 20 04:38:36 2011 +0100
@@ -61,6 +61,9 @@
  * interfaces.
  */
 
+/* we always print to stderr */
+#define USE_STDERR JNI_TRUE
+
 static jboolean printVersion = JNI_FALSE; /* print and exit */
 static jboolean showVersion = JNI_FALSE;  /* print but continue */
 static jboolean printUsage = JNI_FALSE;   /* print and exit*/
@@ -1136,36 +1139,18 @@
     return; \
   }
 
-static jstring platformEncoding = NULL;
-static jstring getPlatformEncoding(JNIEnv *env) {
-    if (platformEncoding == NULL) {
-        jstring propname = (*env)->NewStringUTF(env, "sun.jnu.encoding");
-        if (propname) {
-            jclass cls;
-            jmethodID mid;
-            NULL_CHECK0 (cls = FindBootStrapClass(env, "java/lang/System"));
-            NULL_CHECK0 (mid = (*env)->GetStaticMethodID(
-                                   env, cls,
-                                   "getProperty",
-                                   "(Ljava/lang/String;)Ljava/lang/String;"));
-            platformEncoding = (*env)->CallStaticObjectMethod (
-                                    env, cls, mid, propname);
-        }
+static jclass helperClass = NULL;
+
+static jclass
+GetLauncherHelperClass(JNIEnv *env) {
+    if (helperClass == NULL) {
+        NULL_CHECK0(helperClass = FindBootStrapClass(env,
+                "sun/launcher/LauncherHelper"));
     }
-    return platformEncoding;
+    return helperClass;
 }
 
-static jboolean isEncodingSupported(JNIEnv *env, jstring enc) {
-    jclass cls;
-    jmethodID mid;
-    NULL_CHECK0 (cls = FindBootStrapClass(env, "java/nio/charset/Charset"));
-    NULL_CHECK0 (mid = (*env)->GetStaticMethodID(
-                           env, cls,
-                           "isSupported",
-                           "(Ljava/lang/String;)Z"));
-    return (*env)->CallStaticBooleanMethod(env, cls, mid, enc);
-}
-
+static jmethodID makePlatformStringMID = NULL;
 /*
  * Returns a new Java string object for the specified platform string.
  */
@@ -1173,36 +1158,23 @@
 NewPlatformString(JNIEnv *env, char *s)
 {
     int len = (int)JLI_StrLen(s);
-    jclass cls;
-    jmethodID mid;
     jbyteArray ary;
-    jstring enc;
-
+    jclass cls = GetLauncherHelperClass(env);
+    NULL_CHECK0(cls);
     if (s == NULL)
         return 0;
-    enc = getPlatformEncoding(env);
 
     ary = (*env)->NewByteArray(env, len);
     if (ary != 0) {
         jstring str = 0;
         (*env)->SetByteArrayRegion(env, ary, 0, len, (jbyte *)s);
         if (!(*env)->ExceptionOccurred(env)) {
-            NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
-            if (isEncodingSupported(env, enc) == JNI_TRUE) {
-                NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>",
-                                          "([BLjava/lang/String;)V"));
-                str = (*env)->NewObject(env, cls, mid, ary, enc);
-            } else {
-                /*If the encoding specified in sun.jnu.encoding is not
-                  endorsed by "Charset.isSupported" we have to fall back
-                  to use String(byte[]) explicitly here without specifying
-                  the encoding name, in which the StringCoding class will
-                  pickup the iso-8859-1 as the fallback converter for us.
-                */
-                NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>",
-                                          "([B)V"));
-                str = (*env)->NewObject(env, cls, mid, ary);
+            if (makePlatformStringMID == NULL) {
+                NULL_CHECK0(makePlatformStringMID = (*env)->GetStaticMethodID(env,
+                        cls, "makePlatformString", "(Z[B)Ljava/lang/String;"));
             }
+            str = (*env)->CallStaticObjectMethod(env, cls,
+                    makePlatformStringMID, USE_STDERR, ary);
             (*env)->DeleteLocalRef(env, ary);
             return str;
         }
@@ -1239,20 +1211,28 @@
 static jclass
 LoadMainClass(JNIEnv *env, int mode, char *name)
 {
-    jclass cls;
     jmethodID mid;
     jstring str;
     jobject result;
     jlong start, end;
-
+    jclass cls = GetLauncherHelperClass(env);
+    NULL_CHECK0(cls);
     if (JLI_IsTraceLauncher()) {
         start = CounterGet();
     }
-    NULL_CHECK0(cls = FindBootStrapClass(env, "sun/launcher/LauncherHelper"));
-    NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls, "checkAndLoadMain",
-                                          "(ZILjava/lang/String;)Ljava/lang/Class;"));
-    str = (*env)->NewStringUTF(env, name);
-    result = (*env)->CallStaticObjectMethod(env, cls, mid, JNI_TRUE, mode, str);
+    NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls,
+                "checkAndLoadMain",
+                "(ZILjava/lang/String;)Ljava/lang/Class;"));
+
+    switch (mode) {
+        case LM_CLASS:
+            str = NewPlatformString(env, name);
+            break;
+        default:
+            str = (*env)->NewStringUTF(env, name);
+            break;
+    }
+    result = (*env)->CallStaticObjectMethod(env, cls, mid, USE_STDERR, mode, str);
 
     if (JLI_IsTraceLauncher()) {
         end   = CounterGet();
@@ -1478,15 +1458,15 @@
 static void
 ShowSettings(JNIEnv *env, char *optString)
 {
-    jclass cls;
     jmethodID showSettingsID;
     jstring joptString;
-    NULL_CHECK(cls = FindBootStrapClass(env, "sun/launcher/LauncherHelper"));
+    jclass cls = GetLauncherHelperClass(env);
+    NULL_CHECK(cls);
     NULL_CHECK(showSettingsID = (*env)->GetStaticMethodID(env, cls,
             "showSettings", "(ZLjava/lang/String;JJJZ)V"));
     joptString = (*env)->NewStringUTF(env, optString);
     (*env)->CallStaticVoidMethod(env, cls, showSettingsID,
-                                 JNI_TRUE,
+                                 USE_STDERR,
                                  joptString,
                                  (jlong)initialHeapSize,
                                  (jlong)maxHeapSize,
@@ -1500,18 +1480,15 @@
 static void
 PrintUsage(JNIEnv* env, jboolean doXUsage)
 {
-  jclass cls;
   jmethodID initHelp, vmSelect, vmSynonym, vmErgo, printHelp, printXUsageMessage;
   jstring jprogname, vm1, vm2;
   int i;
-
-  NULL_CHECK(cls = FindBootStrapClass(env, "sun/launcher/LauncherHelper"));
-
-
+  jclass cls = GetLauncherHelperClass(env);
+  NULL_CHECK(cls);
   if (doXUsage) {
     NULL_CHECK(printXUsageMessage = (*env)->GetStaticMethodID(env, cls,
                                         "printXUsageMessage", "(Z)V"));
-    (*env)->CallStaticVoidMethod(env, cls, printXUsageMessage, JNI_TRUE);
+    (*env)->CallStaticVoidMethod(env, cls, printXUsageMessage, USE_STDERR);
   } else {
     NULL_CHECK(initHelp = (*env)->GetStaticMethodID(env, cls,
                                         "initHelpMessage", "(Ljava/lang/String;)V"));
@@ -1570,7 +1547,7 @@
     }
 
     /* Complete the usage message and print to stderr*/
-    (*env)->CallStaticVoidMethod(env, cls, printHelp, JNI_TRUE);
+    (*env)->CallStaticVoidMethod(env, cls, printHelp, USE_STDERR);
   }
   return;
 }
--- a/src/share/classes/com/sun/jarsigner/ContentSignerParameters.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/jarsigner/ContentSignerParameters.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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,7 @@
 package com.sun.jarsigner;
 
 import java.net.URI;
-import java.security.cert.X509CRL;
 import java.security.cert.X509Certificate;
-import java.util.Set;
 import java.util.zip.ZipFile;
 
 /**
@@ -83,13 +81,6 @@
     public X509Certificate[] getSignerCertificateChain();
 
     /**
-     * Retrieves the signer's X.509 CRLs.
-     *
-     * @return An unmodifiable set of X.509 CRLs (never <code>null</code>)
-     */
-    public Set<X509CRL> getCRLs();
-
-    /**
      * Retrieves the content that was signed.
      * The content is the JAR file's signature file.
      *
--- a/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Wed Apr 20 04:38:36 2011 +0100
@@ -743,24 +743,24 @@
 
         private void dumpBand() throws IOException {
             assert(optDumpBands);
-            PrintStream ps = new PrintStream(getDumpStream(this, ".txt"));
-            String irr = (bandCoding == regularCoding) ? "" : " irregular";
-            ps.print("# length="+length+
-                     " size="+outputSize()+
-                     irr+" coding="+bandCoding);
-            if (metaCoding != noMetaCoding) {
-                StringBuffer sb = new StringBuffer();
-                for (int i = 0; i < metaCoding.length; i++) {
-                    if (i == 1)  sb.append(" /");
-                    sb.append(" ").append(metaCoding[i] & 0xFF);
+            try (PrintStream ps = new PrintStream(getDumpStream(this, ".txt"))) {
+                String irr = (bandCoding == regularCoding) ? "" : " irregular";
+                ps.print("# length="+length+
+                         " size="+outputSize()+
+                         irr+" coding="+bandCoding);
+                if (metaCoding != noMetaCoding) {
+                    StringBuffer sb = new StringBuffer();
+                    for (int i = 0; i < metaCoding.length; i++) {
+                        if (i == 1)  sb.append(" /");
+                        sb.append(" ").append(metaCoding[i] & 0xFF);
+                    }
+                    ps.print(" //header: "+sb);
                 }
-                ps.print(" //header: "+sb);
+                printArrayTo(ps, values, 0, length);
             }
-            printArrayTo(ps, values, 0, length);
-            ps.close();
-            OutputStream ds = getDumpStream(this, ".bnd");
-            bandCoding.writeArrayTo(ds, values, 0, length);
-            ds.close();
+            try (OutputStream ds = getDumpStream(this, ".bnd")) {
+                bandCoding.writeArrayTo(ds, values, 0, length);
+            }
         }
 
         /** Disburse one value. */
@@ -829,12 +829,12 @@
 
         private void dumpBand() throws IOException {
             assert(optDumpBands);
-            OutputStream ds = getDumpStream(this, ".bnd");
-            if (bytesForDump != null)
-                bytesForDump.writeTo(ds);
-            else
-                bytes.writeTo(ds);
-            ds.close();
+            try (OutputStream ds = getDumpStream(this, ".bnd")) {
+                if (bytesForDump != null)
+                    bytesForDump.writeTo(ds);
+                else
+                    bytes.writeTo(ds);
+            }
         }
 
         public void readDataFrom(InputStream in) throws IOException {
--- a/src/share/classes/com/sun/java/util/jar/pack/Driver.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/Driver.java	Wed Apr 20 04:38:36 2011 +0100
@@ -150,12 +150,12 @@
                 // See if there is any other action to take.
                 if ("--config-file=".equals(state)) {
                     String propFile = av.remove(0);
-                    InputStream propIn = new FileInputStream(propFile);
                     Properties fileProps = new Properties();
-                    fileProps.load(new BufferedInputStream(propIn));
+                    try (InputStream propIn = new FileInputStream(propFile)) {
+                        fileProps.load(propIn);
+                    }
                     if (engProps.get(verboseProp) != null)
                         fileProps.list(System.out);
-                    propIn.close();
                     for (Map.Entry<Object,Object> me : fileProps.entrySet()) {
                         engProps.put((String) me.getKey(), (String) me.getValue());
                     }
@@ -348,10 +348,10 @@
                 else
                     fileOut = new FileOutputStream(outfile);
                 fileOut = new BufferedOutputStream(fileOut);
-                JarOutputStream out = new JarOutputStream(fileOut);
-                junpack.unpack(in, out);
-                //in.close();  // p200 closes in but not out
-                out.close();
+                try (JarOutputStream out = new JarOutputStream(fileOut)) {
+                    junpack.unpack(in, out);
+                    // p200 closes in but not out
+                }
                 // At this point, we have a good jarfile (or newfile, if -r)
             }
 
@@ -411,8 +411,7 @@
         long filelen = new File(jarfile).length();
         if (filelen <= 0)  return "";
         long skiplen = Math.max(0, filelen - tail.length);
-        InputStream in = new FileInputStream(new File(jarfile));
-        try {
+        try (InputStream in = new FileInputStream(new File(jarfile))) {
             in.skip(skiplen);
             in.read(tail);
             for (int i = tail.length-4; i >= 0; i--) {
@@ -426,8 +425,6 @@
                 }
             }
             return "";
-        } finally {
-            in.close();
         }
     }
 
--- a/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Wed Apr 20 04:38:36 2011 +0100
@@ -241,9 +241,9 @@
     void run(File inFile, JarOutputStream jstream) throws IOException {
         // %%% maybe memory-map the file, and pass it straight into unpacker
         ByteBuffer mappedFile = null;
-        FileInputStream fis = new FileInputStream(inFile);
-        run(fis, jstream, mappedFile);
-        fis.close();
+        try (FileInputStream fis = new FileInputStream(inFile)) {
+            run(fis, jstream, mappedFile);
+        }
         // Note:  caller is responsible to finish with jstream.
     }
 
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, 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
@@ -540,9 +540,9 @@
             Index index = initCPIndex(tag, cpMap);
 
             if (optDumpBands) {
-                PrintStream ps = new PrintStream(getDumpStream(index, ".idx"));
-                printArrayTo(ps, index.cpMap, 0, index.cpMap.length);
-                ps.close();
+                try (PrintStream ps = new PrintStream(getDumpStream(index, ".idx"))) {
+                    printArrayTo(ps, index.cpMap, 0, index.cpMap.length);
+                }
             }
         }
 
@@ -828,26 +828,27 @@
         attr_definition_headers.readFrom(in);
         attr_definition_name.readFrom(in);
         attr_definition_layout.readFrom(in);
-        PrintStream dump = !optDumpBands ? null
-            : new PrintStream(getDumpStream(attr_definition_headers, ".def"));
-        for (int i = 0; i < numAttrDefs; i++) {
-            int       header = attr_definition_headers.getByte();
-            Utf8Entry name   = (Utf8Entry) attr_definition_name.getRef();
-            Utf8Entry layout = (Utf8Entry) attr_definition_layout.getRef();
-            int       ctype  = (header &  ADH_CONTEXT_MASK);
-            int       index  = (header >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB;
-            Attribute.Layout def = new Attribute.Layout(ctype,
-                                                        name.stringValue(),
-                                                        layout.stringValue());
-            // Check layout string for Java 6 extensions.
-            String pvLayout = def.layoutForPackageMajver(getPackageMajver());
-            if (!pvLayout.equals(def.layout())) {
-                throw new IOException("Bad attribute layout in version 150 archive: "+def.layout());
+        try (PrintStream dump = !optDumpBands ? null
+                 : new PrintStream(getDumpStream(attr_definition_headers, ".def")))
+        {
+            for (int i = 0; i < numAttrDefs; i++) {
+                int       header = attr_definition_headers.getByte();
+                Utf8Entry name   = (Utf8Entry) attr_definition_name.getRef();
+                Utf8Entry layout = (Utf8Entry) attr_definition_layout.getRef();
+                int       ctype  = (header &  ADH_CONTEXT_MASK);
+                int       index  = (header >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB;
+                Attribute.Layout def = new Attribute.Layout(ctype,
+                                                            name.stringValue(),
+                                                            layout.stringValue());
+                // Check layout string for Java 6 extensions.
+                String pvLayout = def.layoutForPackageMajver(getPackageMajver());
+                if (!pvLayout.equals(def.layout())) {
+                    throw new IOException("Bad attribute layout in version 150 archive: "+def.layout());
+                }
+                this.setAttributeLayoutIndex(def, index);
+                if (dump != null)  dump.println(index+" "+def);
             }
-            this.setAttributeLayoutIndex(def, index);
-            if (dump != null)  dump.println(index+" "+def);
         }
-        if (dump != null)  dump.close();
         attr_definition_headers.doneDisbursing();
         attr_definition_name.doneDisbursing();
         attr_definition_layout.doneDisbursing();
@@ -1011,7 +1012,7 @@
         return -1;
     }
 
-    Comparator<Entry> entryOutputOrder = new Comparator<>() {
+    Comparator<Entry> entryOutputOrder = new Comparator<Entry>() {
         public int compare(Entry  e0, Entry e1) {
             int k0 = getOutputIndex(e0);
             int k1 = getOutputIndex(e1);
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, 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
@@ -458,9 +458,9 @@
                 Utils.log.info("Writing "+cpMap.length+" "+ConstantPool.tagName(tag)+" entries...");
 
             if (optDumpBands) {
-                PrintStream ps = new PrintStream(getDumpStream(index, ".idx"));
-                printArrayTo(ps, cpMap, 0, cpMap.length);
-                ps.close();
+                try (PrintStream ps = new PrintStream(getDumpStream(index, ".idx"))) {
+                    printArrayTo(ps, cpMap, 0, cpMap.length);
+                }
             }
 
             switch (tag) {
@@ -785,7 +785,7 @@
             defMap.entrySet().toArray(layoutsAndCounts);
             // Sort by count, most frequent first.
             // Predefs. participate in this sort, though it does not matter.
-            Arrays.sort(layoutsAndCounts, new Comparator<>() {
+            Arrays.sort(layoutsAndCounts, new Comparator<Object>() {
                 public int compare(Object o0, Object o1) {
                     Map.Entry e0 = (Map.Entry) o0;
                     Map.Entry e1 = (Map.Entry) o1;
@@ -923,33 +923,34 @@
             }
         });
         attrDefsWritten = new Attribute.Layout[numAttrDefs];
-        PrintStream dump = !optDumpBands ? null
-            : new PrintStream(getDumpStream(attr_definition_headers, ".def"));
-        int[] indexForDebug = Arrays.copyOf(attrIndexLimit, ATTR_CONTEXT_LIMIT);
-        for (int i = 0; i < defs.length; i++) {
-            int header = ((Integer)defs[i][0]).intValue();
-            Attribute.Layout def = (Attribute.Layout) defs[i][1];
-            attrDefsWritten[i] = def;
-            assert((header & ADH_CONTEXT_MASK) == def.ctype());
-            attr_definition_headers.putByte(header);
-            attr_definition_name.putRef(ConstantPool.getUtf8Entry(def.name()));
-            String layout = def.layoutForPackageMajver(getPackageMajver());
-            attr_definition_layout.putRef(ConstantPool.getUtf8Entry(layout));
-            // Check that we are transmitting that correct attribute index:
-            boolean debug = false;
-            assert(debug = true);
-            if (debug) {
-                int hdrIndex = (header >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB;
-                if (hdrIndex < 0)  hdrIndex = indexForDebug[def.ctype()]++;
-                int realIndex = (attrIndexTable.get(def)).intValue();
-                assert(hdrIndex == realIndex);
-            }
-            if (dump != null) {
-                int index = (header >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB;
-                dump.println(index+" "+def);
+        try (PrintStream dump = !optDumpBands ? null
+                 : new PrintStream(getDumpStream(attr_definition_headers, ".def")))
+        {
+            int[] indexForDebug = Arrays.copyOf(attrIndexLimit, ATTR_CONTEXT_LIMIT);
+            for (int i = 0; i < defs.length; i++) {
+                int header = ((Integer)defs[i][0]).intValue();
+                Attribute.Layout def = (Attribute.Layout) defs[i][1];
+                attrDefsWritten[i] = def;
+                assert((header & ADH_CONTEXT_MASK) == def.ctype());
+                attr_definition_headers.putByte(header);
+                attr_definition_name.putRef(ConstantPool.getUtf8Entry(def.name()));
+                String layout = def.layoutForPackageMajver(getPackageMajver());
+                attr_definition_layout.putRef(ConstantPool.getUtf8Entry(layout));
+                // Check that we are transmitting that correct attribute index:
+                boolean debug = false;
+                assert(debug = true);
+                if (debug) {
+                    int hdrIndex = (header >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB;
+                    if (hdrIndex < 0)  hdrIndex = indexForDebug[def.ctype()]++;
+                    int realIndex = (attrIndexTable.get(def)).intValue();
+                    assert(hdrIndex == realIndex);
+                }
+                if (dump != null) {
+                    int index = (header >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB;
+                    dump.println(index+" "+def);
+                }
             }
         }
-        if (dump != null)  dump.close();
     }
 
     void writeAttrCounts() throws IOException {
--- a/src/share/classes/com/sun/java/util/jar/pack/PropMap.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/PropMap.java	Wed Apr 20 04:38:36 2011 +0100
@@ -122,26 +122,23 @@
         // Define certain attribute layouts by default.
         // Do this after the previous props are put in place,
         // to allow override if necessary.
-        InputStream propStr = null;
-        try {
-            String propFile = "intrinsic.properties";
-            propStr = PackerImpl.class.getResourceAsStream(propFile);
-            props.load(new BufferedInputStream(propStr));
-            for (Map.Entry<Object, Object> e : props.entrySet()) {
-                String key = (String) e.getKey();
-                String val = (String) e.getValue();
-                if (key.startsWith("attribute.")) {
-                    e.setValue(Attribute.normalizeLayoutString(val));
-                }
+        String propFile = "intrinsic.properties";
+
+        try (InputStream propStr = PackerImpl.class.getResourceAsStream(propFile)) {
+            if (propStr == null) {
+                throw new RuntimeException(propFile + " cannot be loaded");
             }
+            props.load(propStr);
         } catch (IOException ee) {
             throw new RuntimeException(ee);
-        } finally {
-            try {
-                if (propStr != null) {
-                    propStr.close();
-                }
-            } catch (IOException ignore) {}
+        }
+
+        for (Map.Entry<Object, Object> e : props.entrySet()) {
+            String key = (String) e.getKey();
+            String val = (String) e.getValue();
+            if (key.startsWith("attribute.")) {
+                e.setValue(Attribute.normalizeLayoutString(val));
+            }
         }
 
         defaultProps = (new HashMap<>(props));  // shrink to fit
--- a/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -161,8 +161,9 @@
         }
         // Use the stream-based implementation.
         // %%% Reconsider if native unpacker learns to memory-map the file.
-        FileInputStream instr = new FileInputStream(in);
-        unpack(instr, out);
+        try (FileInputStream instr = new FileInputStream(in)) {
+            unpack(instr, out);
+        }
         if (props.getBoolean(Utils.UNPACK_REMOVE_PACKFILE)) {
             in.delete();
         }
--- a/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Wed Apr 20 04:38:36 2011 +0100
@@ -268,18 +268,18 @@
         // 4947205 : Peformance is slow when using pack-effort=0
         out = new BufferedOutputStream(out);
         out = new NonCloser(out); // protect from JarOutputStream.close()
-        JarOutputStream jout = new JarOutputStream(out);
-        copyJarFile(in, jout);
-        jout.close();
+        try (JarOutputStream jout = new JarOutputStream(out)) {
+            copyJarFile(in, jout);
+        }
     }
     static void copyJarFile(JarFile in, OutputStream out) throws IOException {
 
         // 4947205 : Peformance is slow when using pack-effort=0
         out = new BufferedOutputStream(out);
         out = new NonCloser(out); // protect from JarOutputStream.close()
-        JarOutputStream jout = new JarOutputStream(out);
-        copyJarFile(in, jout);
-        jout.close();
+        try (JarOutputStream jout = new JarOutputStream(out)) {
+            copyJarFile(in, jout);
+        }
     }
         // Wrapper to prevent closing of client-supplied stream.
     static private
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -380,13 +380,19 @@
     }
 
     LdapRequest writeRequest(BerEncoder ber, int msgId) throws IOException {
-        return writeRequest(ber, msgId, false /* pauseAfterReceipt */);
+        return writeRequest(ber, msgId, false /* pauseAfterReceipt */, -1);
     }
 
-    LdapRequest writeRequest(BerEncoder ber, int msgId, boolean pauseAfterReceipt)
-        throws IOException {
+    LdapRequest writeRequest(BerEncoder ber, int msgId,
+        boolean pauseAfterReceipt) throws IOException {
+        return writeRequest(ber, msgId, pauseAfterReceipt, -1);
+    }
 
-        LdapRequest req = new LdapRequest(msgId, pauseAfterReceipt);
+    LdapRequest writeRequest(BerEncoder ber, int msgId,
+        boolean pauseAfterReceipt, int replyQueueCapacity) throws IOException {
+
+        LdapRequest req =
+            new LdapRequest(msgId, pauseAfterReceipt, replyQueueCapacity);
         addRequest(req);
 
         if (traceFile != null) {
--- a/src/share/classes/com/sun/jndi/ldap/LdapClient.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/jndi/ldap/LdapClient.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -516,7 +516,8 @@
     LdapResult search(String dn, int scope, int deref, int sizeLimit,
                       int timeLimit, boolean attrsOnly, String attrs[],
                       String filter, int batchSize, Control[] reqCtls,
-                      Hashtable binaryAttrs, boolean waitFirstReply)
+                      Hashtable binaryAttrs, boolean waitFirstReply,
+                      int replyQueueCapacity)
         throws IOException, NamingException {
 
         ensureOpen();
@@ -543,7 +544,8 @@
                 if (isLdapv3) encodeControls(ber, reqCtls);
             ber.endSeq();
 
-         LdapRequest req = conn.writeRequest(ber, curMsgId);
+         LdapRequest req =
+                conn.writeRequest(ber, curMsgId, false, replyQueueCapacity);
 
          res.msgId = curMsgId;
          res.status = LdapClient.LDAP_SUCCESS; //optimistic
--- a/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -191,6 +191,14 @@
     // Environment property for the domain name (derived from this context's DN)
     private static final String DOMAIN_NAME = "com.sun.jndi.ldap.domainname";
 
+    // Block until the first search reply is received
+    private static final String WAIT_FOR_REPLY =
+        "com.sun.jndi.ldap.search.waitForReply";
+
+    // Size of the queue of unprocessed search replies
+    private static final String REPLY_QUEUE_SIZE =
+        "com.sun.jndi.ldap.search.replyQueueSize";
+
     // ----------------- Fields that don't change -----------------------
     private static final NameParser parser = new LdapNameParser();
 
@@ -246,6 +254,8 @@
     private Hashtable binaryAttrs = null;    // attr values returned as byte[]
     private int connectTimeout = -1;         // no timeout value
     private int readTimeout = -1;            // no timeout value
+    private boolean waitForReply = true;     // wait for search response
+    private int replyQueueSize  = -1;        // unlimited queue size
     private boolean useSsl = false;          // true if SSL protocol is active
     private boolean useDefaultPortNumber = false; // no port number was supplied
 
@@ -1759,8 +1769,8 @@
                                          SearchControls cons,
                                          Continuation cont)
             throws NamingException {
-        return searchAux(name, filter, cloneSearchControls(cons), true, true,
-                         cont);
+        return searchAux(name, filter, cloneSearchControls(cons), true,
+                 waitForReply, cont);
     }
 
     protected NamingEnumeration c_search(Name name,
@@ -1928,7 +1938,7 @@
     }
 
     private LdapResult doSearch(Name name, String filter, SearchControls cons,
-        boolean relative, boolean waitFirstReply) throws NamingException {
+        boolean relative, boolean waitForReply) throws NamingException {
             ensureOpen();
             try {
                 int scope;
@@ -1984,7 +1994,8 @@
                         batchSize,
                         reqCtls,
                         binaryAttrs,
-                        waitFirstReply);
+                        waitForReply,
+                        replyQueueSize);
                 respCtls = answer.resControls; // retrieve response controls
                 return answer;
 
@@ -2170,6 +2181,10 @@
             connectTimeout = -1;
         } else if (propName.equals(READ_TIMEOUT)) {
             readTimeout = -1;
+        } else if (propName.equals(WAIT_FOR_REPLY)) {
+            waitForReply = true;
+        } else if (propName.equals(REPLY_QUEUE_SIZE)) {
+            replyQueueSize = -1;
 
 // The following properties affect the connection
 
@@ -2225,6 +2240,11 @@
                 setConnectTimeout((String)propVal);
             } else if (propName.equals(READ_TIMEOUT)) {
                 setReadTimeout((String)propVal);
+            } else if (propName.equals(WAIT_FOR_REPLY)) {
+                setWaitForReply((String)propVal);
+            } else if (propName.equals(REPLY_QUEUE_SIZE)) {
+                setReplyQueueSize((String)propVal);
+
 // The following properties affect the connection
 
             } else if (propName.equals(Context.SECURITY_PROTOCOL)) {
@@ -2312,6 +2332,13 @@
         // Set the read timeout
         setReadTimeout((String)envprops.get(READ_TIMEOUT));
 
+        // Set the flag that controls whether to block until the first reply
+        // is received
+        setWaitForReply((String)envprops.get(WAIT_FOR_REPLY));
+
+        // Set the size of the queue of unprocessed search replies
+        setReplyQueueSize((String)envprops.get(REPLY_QUEUE_SIZE));
+
         // When connection is created, it will use these and other
         // properties from the environment
     }
@@ -2442,6 +2469,34 @@
     }
 
     /**
+     * Sets the size of the queue of unprocessed search replies
+     */
+    private void setReplyQueueSize(String replyQueueSizeProp) {
+        if (replyQueueSizeProp != null) {
+           replyQueueSize = Integer.parseInt(replyQueueSizeProp);
+            // disallow an empty queue
+            if (replyQueueSize <= 0) {
+                replyQueueSize = -1;    // unlimited
+            }
+        } else {
+            replyQueueSize = -1;        // unlimited
+        }
+    }
+
+    /**
+     * Sets the flag that controls whether to block until the first search
+     * reply is received
+     */
+    private void setWaitForReply(String waitForReplyProp) {
+        if (waitForReplyProp != null &&
+            (waitForReplyProp.equalsIgnoreCase("false"))) {
+            waitForReply = false;
+        } else {
+            waitForReply = true;
+        }
+    }
+
+    /**
      * Sets the read timeout value
      */
     private void setReadTimeout(String readTimeoutProp) {
--- a/src/share/classes/com/sun/jndi/ldap/LdapRequest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/jndi/ldap/LdapRequest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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,8 @@
 package com.sun.jndi.ldap;
 
 import java.io.IOException;
-import java.util.Vector;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
 import javax.naming.CommunicationException;
 
 final class LdapRequest {
@@ -35,14 +36,26 @@
     int msgId;          // read-only
 
     private int gotten = 0;
-    private Vector replies = new Vector(3);
+    private BlockingQueue<BerDecoder> replies;
+    private int highWatermark = -1;
     private boolean cancelled = false;
     private boolean pauseAfterReceipt = false;
     private boolean completed = false;
 
     LdapRequest(int msgId, boolean pause) {
+        this(msgId, pause, -1);
+    }
+
+    LdapRequest(int msgId, boolean pause, int replyQueueCapacity) {
         this.msgId = msgId;
         this.pauseAfterReceipt = pause;
+        if (replyQueueCapacity == -1) {
+            this.replies = new LinkedBlockingQueue<BerDecoder>();
+        } else {
+            this.replies =
+                new LinkedBlockingQueue<BerDecoder>(replyQueueCapacity);
+            highWatermark = (replyQueueCapacity * 80) / 100; // 80% capacity
+        }
     }
 
     synchronized void cancel() {
@@ -57,7 +70,13 @@
         if (cancelled) {
             return false;
         }
-        replies.addElement(ber);
+
+        // Add a new reply to the queue of unprocessed replies.
+        try {
+            replies.put(ber);
+        } catch (InterruptedException e) {
+            // ignore
+        }
 
         // peek at the BER buffer to check if it is a SearchResultDone PDU
         try {
@@ -70,6 +89,14 @@
         ber.reset();
 
         notify(); // notify anyone waiting for reply
+        /*
+         * If a queue capacity has been set then trigger a pause when the
+         * queue has filled to 80% capacity. Later, when the queue has drained
+         * then the reader gets unpaused.
+         */
+        if (highWatermark != -1 && replies.size() >= highWatermark) {
+            return true; // trigger the pause
+        }
         return pauseAfterReceipt;
     }
 
@@ -79,14 +106,12 @@
                 " cancelled");
         }
 
-        if (gotten < replies.size()) {
-            BerDecoder answer = (BerDecoder)replies.elementAt(gotten);
-            replies.setElementAt(null, gotten); // remove reference
-            ++gotten; // skip to next
-            return answer;
-        } else {
-            return null;
-        }
+        /*
+         * Remove a reply if the queue is not empty.
+         * poll returns null if queue is empty.
+         */
+        BerDecoder reply = replies.poll();
+        return reply;
     }
 
     synchronized boolean hasSearchCompleted() {
--- a/src/share/classes/com/sun/media/sound/AiffFileWriter.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/AiffFileWriter.java	Wed Apr 20 04:38:36 2011 +0100
@@ -25,12 +25,10 @@
 
 package com.sun.media.sound;
 
-import java.util.Vector;
 import java.io.File;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.IOException;
-import java.io.DataInputStream;
 
 import java.io.BufferedOutputStream;
 import java.io.DataOutputStream;
@@ -398,7 +396,8 @@
         header = baos.toByteArray();
         headerStream = new ByteArrayInputStream( header );
 
-        aiffStream = new SequenceInputStream(headerStream,codedAudioStream);
+        aiffStream = new SequenceInputStream(headerStream,
+                            new NoCloseInputStream(codedAudioStream));
 
         return aiffStream;
 
--- a/src/share/classes/com/sun/media/sound/AlawCodec.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/AlawCodec.java	Wed Apr 20 04:38:36 2011 +0100
@@ -52,9 +52,6 @@
     private static final short seg_end [] = {0xFF, 0x1FF, 0x3FF,
                                              0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF};
 
-    private static final int tempBufferSize = 64;
-    private byte tempBuffer [] = null;
-
     /**
      * Initializes the decode tables
      */
@@ -199,12 +196,9 @@
         AudioFormat inputFormat = stream.getFormat();
 
         if( inputFormat.matches(outputFormat) ) {
-
             cs = stream;
         } else {
-
             cs = (AudioInputStream) (new AlawCodecStream(stream, outputFormat));
-            tempBuffer = new byte[tempBufferSize];
         }
 
         return cs;
@@ -264,6 +258,10 @@
 
     class AlawCodecStream extends AudioInputStream {
 
+        // tempBuffer required only for encoding (when encode is true)
+        private static final int tempBufferSize = 64;
+        private byte tempBuffer [] = null;
+
         /**
          * True to encode to a-law, false to decode to linear
          */
@@ -303,6 +301,7 @@
                 encodeFormat = outputFormat;
                 decodeFormat = inputFormat;
                 PCMIsBigEndian = inputFormat.isBigEndian();
+                tempBuffer = new byte[tempBufferSize];
             }
 
             if (PCMIsBigEndian) {
--- a/src/share/classes/com/sun/media/sound/AuFileWriter.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/AuFileWriter.java	Wed Apr 20 04:38:36 2011 +0100
@@ -25,12 +25,10 @@
 
 package com.sun.media.sound;
 
-import java.util.Vector;
 import java.io.File;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.IOException;
-import java.lang.IllegalArgumentException;
 
 import java.io.BufferedOutputStream;
 import java.io.DataOutputStream;
@@ -131,10 +129,10 @@
             // $$fb: 2001-07-13: done. Fixes Bug 4479981
             RandomAccessFile raf=new RandomAccessFile(out, "rw");
             if (raf.length()<=0x7FFFFFFFl) {
-                                // skip AU magic and data offset field
+                // skip AU magic and data offset field
                 raf.skipBytes(8);
                 raf.writeInt(bytesWritten-AuFileFormat.AU_HEADERSIZE);
-                                // that's all
+                // that's all
             }
             raf.close();
         }
@@ -303,7 +301,8 @@
         dos.close();
         header = baos.toByteArray();
         headerStream = new ByteArrayInputStream( header );
-        auStream = new SequenceInputStream(headerStream,codedAudioStream);
+        auStream = new SequenceInputStream(headerStream,
+                        new NoCloseInputStream(codedAudioStream));
 
         return auStream;
     }
--- a/src/share/classes/com/sun/media/sound/DirectAudioDevice.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/DirectAudioDevice.java	Wed Apr 20 04:38:36 2011 +0100
@@ -395,11 +395,7 @@
         protected volatile boolean noService = false; // do not run the nService method
 
         // Guards all native calls.
-        protected Object lockNative = new Object();
-        // Guards the lastOpened static variable in implOpen and implClose.
-        protected static Object lockLast = new Object();
-        // Keeps track of last opened line, see implOpen "trick".
-        protected static DirectDL lastOpened;
+        protected final Object lockNative = new Object();
 
         // CONSTRUCTOR
         protected DirectDL(DataLine.Info info,
@@ -501,48 +497,21 @@
             // align buffer to full frames
             bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize();
 
-            synchronized(lockLast) {
-                id = nOpen(mixerIndex, deviceID, isSource,
-                        encoding,
-                        hardwareFormat.getSampleRate(),
-                        hardwareFormat.getSampleSizeInBits(),
-                        hardwareFormat.getFrameSize(),
-                        hardwareFormat.getChannels(),
-                        hardwareFormat.getEncoding().equals(
-                            AudioFormat.Encoding.PCM_SIGNED),
-                        hardwareFormat.isBigEndian(),
-                        bufferSize);
+            id = nOpen(mixerIndex, deviceID, isSource,
+                    encoding,
+                    hardwareFormat.getSampleRate(),
+                    hardwareFormat.getSampleSizeInBits(),
+                    hardwareFormat.getFrameSize(),
+                    hardwareFormat.getChannels(),
+                    hardwareFormat.getEncoding().equals(
+                        AudioFormat.Encoding.PCM_SIGNED),
+                    hardwareFormat.isBigEndian(),
+                    bufferSize);
 
-                if (id == 0) {
-                    // Bah... Dirty trick. The most likely cause is an application
-                    // already having a line open for this particular hardware
-                    // format and forgetting about it. If so, silently close that
-                    // implementation and try again. Unfortuantely we can only
-                    // open one line per hardware format currently.
-                    if (lastOpened != null
-                            && hardwareFormat.matches(lastOpened.hardwareFormat)) {
-                        lastOpened.implClose();
-                        lastOpened = null;
-
-                        id = nOpen(mixerIndex, deviceID, isSource,
-                                encoding,
-                                hardwareFormat.getSampleRate(),
-                                hardwareFormat.getSampleSizeInBits(),
-                                hardwareFormat.getFrameSize(),
-                                hardwareFormat.getChannels(),
-                                hardwareFormat.getEncoding().equals(
-                                    AudioFormat.Encoding.PCM_SIGNED),
-                                hardwareFormat.isBigEndian(),
-                                bufferSize);
-                    }
-
-                    if (id == 0) {
-                        // TODO: nicer error messages...
-                        throw new LineUnavailableException(
-                            "line with format "+format+" not supported.");
-                    }
-                }
-                lastOpened = this;
+            if (id == 0) {
+                // TODO: nicer error messages...
+                throw new LineUnavailableException(
+                        "line with format "+format+" not supported.");
             }
 
             this.bufferSize = nGetBufferSize(id, isSource);
@@ -615,14 +584,13 @@
             }
             synchronized (lockNative) {
                 nStop(id, isSource);
-
+            }
+            // wake up any waiting threads
+            synchronized(lock) {
                 // need to set doIO to false before notifying the
                 // read/write thread, that's why isStartedRunning()
                 // cannot be used
                 doIO = false;
-            }
-            // wake up any waiting threads
-            synchronized(lock) {
                 lock.notifyAll();
             }
             setActive(false);
@@ -649,12 +617,8 @@
             doIO = false;
             long oldID = id;
             id = 0;
-            synchronized (lockLast) {
-                synchronized (lockNative) {
-                    nClose(oldID, isSource);
-                    if (lastOpened == this)
-                      lastOpened = null;
-                }
+            synchronized (lockNative) {
+                nClose(oldID, isSource);
             }
             bytePosition = 0;
             softwareConversionSize = 0;
@@ -667,10 +631,9 @@
             if (id == 0) {
                 return 0;
             }
-            int a = 0;
+            int a;
             synchronized (lockNative) {
-                if (doIO)
-                    a = nAvailable(id, isSource);
+                a = nAvailable(id, isSource);
             }
             return a;
         }
@@ -726,7 +689,7 @@
                     lock.notifyAll();
                 }
                 synchronized (lockNative) {
-                    if (id != 0 && doIO) {
+                    if (id != 0) {
                         // then flush native buffers
                         nFlush(id, isSource);
                     }
@@ -737,10 +700,9 @@
 
         // replacement for getFramePosition (see AbstractDataLine)
         public long getLongFramePosition() {
-            long pos = 0;
+            long pos;
             synchronized (lockNative) {
-                if (doIO)
-                    pos = nGetBytePosition(id, isSource, bytePosition);
+                pos = nGetBytePosition(id, isSource, bytePosition);
             }
             // hack because ALSA sometimes reports wrong framepos
             if (pos < 0) {
@@ -786,12 +748,11 @@
             }
             int written = 0;
             while (!flushing) {
-                int thisWritten = 0;
+                int thisWritten;
                 synchronized (lockNative) {
-                    if (doIO)
-                        thisWritten = nWrite(id, b, off, len,
-                                softwareConversionSize,
-                                leftGain, rightGain);
+                    thisWritten = nWrite(id, b, off, len,
+                            softwareConversionSize,
+                            leftGain, rightGain);
                     if (thisWritten < 0) {
                         // error in native layer
                         break;
@@ -1014,10 +975,9 @@
             }
             int read = 0;
             while (doIO && !flushing) {
-                int thisRead = 0;
+                int thisRead;
                 synchronized (lockNative) {
-                    if (doIO)
-                        thisRead = nRead(id, b, off, len, softwareConversionSize);
+                    thisRead = nRead(id, b, off, len, softwareConversionSize);
                     if (thisRead < 0) {
                         // error in native layer
                         break;
@@ -1252,8 +1212,7 @@
             // set new native position (if necessary)
             // this must come after the flush!
             synchronized (lockNative) {
-                if (doIO)
-                    nSetBytePosition(id, isSource, frames * frameSize);
+                nSetBytePosition(id, isSource, frames * frameSize);
             }
 
             if (Printer.debug) Printer.debug("  DirectClip.setFramePosition: "
--- a/src/share/classes/com/sun/media/sound/RealTimeSequencer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/RealTimeSequencer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -775,15 +775,22 @@
         Receiver rec = null;
         // first try to connect to the default synthesizer
         // IMPORTANT: this code needs to be synch'ed with
-        //            MidiSystem.getReceiver(boolean), because the same
+        //            MidiSystem.getSequencer(boolean), because the same
         //            algorithm needs to be used!
         try {
             Synthesizer synth = MidiSystem.getSynthesizer();
-            synth.open();
             if (synth instanceof ReferenceCountingDevice) {
                 rec = ((ReferenceCountingDevice) synth).getReceiverReferenceCounting();
             } else {
-                rec = synth.getReceiver();
+                synth.open();
+                try {
+                    rec = synth.getReceiver();
+                } finally {
+                    // make sure that the synth is properly closed
+                    if (rec == null) {
+                        synth.close();
+                    }
+                }
             }
         } catch (Exception e) {
             // something went wrong with synth
--- a/src/share/classes/com/sun/media/sound/StandardMidiFileReader.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/StandardMidiFileReader.java	Wed Apr 20 04:38:36 2011 +0100
@@ -127,7 +127,7 @@
                 resolution = timing;
             } else {
                 // SMPTE based timing.  first decipher the frame code.
-                int frameCode = (-1 * timing) >> 8;
+                int frameCode = -1 * (timing >> 8);
                 switch(frameCode) {
                 case 24:
                     divisionType = Sequence.SMPTE_24;
--- a/src/share/classes/com/sun/media/sound/SunFileWriter.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/SunFileWriter.java	Wed Apr 20 04:38:36 2011 +0100
@@ -30,14 +30,9 @@
 import java.io.OutputStream;
 import java.io.IOException;
 import java.io.DataInputStream;
-import java.io.RandomAccessFile;
-import java.net.URL;
 
-import javax.sound.sampled.AudioFormat;
 import javax.sound.sampled.AudioFileFormat;
 import javax.sound.sampled.AudioInputStream;
-import javax.sound.sampled.AudioSystem;
-import javax.sound.sampled.UnsupportedAudioFileException;
 import javax.sound.sampled.spi.AudioFileWriter;
 
 
@@ -177,4 +172,62 @@
         return i;
     }
 
+    /**
+     * InputStream wrapper class which prevent source stream from being closed.
+     * The class is usefull for use with SequenceInputStream to prevent
+     * closing of the source input streams.
+     */
+    protected class NoCloseInputStream extends InputStream {
+        private final InputStream in;
+
+        public NoCloseInputStream(InputStream in) {
+            this.in = in;
+        }
+
+        @Override
+        public int read() throws IOException {
+            return in.read();
+        }
+
+        @Override
+        public int read(byte b[]) throws IOException {
+            return in.read(b);
+        }
+
+        @Override
+        public int read(byte b[], int off, int len) throws IOException {
+            return in.read(b, off, len);
+        }
+
+        @Override
+        public long skip(long n) throws IOException {
+            return in.skip(n);
+        }
+
+        @Override
+        public int available() throws IOException {
+            return in.available();
+        }
+
+        @Override
+        public void close() throws IOException {
+            // don't propagate the call
+        }
+
+        @Override
+        public void mark(int readlimit) {
+            in.mark(readlimit);
+        }
+
+        @Override
+        public void reset() throws IOException {
+            in.reset();
+        }
+
+        @Override
+        public boolean markSupported() {
+            return in.markSupported();
+        }
+
+    }
 }
--- a/src/share/classes/com/sun/media/sound/WaveFileWriter.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/WaveFileWriter.java	Wed Apr 20 04:38:36 2011 +0100
@@ -25,12 +25,10 @@
 
 package com.sun.media.sound;
 
-import java.util.Vector;
 import java.io.File;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.IOException;
-import java.lang.IllegalArgumentException;
 
 import java.io.BufferedOutputStream;
 import java.io.DataOutputStream;
@@ -371,7 +369,8 @@
         dos.close();
         header = baos.toByteArray();
         headerStream = new ByteArrayInputStream( header );
-        waveStream = new SequenceInputStream(headerStream,codedAudioStream);
+        waveStream = new SequenceInputStream(headerStream,
+                            new NoCloseInputStream(codedAudioStream));
 
         return (InputStream)waveStream;
     }
--- a/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.FormatConversionProvider	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.FormatConversionProvider	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 # Providers for FormatConversion
+com.sun.media.sound.AudioFloatFormatConverter
 com.sun.media.sound.UlawCodec
 com.sun.media.sound.AlawCodec
 com.sun.media.sound.PCMtoPCMCodec
-com.sun.media.sound.AudioFloatFormatConverter
--- a/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java	Wed Apr 20 04:38:36 2011 +0100
@@ -115,6 +115,31 @@
 
         //construct object used to implement getInterface
         implementor = new InterfaceImplementor(this) {
+                protected boolean isImplemented(Object thiz, Class<?> iface) {
+                    Context cx = enterContext();
+                    try {
+                        if (thiz != null && !(thiz instanceof Scriptable)) {
+                            thiz = cx.toObject(thiz, topLevel);
+                        }
+                        Scriptable engineScope = getRuntimeScope(context);
+                        Scriptable localScope = (thiz != null)? (Scriptable) thiz :
+                                                    engineScope;
+                        for (Method method : iface.getMethods()) {
+                            // ignore methods of java.lang.Object class
+                            if (method.getDeclaringClass() == Object.class) {
+                                continue;
+                            }
+                            Object obj = ScriptableObject.getProperty(localScope, method.getName());
+                            if (! (obj instanceof Function)) {
+                                return false;
+                            }
+                        }
+                        return true;
+                    } finally {
+                        cx.exit();
+                    }
+                }
+
                 protected Object convertResult(Method method, Object res)
                                             throws ScriptException {
                     Class desiredType = method.getReturnType();
--- a/src/share/classes/com/sun/script/util/InterfaceImplementor.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/com/sun/script/util/InterfaceImplementor.java	Wed Apr 20 04:38:36 2011 +0100
@@ -82,12 +82,19 @@
         if (iface == null || !iface.isInterface()) {
             throw new IllegalArgumentException("interface Class expected");
         }
+        if (! isImplemented(thiz, iface)) {
+            return null;
+        }
         AccessControlContext accCtxt = AccessController.getContext();
         return iface.cast(Proxy.newProxyInstance(iface.getClassLoader(),
             new Class[]{iface},
             new InterfaceImplementorInvocationHandler(thiz, accCtxt)));
     }
 
+    protected boolean isImplemented(Object thiz, Class<?> iface) {
+        return true;
+    }
+
     // called to convert method result after invoke
     protected Object convertResult(Method method, Object res)
                                    throws ScriptException {
--- a/src/share/classes/java/awt/Component.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/Component.java	Wed Apr 20 04:38:36 2011 +0100
@@ -3894,6 +3894,11 @@
          * supported or met
          * @exception ClassCastException if the component is not a canvas or
          * window.
+         * @exception IllegalStateException if the component has no peer
+         * @exception IllegalArgumentException if {@code numBuffers} is less than two,
+         * or if {@code BufferCapabilities.isPageFlipping} is not
+         * {@code true}.
+         * @see #createBuffers(int, BufferCapabilities)
          */
         protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
             throws AWTException
--- a/src/share/classes/java/awt/Font.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/Font.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1985,8 +1985,22 @@
      * @since 1.2
      */
     public int canDisplayUpTo(String str) {
-        return canDisplayUpTo(new StringCharacterIterator(str), 0,
-            str.length());
+        Font2D font2d = getFont2D();
+        int len = str.length();
+        for (int i = 0; i < len; i++) {
+            char c = str.charAt(i);
+            if (font2d.canDisplay(c)) {
+                continue;
+            }
+            if (!Character.isHighSurrogate(c)) {
+                return i;
+            }
+            if (!font2d.canDisplay(str.codePointAt(i))) {
+                return i;
+            }
+            i++;
+        }
+        return -1;
     }
 
     /**
@@ -2009,11 +2023,21 @@
      * @since 1.2
      */
     public int canDisplayUpTo(char[] text, int start, int limit) {
-        while (start < limit && canDisplay(text[start])) {
-            ++start;
+        Font2D font2d = getFont2D();
+        for (int i = start; i < limit; i++) {
+            char c = text[i];
+            if (font2d.canDisplay(c)) {
+                continue;
+            }
+            if (!Character.isHighSurrogate(c)) {
+                return i;
+            }
+            if (!font2d.canDisplay(Character.codePointAt(text, i, limit))) {
+                return i;
+            }
+            i++;
         }
-
-        return start == limit ? -1 : start;
+        return -1;
     }
 
     /**
@@ -2034,13 +2058,26 @@
      * @since 1.2
      */
     public int canDisplayUpTo(CharacterIterator iter, int start, int limit) {
-        for (char c = iter.setIndex(start);
-             iter.getIndex() < limit && canDisplay(c);
-             c = iter.next()) {
+        Font2D font2d = getFont2D();
+        char c = iter.setIndex(start);
+        for (int i = start; i < limit; i++, c = iter.next()) {
+            if (font2d.canDisplay(c)) {
+                continue;
+            }
+            if (!Character.isHighSurrogate(c)) {
+                return i;
+            }
+            char c2 = iter.next();
+            // c2 could be CharacterIterator.DONE which is not a low surrogate.
+            if (!Character.isLowSurrogate(c2)) {
+                return i;
+            }
+            if (!font2d.canDisplay(Character.toCodePoint(c, c2))) {
+                return i;
+            }
+            i++;
         }
-
-        int result = iter.getIndex();
-        return result == limit ? -1 : result;
+        return -1;
     }
 
     /**
--- a/src/share/classes/java/awt/LinearGradientPaint.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/LinearGradientPaint.java	Wed Apr 20 04:38:36 2011 +0100
@@ -57,8 +57,14 @@
  * </pre>
  *
  * <p>
- * The user may also select what action the {@code LinearGradientPaint}
- * should take when filling color outside the start and end points.
+ * The user may also select what action the {@code LinearGradientPaint} object
+ * takes when it is filling the space outside the start and end points by
+ * setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}.
+ * The distances between any two colors in any of the reflected or repeated
+ * copies of the gradient are the same as the distance between those same two
+ * colors between the start and end points.
+ * Note that some minor variations in distances may occur due to sampling at
+ * the granularity of a pixel.
  * If no cycle method is specified, {@code NO_CYCLE} will be chosen by
  * default, which means the endpoint colors will be used to fill the
  * remaining area.
--- a/src/share/classes/java/awt/MultipleGradientPaint.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/MultipleGradientPaint.java	Wed Apr 20 04:38:36 2011 +0100
@@ -286,6 +286,10 @@
     /**
      * Returns a copy of the transform applied to the gradient.
      *
+     * <p>
+     * Note that if no transform is applied to the gradient
+     * when it is created, the identity transform is used.
+     *
      * @return a copy of the transform applied to the gradient
      */
     public final AffineTransform getTransform() {
@@ -293,10 +297,12 @@
     }
 
     /**
-     * Returns the transparency mode for this Paint object.
+     * Returns the transparency mode for this {@code Paint} object.
      *
-     * @return an integer value representing the transparency mode for
-     * this Paint object
+     * @return {@code OPAQUE} if all colors used by this
+     *         {@code Paint} object are opaque,
+     *         {@code TRANSLUCENT} if at least one of the
+     *         colors used by this {@code Paint} object is not opaque.
      * @see java.awt.Transparency
      */
     public final int getTransparency() {
--- a/src/share/classes/java/awt/RadialGradientPaint.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/RadialGradientPaint.java	Wed Apr 20 04:38:36 2011 +0100
@@ -71,8 +71,24 @@
  * </pre>
  *
  * <p>
- * The user may also select what action the {@code RadialGradientPaint}
- * should take when filling color outside the bounds of the circle's radius.
+ * The user may also select what action the {@code RadialGradientPaint} object
+ * takes when it is filling the space outside the circle's radius by
+ * setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}.
+ * The gradient color proportions are equal for any particular line drawn
+ * from the focus point. The following figure shows that the distance AB
+ * is equal to the distance BC, and the distance AD is equal to the distance DE.
+ * <center>
+ * <img src = "doc-files/RadialGradientPaint-3.png">
+ * </center>
+ * If the gradient and graphics rendering transforms are uniformly scaled and
+ * the user sets the focus so that it coincides with the center of the circle,
+ * the gradient color proportions are equal for any line drawn from the center.
+ * The following figure shows the distances AB, BC, AD, and DE. They are all equal.
+ * <center>
+ * <img src = "doc-files/RadialGradientPaint-4.png">
+ * </center>
+ * Note that some minor variations in distances may occur due to sampling at
+ * the granularity of a pixel.
  * If no cycle method is specified, {@code NO_CYCLE} will be chosen by
  * default, which means the the last keyframe color will be used to fill the
  * remaining area.
@@ -604,7 +620,7 @@
     }
 
     /**
-     * Returns a copy of the end point of the gradient axis.
+     * Returns a copy of the focus point of the radial gradient.
      *
      * @return a {@code Point2D} object that is a copy of the focus point
      */
--- a/src/share/classes/java/awt/color/ICC_Profile.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/color/ICC_Profile.java	Wed Apr 20 04:38:36 2011 +0100
@@ -58,7 +58,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
-import sun.misc.BootClassLoaderHook;
 
 /**
  * A representation of color profile data for device independent and
@@ -865,8 +864,7 @@
         case ColorSpace.CS_PYCC:
             synchronized(ICC_Profile.class) {
                 if (PYCCprofile == null) {
-                    if (BootClassLoaderHook.getHook() != null ||
-                        standardProfileExists("PYCC.pf"))
+                    if (standardProfileExists("PYCC.pf"))
                     {
                         ProfileDeferralInfo pInfo =
                             new ProfileDeferralInfo("PYCC.pf",
Binary file src/share/classes/java/awt/doc-files/RadialGradientPaint-3.png has changed
Binary file src/share/classes/java/awt/doc-files/RadialGradientPaint-4.png has changed
--- a/src/share/classes/java/awt/image/PackedColorModel.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/awt/image/PackedColorModel.java	Wed Apr 20 04:38:36 2011 +0100
@@ -343,8 +343,13 @@
         if (bitMasks.length != maskArray.length) {
             return false;
         }
+
+        /* compare 'effective' masks only, i.e. only part of the mask
+         * which fits the capacity of the transfer type.
+         */
+        int maxMask = (int)((1L << DataBuffer.getDataTypeSize(transferType)) - 1);
         for (int i=0; i < bitMasks.length; i++) {
-            if (bitMasks[i] != maskArray[i]) {
+            if ((maxMask & bitMasks[i]) != (maxMask & maskArray[i])) {
                 return false;
             }
         }
--- a/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Wed Apr 20 04:38:36 2011 +0100
@@ -35,7 +35,7 @@
  * is the delegate used by default for classes about
  * which no information is available. The <code>DefaultPersistenceDelegate</code>
  * provides, version resilient, public API-based persistence for
- * classes that follow the JavaBeans conventions without any class specific
+ * classes that follow the JavaBeans&trade; conventions without any class specific
  * configuration.
  * <p>
  * The key assumptions are that the class has a nullary constructor
--- a/src/share/classes/java/beans/DesignMode.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/beans/DesignMode.java	Wed Apr 20 04:38:36 2011 +0100
@@ -31,7 +31,7 @@
  * of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy
  * of java.beans.beancontext.BeanContextChild instances, the current "designTime" property.
  * <p>
- * The JavaBeans specification defines the notion of design time as is a
+ * The JavaBeans&trade; specification defines the notion of design time as is a
  * mode in which JavaBeans instances should function during their composition
  * and customization in a interactive design, composition or construction tool,
  * as opposed to runtime when the JavaBean is part of an applet, application,
--- a/src/share/classes/java/beans/IndexedPropertyChangeEvent.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/beans/IndexedPropertyChangeEvent.java	Wed Apr 20 04:38:36 2011 +0100
@@ -26,7 +26,7 @@
 
 /**
  * An "IndexedPropertyChange" event gets delivered whenever a component that
- * conforms to the JavaBeans<TM> specification (a "bean") changes a bound
+ * conforms to the JavaBeans&trade; specification (a "bean") changes a bound
  * indexed property. This class is an extension of <code>PropertyChangeEvent</code>
  * but contains the index of the property that has changed.
  * <P>
--- a/src/share/classes/java/beans/Introspector.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/beans/Introspector.java	Wed Apr 20 04:38:36 2011 +0100
@@ -87,7 +87,7 @@
  * <p>
  * For more information about introspection and design patterns, please
  * consult the
- *  <a href="http://java.sun.com/products/javabeans/docs/index.html">JavaBeans specification</a>.
+ *  <a href="http://java.sun.com/products/javabeans/docs/index.html">JavaBeans&trade; specification</a>.
  */
 
 public class Introspector {
@@ -1245,7 +1245,7 @@
         try {
             type = ClassFinder.findClass(name, type.getClassLoader());
             // Each customizer should inherit java.awt.Component and implement java.beans.Customizer
-            // according to the section 9.3 of JavaBeans specification
+            // according to the section 9.3 of JavaBeans&trade; specification
             if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) {
                 return type;
             }
--- a/src/share/classes/java/beans/VetoableChangeSupport.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/beans/VetoableChangeSupport.java	Wed Apr 20 04:38:36 2011 +0100
@@ -474,7 +474,7 @@
     /**
      * @serialField children                                   Hashtable
      * @serialField source                                     Object
-     * @serialField propertyChangeSupportSerializedDataVersion int
+     * @serialField vetoableChangeSupportSerializedDataVersion int
      */
     private static final ObjectStreamField[] serialPersistentFields = {
             new ObjectStreamField("children", Hashtable.class),
--- a/src/share/classes/java/beans/package.html	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/beans/package.html	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,7 @@
 
 Contains classes related to developing
 <em>beans</em> -- components
-based on the JavaBeans<sup><font size=-2>TM</font></sup> architecture.
+based on the JavaBeans&trade; architecture.
 A few of the
 classes are used by beans while they run in an application. 
 For example, the event classes are
--- a/src/share/classes/java/dyn/CallSite.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-import sun.dyn.*;
-import sun.dyn.empty.Empty;
-import sun.misc.Unsafe;
-import java.util.Collection;
-
-/**
- * A {@code CallSite} is a holder for a variable {@link MethodHandle},
- * which is called its {@code target}.
- * An {@code invokedynamic} instruction linked to a {@code CallSite} delegates
- * all calls to the site's current target.
- * A {@code CallSite} may be associated with several {@code invokedynamic}
- * instructions, or it may be "free floating", associated with none.
- * In any case, it may be invoked through an associated method handle
- * called its {@linkplain #dynamicInvoker dynamic invoker}.
- * <p>
- * {@code CallSite} is an abstract class which does not allow
- * direct subclassing by users.  It has three immediate,
- * concrete subclasses that may be either instantiated or subclassed.
- * <ul>
- * <li>If a mutable target is not required, an {@code invokedynamic} instruction
- * may be permanently bound by means of a {@linkplain ConstantCallSite constant call site}.
- * <li>If a mutable target is required which has volatile variable semantics,
- * because updates to the target must be immediately and reliably witnessed by other threads,
- * a {@linkplain VolatileCallSite volatile call site} may be used.
- * <li>Otherwise, if a mutable target is required,
- * a {@linkplain MutableCallSite mutable call site} may be used.
- * </ul>
- * <p>
- * A non-constant call site may be <em>relinked</em> by changing its target.
- * The new target must have the same {@linkplain MethodHandle#type() type}
- * as the previous target.
- * Thus, though a call site can be relinked to a series of
- * successive targets, it cannot change its type.
- * <p>
- * Here is a sample use of call sites and bootstrap methods which links every
- * dynamic call site to print its arguments:
-<blockquote><pre><!-- see indy-demo/src/PrintArgsDemo.java -->
-static void test() throws Throwable {
-    // THE FOLLOWING LINE IS PSEUDOCODE FOR A JVM INSTRUCTION
-    InvokeDynamic[#bootstrapDynamic].baz("baz arg", 2, 3.14);
-}
-private static void printArgs(Object... args) {
-  System.out.println(java.util.Arrays.deepToString(args));
-}
-private static final MethodHandle printArgs;
-static {
-  MethodHandles.Lookup lookup = MethodHandles.lookup();
-  Class thisClass = lookup.lookupClass();  // (who am I?)
-  printArgs = lookup.findStatic(thisClass,
-      "printArgs", MethodType.methodType(void.class, Object[].class));
-}
-private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String name, MethodType type) {
-  // ignore caller and name, but match the type:
-  return new ConstantCallSite(MethodHandles.collectArguments(printArgs, type));
-}
-</pre></blockquote>
- * @author John Rose, JSR 292 EG
- */
-abstract
-public class CallSite {
-    private static final Access IMPL_TOKEN = Access.getToken();
-
-    // Fields used only by the JVM.  Do not use or change.
-    private MemberName vmmethod; // supplied by the JVM (ref. to calling method)
-    private int        vmindex;  // supplied by the JVM (BCI within calling method)
-
-    // The actual payload of this call site:
-    /*package-private*/
-    MethodHandle target;
-
-    // Remove this field for PFD and delete deprecated methods:
-    private MemberName calleeNameRemoveForPFD;
-
-    /**
-     * Make a blank call site object with the given method type.
-     * An initial target method is supplied which will throw
-     * an {@link IllegalStateException} if called.
-     * <p>
-     * Before this {@code CallSite} object is returned from a bootstrap method,
-     * it is usually provided with a more useful target method,
-     * via a call to {@link CallSite#setTarget(MethodHandle) setTarget}.
-     * @throws NullPointerException if the proposed type is null
-     */
-    /*package-private*/
-    CallSite(MethodType type) {
-        target = MethodHandles.invokers(type).uninitializedCallSite();
-    }
-
-    /**
-     * Make a blank call site object, possibly equipped with an initial target method handle.
-     * @param target the method handle which will be the initial target of the call site
-     * @throws NullPointerException if the proposed target is null
-     */
-    /*package-private*/
-    CallSite(MethodHandle target) {
-        target.type();  // null check
-        this.target = target;
-    }
-
-    /**
-     * Report the type of this call site's target.
-     * Although targets may change, the call site's type can never change.
-     * The {@code setTarget} method enforces this invariant by refusing any new target that does
-     * not have the previous target's type.
-     * @return the type of the current target, which is also the type of any future target
-     */
-    public MethodType type() {
-        return target.type();
-    }
-
-    /** Called from JVM (or low-level Java code) after the BSM returns the newly created CallSite.
-     *  The parameters are JVM-specific.
-     */
-    void initializeFromJVM(String name,
-                           MethodType type,
-                           MemberName callerMethod,
-                           int        callerBCI) {
-        if (this.vmmethod != null) {
-            // FIXME
-            throw new InvokeDynamicBootstrapError("call site has already been linked to an invokedynamic instruction");
-        }
-        if (!this.type().equals(type)) {
-            throw wrongTargetType(target, type);
-        }
-        this.vmindex  = callerBCI;
-        this.vmmethod = callerMethod;
-    }
-
-    /**
-     * Report the current linkage state of the call site, a value which may change over time.
-     * <p>
-     * If a {@code CallSite} object is returned
-     * from the bootstrap method of the {@code invokedynamic} instruction,
-     * the {@code CallSite} is permanently bound to that instruction.
-     * When the {@code invokedynamic} instruction is executed, the target method
-     * of its associated call site object is invoked directly.
-     * It is as if the instruction calls {@code getTarget} and then
-     * calls {@link MethodHandle#invokeExact invokeExact} on the result.
-     * <p>
-     * Unless specified differently by a subclass,
-     * the interactions of {@code getTarget} with memory are the same
-     * as of a read from an ordinary variable, such as an array element or a
-     * non-volatile, non-final field.
-     * <p>
-     * In particular, the current thread may choose to reuse the result
-     * of a previous read of the target from memory, and may fail to see
-     * a recent update to the target by another thread.
-     * <p>
-     * In a {@linkplain ConstantCallSite constant call site}, the {@code getTarget} method behaves
-     * like a read from a {@code final} field of the {@code CallSite}.
-     * <p>
-     * In a {@linkplain VolatileCallSite volatile call site}, the {@code getTarget} method behaves
-     * like a read from a {@code volatile} field of the {@code CallSite}.
-     * <p>
-     * This method may not be overridden by application code.
-     * @return the current linkage state of the call site, its target method handle
-     * @see ConstantCallSite
-     * @see VolatileCallSite
-     * @see #setTarget
-     */
-    public final MethodHandle getTarget() {
-        return getTarget0();
-    }
-
-    /**
-     * Privileged implementations can override this to force final or volatile semantics on getTarget.
-     */
-    /*package-private*/
-    MethodHandle getTarget0() {
-        return target;
-    }
-
-    /**
-     * Set the target method of this call site.
-     * <p>
-     * Unless a subclass of CallSite documents otherwise,
-     * the interactions of {@code setTarget} with memory are the same
-     * as of a write to an ordinary variable, such as an array element or a
-     * non-volatile, non-final field.
-     * <p>
-     * In particular, unrelated threads may fail to see the updated target
-     * until they perform a read from memory.
-     * Stronger guarantees can be created by putting appropriate operations
-     * into the bootstrap method and/or the target methods used
-     * at any given call site.
-     * @param newTarget the new target
-     * @throws NullPointerException if the proposed new target is null
-     * @throws WrongMethodTypeException if the proposed new target
-     *         has a method type that differs from the previous target
-     * @throws UnsupportedOperationException if the call site is
-     *         in fact a {@link ConstantCallSite}
-     */
-    public void setTarget(MethodHandle newTarget) {
-        checkTargetChange(this.target, newTarget);
-        setTargetNormal(newTarget);
-    }
-
-    void checkTargetChange(MethodHandle oldTarget, MethodHandle newTarget) {
-        MethodType oldType = oldTarget.type();
-        MethodType newType = newTarget.type();  // null check!
-        if (!newType.equals(oldType))
-            throw wrongTargetType(newTarget, oldType);
-    }
-
-    private static WrongMethodTypeException wrongTargetType(MethodHandle target, MethodType type) {
-        return new WrongMethodTypeException(String.valueOf(target)+" should be of type "+type);
-    }
-
-    /**
-     * Produce a method handle equivalent to an invokedynamic instruction
-     * which has been linked to this call site.
-     * <p>If this call site is a {@linkplain ConstantCallSite constant call site},
-     * this method simply returns the call site's target, since that will never change.
-     * <p>Otherwise, this method is equivalent to the following code:
-     * <p><blockquote><pre>
-     * MethodHandle getTarget, invoker, result;
-     * getTarget = MethodHandles.lookup().bind(this, "getTarget", MethodType.methodType(MethodHandle.class));
-     * invoker = MethodHandles.exactInvoker(this.type());
-     * result = MethodHandles.foldArguments(invoker, getTarget)
-     * </pre></blockquote>
-     * @return a method handle which always invokes this call site's current target
-     */
-    public final MethodHandle dynamicInvoker() {
-        if (this instanceof ConstantCallSite) {
-            return getTarget0();  // will not change dynamically
-        }
-        MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, GET_TARGET, this);
-        MethodHandle invoker = MethodHandles.exactInvoker(this.type());
-        return MethodHandles.foldArguments(invoker, getTarget);
-    }
-    private static final MethodHandle GET_TARGET;
-    static {
-        try {
-            GET_TARGET = MethodHandles.Lookup.IMPL_LOOKUP.
-                findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class));
-        } catch (NoAccessException ignore) {
-            throw new InternalError();
-        }
-    }
-
-    /** This guy is rolled into the default target if a MethodType is supplied to the constructor. */
-    /*package-private*/
-    static Empty uninitializedCallSite() {
-        throw new IllegalStateException("uninitialized call site");
-    }
-
-    // unsafe stuff:
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long TARGET_OFFSET;
-
-    static {
-        try {
-            TARGET_OFFSET = unsafe.objectFieldOffset(CallSite.class.getDeclaredField("target"));
-        } catch (Exception ex) { throw new Error(ex); }
-    }
-
-    /*package-private*/
-    void setTargetNormal(MethodHandle newTarget) {
-        target = newTarget;
-        //CallSiteImpl.setCallSiteTarget(IMPL_TOKEN, this, newTarget);
-    }
-    /*package-private*/
-    MethodHandle getTargetVolatile() {
-        return (MethodHandle) unsafe.getObjectVolatile(this, TARGET_OFFSET);
-    }
-    /*package-private*/
-    void setTargetVolatile(MethodHandle newTarget) {
-        unsafe.putObjectVolatile(this, TARGET_OFFSET, newTarget);
-        //CallSiteImpl.setCallSiteTarget(IMPL_TOKEN, this, newTarget);
-    }
-}
--- a/src/share/classes/java/dyn/ClassValue.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 2010, 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 java.dyn;
-
-import java.util.WeakHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.lang.reflect.UndeclaredThrowableException;
-
-/**
- * Lazily associate a computed value with (potentially) every class.
- * @author John Rose, JSR 292 EG
- */
-public class ClassValue<T> {
-    /**
-     * Compute the given class's derived value for this {@code ClassValue}.
-     * <p>
-     * This method will be invoked within the first thread that accesses
-     * the value with the {@link #get get} method.
-     * <p>
-     * Normally, this method is invoked at most once per class,
-     * but it may be invoked again if there has been a call to
-     * {@link #remove remove}.
-     * <p>
-     * If there is no override from a subclass, this method returns
-     * the result of applying the {@code ClassValue}'s {@code computeValue}
-     * method handle, which was supplied at construction time.
-     *
-     * @return the newly computed value associated with this {@code ClassValue}, for the given class or interface
-     * @throws UndeclaredThrowableException if the {@code computeValue} method handle invocation throws something other than a {@code RuntimeException} or {@code Error}
-     * @throws UnsupportedOperationException if the {@code computeValue} method handle is null (subclasses must override)
-     */
-    protected T computeValue(Class<?> type) {
-        if (computeValue == null)
-            return null;
-        try {
-            return (T) (Object) computeValue.invokeGeneric(type);
-        } catch (Throwable ex) {
-            if (ex instanceof Error)             throw (Error) ex;
-            if (ex instanceof RuntimeException)  throw (RuntimeException) ex;
-            throw new UndeclaredThrowableException(ex);
-        }
-    }
-
-    private final MethodHandle computeValue;
-
-    /**
-     * Creates a new class value.
-     * Subclasses which use this constructor must override
-     * the {@link #computeValue computeValue} method,
-     * since the default {@code computeValue} method requires a method handle,
-     * which this constructor does not provide.
-     */
-    protected ClassValue() {
-        this.computeValue = null;
-    }
-
-    /**
-     * Creates a new class value, whose {@link #computeValue computeValue} method
-     * will return the result of {@code computeValue.invokeGeneric(type)}.
-     * @throws NullPointerException  if the method handle parameter is null
-     */
-    public ClassValue(MethodHandle computeValue) {
-        computeValue.getClass();  // trigger NPE if null
-        this.computeValue = computeValue;
-    }
-
-    /**
-     * Returns the value for the given class.
-     * If no value has yet been computed, it is obtained by
-     * by an invocation of the {@link #computeValue computeValue} method.
-     * <p>
-     * The actual installation of the value on the class
-     * is performed atomically.
-     * At that point, if racing threads have
-     * computed values, one is chosen, and returned to
-     * all the racing threads.
-     *
-     * @return the current value associated with this {@code ClassValue}, for the given class or interface
-     */
-    public T get(Class<?> type) {
-        ClassValueMap map = getMap(type);
-        if (map != null) {
-            Object x = map.get(this);
-            if (x != null) {
-                return (T) map.unmaskNull(x);
-            }
-        }
-        return setComputedValue(type);
-    }
-
-    /**
-     * Removes the associated value for the given class.
-     * If this value is subsequently {@linkplain #get read} for the same class,
-     * its value will be reinitialized by invoking its {@link #computeValue computeValue} method.
-     * This may result in an additional invocation of the
-     * {@code computeValue computeValue} method for the given class.
-     * <p>
-     * If racing threads perform a combination of {@code get} and {@code remove} calls,
-     * the calls are serialized.
-     * A value produced by a call to {@code computeValue} will be discarded, if
-     * the corresponding {@code get} call was followed by a {@code remove} call
-     * before the {@code computeValue} could complete.
-     * In such a case, the {@code get} call will re-invoke {@code computeValue}.
-     */
-    public void remove(Class<?> type) {
-        ClassValueMap map = getMap(type);
-        if (map != null) {
-            synchronized (map) {
-                map.remove(this);
-            }
-        }
-    }
-
-    /// Implementation...
-
-    /** The hash code for this type is based on the identity of the object,
-     *  and is well-dispersed for power-of-two tables.
-     */
-    public final int hashCode() { return hashCode; }
-    private final int hashCode = HASH_CODES.getAndAdd(0x61c88647);
-    private static final AtomicInteger HASH_CODES = new AtomicInteger();
-
-    private static final AtomicInteger STORE_BARRIER = new AtomicInteger();
-
-    /** Slow path for {@link #get}. */
-    private T setComputedValue(Class<?> type) {
-        ClassValueMap map = getMap(type);
-        if (map == null) {
-            map = initializeMap(type);
-        }
-        T value = computeValue(type);
-        STORE_BARRIER.lazySet(0);
-        // All stores pending from computeValue are completed.
-        synchronized (map) {
-            // Warm up the table with a null entry.
-            map.preInitializeEntry(this);
-        }
-        STORE_BARRIER.lazySet(0);
-        // All stores pending from table expansion are completed.
-        synchronized (map) {
-            value = (T) map.initializeEntry(this, value);
-            // One might fear a possible race condition here
-            // if the code for map.put has flushed the write
-            // to map.table[*] before the writes to the Map.Entry
-            // are done.  This is not possible, since we have
-            // warmed up the table with an empty entry.
-        }
-        return value;
-    }
-
-    // Replace this map by a per-class slot.
-    private static final WeakHashMap<Class<?>, ClassValueMap> ROOT
-        = new WeakHashMap<Class<?>, ClassValueMap>();
-
-    private static ClassValueMap getMap(Class<?> type) {
-        return ROOT.get(type);
-    }
-
-    private static ClassValueMap initializeMap(Class<?> type) {
-        synchronized (ClassValue.class) {
-            ClassValueMap map = ROOT.get(type);
-            if (map == null)
-                ROOT.put(type, map = new ClassValueMap());
-            return map;
-        }
-    }
-
-    static class ClassValueMap extends WeakHashMap<ClassValue, Object> {
-        /** Make sure this table contains an Entry for the given key, even if it is empty. */
-        void preInitializeEntry(ClassValue key) {
-            if (!this.containsKey(key))
-                this.put(key, null);
-        }
-        /** Make sure this table contains a non-empty Entry for the given key. */
-        Object initializeEntry(ClassValue key, Object value) {
-            Object prior = this.get(key);
-            if (prior != null) {
-                return unmaskNull(prior);
-            }
-            this.put(key, maskNull(value));
-            return value;
-        }
-
-        Object maskNull(Object x) {
-            return x == null ? this : x;
-        }
-        Object unmaskNull(Object x) {
-            return x == this ? null : x;
-        }
-    }
-}
--- a/src/share/classes/java/dyn/ConstantCallSite.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2010, 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 java.dyn;
-
-/**
- * A {@code ConstantCallSite} is a {@link CallSite} whose target is permanent, and can never be changed.
- * An {@code invokedynamic} instruction linked to a {@code ConstantCallSite} is permanently
- * bound to the call site's target.
- * @author John Rose, JSR 292 EG
- */
-public class ConstantCallSite extends CallSite {
-    /** Create a call site with a permanent target.
-     * @throws NullPointerException if the proposed target is null
-     */
-    public ConstantCallSite(MethodHandle target) {
-        super(target);
-    }
-    /**
-     * Throw an {@link UnsupportedOperationException}, because this kind of call site cannot change its target.
-     */
-    @Override public final void setTarget(MethodHandle ignore) {
-        throw new UnsupportedOperationException("ConstantCallSite");
-    }
-}
--- a/src/share/classes/java/dyn/InvokeDynamic.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-/**
- * This is a place-holder class.  Some HotSpot implementations need to see it.
- */
-final class InvokeDynamic {
-    private InvokeDynamic() { throw new InternalError(); }  // do not instantiate
-}
--- a/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-/**
- * Thrown to indicate that an {@code invokedynamic} instruction has
- * failed to find its
- * {@linkplain BootstrapMethod bootstrap method},
- * or the bootstrap method has
- * failed to provide a
- * {@linkplain CallSite} call site with a non-null {@linkplain MethodHandle target}
- * of the correct {@linkplain MethodType method type}.
- *
- * @author John Rose, JSR 292 EG
- * @since 1.7
- */
-public class InvokeDynamicBootstrapError extends LinkageError {
-    private static final long serialVersionUID = 292L;
-
-    /**
-     * Constructs an {@code InvokeDynamicBootstrapError} with no detail message.
-     */
-    public InvokeDynamicBootstrapError() {
-        super();
-    }
-
-    /**
-     * Constructs an {@code InvokeDynamicBootstrapError} with the specified
-     * detail message.
-     *
-     * @param s the detail message.
-     */
-    public InvokeDynamicBootstrapError(String s) {
-        super(s);
-    }
-
-    /**
-     * Constructs a {@code InvokeDynamicBootstrapError} with the specified
-     * detail message and cause.
-     *
-     * @param s the detail message.
-     * @param cause the cause, may be {@code null}.
-     */
-    public InvokeDynamicBootstrapError(String s, Throwable cause) {
-        super(s, cause);
-    }
-
-    /**
-     * Constructs a {@code InvokeDynamicBootstrapError} with the specified
-     * cause.
-     *
-     * @param cause the cause, may be {@code null}.
-     */
-    public InvokeDynamicBootstrapError(Throwable cause) {
-        // cf. Throwable(Throwable cause) constructor.
-        super(cause == null ? null : cause.toString());
-        initCause(cause);
-    }
-}
--- a/src/share/classes/java/dyn/Linkage.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-import java.dyn.MethodHandles.Lookup;
-import java.util.WeakHashMap;
-import sun.dyn.Access;
-import sun.dyn.MethodHandleImpl;
-import sun.dyn.util.VerifyAccess;
-import sun.reflect.Reflection;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * <em>CLASS WILL BE REMOVED FOR PFD:</em>
- * Static routines for controlling invokedynamic behavior.
- * Replaced by non-static APIs.
- * @author John Rose, JSR 292 EG
- * @deprecated This class will be removed in the Public Final Draft.
- */
-public class Linkage {
-    private static final Access IMPL_TOKEN = Access.getToken();
-
-    private Linkage() {}  // do not instantiate
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Register a <em>bootstrap method</em> to use when linking dynamic call sites within
-     * a given caller class.
-     * @deprecated Use @{@link BootstrapMethod} annotations instead.
-     */
-    public static
-    void registerBootstrapMethod(Class callerClass, MethodHandle bootstrapMethod) {
-        Class callc = Reflection.getCallerClass(2);
-        if (callc != null && !VerifyAccess.isSamePackage(callerClass, callc))
-            throw new IllegalArgumentException("cannot set bootstrap method on "+callerClass);
-        MethodHandleImpl.registerBootstrap(IMPL_TOKEN, callerClass, bootstrapMethod);
-    }
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Simplified version of {@code registerBootstrapMethod} for self-registration,
-     * to be called from a static initializer.
-     * @deprecated Use @{@link BootstrapMethod} annotations instead.
-     */
-    public static
-    void registerBootstrapMethod(Class<?> runtime, String name) {
-        Class callerClass = Reflection.getCallerClass(2);
-        registerBootstrapMethodLookup(callerClass, runtime, name);
-    }
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Simplified version of {@code registerBootstrapMethod} for self-registration,
-     * @deprecated Use @{@link BootstrapMethod} annotations instead.
-     */
-    public static
-    void registerBootstrapMethod(String name) {
-        Class callerClass = Reflection.getCallerClass(2);
-        registerBootstrapMethodLookup(callerClass, callerClass, name);
-    }
-
-    private static
-    void registerBootstrapMethodLookup(Class<?> callerClass, Class<?> runtime, String name) {
-        Lookup lookup = new Lookup(IMPL_TOKEN, callerClass);
-        MethodHandle bootstrapMethod;
-        try {
-            bootstrapMethod = lookup.findStatic(runtime, name, BOOTSTRAP_METHOD_TYPE);
-        } catch (NoAccessException ex) {
-            throw new IllegalArgumentException("no such bootstrap method in "+runtime+": "+name, ex);
-        }
-        MethodHandleImpl.registerBootstrap(IMPL_TOKEN, callerClass, bootstrapMethod);
-    }
-
-    private static final MethodType BOOTSTRAP_METHOD_TYPE
-            = MethodType.methodType(CallSite.class,
-                                    Class.class, String.class, MethodType.class);
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Invalidate all <code>invokedynamic</code> call sites everywhere.
-     * @deprecated Use {@linkplain CallSite#setTarget call site target setting}
-     * and {@link VolatileCallSite#invalidateAll call site invalidation} instead.
-     */
-    public static
-    Object invalidateAll() {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Invalidate all {@code invokedynamic} call sites in the bytecodes
-     * of any methods of the given class.
-     * @deprecated Use {@linkplain CallSite#setTarget call site target setting}
-     * and {@link VolatileCallSite#invalidateAll call site invalidation} instead.
-     */
-    public static
-    Object invalidateCallerClass(Class<?> callerClass) {
-        throw new UnsupportedOperationException();
-    }
-}
--- a/src/share/classes/java/dyn/MethodHandle.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,692 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-//import sun.dyn.*;
-
-import sun.dyn.Access;
-import sun.dyn.MethodHandleImpl;
-
-import static java.dyn.MethodHandles.invokers;  // package-private API
-import static sun.dyn.MemberName.newIllegalArgumentException;  // utility
-
-/**
- * A method handle is a typed, directly executable reference to a method,
- * constructor, field, or similar low-level operation, with optional
- * transformations of arguments or return values.
- * These transformations are quite general, and include such patterns as
- * {@linkplain #asType conversion},
- * {@linkplain #bindTo insertion},
- * {@linkplain java.dyn.MethodHandles#dropArguments deletion},
- * and {@linkplain java.dyn.MethodHandles#filterArguments substitution}.
- * <p>
- * <em>Note: The super-class of MethodHandle is Object.
- *     Any other super-class visible in the Reference Implementation
- *     will be removed before the Proposed Final Draft.
- *     Also, the final version will not include any public or
- *     protected constructors.</em>
- * <p>
- * Method handles are strongly typed according to signature.
- * They are not distinguished by method name or enclosing class.
- * A method handle must be invoked under a signature which matches
- * the method handle's own {@linkplain MethodType method type}.
- * <p>
- * Every method handle reports its type via the {@link #type type} accessor.
- * The structure of this type is a series of classes, one of which is
- * the return type of the method (or {@code void.class} if none).
- * <p>
- * Every method handle appears as an object containing a method named
- * {@link #invokeExact invokeExact}, whose signature exactly matches
- * the method handle's type.
- * A Java method call expression, which compiles to an
- * {@code invokevirtual} instruction,
- * can invoke this method from Java source code.
- * <p>
- * Every call to a method handle specifies an intended method type,
- * which must exactly match the type of the method handle.
- * (The type is specified in the {@code invokevirtual} instruction,
- * via a {@code CONSTANT_NameAndType} constant pool entry.)
- * The call looks within the receiver object for a method
- * named {@code invokeExact} of the intended method type.
- * The call fails with a {@link WrongMethodTypeException}
- * if the method does not exist, even if there is an {@code invokeExact}
- * method of a closely similar signature.
- * As with other kinds
- * of methods in the JVM, signature matching during method linkage
- * is exact, and does not allow for language-level implicit conversions
- * such as {@code String} to {@code Object} or {@code short} to {@code int}.
- * <p>
- * Each individual method handle also contains a method named
- * {@link #invokeGeneric invokeGeneric}, whose type is the same
- * as {@code invokeExact}, and is therefore also reported by
- * the {@link #type type} accessor.
- * A call to {@code invokeGeneric} works the same as a call to
- * {@code invokeExact}, if the signature specified by the caller
- * exactly matches the method handle's own type.
- * If there is a type mismatch, {@code invokeGeneric} attempts
- * to adjust the type of the target method handle
- * (as if by a call to {@link #asType asType})
- * to obtain an exactly invokable target.
- * This allows a more powerful negotiation of method type
- * between caller and callee.
- * <p>
- * A method handle is an unrestricted capability to call a method.
- * A method handle can be formed on a non-public method by a class
- * that has access to that method; the resulting handle can be used
- * in any place by any caller who receives a reference to it.  Thus, access
- * checking is performed when the method handle is created, not
- * (as in reflection) every time it is called.  Handles to non-public
- * methods, or in non-public classes, should generally be kept secret.
- * They should not be passed to untrusted code unless their use from
- * the untrusted code would be harmless.
- * <p>
- * Bytecode in the JVM can directly call a method handle's
- * {@code invokeExact} method from an {@code invokevirtual} instruction.
- * The receiver class type must be {@code MethodHandle} and the method name
- * must be {@code invokeExact}.  The signature of the invocation
- * (after resolving symbolic type names) must exactly match the method type
- * of the target method.
- * Similarly, bytecode can directly call a method handle's {@code invokeGeneric}
- * method.  The signature of the invocation (after resolving symbolic type names)
- * must either exactly match the method type or be a valid argument to
- * the target's {@link #asType asType} method.
- * <p>
- * Every {@code invokeExact} and {@code invokeGeneric} method always
- * throws {@link java.lang.Throwable Throwable},
- * which is to say that there is no static restriction on what a method handle
- * can throw.  Since the JVM does not distinguish between checked
- * and unchecked exceptions (other than by their class, of course),
- * there is no particular effect on bytecode shape from ascribing
- * checked exceptions to method handle invocations.  But in Java source
- * code, methods which perform method handle calls must either explicitly
- * throw {@code java.lang.Throwable Throwable}, or else must catch all
- * throwables locally, rethrowing only those which are legal in the context,
- * and wrapping ones which are illegal.
- * <p>
- * Bytecode in the JVM can directly obtain a method handle
- * for any accessible method from a {@code ldc} instruction
- * which refers to a {@code CONSTANT_MethodHandle} constant pool entry.
- * (Each such entry refers directly to a {@code CONSTANT_Methodref},
- * {@code CONSTANT_InterfaceMethodref}, or {@code CONSTANT_Fieldref}
- * constant pool entry.
- * For more details, see the <a href="package-summary.html#mhcon">package summary</a>.)
- * <p>
- * Java code can also use a reflective API called
- * {@link java.dyn.MethodHandles.Lookup MethodHandles.Lookup}
- * for creating and calling method handles.
- * For example, a static method handle can be obtained
- * from {@link java.dyn.MethodHandles.Lookup#findStatic Lookup.findStatic}.
- * There are also bridge methods from Core Reflection API objects,
- * such as {@link java.dyn.MethodHandles.Lookup#unreflect Lookup.ureflect}.
- * <p>
- * A method reference may refer either to a static or non-static method.
- * In the non-static case, the method handle type includes an explicit
- * receiver argument, prepended before any other arguments.
- * In the method handle's type, the initial receiver argument is typed
- * according to the class under which the method was initially requested.
- * (E.g., if a non-static method handle is obtained via {@code ldc},
- * the type of the receiver is the class named in the constant pool entry.)
- * <p>
- * When a method handle to a virtual method is invoked, the method is
- * always looked up in the receiver (that is, the first argument).
- * <p>
- * A non-virtual method handles to a specific virtual method implementation
- * can also be created.  These do not perform virtual lookup based on
- * receiver type.  Such a method handle simulates the effect of
- * an {@code invokespecial} instruction to the same method.
- * <p>
- * Here are some examples of usage:
- * <p><blockquote><pre>
-Object x, y; String s; int i;
-MethodType mt; MethodHandle mh;
-MethodHandles.Lookup lookup = MethodHandles.lookup();
-// mt is {(char,char) =&gt; String}
-mt = MethodType.methodType(String.class, char.class, char.class);
-mh = lookup.findVirtual(String.class, "replace", mt);
-// (Ljava/lang/String;CC)Ljava/lang/String;
-s = (String) mh.invokeExact("daddy",'d','n');
-assert(s.equals("nanny"));
-// weakly typed invocation (using MHs.invoke)
-s = (String) mh.invokeWithArguments("sappy", 'p', 'v');
-assert(s.equals("savvy"));
-// mt is {Object[] =&gt; List}
-mt = MethodType.methodType(java.util.List.class, Object[].class);
-mh = lookup.findStatic(java.util.Arrays.class, "asList", mt);
-// mt is {(Object,Object,Object) =&gt; Object}
-mt = MethodType.genericMethodType(3);
-mh = MethodHandles.collectArguments(mh, mt);
-// mt is {(Object,Object,Object) =&gt; Object}
-// (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-x = mh.invokeExact((Object)1, (Object)2, (Object)3);
-assert(x.equals(java.util.Arrays.asList(1,2,3)));
-// mt is { =&gt; int}
-mt = MethodType.methodType(int.class);
-mh = lookup.findVirtual(java.util.List.class, "size", mt);
-// (Ljava/util/List;)I
-i = (int) mh.invokeExact(java.util.Arrays.asList(1,2,3));
-assert(i == 3);
-mt = MethodType.methodType(void.class, String.class);
-mh = lookup.findVirtual(java.io.PrintStream.class, "println", mt);
-mh.invokeExact(System.out, "Hello, world.");
-// (Ljava/io/PrintStream;Ljava/lang/String;)V
- * </pre></blockquote>
- * Each of the above calls generates a single invokevirtual instruction
- * with the name {@code invoke} and the type descriptors indicated in the comments.
- * The argument types are taken directly from the actual arguments,
- * while the return type is taken from the cast immediately applied to the call.
- * This cast may be to a primitive.
- * If it is missing, the type defaults to {@code Object} if the call
- * occurs in a context which uses the return value.
- * If the call occurs as a statement, a cast is impossible,
- * and there is no return type; the call is {@code void}.
- * <p>
- * <em>A note on generic typing:</em>  Method handles do not represent
- * their function types in terms of Java parameterized (generic) types,
- * because there are three mismatches between function types and parameterized
- * Java types.
- * <ol>
- * <li>Method types range over all possible arities,
- * from no arguments to up to 255 of arguments (a limit imposed by the JVM).
- * Generics are not variadic, and so cannot represent this.</li>
- * <li>Method types can specify arguments of primitive types,
- * which Java generic types cannot range over.</li>
- * <li>Higher order functions over method handles (combinators) are
- * often generic across a wide range of function types, including
- * those of multiple arities.  It is impossible to represent such
- * genericity with a Java type parameter.</li>
- * </ol>
- * Signature polymorphic methods in this class appear to be documented
- * as having type parameters for return types and a parameter, but that is
- * merely a documentation convention.  These type parameters do
- * not play a role in type-checking method handle invocations.
- * <p>
- * Like classes and strings, method handles that correspond to accessible
- * fields, methods, and constructors can be represented directly
- * in a class file's constant pool as constants to be loaded by {@code ldc} bytecodes.
- * Loading such a constant causes the component classes of its type to be loaded as necessary.
- * <p>
- * Method handles cannot be subclassed by the user.
- * Implementations may (or may not) create internal subclasses of {@code MethodHandle}
- * which may be visible via the {@code java.lang.Object#getClass Object.getClass}
- * operation.  The programmer should not draw conclusions about a method handle
- * from its specific class, as the method handle class hierarchy (if any)
- * may change from time to time or across implementations from different vendors.
- * <p>
- * With respect to the Java Memory Model, any method handle will behave
- * as if all of its fields are final variables.  This means that any method
- * handle made visible to the application will always be fully formed.
- * This is true even if the method handle is published through a shared
- * variables in a data race.
- *
- * @see MethodType
- * @see MethodHandles
- * @author John Rose, JSR 292 EG
- */
-public abstract class MethodHandle
-        // Note: This is an implementation inheritance hack, and will be removed
-        // with a JVM change which moves the required hidden state onto this class.
-        extends MethodHandleImpl
-{
-    private static Access IMPL_TOKEN = Access.getToken();
-
-    // interface MethodHandle<R throws X extends Exception,A...>
-    // { MethodType<R throws X,A...> type(); public R invokeExact(A...) throws X; }
-
-    /**
-     * Internal marker interface which distinguishes (to the Java compiler)
-     * those methods which are signature polymorphic.
-     */
-    @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD,java.lang.annotation.ElementType.TYPE})
-    @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-    @interface PolymorphicSignature { }
-
-    private MethodType type;
-
-    /**
-     * Report the type of this method handle.
-     * Every invocation of this method handle via {@code invokeExact} must exactly match this type.
-     * @return the method handle type
-     */
-    public final MethodType type() {
-        return type;
-    }
-
-    /**
-     * <em>CONSTRUCTOR WILL BE REMOVED FOR PFD:</em>
-     * Temporary constructor in early versions of the Reference Implementation.
-     * Method handle inheritance (if any) will be contained completely within
-     * the {@code java.dyn} package.
-     */
-    // The constructor for MethodHandle may only be called by privileged code.
-    // Subclasses may be in other packages, but must possess
-    // a token which they obtained from MH with a security check.
-    // @param token non-null object which proves access permission
-    // @param type type (permanently assigned) of the new method handle
-    protected MethodHandle(Access token, MethodType type) {
-        super(token);
-        Access.check(token);
-        this.type = type;
-    }
-
-    private void initType(MethodType type) {
-        type.getClass();  // elicit NPE
-        if (this.type != null)  throw new InternalError();
-        this.type = type;
-    }
-
-    static {
-        // This hack allows the implementation package special access to
-        // the internals of MethodHandle.  In particular, the MTImpl has all sorts
-        // of cached information useful to the implementation code.
-        MethodHandleImpl.setMethodHandleFriend(IMPL_TOKEN, new MethodHandleImpl.MethodHandleFriend() {
-            public void initType(MethodHandle mh, MethodType type) { mh.initType(type); }
-        });
-    }
-
-    /**
-     * Returns a string representation of the method handle,
-     * starting with the string {@code "MethodHandle"} and
-     * ending with the string representation of the method handle's type.
-     * In other words, this method returns a string equal to the value of:
-     * <blockquote><pre>
-     * "MethodHandle" + type().toString()
-     * </pre></blockquote>
-     * <p>
-     * Note:  Future releases of this API may add further information
-     * to the string representation.
-     * Therefore, the present syntax should not be parsed by applications.
-     *
-     * @return a string representation of the method handle
-     */
-    @Override
-    public String toString() {
-        return MethodHandleImpl.getNameString(IMPL_TOKEN, this);
-    }
-
-    /**
-     * Invoke the method handle, allowing any caller signature, but requiring an exact signature match.
-     * The signature at the call site of {@code invokeExact} must
-     * exactly match this method handle's {@link #type type}.
-     * No conversions are allowed on arguments or return values.
-     * @throws WrongMethodTypeException if the target's type is not identical with the caller's type signature
-     * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call
-     */
-    public final native @PolymorphicSignature Object invokeExact(Object... args) throws Throwable;
-
-    /**
-     * Invoke the method handle, allowing any caller signature,
-     * and optionally performing conversions for arguments and return types.
-     * <p>
-     * If the call site signature exactly matches this method handle's {@link #type type},
-     * the call proceeds as if by {@link #invokeExact invokeExact}.
-     * <p>
-     * Otherwise, the call proceeds as if this method handle were first
-     * adjusted by calling {@link #asType asType} to adjust this method handle
-     * to the required type, and then the call proceeds as if by
-     * {@link #invokeExact invokeExact} on the adjusted method handle.
-     * <p>
-     * There is no guarantee that the {@code asType} call is actually made.
-     * If the JVM can predict the results of making the call, it may perform
-     * adaptations directly on the caller's arguments,
-     * and call the target method handle according to its own exact type.
-     * <p>
-     * If the method handle is equipped with a
-     * {@linkplain #withTypeHandler type handler}, the handler must produce
-     * an entry point of the call site's exact type.
-     * Otherwise, the signature at the call site of {@code invokeGeneric} must
-     * be a valid argument to the standard {@code asType} method.
-     * In particular, the caller must specify the same argument arity
-     * as the callee's type.
-     * @throws WrongMethodTypeException if the target's type cannot be adjusted to the caller's type signature
-     * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call
-     */
-    public final native @PolymorphicSignature Object invokeGeneric(Object... args) throws Throwable;
-
-    /**
-     * Perform a varargs invocation, passing the arguments in the given array
-     * to the method handle, as if via {@link #invokeGeneric invokeGeneric} from a call site
-     * which mentions only the type {@code Object}, and whose arity is the length
-     * of the argument array.
-     * <p>
-     * Specifically, execution proceeds as if by the following steps,
-     * although the methods are not guaranteed to be called if the JVM
-     * can predict their effects.
-     * <ul>
-     * <li>Determine the length of the argument array as {@code N}.
-     *     For a null reference, {@code N=0}. </li>
-     * <li>Determine the generic type {@code TN} of {@code N} arguments as
-     *     as {@code TN=MethodType.genericMethodType(N)}.</li>
-     * <li>Force the original target method handle {@code MH0} to the
-     *     required type, as {@code MH1 = MH0.asType(TN)}. </li>
-     * <li>Spread the array into {@code N} separate arguments {@code A0, ...}. </li>
-     * <li>Invoke the type-adjusted method handle on the unpacked arguments:
-     *     MH1.invokeExact(A0, ...). </li>
-     * <li>Take the return value as an {@code Object} reference. </li>
-     * </ul>
-     * <p>
-     * Because of the action of the {@code asType} step, the following argument
-     * conversions are applied as necessary:
-     * <ul>
-     * <li>reference casting
-     * <li>unboxing
-     * <li>widening primitive conversions
-     * </ul>
-     * <p>
-     * The result returned by the call is boxed if it is a primitive,
-     * or forced to null if the return type is void.
-     * <p>
-     * This call is equivalent to the following code:
-     * <p><blockquote><pre>
-     * MethodHandle invoker = MethodHandles.varargsInvoker(this.type(), 0);
-     * Object result = invoker.invokeExact(this, arguments);
-     * </pre></blockquote>
-     * @param arguments the arguments to pass to the target
-     * @return the result returned by the target
-     * @throws WrongMethodTypeException if the target's type cannot be adjusted to take the arguments
-     * @throws Throwable anything thrown by the target method invocation
-     * @see MethodHandles#varargsInvoker
-     */
-    public final Object invokeWithArguments(Object... arguments) throws Throwable {
-        int argc = arguments == null ? 0 : arguments.length;
-        MethodType type = type();
-        if (type.parameterCount() != argc) {
-            // simulate invokeGeneric
-            return asType(MethodType.genericMethodType(argc)).invokeWithArguments(arguments);
-        }
-        if (argc <= 10) {
-            MethodHandle invoker = MethodHandles.invokers(type).genericInvoker();
-            switch (argc) {
-                case 0:  return invoker.invokeExact(this);
-                case 1:  return invoker.invokeExact(this,
-                                    arguments[0]);
-                case 2:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1]);
-                case 3:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2]);
-                case 4:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3]);
-                case 5:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3], arguments[4]);
-                case 6:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3], arguments[4], arguments[5]);
-                case 7:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3], arguments[4], arguments[5],
-                                    arguments[6]);
-                case 8:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3], arguments[4], arguments[5],
-                                    arguments[6], arguments[7]);
-                case 9:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3], arguments[4], arguments[5],
-                                    arguments[6], arguments[7], arguments[8]);
-                case 10:  return invoker.invokeExact(this,
-                                    arguments[0], arguments[1], arguments[2],
-                                    arguments[3], arguments[4], arguments[5],
-                                    arguments[6], arguments[7], arguments[8],
-                                    arguments[9]);
-            }
-        }
-
-        // more than ten arguments get boxed in a varargs list:
-        MethodHandle invoker = MethodHandles.invokers(type).varargsInvoker(0);
-        return invoker.invokeExact(this, arguments);
-    }
-    /** Equivalent to {@code invokeWithArguments(arguments.toArray())}. */
-    public final Object invokeWithArguments(java.util.List<?> arguments) throws Throwable {
-        return invokeWithArguments(arguments.toArray());
-    }
-    @Deprecated
-    public final Object invokeVarargs(Object... arguments) throws Throwable {
-        return invokeWithArguments(arguments);
-    }
-    @Deprecated
-    public final Object invokeVarargs(java.util.List<?> arguments) throws Throwable {
-        return invokeWithArguments(arguments.toArray());
-    }
-
-    /**
-     * Produce an adapter method handle which adapts the type of the
-     * current method handle to a new type
-     * The resulting method handle is guaranteed to report a type
-     * which is equal to the desired new type.
-     * <p>
-     * If the original type and new type are equal, returns {@code this}.
-     * <p>
-     * This method provides the crucial behavioral difference between
-     * {@link #invokeExact invokeExact} and {@link #invokeGeneric invokeGeneric}.  The two methods
-     * perform the same steps when the caller's type descriptor is identical
-     * with the callee's, but when the types differ, {@link #invokeGeneric invokeGeneric}
-     * also calls {@code asType} (or some internal equivalent) in order
-     * to match up the caller's and callee's types.
-     * <p>
-     * This method is equivalent to {@link MethodHandles#convertArguments convertArguments},
-     * except for method handles produced by {@link #withTypeHandler withTypeHandler},
-     * in which case the specified type handler is used for calls to {@code asType}.
-     * <p>
-     * Note that the default behavior of {@code asType} only performs
-     * pairwise argument conversion and return value conversion.
-     * Because of this, unless the method handle has a type handler,
-     * the original type and new type must have the same number of arguments.
-     *
-     * @param newType the expected type of the new method handle
-     * @return a method handle which delegates to {@code this} after performing
-     *           any necessary argument conversions, and arranges for any
-     *           necessary return value conversions
-     * @throws WrongMethodTypeException if the conversion cannot be made
-     * @see MethodHandles#convertArguments
-     */
-    public MethodHandle asType(MethodType newType) {
-        return MethodHandles.convertArguments(this, newType);
-    }
-
-    /**
-     * Produce a method handle which adapts, as its <i>target</i>,
-     * the current method handle.  The type of the adapter will be
-     * the same as the type of the target, except that the final
-     * {@code arrayLength} parameters of the target's type are replaced
-     * by a single array parameter of type {@code arrayType}.
-     * <p>
-     * If the array element type differs from any of the corresponding
-     * argument types on original target,
-     * the original target is adapted to take the array elements directly,
-     * as if by a call to {@link #asType asType}.
-     * <p>
-     * When called, the adapter replaces a trailing array argument
-     * by the array's elements, each as its own argument to the target.
-     * (The order of the arguments is preserved.)
-     * They are converted pairwise by casting and/or unboxing
-     * to the types of the trailing parameters of the target.
-     * Finally the target is called.
-     * What the target eventually returns is returned unchanged by the adapter.
-     * <p>
-     * Before calling the target, the adapter verifies that the array
-     * contains exactly enough elements to provide a correct argument count
-     * to the target method handle.
-     * (The array may also be null when zero elements are required.)
-     * @param arrayType usually {@code Object[]}, the type of the array argument from which to extract the spread arguments
-     * @param arrayLength the number of arguments to spread from an incoming array argument
-     * @return a new method handle which spreads its final array argument,
-     *         before calling the original method handle
-     * @throws IllegalArgumentException if {@code arrayType} is not an array type
-     * @throws IllegalArgumentException if target does not have at least
-     *         {@code arrayLength} parameter types
-     * @throws WrongMethodTypeException if the implied {@code asType} call fails
-     */
-    public final MethodHandle asSpreader(Class<?> arrayType, int arrayLength) {
-        Class<?> arrayElement = arrayType.getComponentType();
-        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
-        MethodType oldType = type();
-        int nargs = oldType.parameterCount();
-        if (nargs < arrayLength)  throw newIllegalArgumentException("bad spread array length");
-        int keepPosArgs = nargs - arrayLength;
-        MethodType newType = oldType.dropParameterTypes(keepPosArgs, nargs);
-        newType = newType.insertParameterTypes(keepPosArgs, arrayType);
-        return MethodHandles.spreadArguments(this, newType);
-    }
-
-    /**
-     * Produce a method handle which adapts, as its <i>target</i>,
-     * the current method handle.  The type of the adapter will be
-     * the same as the type of the target, except that a single trailing
-     * parameter (usually of type {@code arrayType}) is replaced by
-     * {@code arrayLength} parameters whose type is element type of {@code arrayType}.
-     * <p>
-     * If the array type differs from the final argument type on original target,
-     * the original target is adapted to take the array type directly,
-     * as if by a call to {@link #asType asType}.
-     * <p>
-     * When called, the adapter replaces its trailing {@code arrayLength}
-     * arguments by a single new array of type {@code arrayType}, whose elements
-     * comprise (in order) the replaced arguments.
-     * Finally the target is called.
-     * What the target eventually returns is returned unchanged by the adapter.
-     * <p>
-     * (The array may also be a shared constant when {@code arrayLength} is zero.)
-     * @param arrayType usually {@code Object[]}, the type of the array argument which will collect the arguments
-     * @param arrayLength the number of arguments to collect into a new array argument
-     * @return a new method handle which collects some trailing argument
-     *         into an array, before calling the original method handle
-     * @throws IllegalArgumentException if {@code arrayType} is not an array type
-               or {@code arrayType} is not assignable to this method handle's trailing parameter type
-     * @throws IllegalArgumentException if {@code arrayLength} is not
-     *         a legal array size
-     * @throws WrongMethodTypeException if the implied {@code asType} call fails
-     */
-    public final MethodHandle asCollector(Class<?> arrayType, int arrayLength) {
-        Class<?> arrayElement = arrayType.getComponentType();
-        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
-        MethodType oldType = type();
-        int nargs = oldType.parameterCount();
-        MethodType newType = oldType.dropParameterTypes(nargs-1, nargs);
-        newType = newType.insertParameterTypes(nargs-1,
-                    java.util.Collections.<Class<?>>nCopies(arrayLength, arrayElement));
-        return MethodHandles.collectArguments(this, newType);
-    }
-
-    /**
-     * Produce a method handle which binds the given argument
-     * to the current method handle as <i>target</i>.
-     * The type of the bound handle will be
-     * the same as the type of the target, except that a single leading
-     * reference parameter will be omitted.
-     * <p>
-     * When called, the bound handle inserts the given value {@code x}
-     * as a new leading argument to the target.  The other arguments are
-     * also passed unchanged.
-     * What the target eventually returns is returned unchanged by the bound handle.
-     * <p>
-     * The reference {@code x} must be convertible to the first parameter
-     * type of the target.
-     * @param x  the value to bind to the first argument of the target
-     * @return a new method handle which collects some trailing argument
-     *         into an array, before calling the original method handle
-     * @throws IllegalArgumentException if the target does not have a
-     *         leading parameter type that is a reference type
-     * @throws ClassCastException if {@code x} cannot be converted
-     *         to the leading parameter type of the target
-     * @see MethodHandles#insertArguments
-     */
-    public final MethodHandle bindTo(Object x) {
-        return MethodHandles.insertArguments(this, 0, x);
-    }
-
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Create a new method handle with the same type as this one,
-     * but whose {@code asType} method invokes the given
-     * {@code typeHandler} on this method handle,
-     * instead of the standard {@code MethodHandles.convertArguments}.
-     * <p>
-     * The new method handle will have the same behavior as the
-     * old one when invoked by {@code invokeExact}.
-     * For {@code invokeGeneric} calls which exactly match
-     * the method type, the two method handles will also
-     * have the same behavior.
-     * For other {@code invokeGeneric} calls, the {@code typeHandler}
-     * will control the behavior of the new method handle.
-     * <p>
-     * Thus, a method handle with an {@code asType} handler can
-     * be configured to accept more than one arity of {@code invokeGeneric}
-     * call, and potentially every possible arity.
-     * It can also be configured to supply default values for
-     * optional arguments, when the caller does not specify them.
-     * <p>
-     * The given method handle must take two arguments and return
-     * one result.  The result it returns must be a method handle
-     * of exactly the requested type.  If the result returned by
-     * the target is null, a {@link NullPointerException} is thrown,
-     * else if the type of the target does not exactly match
-     * the requested type, a {@link WrongMethodTypeException} is thrown.
-     * <p>
-     * A method handle's type handler is not guaranteed to be called every
-     * time its {@code asType} or {@code invokeGeneric} method is called.
-     * If the implementation is faced is able to prove that an equivalent
-     * type handler call has already occurred (on the same two arguments),
-     * it may substitute the result of that previous invocation, without
-     * making a new invocation.  Thus, type handlers should not (in general)
-     * perform significant side effects.
-     * <p>
-     * Therefore, the type handler is invoked as if by this code:
-     * <blockquote><pre>
-     * MethodHandle target = this;      // original method handle
-     * MethodHandle adapter = ...;      // adapted method handle
-     * MethodType requestedType = ...;  // argument to asType()
-     * if (type().equals(requestedType))
-     *    return adapter;
-     * MethodHandle result = (MethodHandle)
-     *    typeHandler.invokeGeneric(target, requestedType);
-     * if (!result.type().equals(requestedType))
-     *    throw new WrongMethodTypeException();
-     * return result;
-     * </pre></blockquote>
-     * <p>
-     * For example, here is a list-making variable-arity method handle:
-     * <blockquote><pre>
-MethodHandle makeEmptyList = MethodHandles.constant(List.class, Arrays.asList());
-MethodHandle asList = lookup()
-  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class));
-static MethodHandle collectingTypeHandler(MethodHandle base, MethodType newType) {
-  return asList.asCollector(Object[].class, newType.parameterCount()).asType(newType);
-}
-MethodHandle collectingTypeHandler = lookup()
-  .findStatic(lookup().lookupClass(), "collectingTypeHandler",
-     methodType(MethodHandle.class, MethodHandle.class, MethodType.class));
-MethodHandle makeAnyList = makeEmptyList.withTypeHandler(collectingTypeHandler);
-
-assertEquals("[]", makeAnyList.invokeGeneric().toString());
-assertEquals("[1]", makeAnyList.invokeGeneric(1).toString());
-assertEquals("[two, too]", makeAnyList.invokeGeneric("two", "too").toString());
-     * <pre><blockquote>
-     */
-    public MethodHandle withTypeHandler(MethodHandle typeHandler) {
-        return MethodHandles.withTypeHandler(this, typeHandler);
-    }
-}
--- a/src/share/classes/java/dyn/MethodHandles.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1997 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-import java.lang.reflect.*;
-import sun.dyn.Access;
-import sun.dyn.MemberName;
-import sun.dyn.MethodHandleImpl;
-import sun.dyn.util.ValueConversions;
-import sun.dyn.util.VerifyAccess;
-import sun.dyn.util.Wrapper;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-import sun.dyn.Invokers;
-import sun.dyn.MethodTypeImpl;
-import sun.reflect.Reflection;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-import static sun.dyn.MemberName.newNoAccessException;
-
-/**
- * This class consists exclusively of static methods that operate on or return
- * method handles. They fall into several categories:
- * <ul>
- * <li>Factory methods which create method handles for methods and fields.
- * <li>Invoker methods which can invoke method handles on dynamically typed arguments and/or varargs arrays.
- * <li>Combinator methods, which combine or transforming pre-existing method handles into new ones.
- * <li>Factory methods which create method handles that emulate other common JVM operations or control flow patterns.
- * </ul>
- * <p>
- * @author John Rose, JSR 292 EG
- */
-public class MethodHandles {
-
-    private MethodHandles() { }  // do not instantiate
-
-    private static final Access IMPL_TOKEN = Access.getToken();
-    private static final MemberName.Factory IMPL_NAMES = MemberName.getFactory(IMPL_TOKEN);
-    static { MethodHandleImpl.initStatics(); }
-    // See IMPL_LOOKUP below.
-
-    //// Method handle creation from ordinary methods.
-
-    /**
-     * Return a {@link Lookup lookup object} on the caller,
-     * which has the capability to access any method handle that the caller has access to,
-     * including direct method handles to private fields and methods.
-     * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
-     * Do not store it in place where untrusted code can access it.
-     */
-    public static Lookup lookup() {
-        return new Lookup();
-    }
-
-    /**
-     * Return a {@link Lookup lookup object} which is trusted minimally.
-     * It can only be used to create method handles to
-     * publicly accessible fields and methods.
-     * <p>
-     * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class}
-     * of this lookup object will be {@link java.lang.Object}.
-     * <p>
-     * The lookup class can be changed to any other class {@code C} using an expression of the form
-     * {@linkplain Lookup#in <code>publicLookup().in(C.class)</code>}.
-     * Since all classes have equal access to public names,
-     * such a change would confer no new access rights.
-     */
-    public static Lookup publicLookup() {
-        return Lookup.PUBLIC_LOOKUP;
-    }
-
-    /**
-     * A <em>lookup object</em> is a factory for creating method handles,
-     * when the creation requires access checking.
-     * Method handles do not perform
-     * access checks when they are called, but rather when they are created.
-     * (This is a major difference
-     * from reflective {@link Method}, which performs access checking
-     * against every caller, on every call.)
-     * Therefore, method handle access
-     * restrictions must be enforced when a method handle is created.
-     * The caller class against which those restrictions are enforced
-     * is known as the {@linkplain #lookupClass lookup class}.
-     * A lookup object embodies an
-     * authenticated lookup class, and can be used to create any number
-     * of access-checked method handles, all checked against a single
-     * lookup class.
-     * <p>
-     * A class which needs to create method handles will call
-     * {@link MethodHandles#lookup MethodHandles.lookup} to create a factory for itself.
-     * It may then use this factory to create method handles on
-     * all of its methods, including private ones.
-     * It may also delegate the lookup (e.g., to a metaobject protocol)
-     * by passing the lookup object to other code.
-     * If this other code creates method handles, they will be access
-     * checked against the original lookup class, and not with any higher
-     * privileges.
-     * <p>
-     * Access checks only apply to named and reflected methods.
-     * Other method handle creation methods, such as
-     * {@link #convertArguments MethodHandles.convertArguments},
-     * do not require any access checks, and can be done independently
-     * of any lookup class.
-     * <h3>How access errors are handled</h3>
-     * A lookup can fail, because
-     * the containing class is not accessible to the lookup class, or
-     * because the desired class member is missing, or because the
-     * desired class member is not accessible to the lookup class.
-     * It can also fail if a security manager is installed and refuses
-     * access.  In any of these cases, an exception will be
-     * thrown from the attempted lookup.
-     * <p>
-     * In general, the conditions under which a method handle may be
-     * created for a method {@code M} are exactly as restrictive as the conditions
-     * under which the lookup class could have compiled a call to {@code M}.
-     * <p>
-     * In some cases, this access is obtained by the Java compiler by creating
-     * an wrapper method to access a private method of another class
-     * in the same top-level declaration.
-     * For example, a nested class {@code C.D}
-     * can access private members within other related classes such as
-     * {@code C}, {@code C.D.E}, or {@code C.B},
-     * but the Java compiler may need to generate wrapper methods in
-     * those related classes.  In such cases, a {@code Lookup} object on
-     * {@code C.E} would be unable to those private members.
-     * A workaround for this limitation is the {@link Lookup#in Lookup.in} method,
-     * which can transform a lookup on {@code C.E} into one on any of those other
-     * classes, without special elevation of privilege.
-     */
-    public static final
-    class Lookup {
-        /** The class on behalf of whom the lookup is being performed. */
-        private final Class<?> lookupClass;
-
-        /** The allowed sorts of members which may be looked up (PUBLIC, etc.). */
-        private final int allowedModes;
-
-        /** A single-bit mask representing {@code public} access,
-         *  which may contribute to the result of {@link #lookupModes lookupModes}.
-         *  The value, {@code 0x01}, happens to be the same as the value of the
-         *  {@code public} {@linkplain java.lang.reflect.Modifier#PUBLIC modifier bit}.
-         */
-        public static final int PUBLIC = Modifier.PUBLIC;
-
-        /** A single-bit mask representing {@code private} access,
-         *  which may contribute to the result of {@link #lookupModes lookupModes}.
-         *  The value, {@code 0x02}, happens to be the same as the value of the
-         *  {@code private} {@linkplain java.lang.reflect.Modifier#PRIVATE modifier bit}.
-         */
-        public static final int PRIVATE = Modifier.PRIVATE;
-
-        /** A single-bit mask representing {@code protected} access,
-         *  which may contribute to the result of {@link #lookupModes lookupModes}.
-         *  The value, {@code 0x04}, happens to be the same as the value of the
-         *  {@code protected} {@linkplain java.lang.reflect.Modifier#PROTECTED modifier bit}.
-         */
-        public static final int PROTECTED = Modifier.PROTECTED;
-
-        /** A single-bit mask representing {@code package} access (default access),
-         *  which may contribute to the result of {@link #lookupModes lookupModes}.
-         *  The value is {@code 0x08}, which does not correspond meaningfully to
-         *  any particular {@linkplain java.lang.reflect.Modifier modifier bit}.
-         */
-        public static final int PACKAGE = Modifier.STATIC;
-
-        private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE);
-        private static final int TRUSTED   = -1;
-
-        private static int fixmods(int mods) {
-            mods &= (ALL_MODES - PACKAGE);
-            return (mods != 0) ? mods : PACKAGE;
-        }
-
-        /** Which class is performing the lookup?  It is this class against
-         *  which checks are performed for visibility and access permissions.
-         *  <p>
-         *  The class implies a maximum level of access permission,
-         *  but the permissions may be additionally limited by the bitmask
-         *  {@link #lookupModes}, which controls whether non-public members
-         *  can be accessed.
-         */
-        public Class<?> lookupClass() {
-            return lookupClass;
-        }
-
-        // This is just for calling out to MethodHandleImpl.
-        private Class<?> lookupClassOrNull() {
-            return (allowedModes == TRUSTED) ? null : lookupClass;
-        }
-
-        /** Which types of members can this lookup object produce?
-         *  The result is a bit-mask of the bits
-         *  {@linkplain #PUBLIC PUBLIC (0x01)},
-         *  {@linkplain #PRIVATE PRIVATE (0x02)},
-         *  {@linkplain #PROTECTED PROTECTED (0x04)},
-         *  and {@linkplain #PACKAGE PACKAGE (0x08)}.
-         *  <p>
-         *  A freshly-created lookup object
-         *  on the {@linkplain java.dyn.MethodHandles#lookup() caller's class}
-         *  has all possible bits set, since the caller class can access all its own members.
-         *  A lookup object on a new lookup class
-         *  {@linkplain java.dyn.MethodHandles.Lookup#in created from a previous lookup object}
-         *  may have some mode bits set to zero.
-         *  The purpose of this is to restrict access via the new lookup object,
-         *  so that it can access only names which can be reached by the original
-         *  lookup object, and also by the new lookup class.
-         */
-        public int lookupModes() {
-            return allowedModes & ALL_MODES;
-        }
-
-        /** Embody the current class (the lookupClass) as a lookup class
-         * for method handle creation.
-         * Must be called by from a method in this package,
-         * which in turn is called by a method not in this package.
-         * <p>
-         * Also, don't make it private, lest javac interpose
-         * an access$N method.
-         */
-        Lookup() {
-            this(getCallerClassAtEntryPoint(), ALL_MODES);
-            // make sure we haven't accidentally picked up a privileged class:
-            checkUnprivilegedlookupClass(lookupClass);
-        }
-
-        Lookup(Access token, Class<?> lookupClass) {
-            this(lookupClass, ALL_MODES);
-            Access.check(token);
-        }
-
-        private Lookup(Class<?> lookupClass, int allowedModes) {
-            this.lookupClass = lookupClass;
-            this.allowedModes = allowedModes;
-        }
-
-        /**
-         * Create a lookup on the specified new lookup class.
-         * The resulting object will report the specified
-         * class as its own {@link #lookupClass lookupClass}.
-         * <p>
-         * However, the resulting {@code Lookup} object is guaranteed
-         * to have no more access capabilities than the original.
-         * In particular, access capabilities can be lost as follows:<ul>
-         * <li>If the new lookup class differs from the old one,
-         * protected members will not be accessible by virtue of inheritance.
-         * (Protected members may continue to be accessible because of package sharing.)
-         * <li>If the new lookup class is in a different package
-         * than the old one, protected and default (package) members will not be accessible.
-         * <li>If the new lookup class is not within the same package member
-         * as the old one, private members will not be accessible.
-         * <li>If the new lookup class is not accessible to the old lookup class,
-         * then no members, not even public members, will be accessible.
-         * (In all other cases, public members will continue to be accessible.)
-         * </ul>
-         */
-        public Lookup in(Class<?> requestedLookupClass) {
-            requestedLookupClass.getClass();  // null check
-            if (allowedModes == TRUSTED)  // IMPL_LOOKUP can make any lookup at all
-                return new Lookup(requestedLookupClass, ALL_MODES);
-            if (requestedLookupClass == this.lookupClass)
-                return this;  // keep same capabilities
-            int newModes = (allowedModes & (ALL_MODES & ~PROTECTED));
-            if ((newModes & PACKAGE) != 0
-                && !VerifyAccess.isSamePackage(this.lookupClass, requestedLookupClass)) {
-                newModes &= ~(PACKAGE|PRIVATE);
-            }
-            // Allow nestmate lookups to be created without special privilege:
-            if ((newModes & PRIVATE) != 0
-                && !VerifyAccess.isSamePackageMember(this.lookupClass, requestedLookupClass)) {
-                newModes &= ~PRIVATE;
-            }
-            if (newModes == PUBLIC
-                && !VerifyAccess.isClassAccessible(requestedLookupClass, this.lookupClass)) {
-                // The requested class it not accessible from the lookup class.
-                // No permissions.
-                newModes = 0;
-            }
-            checkUnprivilegedlookupClass(requestedLookupClass);
-            return new Lookup(requestedLookupClass, newModes);
-        }
-
-        // Make sure outer class is initialized first.
-        static { IMPL_TOKEN.getClass(); }
-
-        /** Version of lookup which is trusted minimally.
-         *  It can only be used to create method handles to
-         *  publicly accessible members.
-         */
-        static final Lookup PUBLIC_LOOKUP = new Lookup(Object.class, PUBLIC);
-
-        /** Package-private version of lookup which is trusted. */
-        static final Lookup IMPL_LOOKUP = new Lookup(Object.class, TRUSTED);
-        static { MethodHandleImpl.initLookup(IMPL_TOKEN, IMPL_LOOKUP); }
-
-        private static void checkUnprivilegedlookupClass(Class<?> lookupClass) {
-            String name = lookupClass.getName();
-            if (name.startsWith("java.dyn.") || name.startsWith("sun.dyn."))
-                throw newIllegalArgumentException("illegal lookupClass: "+lookupClass);
-        }
-
-        /**
-         * Display the name of the class from which lookups are to be made.
-         * (The name is the one reported by {@link java.lang.Class#getName() Class.getName}.)
-         * If there are restrictions on the access permitted to this lookup,
-         * this is indicated by adding a suffix to the class name, consisting
-         * of a slash and a keyword.  The keyword is chosen as follows:
-         * <ul>
-         * <li>If no access is allowed, the suffix is "/noaccess".
-         * <li>If only public access is allowed, the suffix is "/public".
-         * <li>If only public and package access are allowed, the suffix is "/package".
-         * <li>If only public, package, and private access are allowed, the suffix is "/private".
-         * </ul>
-         * If none of the above cases apply, it is the case that full
-         * access (public, package, private, and protected) is allowed.
-         * In this case, no suffix is added.
-         * This is true only of an object obtained originally from
-         * {@link java.dyn.MethodHandles#lookup() MethodHandles.lookup}.
-         * Objects created by {@link java.dyn.MethodHandles.Lookup#in() Lookup#in}
-         * always have restricted access, and will display a suffix.
-         */
-        @Override
-        public String toString() {
-            String cname = lookupClass.getName();
-            switch (allowedModes) {
-            case TRUSTED:
-                return "/trusted";  // internal only
-            case PUBLIC:
-                return cname + "/public";
-            case PUBLIC|PACKAGE:
-                return cname + "/package";
-            case 0:  // no privileges
-                return cname + "/noaccess";
-            case ALL_MODES:
-                return cname;
-            default:
-                return cname + "/private";
-            }
-        }
-
-        // call this from an entry point method in Lookup with extraFrames=0.
-        private static Class<?> getCallerClassAtEntryPoint() {
-            final int CALLER_DEPTH = 4;
-            // 0: Reflection.getCC, 1: getCallerClassAtEntryPoint,
-            // 2: Lookup.<init>, 3: MethodHandles.*, 4: caller
-            // Note:  This should be the only use of getCallerClass in this file.
-            assert(Reflection.getCallerClass(CALLER_DEPTH-1) == MethodHandles.class);
-            return Reflection.getCallerClass(CALLER_DEPTH);
-        }
-
-        /**
-         * Produce a method handle for a static method.
-         * The type of the method handle will be that of the method.
-         * (Since static methods do not take receivers, there is no
-         * additional receiver argument inserted into the method handle type,
-         * as there would be with {@link #findVirtual} or {@link #findSpecial}.)
-         * The method and all its argument types must be accessible to the lookup class.
-         * If the method's class has not yet been initialized, that is done
-         * immediately, before the method handle is returned.
-         * @param refc the class from which the method is accessed
-         * @param name the name of the method
-         * @param type the type of the method
-         * @return the desired method handle
-         * @exception NoAccessException if the method does not exist or access checking fails
-         */
-        public
-        MethodHandle findStatic(Class<?> refc, String name, MethodType type) throws NoAccessException {
-            MemberName method = resolveOrFail(refc, name, type, true);
-            checkMethod(refc, method, true);
-            return MethodHandleImpl.findMethod(IMPL_TOKEN, method, false, lookupClassOrNull());
-        }
-
-        /**
-         * Produce a method handle for a virtual method.
-         * The type of the method handle will be that of the method,
-         * with the receiver type (usually {@code refc}) prepended.
-         * The method and all its argument types must be accessible to the lookup class.
-         * <p>
-         * When called, the handle will treat the first argument as a receiver
-         * and dispatch on the receiver's type to determine which method
-         * implementation to enter.
-         * (The dispatching action is identical with that performed by an
-         * {@code invokevirtual} or {@code invokeinterface} instruction.)
-         * @param refc the class or interface from which the method is accessed
-         * @param name the name of the method
-         * @param type the type of the method, with the receiver argument omitted
-         * @return the desired method handle
-         * @exception NoAccessException if the method does not exist or access checking fails
-         */
-        public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) throws NoAccessException {
-            MemberName method = resolveOrFail(refc, name, type, false);
-            checkMethod(refc, method, false);
-            MethodHandle mh = MethodHandleImpl.findMethod(IMPL_TOKEN, method, true, lookupClassOrNull());
-            return restrictProtectedReceiver(method, mh);
-        }
-
-        /**
-         * Produce a method handle which creates an object and initializes it, using
-         * the constructor of the specified type.
-         * The parameter types of the method handle will be those of the constructor,
-         * while the return type will be a reference to the constructor's class.
-         * The constructor and all its argument types must be accessible to the lookup class.
-         * If the constructor's class has not yet been initialized, that is done
-         * immediately, before the method handle is returned.
-         * <p>
-         * Note:  The requested type must have a return type of {@code void}.
-         * This is consistent with the JVM's treatment of constructor signatures.
-         * @param refc the class or interface from which the method is accessed
-         * @param type the type of the method, with the receiver argument omitted, and a void return type
-         * @return the desired method handle
-         * @exception NoAccessException if the method does not exist or access checking fails
-         */
-        public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoAccessException {
-            String name = "<init>";
-            MemberName ctor = resolveOrFail(refc, name, type, false, false, lookupClassOrNull());
-            assert(ctor.isConstructor());
-            checkAccess(refc, ctor);
-            MethodHandle rawMH = MethodHandleImpl.findMethod(IMPL_TOKEN, ctor, false, lookupClassOrNull());
-            return MethodHandleImpl.makeAllocator(IMPL_TOKEN, rawMH);
-        }
-
-        /**
-         * Produce an early-bound method handle for a virtual method,
-         * as if called from an {@code invokespecial}
-         * instruction from {@code caller}.
-         * The type of the method handle will be that of the method,
-         * with a suitably restricted receiver type (such as {@code caller}) prepended.
-         * The method and all its argument types must be accessible
-         * to the caller.
-         * <p>
-         * When called, the handle will treat the first argument as a receiver,
-         * but will not dispatch on the receiver's type.
-         * (This direct invocation action is identical with that performed by an
-         * {@code invokespecial} instruction.)
-         * <p>
-         * If the explicitly specified caller class is not identical with the
-         * lookup class, or if this lookup object does not have private access
-         * privileges, the access fails.
-         * @param refc the class or interface from which the method is accessed
-         * @param name the name of the method (which must not be "&lt;init&gt;")
-         * @param type the type of the method, with the receiver argument omitted
-         * @param specialCaller the proposed calling class to perform the {@code invokespecial}
-         * @return the desired method handle
-         * @exception NoAccessException if the method does not exist or access checking fails
-         */
-        public MethodHandle findSpecial(Class<?> refc, String name, MethodType type,
-                                        Class<?> specialCaller) throws NoAccessException {
-            checkSpecialCaller(specialCaller);
-            MemberName method = resolveOrFail(refc, name, type, false, false, specialCaller);
-            checkMethod(refc, method, false);
-            MethodHandle mh = MethodHandleImpl.findMethod(IMPL_TOKEN, method, false, specialCaller);
-            return restrictReceiver(method, mh, specialCaller);
-        }
-
-        /**
-         * Produce a method handle giving read access to a non-static field.
-         * The type of the method handle will have a return type of the field's
-         * value type.
-         * The method handle's single argument will be the instance containing
-         * the field.
-         * Access checking is performed immediately on behalf of the lookup class.
-         * @param name the field's name
-         * @param type the field's type
-         * @return a method handle which can load values from the field
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) throws NoAccessException {
-            return makeAccessor(refc, name, type, false, false);
-        }
-
-        /**
-         * Produce a method handle giving write access to a non-static field.
-         * The type of the method handle will have a void return type.
-         * The method handle will take two arguments, the instance containing
-         * the field, and the value to be stored.
-         * The second argument will be of the field's value type.
-         * Access checking is performed immediately on behalf of the lookup class.
-         * @param name the field's name
-         * @param type the field's type
-         * @return a method handle which can store values into the field
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoAccessException {
-            return makeAccessor(refc, name, type, false, true);
-        }
-
-        /**
-         * Produce a method handle giving read access to a static field.
-         * The type of the method handle will have a return type of the field's
-         * value type.
-         * The method handle will take no arguments.
-         * Access checking is performed immediately on behalf of the lookup class.
-         * @param name the field's name
-         * @param type the field's type
-         * @return a method handle which can load values from the field
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) throws NoAccessException {
-            return makeAccessor(refc, name, type, true, false);
-        }
-
-        /**
-         * Produce a method handle giving write access to a static field.
-         * The type of the method handle will have a void return type.
-         * The method handle will take a single
-         * argument, of the field's value type, the value to be stored.
-         * Access checking is performed immediately on behalf of the lookup class.
-         * @param name the field's name
-         * @param type the field's type
-         * @return a method handle which can store values into the field
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) throws NoAccessException {
-            return makeAccessor(refc, name, type, true, true);
-        }
-
-        /**
-         * Produce an early-bound method handle for a non-static method.
-         * The receiver must have a supertype {@code defc} in which a method
-         * of the given name and type is accessible to the lookup class.
-         * The method and all its argument types must be accessible to the lookup class.
-         * The type of the method handle will be that of the method,
-         * without any insertion of an additional receiver parameter.
-         * The given receiver will be bound into the method handle,
-         * so that every call to the method handle will invoke the
-         * requested method on the given receiver.
-         * <p>
-         * This is equivalent to the following expression:
-         * <code>
-         * {@link #insertArguments insertArguments}({@link #findVirtual findVirtual}(defc, name, type), receiver)
-         * </code>
-         * where {@code defc} is either {@code receiver.getClass()} or a super
-         * type of that class, in which the requested method is accessible
-         * to the lookup class.
-         * @param receiver the object from which the method is accessed
-         * @param name the name of the method
-         * @param type the type of the method, with the receiver argument omitted
-         * @return the desired method handle
-         * @exception NoAccessException if the method does not exist or access checking fails
-         */
-        public MethodHandle bind(Object receiver, String name, MethodType type) throws NoAccessException {
-            Class<? extends Object> refc = receiver.getClass(); // may get NPE
-            MemberName method = resolveOrFail(refc, name, type, false);
-            checkMethod(refc, method, false);
-            MethodHandle dmh = MethodHandleImpl.findMethod(IMPL_TOKEN, method, true, lookupClassOrNull());
-            MethodHandle bmh = MethodHandleImpl.bindReceiver(IMPL_TOKEN, dmh, receiver);
-            if (bmh == null)
-                throw newNoAccessException(method, lookupClass());
-            return bmh;
-        }
-
-        /**
-         * Make a direct method handle to <i>m</i>, if the lookup class has permission.
-         * If <i>m</i> is non-static, the receiver argument is treated as an initial argument.
-         * If <i>m</i> is virtual, overriding is respected on every call.
-         * Unlike the Core Reflection API, exceptions are <em>not</em> wrapped.
-         * The type of the method handle will be that of the method,
-         * with the receiver type prepended (but only if it is non-static).
-         * If the method's {@code accessible} flag is not set,
-         * access checking is performed immediately on behalf of the lookup class.
-         * If <i>m</i> is not public, do not share the resulting handle with untrusted parties.
-         * @param m the reflected method
-         * @return a method handle which can invoke the reflected method
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle unreflect(Method m) throws NoAccessException {
-            MemberName method = new MemberName(m);
-            assert(method.isMethod());
-            if (!m.isAccessible())  checkMethod(method.getDeclaringClass(), method, method.isStatic());
-            MethodHandle mh = MethodHandleImpl.findMethod(IMPL_TOKEN, method, true, lookupClassOrNull());
-            if (!m.isAccessible())  mh = restrictProtectedReceiver(method, mh);
-            return mh;
-        }
-
-        /**
-         * Produce a method handle for a reflected method.
-         * It will bypass checks for overriding methods on the receiver,
-         * as if by a {@code invokespecial} instruction from within the {@code specialCaller}.
-         * The type of the method handle will be that of the method,
-         * with the special caller type prepended (and <em>not</em> the receiver of the method).
-         * If the method's {@code accessible} flag is not set,
-         * access checking is performed immediately on behalf of the lookup class,
-         * as if {@code invokespecial} instruction were being linked.
-         * @param m the reflected method
-         * @param specialCaller the class nominally calling the method
-         * @return a method handle which can invoke the reflected method
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle unreflectSpecial(Method m, Class<?> specialCaller) throws NoAccessException {
-            checkSpecialCaller(specialCaller);
-            MemberName method = new MemberName(m);
-            assert(method.isMethod());
-            // ignore m.isAccessible:  this is a new kind of access
-            checkMethod(m.getDeclaringClass(), method, false);
-            MethodHandle mh = MethodHandleImpl.findMethod(IMPL_TOKEN, method, false, lookupClassOrNull());
-            return restrictReceiver(method, mh, specialCaller);
-        }
-
-        /**
-         * Produce a method handle for a reflected constructor.
-         * The type of the method handle will be that of the constructor,
-         * with the return type changed to the declaring class.
-         * The method handle will perform a {@code newInstance} operation,
-         * creating a new instance of the constructor's class on the
-         * arguments passed to the method handle.
-         * <p>
-         * If the constructor's {@code accessible} flag is not set,
-         * access checking is performed immediately on behalf of the lookup class.
-         * @param c the reflected constructor
-         * @return a method handle which can invoke the reflected constructor
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle unreflectConstructor(Constructor c) throws NoAccessException {
-            MemberName ctor = new MemberName(c);
-            assert(ctor.isConstructor());
-            if (!c.isAccessible())  checkAccess(c.getDeclaringClass(), ctor);
-            MethodHandle rawCtor = MethodHandleImpl.findMethod(IMPL_TOKEN, ctor, false, lookupClassOrNull());
-            return MethodHandleImpl.makeAllocator(IMPL_TOKEN, rawCtor);
-        }
-
-        /**
-         * Produce a method handle giving read access to a reflected field.
-         * The type of the method handle will have a return type of the field's
-         * value type.
-         * If the field is static, the method handle will take no arguments.
-         * Otherwise, its single argument will be the instance containing
-         * the field.
-         * If the method's {@code accessible} flag is not set,
-         * access checking is performed immediately on behalf of the lookup class.
-         * @param f the reflected field
-         * @return a method handle which can load values from the reflected field
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle unreflectGetter(Field f) throws NoAccessException {
-            return makeAccessor(f.getDeclaringClass(), new MemberName(f), f.isAccessible(), false);
-        }
-
-        /**
-         * Produce a method handle giving write access to a reflected field.
-         * The type of the method handle will have a void return type.
-         * If the field is static, the method handle will take a single
-         * argument, of the field's value type, the value to be stored.
-         * Otherwise, the two arguments will be the instance containing
-         * the field, and the value to be stored.
-         * If the method's {@code accessible} flag is not set,
-         * access checking is performed immediately on behalf of the lookup class.
-         * @param f the reflected field
-         * @return a method handle which can store values into the reflected field
-         * @exception NoAccessException if access checking fails
-         */
-        public MethodHandle unreflectSetter(Field f) throws NoAccessException {
-            return makeAccessor(f.getDeclaringClass(), new MemberName(f), f.isAccessible(), true);
-        }
-
-        /// Helper methods, all package-private.
-
-        MemberName resolveOrFail(Class<?> refc, String name, Class<?> type, boolean isStatic) throws NoAccessException {
-            checkSymbolicClass(refc);  // do this before attempting to resolve
-            int mods = (isStatic ? Modifier.STATIC : 0);
-            return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), true, lookupClassOrNull());
-        }
-
-        MemberName resolveOrFail(Class<?> refc, String name, MethodType type, boolean isStatic) throws NoAccessException {
-            checkSymbolicClass(refc);  // do this before attempting to resolve
-            int mods = (isStatic ? Modifier.STATIC : 0);
-            return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), true, lookupClassOrNull());
-        }
-
-        MemberName resolveOrFail(Class<?> refc, String name, MethodType type, boolean isStatic,
-                                 boolean searchSupers, Class<?> specialCaller) throws NoAccessException {
-            checkSymbolicClass(refc);  // do this before attempting to resolve
-            int mods = (isStatic ? Modifier.STATIC : 0);
-            return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), searchSupers, specialCaller);
-        }
-
-        void checkSymbolicClass(Class<?> refc) throws NoAccessException {
-            Class<?> caller = lookupClassOrNull();
-            if (caller != null && !VerifyAccess.isClassAccessible(refc, caller))
-                throw newNoAccessException("symbolic reference class is not public", new MemberName(refc), caller);
-        }
-
-        void checkMethod(Class<?> refc, MemberName m, boolean wantStatic) throws NoAccessException {
-            String message;
-            if (m.isConstructor())
-                message = "expected a method, not a constructor";
-            else if (!m.isMethod())
-                message = "expected a method";
-            else if (wantStatic != m.isStatic())
-                message = wantStatic ? "expected a static method" : "expected a non-static method";
-            else
-                { checkAccess(refc, m); return; }
-            throw newNoAccessException(message, m, lookupClass());
-        }
-
-        void checkAccess(Class<?> refc, MemberName m) throws NoAccessException {
-            int allowedModes = this.allowedModes;
-            if (allowedModes == TRUSTED)  return;
-            int mods = m.getModifiers();
-            if (Modifier.isPublic(mods) && Modifier.isPublic(refc.getModifiers()) && allowedModes != 0)
-                return;  // common case
-            int requestedModes = fixmods(mods);  // adjust 0 => PACKAGE
-            if ((requestedModes & allowedModes) != 0
-                && VerifyAccess.isMemberAccessible(refc, m.getDeclaringClass(),
-                                                   mods, lookupClass()))
-                return;
-            if (((requestedModes & ~allowedModes) & PROTECTED) != 0
-                && VerifyAccess.isSamePackage(m.getDeclaringClass(), lookupClass()))
-                // Protected members can also be checked as if they were package-private.
-                return;
-            throw newNoAccessException(accessFailedMessage(refc, m), m, lookupClass());
-        }
-
-        String accessFailedMessage(Class<?> refc, MemberName m) {
-            Class<?> defc = m.getDeclaringClass();
-            int mods = m.getModifiers();
-            if (!VerifyAccess.isClassAccessible(defc, lookupClass()))
-                return "class is not public";
-            if (refc != defc && !VerifyAccess.isClassAccessible(refc, lookupClass()))
-                return "symbolic reference "+refc.getName()+" is not public";
-            if (Modifier.isPublic(mods))
-                return "access to public member failed";  // (how?)
-            else if (allowedModes == PUBLIC)
-                return "member is not public";
-            else if (allowedModes == 0)
-                return "attempted member access through a non-public class";
-            if (Modifier.isPrivate(mods))
-                return "member is private";
-            if (Modifier.isProtected(mods))
-                return "member is protected";
-            return "member is private to package";
-        }
-
-        private static final boolean ALLOW_NESTMATE_ACCESS = false;
-
-        void checkSpecialCaller(Class<?> specialCaller) throws NoAccessException {
-            if (allowedModes == TRUSTED)  return;
-            if ((allowedModes & PRIVATE) == 0
-                || (specialCaller != lookupClass()
-                    && !(ALLOW_NESTMATE_ACCESS &&
-                         VerifyAccess.isSamePackageMember(specialCaller, lookupClass()))))
-                throw newNoAccessException("no private access for invokespecial",
-                                           new MemberName(specialCaller), lookupClass());
-        }
-
-        MethodHandle restrictProtectedReceiver(MemberName method, MethodHandle mh) throws NoAccessException {
-            // The accessing class only has the right to use a protected member
-            // on itself or a subclass.  Enforce that restriction, from JVMS 5.4.4, etc.
-            if (!method.isProtected() || method.isStatic()
-                || allowedModes == TRUSTED
-                || method.getDeclaringClass() == lookupClass()
-                || (ALLOW_NESTMATE_ACCESS &&
-                    VerifyAccess.isSamePackageMember(method.getDeclaringClass(), lookupClass())))
-                return mh;
-            else
-                return restrictReceiver(method, mh, lookupClass());
-        }
-        MethodHandle restrictReceiver(MemberName method, MethodHandle mh, Class<?> caller) throws NoAccessException {
-            assert(!method.isStatic());
-            Class<?> defc = method.getDeclaringClass();  // receiver type of mh is too wide
-            if (defc.isInterface() || !defc.isAssignableFrom(caller)) {
-                throw newNoAccessException("caller class must be a subclass below the method", method, caller);
-            }
-            MethodType rawType = mh.type();
-            if (rawType.parameterType(0) == caller)  return mh;
-            MethodType narrowType = rawType.changeParameterType(0, caller);
-            return MethodHandleImpl.convertArguments(IMPL_TOKEN, mh, narrowType, rawType, null);
-        }
-
-        MethodHandle makeAccessor(Class<?> refc, String name, Class<?> type,
-                                  boolean isStatic, boolean isSetter) throws NoAccessException {
-            MemberName field = resolveOrFail(refc, name, type, isStatic);
-            if (isStatic != field.isStatic())
-                throw newNoAccessException(isStatic
-                                           ? "expected a static field"
-                                           : "expected a non-static field",
-                                           field, lookupClass());
-            return makeAccessor(refc, field, false, isSetter);
-        }
-
-        MethodHandle makeAccessor(Class<?> refc, MemberName field,
-                                  boolean trusted, boolean isSetter) throws NoAccessException {
-            assert(field.isField());
-            if (trusted)
-                return MethodHandleImpl.accessField(IMPL_TOKEN, field, isSetter, lookupClassOrNull());
-            checkAccess(refc, field);
-            MethodHandle mh = MethodHandleImpl.accessField(IMPL_TOKEN, field, isSetter, lookupClassOrNull());
-            return restrictProtectedReceiver(field, mh);
-        }
-    }
-
-    /**
-     * Produce a method handle giving read access to elements of an array.
-     * The type of the method handle will have a return type of the array's
-     * element type.  Its first argument will be the array type,
-     * and the second will be {@code int}.
-     * @param arrayClass an array type
-     * @return a method handle which can load values from the given array type
-     * @throws  IllegalArgumentException if arrayClass is not an array type
-     */
-    public static
-    MethodHandle arrayElementGetter(Class<?> arrayClass) throws IllegalArgumentException {
-        return MethodHandleImpl.accessArrayElement(IMPL_TOKEN, arrayClass, false);
-    }
-
-    /**
-     * Produce a method handle giving write access to elements of an array.
-     * The type of the method handle will have a void return type.
-     * Its last argument will be the array's element type.
-     * The first and second arguments will be the array type and int.
-     * @return a method handle which can store values into the array type
-     * @throws IllegalArgumentException if arrayClass is not an array type
-     */
-    public static
-    MethodHandle arrayElementSetter(Class<?> arrayClass) throws IllegalArgumentException {
-        return MethodHandleImpl.accessArrayElement(IMPL_TOKEN, arrayClass, true);
-    }
-
-    /// method handle invocation (reflective style)
-
-    /**
-     * Produce a method handle which will invoke any method handle of the
-     * given type on a standard set of {@code Object} type arguments.
-     * The resulting invoker will be a method handle with the following
-     * arguments:
-     * <ul>
-     * <li>a single {@code MethodHandle} target
-     * <li>zero or more {@code Object} values (one for each argument in {@code type})
-     * </ul>
-     * <p>
-     * The invoker will behave like a call to {@link MethodHandle.invokeGeneric} with
-     * the indicated {@code type}.
-     * That is, if the target is exactly of the given {@code type}, it will behave
-     * like {@code invokeExact}; otherwise it behave as if {@link MethodHandle.asType}
-     * is used to convert the target to the required {@code type}.
-     * <p>
-     * The type of the returned invoker will not be the given {@code type}, but rather
-     * will have all parameter and return types replaced by {@code Object}.
-     * <p>
-     * Before invoking its target, the invoker will apply reference casts as
-     * necessary and unbox and widen primitive arguments, as if by {@link #convertArguments}.
-     * The return value of the invoker will be an {@code Object} reference,
-     * boxing a primitive value if the original type returns a primitive,
-     * and always null if the original type returns void.
-     * <p>
-     * This method is equivalent to the following code (though it may be more efficient):
-     * <p><blockquote><pre>
-     * MethodHandle invoker = lookup().findVirtual(MethodHandle.class, "invokeGeneric", type);
-     * MethodType genericType = type.generic();
-     * genericType = genericType.insertParameterType(0, MethodHandle.class);
-     * return invoker.asType(genericType);
-     * </pre></blockquote>
-     * @param type the type of target methods which the invoker will apply to
-     * @return a method handle suitable for invoking any method handle of the given type
-     */
-    static public
-    MethodHandle genericInvoker(MethodType type) {
-        return invokers(type).genericInvoker();
-    }
-
-    /**
-     * Produce a method handle which will invoke any method handle of the
-     * given {@code type} on a standard set of {@code Object} type arguments
-     * and a single trailing {@code Object[]} array.
-     * The resulting invoker will be a method handle with the following
-     * arguments:
-     * <ul>
-     * <li>a single {@code MethodHandle} target
-     * <li>zero or more {@code Object} values (counted by {@code objectArgCount})
-     * <li>an {@code Object[]} array containing more arguments
-     * </ul>
-     * <p>
-     * The invoker will behave like a call to {@link MethodHandle.invokeGeneric} with
-     * the indicated {@code type}.
-     * That is, if the target is exactly of the given {@code type}, it will behave
-     * like {@code invokeExact}; otherwise it behave as if {@link MethodHandle.asType}
-     * is used to convert the target to the required {@code type}.
-     * <p>
-     * The type of the returned invoker will not be the given {@code type}, but rather
-     * will have all parameter and return types replaced by {@code Object}, except for
-     * the last parameter type, which will be the array type {@code Object[]}.
-     * <p>
-     * Before invoking its target, the invoker will spread the varargs array, apply
-     * reference casts as necessary, and unbox and widen primitive arguments.
-     * The return value of the invoker will be an {@code Object} reference,
-     * boxing a primitive value if the original type returns a primitive,
-     * and always null if the original type returns void.
-     * <p>
-     * This method is equivalent to the following code (though it may be more efficient):
-     * <p><blockquote><pre>
-     * MethodHandle invoker = lookup().findVirtual(MethodHandle.class, "invokeGeneric", type);
-     * MethodType vaType = MethodType.genericMethodType(objectArgCount, true);
-     * vaType = vaType.insertParameterType(0, MethodHandle.class);
-     * int spreadArgCount = type.parameterCount - objectArgCount;
-     * invoker = invoker.asSpreader(Object.class, spreadArgCount);
-     * return invoker.asType(vaType);
-     * </pre></blockquote>
-     * @param type the desired target type
-     * @param objectArgCount number of fixed (non-varargs) {@code Object} arguments
-     * @return a method handle suitable for invoking any method handle of the given type
-     */
-    static public
-    MethodHandle varargsInvoker(MethodType type, int objectArgCount) {
-        if (objectArgCount < 0 || objectArgCount > type.parameterCount())
-            throw new IllegalArgumentException("bad argument count "+objectArgCount);
-        return invokers(type).varargsInvoker(objectArgCount);
-    }
-
-    /**
-     * Produce a method handle which will take a invoke any method handle of the
-     * given type.  The resulting invoker will have a type which is
-     * exactly equal to the desired type, except that it will accept
-     * an additional leading argument of type {@code MethodHandle}.
-     * <p>
-     * This method is equivalent to the following code (though it may be more efficient):
-     * <p><blockquote><pre>
-     * lookup().findVirtual(MethodHandle.class, "invokeExact", type);
-     * </pre></blockquote>
-     * @param type the desired target type
-     * @return a method handle suitable for invoking any method handle of the given type
-     */
-    static public
-    MethodHandle exactInvoker(MethodType type) {
-        return invokers(type).exactInvoker();
-    }
-
-    static Invokers invokers(MethodType type) {
-        return MethodTypeImpl.invokers(IMPL_TOKEN, type);
-    }
-
-    /**
-     * <em>WORK IN PROGRESS:</em>
-     * Perform value checking, exactly as if for an adapted method handle.
-     * It is assumed that the given value is either null, of type T0,
-     * or (if T0 is primitive) of the wrapper type corresponding to T0.
-     * The following checks and conversions are made:
-     * <ul>
-     * <li>If T0 and T1 are references, then a cast to T1 is applied.
-     *     (The types do not need to be related in any particular way.)
-     * <li>If T0 and T1 are primitives, then a widening or narrowing
-     *     conversion is applied, if one exists.
-     * <li>If T0 is a primitive and T1 a reference, and
-     *     T0 has a wrapper type TW, a boxing conversion to TW is applied,
-     *     possibly followed by a reference conversion.
-     *     T1 must be TW or a supertype.
-     * <li>If T0 is a reference and T1 a primitive, and
-     *     T1 has a wrapper type TW, an unboxing conversion is applied,
-     *     possibly preceded by a reference conversion.
-     *     T0 must be TW or a supertype.
-     * <li>If T1 is void, the return value is discarded
-     * <li>If T0 is void and T1 a reference, a null value is introduced.
-     * <li>If T0 is void and T1 a primitive, a zero value is introduced.
-     * </ul>
-     * If the value is discarded, null will be returned.
-     * @param valueType
-     * @param value
-     * @return the value, converted if necessary
-     * @throws java.lang.ClassCastException if a cast fails
-     */
-    static
-    <T0, T1> T1 checkValue(Class<T0> t0, Class<T1> t1, Object value)
-       throws ClassCastException
-    {
-        if (t0 == t1) {
-            // no conversion needed; just reassert the same type
-            if (t0.isPrimitive())
-                return Wrapper.asPrimitiveType(t1).cast(value);
-            else
-                return Wrapper.OBJECT.convert(value, t1);
-        }
-        boolean prim0 = t0.isPrimitive(), prim1 = t1.isPrimitive();
-        if (!prim0) {
-            // check contract with caller
-            Wrapper.OBJECT.convert(value, t0);
-            if (!prim1) {
-                return Wrapper.OBJECT.convert(value, t1);
-            }
-            // convert reference to primitive by unboxing
-            Wrapper w1 = Wrapper.forPrimitiveType(t1);
-            return w1.convert(value, t1);
-        }
-        // check contract with caller:
-        Wrapper.asWrapperType(t0).cast(value);
-        Wrapper w1 = Wrapper.forPrimitiveType(t1);
-        return w1.convert(value, t1);
-    }
-
-    static
-    Object checkValue(Class<?> T1, Object value)
-       throws ClassCastException
-    {
-        Class<?> T0;
-        if (value == null)
-            T0 = Object.class;
-        else
-            T0 = value.getClass();
-        return checkValue(T0, T1, value);
-    }
-
-    /// method handle modification (creation from other method handles)
-
-    /**
-     * Produce a method handle which adapts the type of the
-     * given method handle to a new type by pairwise argument conversion.
-     * The original type and new type must have the same number of arguments.
-     * The resulting method handle is guaranteed to report a type
-     * which is equal to the desired new type.
-     * <p>
-     * If the original type and new type are equal, returns target.
-     * <p>
-     * The following conversions are applied as needed both to
-     * arguments and return types.  Let T0 and T1 be the differing
-     * new and old parameter types (or old and new return types)
-     * for corresponding values passed by the new and old method types.
-     * Given those types T0, T1, one of the following conversions is applied
-     * if possible:
-     * <ul>
-     * <li>If T0 and T1 are references, then a cast to T1 is applied.
-     *     (The types do not need to be related in any particular way.)
-     * <li>If T0 and T1 are primitives, then a Java method invocation
-     *     conversion (JLS 5.3) is applied, if one exists.
-     * <li>If T0 is a primitive and T1 a reference, a boxing
-     *     conversion is applied if one exists, possibly followed by
-     *     a reference conversion to a superclass.
-     *     T1 must be a wrapper class or a supertype of one.
-     * <li>If T0 is a reference and T1 a primitive, an unboxing
-     *     conversion will be applied at runtime, possibly followed
-     *     by a Java method invocation conversion (JLS 5.3)
-     *     on the primitive value.  (These are the widening conversions.)
-     *     T0 must be a wrapper class or a supertype of one.
-     *     (In the case where T0 is Object, these are the conversions
-     *     allowed by java.lang.reflect.Method.invoke.)
-     * <li>If the return type T1 is void, any returned value is discarded
-     * <li>If the return type T0 is void and T1 a reference, a null value is introduced.
-     * <li>If the return type T0 is void and T1 a primitive, a zero value is introduced.
-     * </ul>
-     * @param target the method handle to invoke after arguments are retyped
-     * @param newType the expected type of the new method handle
-     * @return a method handle which delegates to {@code target} after performing
-     *           any necessary argument conversions, and arranges for any
-     *           necessary return value conversions
-     * @throws WrongMethodTypeException if the conversion cannot be made
-     * @see MethodHandle#asType
-     * @see MethodHandles#explicitCastArguments
-     */
-    public static
-    MethodHandle convertArguments(MethodHandle target, MethodType newType) {
-        MethodType oldType = target.type();
-        if (oldType.equals(newType))
-            return target;
-        MethodHandle res = null;
-        try {
-            res = MethodHandleImpl.convertArguments(IMPL_TOKEN, target,
-                                                    newType, oldType, null);
-        } catch (IllegalArgumentException ex) {
-        }
-        if (res == null)
-            throw new WrongMethodTypeException("cannot convert to "+newType+": "+target);
-        return res;
-    }
-
-    /**
-     * Produce a method handle which adapts the type of the
-     * given method handle to a new type by pairwise argument conversion.
-     * The original type and new type must have the same number of arguments.
-     * The resulting method handle is guaranteed to report a type
-     * which is equal to the desired new type.
-     * <p>
-     * If the original type and new type are equal, returns target.
-     * <p>
-     * The same conversions are allowed as for {@link #convertArguments convertArguments},
-     * and some additional conversions are also applied if those conversions fail.
-     * Given types T0, T1, one of the following conversions is applied
-     * in addition, if the conversions specified for {@code convertArguments}
-     * would be insufficient:
-     * <ul>
-     * <li>If T0 and T1 are references, and T1 is an interface type,
-     *     then the value of type T0 is passed as a T1 without a cast.
-     *     (This treatment of interfaces follows the usage of the bytecode verifier.)
-     * <li>If T0 and T1 are primitives and one is boolean,
-     *     the boolean is treated as a one-bit unsigned integer.
-     *     (This treatment follows the usage of the bytecode verifier.)
-     *     A conversion from another primitive type behaves as if
-     *     it first converts to byte, and then masks all but the low bit.
-     * <li>If a primitive value would be converted by {@code convertArguments}
-     *     using Java method invocation conversion (JLS 5.3),
-     *     Java casting conversion (JLS 5.5) may be used also.
-     *     This allows primitives to be narrowed as well as widened.
-     * </ul>
-     * @param target the method handle to invoke after arguments are retyped
-     * @param newType the expected type of the new method handle
-     * @return a method handle which delegates to {@code target} after performing
-     *           any necessary argument conversions, and arranges for any
-     *           necessary return value conversions
-     * @throws WrongMethodTypeException if the conversion cannot be made
-     * @see MethodHandle#asType
-     * @see MethodHandles#convertArguments
-     */
-    public static
-    MethodHandle explicitCastArguments(MethodHandle target, MethodType newType) {
-        return convertArguments(target, newType);  // FIXME!
-    }
-
-    /*
-      FIXME: Reconcile javadoc with 10/22/2010 EG notes on conversion:
-
-      Both converters arrange for their method handles to convert arguments
-      and return values.  The conversion rules are the same for arguments
-      and return values, and depend only on source and target types, S and
-      T.  The conversions allowed by castConvertArguments are a strict
-      superset of those performed by convertArguments.
-
-      In all cases, if S and T are references, a simple checkcast is done.
-      If neither S nor T is a primitive, no attempt is made to unbox and
-      box.  A failed conversion throws ClassCastException.
-
-      If T is void, the value is dropped.
-
-      For compatibility with reflection, if S is void and T is a reference,
-      a null value is produced.
-
-      For compatibility with reflection, if S is a reference and T is a
-      primitive, S is first unboxed and then undergoes primitive conversion.
-      In the case of 'convertArguments', only assignment conversion is
-      performed (no narrowing primitive conversion).
-
-      If S is a primitive, S is boxed, and then the above rules are applied.
-      If S and T are both primitives, the boxing will be undetectable; only
-      the primitive conversions will be apparent to the user.  The key point
-      is that if S is a primitive type, the implementation may box it and
-      treat is as Object, without loss of information, or it may use a "fast
-      path" which does not use boxing.
-
-      Notwithstanding the rules above, for compatibility with the verifier,
-      if T is an interface, it is treated as if it were Object.  [KEEP THIS?]
-
-      Also, for compatibility with the verifier, a boolean may be undergo
-      widening or narrowing conversion to any other primitive type.  [KEEP THIS?]
-    */
-
-    /**
-     * Produce a method handle which adapts the calling sequence of the
-     * given method handle to a new type, by reordering the arguments.
-     * The resulting method handle is guaranteed to report a type
-     * which is equal to the desired new type.
-     * <p>
-     * The given array controls the reordering.
-     * Call {@code #I} the number of incoming parameters (the value
-     * {@code newType.parameterCount()}, and call {@code #O} the number
-     * of outgoing parameters (the value {@code target.type().parameterCount()}).
-     * Then the length of the reordering array must be {@code #O},
-     * and each element must be a non-negative number less than {@code #I}.
-     * For every {@code N} less than {@code #O}, the {@code N}-th
-     * outgoing argument will be taken from the {@code I}-th incoming
-     * argument, where {@code I} is {@code reorder[N]}.
-     * <p>
-     * No argument or return value conversions are applied.
-     * The type of each incoming argument, as determined by {@code newType},
-     * must be identical to the type of the corresponding outgoing argument
-     * or arguments in the target method handle.
-     * The return type of {@code newType} must be identical to the return
-     * type of the original target.
-     * <p>
-     * The reordering array need not specify an actual permutation.
-     * An incoming argument will be duplicated if its index appears
-     * more than once in the array, and an incoming argument will be dropped
-     * if its index does not appear in the array.
-     * As in the case of {@link #dropArguments(MethodHandle,int,List) dropArguments},
-     * incoming arguments which are not mentioned in the reordering array
-     * are may be any type, as determined only by {@code newType}.
-     * <blockquote><pre>
-MethodType intfn1 = MethodType.methodType(int.class, int.class);
-MethodType intfn2 = MethodType.methodType(int.class, int.class, int.class);
-MethodHandle sub = ... {int x, int y => x-y} ...;
-assert(sub.type().equals(intfn2));
-MethodHandle sub1 = MethodHandles.permuteArguments(sub, intfn2, 0, 1);
-MethodHandle rsub = MethodHandles.permuteArguments(sub, intfn2, 1, 0);
-assert((int)rsub.invokeExact(1, 100) == 99);
-MethodHandle add = ... {int x, int y => x+y} ...;
-assert(add.type().equals(intfn2));
-MethodHandle twice = MethodHandles.permuteArguments(add, intfn1, 0, 0);
-assert(twice.type().equals(intfn1));
-assert((int)twice.invokeExact(21) == 42);
-     * </pre></blockquote>
-     * @param target the method handle to invoke after arguments are reordered
-     * @param newType the expected type of the new method handle
-     * @param reorder a string which controls the reordering
-     * @return a method handle which delegates to {@code target} after it
-     *           drops unused arguments and moves and/or duplicates the other arguments
-     */
-    public static
-    MethodHandle permuteArguments(MethodHandle target, MethodType newType, int... reorder) {
-        MethodType oldType = target.type();
-        checkReorder(reorder, newType, oldType);
-        return MethodHandleImpl.convertArguments(IMPL_TOKEN, target,
-                                                 newType, oldType,
-                                                 reorder);
-    }
-
-    private static void checkReorder(int[] reorder, MethodType newType, MethodType oldType) {
-        if (reorder.length == oldType.parameterCount()) {
-            int limit = newType.parameterCount();
-            boolean bad = false;
-            for (int i : reorder) {
-                if (i < 0 || i >= limit) {
-                    bad = true; break;
-                }
-            }
-            if (!bad)  return;
-        }
-        throw newIllegalArgumentException("bad reorder array");
-    }
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Equivalent to the following code:
-     * <p><blockquote><pre>
-     * int spreadPos = newType.parameterCount() - 1;
-     * Class<?> spreadType = newType.parameterType(spreadPos);
-     * int spreadCount = target.type().parameterCount() - spreadPos;
-     * MethodHandle adapter = target.asSpreader(spreadType, spreadCount);
-     * adapter = adapter.asType(newType);
-     * return adapter;
-     * </pre></blockquote>
-     * @param target the method handle to invoke after argument spreading
-     * @param newType the expected type of the new method handle
-     * @return a method handle which spreads its final argument,
-     *         before calling the original method handle
-     * @deprecated Use {@link MethodHandle#asSpreader}
-     */
-    public static
-    MethodHandle spreadArguments(MethodHandle target, MethodType newType) {
-        MethodType oldType = target.type();
-        int inargs  = newType.parameterCount();
-        int outargs = oldType.parameterCount();
-        int spreadPos = inargs - 1;
-        int numSpread = (outargs - spreadPos);
-        MethodHandle res = null;
-        if (spreadPos >= 0 && numSpread >= 0) {
-            res = MethodHandleImpl.spreadArguments(IMPL_TOKEN, target, newType, spreadPos);
-        }
-        if (res == null) {
-            throw newIllegalArgumentException("cannot spread "+newType+" to " +oldType);
-        }
-        return res;
-    }
-
-    /**
-     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
-     * Equivalent to the following code:
-     * <p><blockquote><pre>
-     * int collectPos = target.type().parameterCount() - 1;
-     * Class<?> collectType = target.type().parameterType(collectPos);
-     * if (!collectType.isArray())  collectType = Object[].class;
-     * int collectCount = newType.parameterCount() - collectPos;
-     * MethodHandle adapter = target.asCollector(collectType, collectCount);
-     * adapter = adapter.asType(newType);
-     * return adapter;
-     * </pre></blockquote>
-     * @param target the method handle to invoke after argument collection
-     * @param newType the expected type of the new method handle
-     * @return a method handle which collects some trailing argument
-     *         into an array, before calling the original method handle
-     * @deprecated Use {@link MethodHandle#asCollector} instead.
-     */
-    public static
-    MethodHandle collectArguments(MethodHandle target, MethodType newType) {
-        MethodType oldType = target.type();
-        int inargs  = newType.parameterCount();
-        int outargs = oldType.parameterCount();
-        int collectPos = outargs - 1;
-        int numCollect = (inargs - collectPos);
-        if (collectPos < 0 || numCollect < 0)
-            throw newIllegalArgumentException("wrong number of arguments");
-        MethodHandle res = MethodHandleImpl.collectArguments(IMPL_TOKEN, target, newType, collectPos, null);
-        if (res == null) {
-            throw newIllegalArgumentException("cannot collect from "+newType+" to " +oldType);
-        }
-        return res;
-    }
-
-    /**
-     * Produce a method handle of the requested return type which returns the given
-     * constant value every time it is invoked.
-     * <p>
-     * Before the method handle is returned, the passed-in value is converted to the requested type.
-     * If the requested type is primitive, widening primitive conversions are attempted,
-     * else reference conversions are attempted.
-     * <p>The returned method handle is equivalent to {@code identity(type).bindTo(value)},
-     * unless the type is {@code void}, in which case it is {@code identity(type)}.
-     * @param type the return type of the desired method handle
-     * @param value the value to return
-     * @return a method handle of the given return type and no arguments, which always returns the given value
-     * @throws WrongMethodTypeException if the value cannot be converted to the required return type
-     */
-    public static
-    MethodHandle constant(Class<?> type, Object value) {
-        if (type.isPrimitive()) {
-            if (type == void.class)  return identity(type);
-            Wrapper w = Wrapper.forPrimitiveType(type);
-            return identity(type).bindTo(w.convert(value, type));
-        } else {
-            return identity(type).bindTo(type.cast(value));
-        }
-    }
-
-    /**
-     * Produce a method handle of the requested type which returns the given
-     * constant value every time it is invoked.
-     * <p>
-     * Before the method handle is returned, the passed-in value is converted to the requested return type,
-     * as if by {@link #explicitCastArguments #explicitCastArguments}.
-     * That is, if the return type is primitive, the value is unboxed,
-     * and the primitive value is widened and/or narrowed.
-     * Otherwise, reference conversions are attempted.
-     * @param type the type of the desired method handle
-     * @param value the value to return
-     * @return a method handle of the given return type and no arguments, which always returns the given value
-     * @throws WrongMethodTypeException if the value cannot be converted to the required return type
-     */
-    public static
-    MethodHandle constant(MethodType type, Object value) {
-        MethodHandle target = constant(type.returnType(), value);
-        int len = type.parameterCount();
-        if (len == 0)
-            return target.asType(type);
-        target = target.asType(type.dropParameterTypes(0, len));
-        return dropArguments(target, 0, type.parameterList().subList(0, len));
-    }
-
-     /**
-      * Produce a method handle which returns its sole argument when invoked.
-      * <p>The identity function for {@code void} takes no arguments and returns no values.
-      * @param type the type of the sole parameter and return value of the desired method handle
-      * @return a unary method handle which accepts and returns the given type
-      */
-    public static
-    MethodHandle identity(Class<?> type) {
-        return ValueConversions.identity(type);
-    }
-
-     /**
-      * Produce a method handle of the requested type which returns its argument when invoked.
-      * If the return type differs from the first argument type, the argument will be
-      * converted as if by {@link #explicitCastArguments explicitCastArguments}.
-      * If there are additional arguments beyond the first, they are discarded.
-      * <p>The identity function for {@code void} discards all its arguments.
-      * @param type the type of the desired method handle
-      * @return a method handle of the given type, which always returns its first argument
-      * @throws WrongMethodTypeException if the first argument cannot be converted to the required return type
-      */
-    public static
-    MethodHandle identity(MethodType type) {
-        MethodHandle target = identity(type.returnType());
-        int len = type.parameterCount();
-        if (len == 1)
-            return explicitCastArguments(target, type);
-        if (len == 0)
-            throw new IllegalArgumentException("not enough arguments");
-        target = explicitCastArguments(target, type.dropParameterTypes(1, len));
-        return dropArguments(target, 1, type.parameterList().subList(1, len));
-    }
-
-    /**
-     * Produce a method handle which calls the original method handle {@code target},
-     * after inserting the given argument(s) at the given position.
-     * The formal parameters to {@code target} which will be supplied by those
-     * arguments are called <em>bound parameters</em>, because the new method
-     * will contain bindings for those parameters take from {@code values}.
-     * The type of the new method handle will drop the types for the bound
-     * parameters from the original target type, since the new method handle
-     * will no longer require those arguments to be supplied by its callers.
-     * <p>
-     * Each given argument object must match the corresponding bound parameter type.
-     * If a bound parameter type is a primitive, the argument object
-     * must be a wrapper, and will be unboxed to produce the primitive value.
-     * <p>
-     * The  <i>pos</i> may range between zero and <i>N</i> (inclusively),
-     * where <i>N</i> is the number of argument types in resulting method handle
-     * (after bound parameter types are dropped).
-     * @param target the method handle to invoke after the argument is inserted
-     * @param pos where to insert the argument (zero for the first)
-     * @param values the series of arguments to insert
-     * @return a method handle which inserts an additional argument,
-     *         before calling the original method handle
-     * @see MethodHandle#bindTo
-     */
-    public static
-    MethodHandle insertArguments(MethodHandle target, int pos, Object... values) {
-        int insCount = values.length;
-        MethodType oldType = target.type();
-        ArrayList<Class<?>> ptypes =
-                new ArrayList<Class<?>>(oldType.parameterList());
-        int outargs = oldType.parameterCount();
-        int inargs  = outargs - insCount;
-        if (inargs < 0)
-            throw newIllegalArgumentException("too many values to insert");
-        if (pos < 0 || pos > inargs)
-            throw newIllegalArgumentException("no argument type to append");
-        MethodHandle result = target;
-        for (int i = 0; i < insCount; i++) {
-            Object value = values[i];
-            Class<?> valueType = oldType.parameterType(pos+i);
-            value = checkValue(valueType, value);
-            if (pos == 0 && !valueType.isPrimitive()) {
-                // At least for now, make bound method handles a special case.
-                MethodHandle bmh = MethodHandleImpl.bindReceiver(IMPL_TOKEN, result, value);
-                if (bmh != null) {
-                    result = bmh;
-                    continue;
-                }
-                // else fall through to general adapter machinery
-            }
-            result = MethodHandleImpl.bindArgument(IMPL_TOKEN, result, pos, value);
-        }
-        return result;
-    }
-
-    /**
-     * Produce a method handle which calls the original method handle,
-     * after dropping the given argument(s) at the given position.
-     * The type of the new method handle will insert the given argument
-     * type(s), at that position, into the original handle's type.
-     * <p>
-     * The <i>pos</i> may range between zero and <i>N</i>,
-     * where <i>N</i> is the number of argument types in <i>target</i>,
-     * meaning to drop the first or last argument (respectively),
-     * or an argument somewhere in between.
-     * <p>
-     * <b>Example:</b>
-     * <p><blockquote><pre>
-import static java.dyn.MethodHandles.*;
-import static java.dyn.MethodType.*;
-...
-MethodHandle cat = lookup().findVirtual(String.class,
-  "concat", methodType(String.class, String.class));
-assertEquals("xy", (String) cat.invokeExact("x", "y"));
-MethodHandle d0 = dropArguments(cat, 0, String.class);
-assertEquals("yz", (String) d0.invokeExact("x", "y", "z"));
-MethodHandle d1 = dropArguments(cat, 1, String.class);
-assertEquals("xz", (String) d1.invokeExact("x", "y", "z"));
-MethodHandle d2 = dropArguments(cat, 2, String.class);
-assertEquals("xy", (String) d2.invokeExact("x", "y", "z"));
-MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
-assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
-     * </pre></blockquote>
-     * @param target the method handle to invoke after the arguments are dropped
-     * @param valueTypes the type(s) of the argument(s) to drop
-     * @param pos position of first argument to drop (zero for the leftmost)
-     * @return a method handle which drops arguments of the given types,
-     *         before calling the original method handle
-     */
-    public static
-    MethodHandle dropArguments(MethodHandle target, int pos, List<Class<?>> valueTypes) {
-        if (valueTypes.size() == 0)  return target;
-        MethodType oldType = target.type();
-        int outargs = oldType.parameterCount();
-        int inargs  = outargs + valueTypes.size();
-        if (pos < 0 || pos >= inargs)
-            throw newIllegalArgumentException("no argument type to remove");
-        ArrayList<Class<?>> ptypes =
-                new ArrayList<Class<?>>(oldType.parameterList());
-        ptypes.addAll(pos, valueTypes);
-        MethodType newType = MethodType.methodType(oldType.returnType(), ptypes);
-        return MethodHandleImpl.dropArguments(IMPL_TOKEN, target, newType, pos);
-    }
-
-    /**
-     * Produce a method handle which calls the original method handle,
-     * after dropping the given argument(s) at the given position.
-     * The type of the new method handle will insert the given argument
-     * type(s), at that position, into the original handle's type.
-     * This method is equivalent to the following code:
-     * <code>
-     * {@link #dropArguments(MethodHandle,int,List) dropArguments}(target, pos, Arrays.asList(valueTypes))
-     * </code>
-     * @param target the method handle to invoke after the arguments are dropped
-     * @param valueTypes the type(s) of the argument(s) to drop
-     * @param pos position of first argument to drop (zero for the leftmost)
-     * @return a method handle which drops arguments of the given types,
-     *         before calling the original method handle
-     */
-    public static
-    MethodHandle dropArguments(MethodHandle target, int pos, Class<?>... valueTypes) {
-        return dropArguments(target, pos, Arrays.asList(valueTypes));
-    }
-
-    /**
-     * Adapt a target method handle {@code target} by pre-processing
-     * one or more of its arguments, each with its own unary filter function,
-     * and then calling the target with each pre-processed argument
-     * replaced by the result of its corresponding filter function.
-     * <p>
-     * The pre-processing is performed by one or more method handles,
-     * specified in the elements of the {@code filters} array.
-     * (If there are no elements in the array, the original target is returned.)
-     * Each filter is applied to the corresponding argument of the adapter.
-     * <p>
-     * If a filter {@code F} applies to the {@code N}th argument of
-     * the method handle, then {@code F} must be a method handle which
-     * takes exactly one argument.  The type of {@code F}'s sole argument
-     * replaces the corresponding argument type of the target
-     * in the resulting adapted method handle.
-     * The return type of {@code F} must be identical to the corresponding
-     * parameter type of the target.
-     * <p>
-     * It is an error if there are elements of {@code filters}
-     * which do not correspond to argument positions in the target.
-     * <b>Example:</b>
-     * <p><blockquote><pre>
-import static java.dyn.MethodHandles.*;
-import static java.dyn.MethodType.*;
-...
-MethodHandle cat = lookup().findVirtual(String.class,
-  "concat", methodType(String.class, String.class));
-MethodHandle upcase = lookup().findVirtual(String.class,
-  "toUpperCase", methodType(String.class));
-assertEquals("xy", (String) cat.invokeExact("x", "y"));
-MethodHandle f0 = filterArguments(cat, 0, upcase);
-assertEquals("Xy", (String) f0.invokeExact("x", "y")); // Xy
-MethodHandle f1 = filterArguments(cat, 1, upcase);
-assertEquals("xY", (String) f1.invokeExact("x", "y")); // xY
-MethodHandle f2 = filterArguments(cat, 0, upcase, upcase);
-assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
-     * </pre></blockquote>
-     * @param target the method handle to invoke after arguments are filtered
-     * @param pos the position of the first argument to filter
-     * @param filters method handles to call initially on filtered arguments
-     * @return method handle which incorporates the specified argument filtering logic
-     * @throws IllegalArgumentException if an element of {@code filters} is null or
-     *          does not match a corresponding argument type of {@code target} as described above
-     */
-    public static
-    MethodHandle filterArguments(MethodHandle target, int pos, MethodHandle... filters) {
-        MethodType targetType = target.type();
-        MethodHandle adapter = target;
-        MethodType adapterType = targetType;
-        int maxPos = targetType.parameterCount();
-        int curPos = pos;
-        for (MethodHandle filter : filters) {
-            if (curPos >= maxPos)
-                throw newIllegalArgumentException("too many filters");
-            MethodType filterType = filter.type();
-            if (filterType.parameterCount() != 1
-                || filterType.returnType() != targetType.parameterType(curPos))
-                throw newIllegalArgumentException("target and filter types do not match");
-            adapterType = adapterType.changeParameterType(curPos, filterType.parameterType(0));
-            adapter = MethodHandleImpl.filterArgument(IMPL_TOKEN, adapter, curPos, filter);
-            curPos += 1;
-        }
-        MethodType midType = adapter.type();
-        if (midType != adapterType)
-            adapter = MethodHandleImpl.convertArguments(IMPL_TOKEN, adapter, adapterType, midType, null);
-        return adapter;
-    }
-
-    /**
-     * Adapt a target method handle {@code target} by post-processing
-     * its return value with a unary filter function.
-     * <p>
-     * If a filter {@code F} applies to the return value of
-     * the target method handle, then {@code F} must be a method handle which
-     * takes exactly one argument.  The return type of {@code F}
-     * replaces the return type of the target
-     * in the resulting adapted method handle.
-     * The argument type of {@code F} must be identical to the
-     * return type of the target.
-     * <b>Example:</b>
-     * <p><blockquote><pre>
-import static java.dyn.MethodHandles.*;
-import static java.dyn.MethodType.*;
-...
-MethodHandle cat = lookup().findVirtual(String.class,
-  "concat", methodType(String.class, String.class));
-MethodHandle length = lookup().findVirtual(String.class,
-  "length", methodType(int.class));
-System.out.println((String) cat.invokeExact("x", "y")); // xy
-MethodHandle f0 = filterReturnValue(cat, length);
-System.out.println((int) f0.invokeExact("x", "y")); // 2
-     * </pre></blockquote>
-     * @param target the method handle to invoke before filtering the return value
-     * @param filter method handle to call on the return value
-     * @return method handle which incorporates the specified return value filtering logic
-     * @throws IllegalArgumentException if {@code filter} is null or
-     *          does not match the return type of {@code target} as described above
-     */
-    public static
-    MethodHandle filterReturnValue(MethodHandle target, MethodHandle filter) {
-        MethodType targetType = target.type();
-        MethodType filterType = filter.type();
-        if (filterType.parameterCount() != 1
-            || filterType.parameterType(0) != targetType.returnType())
-            throw newIllegalArgumentException("target and filter types do not match");
-        // FIXME: Too many nodes here.
-        MethodHandle returner = dropArguments(filter, 0, targetType.parameterList());
-        return foldArguments(returner, exactInvoker(target.type()).bindTo(target));
-    }
-
-    /**
-     * Adapt a target method handle {@code target} by pre-processing
-     * some of its arguments, and then calling the target with
-     * the result of the pre-processing, plus all original arguments.
-     * <p>
-     * The pre-processing is performed by a second method handle, the {@code combiner}.
-     * The first {@code N} arguments passed to the adapter,
-     * are copied to the combiner, which then produces a result.
-     * (Here, {@code N} is defined as the parameter count of the adapter.)
-     * After this, control passes to the {@code target}, with both the result
-     * of the combiner, and all the original incoming arguments.
-     * <p>
-     * The first argument type of the target must be identical with the
-     * return type of the combiner.
-     * The resulting adapter is the same type as the target, except that the
-     * initial argument type of the target is dropped.
-     * <p>
-     * (Note that {@link #dropArguments(MethodHandle,int,List) dropArguments} can be used to remove any arguments
-     * that either the {@code combiner} or {@code target} does not wish to receive.
-     * If some of the incoming arguments are destined only for the combiner,
-     * consider using {@link MethodHandle#asCollector} instead, since those
-     * arguments will not need to be live on the stack on entry to the
-     * target.)
-     * <p>
-     * The first argument of the target must be identical with the
-     * return value of the combiner.
-     * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
-     * // there are N arguments in the A sequence
-     * T target(V, A[N]..., B...);
-     * V combiner(A...);
-     * T adapter(A... a, B... b) {
-     *   V v = combiner(a...);
-     *   return target(v, a..., b...);
-     * }
-     * </pre></blockquote>
-     * @param target the method handle to invoke after arguments are combined
-     * @param combiner method handle to call initially on the incoming arguments
-     * @return method handle which incorporates the specified argument folding logic
-     * @throws IllegalArgumentException if the first argument type of
-     *          {@code target} is not the same as {@code combiner}'s return type,
-     *          or if the following argument types of {@code target}
-     *          are not identical with the argument types of {@code combiner}
-     */
-    public static
-    MethodHandle foldArguments(MethodHandle target, MethodHandle combiner) {
-        MethodType targetType = target.type();
-        MethodType combinerType = combiner.type();
-        int foldArgs = combinerType.parameterCount();
-        boolean ok = (targetType.parameterCount() >= 1 + foldArgs);
-        if (ok && !combinerType.parameterList().equals(targetType.parameterList().subList(1, foldArgs+1)))
-            ok = false;
-        if (ok && !combinerType.returnType().equals(targetType.parameterType(0)))
-            ok = false;
-        if (!ok)
-            throw misMatchedTypes("target and combiner types", targetType, combinerType);
-        MethodType newType = targetType.dropParameterTypes(0, 1);
-        return MethodHandleImpl.foldArguments(IMPL_TOKEN, target, newType, combiner);
-    }
-
-    /**
-     * Make a method handle which adapts a target method handle,
-     * by guarding it with a test, a boolean-valued method handle.
-     * If the guard fails, a fallback handle is called instead.
-     * All three method handles must have the same corresponding
-     * argument and return types, except that the return type
-     * of the test must be boolean, and the test is allowed
-     * to have fewer arguments than the other two method handles.
-     * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
-     * boolean test(A...);
-     * T target(A...,B...);
-     * T fallback(A...,B...);
-     * T adapter(A... a,B... b) {
-     *   if (test(a...))
-     *     return target(a..., b...);
-     *   else
-     *     return fallback(a..., b...);
-     * }
-     * </pre></blockquote>
-     * Note that the test arguments ({@code a...} in the pseudocode) cannot
-     * be modified by execution of the test, and so are passed unchanged
-     * from the caller to the target or fallback as appropriate.
-     * @param test method handle used for test, must return boolean
-     * @param target method handle to call if test passes
-     * @param fallback method handle to call if test fails
-     * @return method handle which incorporates the specified if/then/else logic
-     * @throws IllegalArgumentException if {@code test} does not return boolean,
-     *          or if all three method types do not match (with the return
-     *          type of {@code test} changed to match that of {@code target}).
-     */
-    public static
-    MethodHandle guardWithTest(MethodHandle test,
-                               MethodHandle target,
-                               MethodHandle fallback) {
-        MethodType gtype = test.type();
-        MethodType ttype = target.type();
-        MethodType ftype = fallback.type();
-        if (!ttype.equals(ftype))
-            throw misMatchedTypes("target and fallback types", ttype, ftype);
-        if (gtype.returnType() != boolean.class)
-            throw newIllegalArgumentException("guard type is not a predicate "+gtype);
-        List<Class<?>> targs = ttype.parameterList();
-        List<Class<?>> gargs = gtype.parameterList();
-        if (!targs.equals(gargs)) {
-            int gpc = gargs.size(), tpc = targs.size();
-            if (gpc >= tpc || !targs.subList(0, gpc).equals(gargs))
-                throw misMatchedTypes("target and test types", ttype, gtype);
-            test = dropArguments(test, gpc, targs.subList(gpc, tpc));
-            gtype = test.type();
-        }
-        return MethodHandleImpl.makeGuardWithTest(IMPL_TOKEN, test, target, fallback);
-    }
-
-    static RuntimeException misMatchedTypes(String what, MethodType t1, MethodType t2) {
-        return newIllegalArgumentException(what + " must match: " + t1 + " != " + t2);
-    }
-
-    /**
-     * Make a method handle which adapts a target method handle,
-     * by running it inside an exception handler.
-     * If the target returns normally, the adapter returns that value.
-     * If an exception matching the specified type is thrown, the fallback
-     * handle is called instead on the exception, plus the original arguments.
-     * <p>
-     * The target and handler must have the same corresponding
-     * argument and return types, except that handler may omit trailing arguments
-     * (similarly to the predicate in {@link #guardWithTest guardWithTest}).
-     * Also, the handler must have an extra leading parameter of {@code exType} or a supertype.
-     * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
-     * T target(A..., B...);
-     * T handler(ExType, A...);
-     * T adapter(A... a, B... b) {
-     *   try {
-     *     return target(a..., b...);
-     *   } catch (ExType ex) {
-     *     return handler(ex, a...);
-     *   }
-     * }
-     * </pre></blockquote>
-     * Note that the saved arguments ({@code a...} in the pseudocode) cannot
-     * be modified by execution of the target, and so are passed unchanged
-     * from the caller to the handler, if the handler is invoked.
-     * <p>
-     * The target and handler must return the same type, even if the handler
-     * always throws.  (This might happen, for instance, because the handler
-     * is simulating a {@code finally} clause).
-     * To create such a throwing handler, compose the handler creation logic
-     * with {@link #throwException throwException},
-     * in order to create a method handle of the correct return type.
-     * @param target method handle to call
-     * @param exType the type of exception which the handler will catch
-     * @param handler method handle to call if a matching exception is thrown
-     * @return method handle which incorporates the specified try/catch logic
-     * @throws IllegalArgumentException if {@code handler} does not accept
-     *          the given exception type, or if the method handle types do
-     *          not match in their return types and their
-     *          corresponding parameters
-     */
-    public static
-    MethodHandle catchException(MethodHandle target,
-                                Class<? extends Throwable> exType,
-                                MethodHandle handler) {
-        MethodType ttype = target.type();
-        MethodType htype = handler.type();
-        if (htype.parameterCount() < 1 ||
-            !htype.parameterType(0).isAssignableFrom(exType))
-            throw newIllegalArgumentException("handler does not accept exception type "+exType);
-        if (htype.returnType() != ttype.returnType())
-            throw misMatchedTypes("target and handler return types", ttype, htype);
-        List<Class<?>> targs = ttype.parameterList();
-        List<Class<?>> hargs = htype.parameterList();
-        hargs = hargs.subList(1, hargs.size());  // omit leading parameter from handler
-        if (!targs.equals(hargs)) {
-            int hpc = hargs.size(), tpc = targs.size();
-            if (hpc >= tpc || !targs.subList(0, hpc).equals(hargs))
-                throw misMatchedTypes("target and handler types", ttype, htype);
-            handler = dropArguments(handler, hpc, hargs.subList(hpc, tpc));
-            htype = handler.type();
-        }
-        return MethodHandleImpl.makeGuardWithCatch(IMPL_TOKEN, target, exType, handler);
-    }
-
-    /**
-     * Produce a method handle which will throw exceptions of the given {@code exType}.
-     * The method handle will accept a single argument of {@code exType},
-     * and immediately throw it as an exception.
-     * The method type will nominally specify a return of {@code returnType}.
-     * The return type may be anything convenient:  It doesn't matter to the
-     * method handle's behavior, since it will never return normally.
-     */
-    public static
-    MethodHandle throwException(Class<?> returnType, Class<? extends Throwable> exType) {
-        return MethodHandleImpl.throwException(IMPL_TOKEN, MethodType.methodType(returnType, exType));
-    }
-
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Produce a wrapper instance of the given "SAM" interface which redirects
-     * its calls to the given method handle.
-     * A SAM interface is an interface which declares a single abstract method.
-     * The type must be public.  (No additional access checks are performed.)
-     * <p>
-     * The resulting instance of the required SAM type will respond to
-     * invocation of the SAM type's single abstract method by calling
-     * the given {@code target} on the incoming arguments,
-     * and returning or throwing whatever the {@code target}
-     * returns or throws.  The invocation will be as if by
-     * {@code target.invokeExact}.
-     * <p>
-     * The method handle may throw an <em>undeclared exception</em>,
-     * which means any checked exception (or other checked throwable)
-     * not declared by the SAM type's single abstract method.
-     * If this happens, the throwable will be wrapped in an instance of
-     * {@link java.lang.reflect.UndeclaredThrowableException UndeclaredThrowableException}
-     * and thrown in that wrapped form.
-     * <p>
-     * The wrapper instance is guaranteed to be of a non-public
-     * implementation class C in a package containing no classes
-     * or methods except system-defined classes and methods.
-     * The implementation class C will have no public supertypes
-     * or public methods beyond the following:
-     * <ul>
-     * <li>the SAM type itself and any methods in the SAM type
-     * <li>the supertypes of the SAM type (if any) and their methods
-     * <li>{@link Object} and its methods
-     * <li>{@link java.dyn.AsInstanceObject AsInstanceObject} and its methods</li>
-     * </ul>
-     * <p>
-     * (Note: When determining the unique abstract method of a SAM interface,
-     * the public {@code Object} methods ({@code toString}, {@code equals}, {@code hashCode})
-     * are disregarded.  For example, {@link java.util.Comparator} is a SAM interface,
-     * even though it re-declares the {@code Object.equals} method.)
-     * <p>
-     * No stable mapping is promised between the SAM type and
-     * the implementation class C.  Over time, several implementation
-     * classes might be used for the same SAM type.
-     * <p>
-     * This method is not guaranteed to return a distinct
-     * wrapper object for each separate call.  If the implementation is able
-     * to prove that a wrapper of the required SAM type
-     * has already been created for a given
-     * method handle, or for another method handle with the
-     * same behavior, the implementation may return that wrapper in place of
-     * a new wrapper.
-     * <p>
-     * This method is designed to apply to common use cases
-     * where a single method handle must interoperate with
-     * a type (class or interface) that implements a function-like
-     * API.  Additional variations, such as SAM classes with
-     * private constructors, or interfaces with multiple but related
-     * entry points, must be covered by hand-written or automatically
-     * generated adapter classes.  In those cases, consider implementing
-     * {@link java.dyn.MethodHandles.AsInstanceObject AsInstanceObject}
-     * in the adapters, so that generic code can extract the underlying
-     * method handle without knowing where the SAM adapter came from.
-     * @param target the method handle to invoke from the wrapper
-     * @param samType the desired type of the wrapper, a SAM type
-     * @return a correctly-typed wrapper for the given {@code target}
-     * @throws IllegalArgumentException if the {@code target} throws
-     *         an undeclared exception
-     */
-    // ISSUE: Should we delegate equals/hashCode to the targets?
-    // Not useful unless there is a stable equals/hashCode behavior
-    // for MethodHandle, but there isn't.
-    public static
-    <T> T asInstance(final MethodHandle target, final Class<T> samType) {
-        // POC implementation only; violates the above contract several ways
-        final Method sam = getSamMethod(samType);
-        if (sam == null)
-            throw new IllegalArgumentException("not a SAM type: "+samType.getName());
-        MethodType samMT = MethodType.methodType(sam.getReturnType(), sam.getParameterTypes());
-        if (!samMT.equals(target.type()))
-            throw new IllegalArgumentException("wrong method type: "+target+" should match "+sam);
-        return samType.cast(Proxy.newProxyInstance(
-                samType.getClassLoader(),
-                new Class[]{ samType, AsInstanceObject.class },
-                new InvocationHandler() {
-                    private Object getArg(String name) {
-                        if ((Object)name == "getAsInstanceTarget")  return target;
-                        if ((Object)name == "getAsInstanceType")    return samType;
-                        throw new AssertionError();
-                    }
-                    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-                        if (method.getDeclaringClass() == AsInstanceObject.class)
-                            return getArg(method.getName());
-                        if (method.equals(sam))
-                            return target.invokeVarargs(args);
-                        if (isObjectMethod(method))
-                            return callObjectMethod(this, method, args);
-                        throw new InternalError();
-                    }
-                }));
-    }
-
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Interface implemented by every object which is produced by {@link #asInstance asInstance}.
-     * The methods of this interface allow a caller to recover the parameters
-     * to {@code asInstance}.
-     * This allows applications to repeatedly convert between method handles
-     * and SAM objects, without the risk of creating unbounded delegation chains.
-     */
-    public interface AsInstanceObject {
-        /** Produce or recover a target method handle which is behaviorally
-         *  equivalent to the SAM method of this object.
-         */
-        public MethodHandle getAsInstanceTarget();
-        /** Recover the SAM type for which this object was created.
-         */
-        public Class<?> getAsInstanceType();
-    }
-
-    private static
-    boolean isObjectMethod(Method m) {
-        switch (m.getName()) {
-        case "toString":
-            return (m.getReturnType() == String.class
-                    && m.getParameterTypes().length == 0);
-        case "hashCode":
-            return (m.getReturnType() == int.class
-                    && m.getParameterTypes().length == 0);
-        case "equals":
-            return (m.getReturnType() == boolean.class
-                    && m.getParameterTypes().length == 1
-                    && m.getParameterTypes()[0] == Object.class);
-        }
-        return false;
-    }
-
-    private static
-    Object callObjectMethod(Object self, Method m, Object[] args) {
-        assert(isObjectMethod(m)) : m;
-        switch (m.getName()) {
-        case "toString":
-            return self.getClass().getName() + "@" + Integer.toHexString(self.hashCode());
-        case "hashCode":
-            return System.identityHashCode(self);
-        case "equals":
-            return (self == args[0]);
-        }
-        return null;
-    }
-
-    private static
-    Method getSamMethod(Class<?> samType) {
-        Method sam = null;
-        for (Method m : samType.getMethods()) {
-            int mod = m.getModifiers();
-            if (Modifier.isAbstract(mod)) {
-                if (sam != null && !isObjectMethod(sam))
-                    return null;  // too many abstract methods
-                sam = m;
-            }
-        }
-        if (!samType.isInterface() && getSamConstructor(samType) == null)
-            return null;  // wrong kind of constructor
-        return sam;
-    }
-
-    private static
-    Constructor getSamConstructor(Class<?> samType) {
-        for (Constructor c : samType.getDeclaredConstructors()) {
-            if (c.getParameterTypes().length == 0) {
-                int mod = c.getModifiers();
-                if (Modifier.isPublic(mod) || Modifier.isProtected(mod))
-                    return c;
-            }
-        }
-        return null;
-    }
-
-    /*non-public*/
-    static MethodHandle withTypeHandler(MethodHandle target, MethodHandle typeHandler) {
-        return MethodHandleImpl.withTypeHandler(IMPL_TOKEN, target, typeHandler);
-    }
-}
--- a/src/share/classes/java/dyn/MethodType.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,649 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import sun.dyn.Access;
-import sun.dyn.Invokers;
-import sun.dyn.MethodTypeImpl;
-import sun.dyn.util.BytecodeDescriptor;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * A method type represents the arguments and return type accepted and
- * returned by a method handle, or the arguments and return type passed
- * and expected  by a method handle caller.  Method types must be properly
- * matched between a method handle and all its callers,
- * and the JVM's operations enforce this matching at, specifically
- * during calls to {@link MethodHandle#invokeExact}
- * and {@link MethodHandle#invokeGeneric}, and during execution
- * of {@code invokedynamic} instructions.
- * <p>
- * The structure is a return type accompanied by any number of parameter types.
- * The types (primitive, {@code void}, and reference) are represented by {@link Class} objects.
- * (For ease of exposition, we treat {@code void} as if it were a type.
- * In fact, it denotes the absence of a return type.)
- * <p>
- * All instances of {@code MethodType} are immutable.
- * Two instances are completely interchangeable if they compare equal.
- * Equality depends on pairwise correspondence of the return and parameter types and on nothing else.
- * <p>
- * This type can be created only by factory methods.
- * All factory methods may cache values, though caching is not guaranteed.
- * Some factory methods are static, while others are virtual methods which
- * modify precursor method types, e.g., by changing a selected parameter.
- * <p>
- * Factory methods which operate on groups of parameter types
- * are systematically presented in two versions, so that both Java arrays and
- * Java lists can be used to work with groups of parameter types.
- * The query methods {@code parameterArray} and {@code parameterList}
- * also provide a choice between arrays and lists.
- * <p>
- * {@code MethodType} objects are sometimes derived from bytecode instructions
- * such as {@code invokedynamic}, specifically from the type descriptor strings associated
- * with the instructions in a class file's constant pool.
- * <p>
- * Like classes and strings, method types can also be represented directly
- * in a class file's constant pool as constants. The may be loaded by an {@code ldc}
- * instruction which refers to a suitable {@code CONSTANT_MethodType} constant pool entry.
- * The entry refers to a {@code CONSTANT_Utf8} spelling for the descriptor string.
- * For more details, see the <a href="package-summary.html#mtcon">package summary</a>.
- * <p>
- * When the JVM materializes a {@code MethodType} from a descriptor string,
- * all classes named in the descriptor must be accessible, and will be loaded.
- * (But the classes need not be initialized, as is the case with a {@code CONSTANT_Class}.)
- * This loading may occur at any time before the {@code MethodType} object is first derived.
- * @author John Rose, JSR 292 EG
- */
-public final
-class MethodType {
-    private final Class<?>   rtype;
-    private final Class<?>[] ptypes;
-    private MethodTypeForm form; // erased form, plus cached data about primitives
-    private MethodType wrapAlt;  // alternative wrapped/unwrapped version
-    private Invokers invokers;   // cache of handy higher-order adapters
-
-    private static final Access IMPL_TOKEN = Access.getToken();
-
-    // share a cache with a friend in this package
-    Invokers getInvokers() { return invokers; }
-    void setInvokers(Invokers inv) { invokers = inv; }
-
-    static {
-        // This hack allows the implementation package special access to
-        // the internals of MethodType.  In particular, the MTImpl has all sorts
-        // of cached information useful to the implementation code.
-        MethodTypeImpl.setMethodTypeFriend(IMPL_TOKEN, new MethodTypeImpl.MethodTypeFriend() {
-            public Class<?>[] ptypes(MethodType mt)        { return mt.ptypes; }
-            public MethodTypeImpl form(MethodType mt)      { return mt.form; }
-            public void setForm(MethodType mt, MethodTypeImpl form) {
-                assert(mt.form == null);
-                mt.form = (MethodTypeForm) form;
-            }
-            public MethodType makeImpl(Class<?> rtype, Class<?>[] ptypes, boolean trusted) {
-                return MethodType.makeImpl(rtype, ptypes, trusted);
-            }
-            public MethodTypeImpl newMethodTypeForm(MethodType mt) {
-                return new MethodTypeForm(mt);
-            }
-            public Invokers getInvokers(MethodType mt)    { return mt.invokers; }
-            public void setInvokers(MethodType mt, Invokers inv) { mt.invokers = inv; }
-        });
-    }
-
-    private MethodType(Class<?> rtype, Class<?>[] ptypes) {
-        checkRtype(rtype);
-        checkPtypes(ptypes);
-        this.rtype = rtype;
-        this.ptypes = ptypes;
-    }
-
-    private void checkRtype(Class<?> rtype) {
-        rtype.equals(rtype);  // null check
-    }
-    private void checkPtypes(Class<?>[] ptypes) {
-        for (Class<?> ptype : ptypes) {
-            ptype.equals(ptype);  // null check
-            if (ptype == void.class)
-                throw newIllegalArgumentException("parameter type cannot be void");
-        }
-    }
-
-    static final HashMap<MethodType,MethodType> internTable
-            = new HashMap<MethodType, MethodType>();
-
-    static final Class<?>[] NO_PTYPES = {};
-
-    /** Find or create an instance of the given method type.
-     * @param rtype  the return type
-     * @param ptypes the parameter types
-     * @return a method type with the given parts
-     * @throws NullPointerException if rtype or any ptype is null
-     * @throws IllegalArgumentException if any of the ptypes is void
-     */
-    public static
-    MethodType methodType(Class<?> rtype, Class<?>[] ptypes) {
-        return makeImpl(rtype, ptypes, false);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}. */
-    public static
-    MethodType methodType(Class<?> rtype, List<? extends Class<?>> ptypes) {
-        boolean notrust = false;  // random List impl. could return evil ptypes array
-        return makeImpl(rtype, ptypes.toArray(NO_PTYPES), notrust);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     *  The leading parameter type is prepended to the remaining array.
-     */
-    public static
-    MethodType methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes) {
-        Class<?>[] ptypes1 = new Class<?>[1+ptypes.length];
-        ptypes1[0] = ptype0;
-        System.arraycopy(ptypes, 0, ptypes1, 1, ptypes.length);
-        return makeImpl(rtype, ptypes1, true);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     *  The resulting method has no parameter types.
-     */
-    public static
-    MethodType methodType(Class<?> rtype) {
-        return makeImpl(rtype, NO_PTYPES, true);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     *  The resulting method has the single given parameter type.
-     */
-    public static
-    MethodType methodType(Class<?> rtype, Class<?> ptype0) {
-        return makeImpl(rtype, new Class<?>[]{ ptype0 }, true);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     *  The resulting method has the same parameter types as {@code ptypes},
-     *  and the specified return type.
-     */
-    public static
-    MethodType methodType(Class<?> rtype, MethodType ptypes) {
-        return makeImpl(rtype, ptypes.ptypes, true);
-    }
-
-    /**
-     * Sole factory method to find or create an interned method type.
-     * @param rtype desired return type
-     * @param ptypes desired parameter types
-     * @param trusted whether the ptypes can be used without cloning
-     * @return the unique method type of the desired structure
-     */
-    private static
-    MethodType makeImpl(Class<?> rtype, Class<?>[] ptypes, boolean trusted) {
-        if (ptypes == null || ptypes.length == 0) {
-            ptypes = NO_PTYPES; trusted = true;
-        }
-        MethodType mt1 = new MethodType(rtype, ptypes);
-        MethodType mt0;
-        synchronized (internTable) {
-            mt0 = internTable.get(mt1);
-            if (mt0 != null)
-                return mt0;
-        }
-        if (!trusted)
-            // defensively copy the array passed in by the user
-            mt1 = new MethodType(rtype, ptypes.clone());
-        // promote the object to the Real Thing, and reprobe
-        MethodTypeImpl.initForm(IMPL_TOKEN, mt1);
-        synchronized (internTable) {
-            mt0 = internTable.get(mt1);
-            if (mt0 != null)
-                return mt0;
-            internTable.put(mt1, mt1);
-        }
-        return mt1;
-    }
-
-    // Entry point from JVM.  TODO: Change the name & signature.
-    private static MethodType makeImpl(Class<?> rtype, Class<?>[] ptypes,
-            boolean ignore1, boolean ignore2) {
-        return makeImpl(rtype, ptypes, true);
-    }
-
-    private static final MethodType[] objectOnlyTypes = new MethodType[20];
-
-    /**
-     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * All parameters and the return type will be {@code Object},
-     * except the final varargs parameter if any, which will be {@code Object[]}.
-     * @param objectArgCount number of parameters (excluding the varargs parameter if any)
-     * @param varargs whether there will be a varargs parameter, of type {@code Object[]}
-     * @return a totally generic method type, given only its count of parameters and varargs
-     * @see #genericMethodType(int)
-     */
-    public static
-    MethodType genericMethodType(int objectArgCount, boolean varargs) {
-        MethodType mt;
-        int ivarargs = (!varargs ? 0 : 1);
-        int ootIndex = objectArgCount*2 + ivarargs;
-        if (ootIndex < objectOnlyTypes.length) {
-            mt = objectOnlyTypes[ootIndex];
-            if (mt != null)  return mt;
-        }
-        Class<?>[] ptypes = new Class<?>[objectArgCount + ivarargs];
-        Arrays.fill(ptypes, Object.class);
-        if (ivarargs != 0)  ptypes[objectArgCount] = Object[].class;
-        mt = makeImpl(Object.class, ptypes, true);
-        if (ootIndex < objectOnlyTypes.length) {
-            objectOnlyTypes[ootIndex] = mt;     // cache it here also!
-        }
-        return mt;
-    }
-
-    /**
-     * All parameters and the return type will be Object.
-     * @param objectArgCount number of parameters
-     * @return a totally generic method type, given only its count of parameters
-     * @see #genericMethodType(int, boolean)
-     */
-    public static
-    MethodType genericMethodType(int objectArgCount) {
-        return genericMethodType(objectArgCount, false);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param num    the index (zero-based) of the parameter type to change
-     * @param nptype a new parameter type to replace the old one with
-     * @return the same type, except with the selected parameter changed
-     */
-    public MethodType changeParameterType(int num, Class<?> nptype) {
-        if (parameterType(num) == nptype)  return this;
-        Class<?>[] nptypes = ptypes.clone();
-        nptypes[num] = nptype;
-        return makeImpl(rtype, nptypes, true);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param num    the position (zero-based) of the inserted parameter type(s)
-     * @param ptypesToInsert zero or more a new parameter types to insert into the parameter list
-     * @return the same type, except with the selected parameter(s) inserted
-     */
-    public MethodType insertParameterTypes(int num, Class<?>... ptypesToInsert) {
-        int len = ptypes.length;
-        if (num < 0 || num > len)
-            throw newIllegalArgumentException("num="+num); //SPECME
-        int ilen = ptypesToInsert.length;
-        if (ilen == 0)  return this;
-        Class<?>[] nptypes = Arrays.copyOfRange(ptypes, 0, len+ilen);
-        System.arraycopy(nptypes, num, nptypes, num+ilen, len-num);
-        System.arraycopy(ptypesToInsert, 0, nptypes, num, ilen);
-        return makeImpl(rtype, nptypes, true);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param ptypesToInsert zero or more a new parameter types to insert after the end of the parameter list
-     * @return the same type, except with the selected parameter(s) appended
-     */
-    public MethodType appendParameterTypes(Class<?>... ptypesToInsert) {
-        return insertParameterTypes(parameterCount(), ptypesToInsert);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param ptypesToInsert zero or more a new parameter types to insert after the end of the parameter list
-     * @return the same type, except with the selected parameter(s) appended
-     */
-    public MethodType appendParameterTypes(List<Class<?>> ptypesToInsert) {
-        return insertParameterTypes(parameterCount(), ptypesToInsert);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param num    the position (zero-based) of the inserted parameter type(s)
-     * @param ptypesToInsert zero or more a new parameter types to insert into the parameter list
-     * @return the same type, except with the selected parameter(s) inserted
-     */
-    public MethodType insertParameterTypes(int num, List<Class<?>> ptypesToInsert) {
-        return insertParameterTypes(num, ptypesToInsert.toArray(NO_PTYPES));
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param start  the index (zero-based) of the first parameter type to remove
-     * @param end    the index (greater than {@code start}) of the first parameter type after not to remove
-     * @return the same type, except with the selected parameter(s) removed
-     */
-    public MethodType dropParameterTypes(int start, int end) {
-        int len = ptypes.length;
-        if (!(0 <= start && start <= end && end <= len))
-            throw newIllegalArgumentException("start="+start+" end="+end); //SPECME
-        if (start == end)  return this;
-        Class<?>[] nptypes;
-        if (start == 0) {
-            if (end == len) {
-                // drop all parameters
-                nptypes = NO_PTYPES;
-            } else {
-                // drop initial parameter(s)
-                nptypes = Arrays.copyOfRange(ptypes, end, len);
-            }
-        } else {
-            if (end == len) {
-                // drop trailing parameter(s)
-                nptypes = Arrays.copyOfRange(ptypes, 0, start);
-            } else {
-                int tail = len - end;
-                nptypes = Arrays.copyOfRange(ptypes, 0, start + tail);
-                System.arraycopy(ptypes, end, nptypes, start, tail);
-            }
-        }
-        return makeImpl(rtype, nptypes, true);
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * @param nrtype a return parameter type to replace the old one with
-     * @return the same type, except with the return type change
-     */
-    public MethodType changeReturnType(Class<?> nrtype) {
-        if (returnType() == nrtype)  return this;
-        return makeImpl(nrtype, ptypes, true);
-    }
-
-    /** Convenience method.
-     * Report if this type contains a primitive argument or return value.
-     * The return type {@code void} counts as a primitive.
-     * @return true if any of the types are primitives
-     */
-    public boolean hasPrimitives() {
-        return form.hasPrimitives();
-    }
-
-    /** Convenience method.
-     * Report if this type contains a wrapper argument or return value.
-     * Wrappers are types which box primitive values, such as {@link Integer}.
-     * The reference type {@code java.lang.Void} counts as a wrapper.
-     * @return true if any of the types are wrappers
-     */
-    public boolean hasWrappers() {
-        return unwrap() != this;
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * Erase all reference types to {@code Object}.
-     * All primitive types (including {@code void}) will remain unchanged.
-     * @return a version of the original type with all reference types replaced
-     */
-    public MethodType erase() {
-        return form.erasedType();
-    }
-
-    /** Convenience method for {@link #genericMethodType(int)}.
-     * Convert all types, both reference and primitive, to {@code Object}.
-     * The expression {@code type.wrap().erase()} produces the same value
-     * as {@code type.generic()}.
-     * @return a version of the original type with all types replaced
-     */
-    public MethodType generic() {
-        return genericMethodType(parameterCount());
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * Convert all primitive types to their corresponding wrapper types.
-     * All reference types (including wrapper types) will remain unchanged.
-     * A {@code void} return type is changed to the type {@code java.lang.Void}.
-     * The expression {@code type.wrap().erase()} produces the same value
-     * as {@code type.generic()}.
-     * @return a version of the original type with all primitive types replaced
-     */
-    public MethodType wrap() {
-        return hasPrimitives() ? wrapWithPrims(this) : this;
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * Convert all wrapper types to their corresponding primitive types.
-     * All primitive types (including {@code void}) will remain unchanged.
-     * A return type of {@code java.lang.Void} is changed to {@code void}.
-     * @return a version of the original type with all wrapper types replaced
-     */
-    public MethodType unwrap() {
-        MethodType noprims = !hasPrimitives() ? this : wrapWithPrims(this);
-        return unwrapWithNoPrims(noprims);
-    }
-
-    private static MethodType wrapWithPrims(MethodType pt) {
-        assert(pt.hasPrimitives());
-        MethodType wt = pt.wrapAlt;
-        if (wt == null) {
-            // fill in lazily
-            wt = MethodTypeImpl.canonicalize(pt, MethodTypeImpl.WRAP, MethodTypeImpl.WRAP);
-            assert(wt != null);
-            pt.wrapAlt = wt;
-        }
-        return wt;
-    }
-
-    private static MethodType unwrapWithNoPrims(MethodType wt) {
-        assert(!wt.hasPrimitives());
-        MethodType uwt = wt.wrapAlt;
-        if (uwt == null) {
-            // fill in lazily
-            uwt = MethodTypeImpl.canonicalize(wt, MethodTypeImpl.UNWRAP, MethodTypeImpl.UNWRAP);
-            if (uwt == null)
-                uwt = wt;    // type has no wrappers or prims at all
-            wt.wrapAlt = uwt;
-        }
-        return uwt;
-    }
-
-    /** @param num the index (zero-based) of the desired parameter type
-     *  @return the selected parameter type
-     */
-    public Class<?> parameterType(int num) {
-        return ptypes[num];
-    }
-    /** @return the number of parameter types */
-    public int parameterCount() {
-        return ptypes.length;
-    }
-    /** @return the return type */
-    public Class<?> returnType() {
-        return rtype;
-    }
-
-    /**
-     * Convenience method to present the arguments as a list.
-     * @return the parameter types (as an immutable list)
-     */
-    public List<Class<?>> parameterList() {
-        return Collections.unmodifiableList(Arrays.asList(ptypes));
-    }
-
-    /**
-     * Convenience method to present the arguments as an array.
-     * Changes to the array will not result in changes to the type.
-     * @return the parameter types (as a fresh copy if necessary)
-     */
-    public Class<?>[] parameterArray() {
-        return ptypes.clone();
-    }
-
-    /**
-     * Compares the specified object with this type for equality.
-     * That is, it returns <tt>true</tt> if and only if the specified object
-     * is also a method type with exactly the same parameters and return type.
-     * @param x object to compare
-     * @see Object#equals(Object)
-     */
-    @Override
-    public boolean equals(Object x) {
-        return this == x || x instanceof MethodType && equals((MethodType)x);
-    }
-
-    private boolean equals(MethodType that) {
-        return this.rtype == that.rtype
-            && Arrays.equals(this.ptypes, that.ptypes);
-    }
-
-    /**
-     * Returns the hash code value for this method type.
-     * It is defined to be the same as the hashcode of a List
-     * whose elements are the return type followed by the
-     * parameter types.
-     * @return the hash code value for this method type
-     * @see Object#hashCode()
-     * @see #equals(Object)
-     * @see List#hashCode()
-     */
-    @Override
-    public int hashCode() {
-      int hashCode = 31 + rtype.hashCode();
-      for (Class<?> ptype : ptypes)
-          hashCode = 31*hashCode + ptype.hashCode();
-      return hashCode;
-    }
-
-    /**
-     * The string representation of a method type is a
-     * parenthesis enclosed, comma separated list of type names,
-     * followed immediately by the return type.
-     * <p>
-     * Each type is represented by its
-     * {@link java.lang.Class#getSimpleName simple name}.
-     * If a type name name is array, it the base type followed
-     * by [], rather than the Class.getName of the array type.
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("(");
-        for (int i = 0; i < ptypes.length; i++) {
-            if (i > 0)  sb.append(",");
-            sb.append(ptypes[i].getSimpleName());
-        }
-        sb.append(")");
-        sb.append(rtype.getSimpleName());
-        return sb.toString();
-    }
-
-    /// Queries which have to do with the bytecode architecture
-
-    /** The number of JVM stack slots required to invoke a method
-     * of this type.  Note that (for historic reasons) the JVM requires
-     * a second stack slot to pass long and double arguments.
-     * So this method returns {@link #parameterCount()} plus the
-     * number of long and double parameters (if any).
-     * <p>
-     * This method is included for the benfit of applications that must
-     * generate bytecodes that process method handles and invokedynamic.
-     * @return the number of JVM stack slots for this type's parameters
-     */
-    public int parameterSlotCount() {
-        return form.parameterSlotCount();
-    }
-
-    /** Number of JVM stack slots which carry all parameters including and after
-     * the given position, which must be in the range of 0 to
-     * {@code parameterCount} inclusive.  Successive parameters are
-     * more shallowly stacked, and parameters are indexed in the bytecodes
-     * according to their trailing edge.  Thus, to obtain the depth
-     * in the outgoing call stack of parameter {@code N}, obtain
-     * the {@code parameterSlotDepth} of its trailing edge
-     * at position {@code N+1}.
-     * <p>
-     * Parameters of type {@code long} and {@code double} occupy
-     * two stack slots (for historical reasons) and all others occupy one.
-     * Therefore, the number returned is the number of arguments
-     * <em>including</em> and <em>after</em> the given parameter,
-     * <em>plus</em> the number of long or double arguments
-     * at or after after the argument for the given parameter.
-     * <p>
-     * This method is included for the benfit of applications that must
-     * generate bytecodes that process method handles and invokedynamic.
-     * @param num an index (zero-based, inclusive) within the parameter types
-     * @return the index of the (shallowest) JVM stack slot transmitting the
-     *         given parameter
-     */
-    public int parameterSlotDepth(int num) {
-        if (num < 0 || num > ptypes.length)
-            parameterType(num);  // force a range check
-        return form.parameterToArgSlot(num-1);
-    }
-
-    /** The number of JVM stack slots required to receive a return value
-     * from a method of this type.
-     * If the {@link #returnType() return type} is void, it will be zero,
-     * else if the return type is long or double, it will be two, else one.
-     * <p>
-     * This method is included for the benfit of applications that must
-     * generate bytecodes that process method handles and invokedynamic.
-     * @return the number of JVM stack slots (0, 1, or 2) for this type's return value
-     */
-    public int returnSlotCount() {
-        return form.returnSlotCount();
-    }
-
-    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
-     * Find or create an instance of the given method type.
-     * Any class or interface name embedded in the descriptor string
-     * will be resolved by calling {@link ClassLoader#loadClass(java.lang.String)}
-     * on the given loader (or if it is null, on the system class loader).
-     * <p>
-     * Note that it is possible to encounter method types which cannot be
-     * constructed by this method, because their component types are
-     * not all reachable from a common class loader.
-     * <p>
-     * This method is included for the benfit of applications that must
-     * generate bytecodes that process method handles and invokedynamic.
-     * @param descriptor a bytecode-level signature string "(T...)T"
-     * @param loader the class loader in which to look up the types
-     * @return a method type matching the bytecode-level signature
-     * @throws IllegalArgumentException if the string is not well-formed
-     * @throws TypeNotPresentException if a named type cannot be found
-     */
-    public static MethodType fromMethodDescriptorString(String descriptor, ClassLoader loader)
-        throws IllegalArgumentException, TypeNotPresentException
-    {
-        List<Class<?>> types = BytecodeDescriptor.parseMethod(descriptor, loader);
-        Class<?> rtype = types.remove(types.size() - 1);
-        Class<?>[] ptypes = types.toArray(NO_PTYPES);
-        return makeImpl(rtype, ptypes, true);
-    }
-
-    /**
-     * Create a bytecode descriptor representation of the method type.
-     * <p>
-     * Note that this is not a strict inverse of {@link #fromMethodDescriptorString}.
-     * Two distinct classes which share a common name but have different class loaders
-     * will appear identical when viewed within descriptor strings.
-     * <p>
-     * This method is included for the benfit of applications that must
-     * generate bytecodes that process method handles and invokedynamic.
-     * {@link #fromMethodDescriptorString(java.lang.String, java.lang.ClassLoader)},
-     * because the latter requires a suitable class loader argument.
-     * @return the bytecode signature representation
-     */
-    public String toMethodDescriptorString() {
-        return BytecodeDescriptor.unparse(this);
-    }
-}
--- a/src/share/classes/java/dyn/MethodTypeForm.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 java.dyn;
-
-/**
- * TO DO:  Temporary shim; remove after refactoring effects are complete in JVM.
- * @author John Rose
- */
-import sun.dyn.MethodTypeImpl;
-
-class MethodTypeForm extends MethodTypeImpl {
-
-    MethodTypeForm(MethodType erasedType) {
-        super(erasedType);
-    }
-}
--- a/src/share/classes/java/dyn/MutableCallSite.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-import sun.dyn.*;
-import sun.dyn.empty.Empty;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * A {@code MutableCallSite} is a {@link CallSite} whose target variable
- * behaves like an ordinary field.
- * An {@code invokedynamic} instruction linked to a {@code MutableCallSite} delegates
- * all calls to the site's current target.
- * The {@linkplain CallSite#dynamicInvoker dynamic invoker} of a mutable call site
- * also delegates each call to the site's current target.
- * <p>
- * Here is an example of a mutable call site which introduces a
- * state variable into a method handle chain.
- * <blockquote><pre>
-MutableCallSite name = new MutableCallSite(MethodType.methodType(String.class));
-MethodHandle MH_name = name.dynamicInvoker();
-MethodType MT_str2 = MethodType.methodType(String.class, String.class);
-MethodHandle MH_upcase = MethodHandles.lookup()
-    .findVirtual(String.class, "toUpperCase", MT_str2);
-MethodHandle worker1 = MethodHandles.filterReturnValue(MH_name, MH_upcase);
-name.setTarget(MethodHandles.constant(String.class, "Rocky"));
-assertEquals("ROCKY", (String) worker1.invokeExact());
-name.setTarget(MethodHandles.constant(String.class, "Fred"));
-assertEquals("FRED", (String) worker1.invokeExact());
-// (mutation can be continued indefinitely)
- * </pre></blockquote>
- * <p>
- * The same call site may be used in several places at once.
- * <blockquote><pre>
-MethodHandle MH_dear = MethodHandles.lookup()
-    .findVirtual(String.class, "concat", MT_str2).bindTo(", dear?");
-MethodHandle worker2 = MethodHandles.filterReturnValue(MH_name, MH_dear);
-assertEquals("Fred, dear?", (String) worker2.invokeExact());
-name.setTarget(MethodHandles.constant(String.class, "Wilma"));
-assertEquals("WILMA", (String) worker1.invokeExact());
-assertEquals("Wilma, dear?", (String) worker2.invokeExact());
- * </pre></blockquote>
- * <p>
- * <em>Non-synchronization of target values:</em>
- * A write to a mutable call site's target does not force other threads
- * to become aware of the updated value.  Threads which do not perform
- * suitable synchronization actions relative to the updated call site
- * may cache the old target value and delay their use of the new target
- * value indefinitely.
- * (This is a normal consequence of the Java Memory Model as applied
- * to object fields.)
- * <p>
- * The {@link #sync sync} operation provides a way to force threads
- * to accept a new target value, even if there is no other synchronization.
- * <p>
- * For target values which will be frequently updated, consider using
- * a {@linkplain VolatileCallSite volatile call site} instead.
- * @author John Rose, JSR 292 EG
- */
-public class MutableCallSite extends CallSite {
-    /**
-     * Make a blank call site object with the given method type.
-     * An initial target method is supplied which will throw
-     * an {@link IllegalStateException} if called.
-     * <p>
-     * Before this {@code CallSite} object is returned from a bootstrap method,
-     * it is usually provided with a more useful target method,
-     * via a call to {@link CallSite#setTarget(MethodHandle) setTarget}.
-     * @throws NullPointerException if the proposed type is null
-     */
-    public MutableCallSite(MethodType type) {
-        super(type);
-    }
-
-    /**
-     * Make a blank call site object, possibly equipped with an initial target method handle.
-     * @param target the method handle which will be the initial target of the call site
-     * @throws NullPointerException if the proposed target is null
-     */
-    public MutableCallSite(MethodHandle target) {
-        super(target);
-    }
-
-    /**
-     * Perform a synchronization operation on each call site in the given array,
-     * forcing all other threads to throw away any cached values previously
-     * loaded from the target of any of the call sites.
-     * <p>
-     * This operation does not reverse any calls that have already started
-     * on an old target value.
-     * (Java supports {@linkplain java.lang.Object#wait() forward time travel} only.)
-     * <p>
-     * The overall effect is to force all future readers of each call site's target
-     * to accept the most recently stored value.
-     * ("Most recently" is reckoned relative to the {@code sync} itself.)
-     * Conversely, the {@code sync} call may block until all readers have
-     * (somehow) decached all previous versions of each call site's target.
-     * <p>
-     * To avoid race conditions, calls to {@code setTarget} and {@code sync}
-     * should generally be performed under some sort of mutual exclusion.
-     * Note that reader threads may observe an updated target as early
-     * as the {@code setTarget} call that install the value
-     * (and before the {@code sync} that confirms the value).
-     * On the other hand, reader threads may observe previous versions of
-     * the target until the {@code sync} call returns
-     * (and after the {@code setTarget} that attempts to convey the updated version).
-     * <p>
-     * In terms of the Java Memory Model, this operation performs a synchronization
-     * action which is comparable in effect to the writing of a volatile variable
-     * by the current thread, and an eventual volatile read by every other thread
-     * that may access one of the affected call sites.
-     * <p>
-     * The following effects are apparent, for each individual call site {@code S}:
-     * <ul>
-     * <li>A new volatile variable {@code V} is created, and written by the current thread.
-     *     As defined by the JMM, this write is a global synchronization event.
-     * <li>As is normal with thread-local ordering of write events,
-     *     every action already performed by the current thread is
-     *     taken to happen before the volatile write to {@code V}.
-     *     (In some implementations, this means that the current thread
-     *     performs a global release operation.)
-     * <li>Specifically, the write to the current target of {@code S} is
-     *     taken to happen before the volatile write to {@code V}.
-     * <li>The volatile write to {@code V} is placed
-     *     (in an implementation specific manner)
-     *     in the global synchronization order.
-     * <li>Consider an arbitrary thread {@code T} (other than the current thread).
-     *     If {@code T} executes a synchronization action {@code A}
-     *     after the volatile write to {@code V} (in the global synchronization order),
-     *     it is therefore required to see either the current target
-     *     of {@code S}, or a later write to that target,
-     *     if it executes a read on the target of {@code S}.
-     *     (This constraint is called "synchronization-order consistency".)
-     * <li>The JMM specifically allows optimizing compilers to elide
-     *     reads or writes of variables that are known to be useless.
-     *     Such elided reads and writes have no effect on the happens-before
-     *     relation.  Regardless of this fact, the volatile {@code V}
-     *     will not be elided, even though its written value is
-     *     indeterminate and its read value is not used.
-     * </ul>
-     * Because of the last point, the implementation behaves as if a
-     * volatile read of {@code V} were performed by {@code T}
-     * immediately after its action {@code A}.  In the local ordering
-     * of actions in {@code T}, this read happens before any future
-     * read of the target of {@code S}.  It is as if the
-     * implementation arbitrarily picked a read of {@code S}'s target
-     * by {@code T}, and forced a read of {@code V} to precede it,
-     * thereby ensuring communication of the new target value.
-     * <p>
-     * As long as the constraints of the Java Memory Model are obeyed,
-     * implementations may delay the completion of a {@code sync}
-     * operation while other threads ({@code T} above) continue to
-     * use previous values of {@code S}'s target.
-     * However, implementations are (as always) encouraged to avoid
-     * livelock, and to eventually require all threads to take account
-     * of the updated target.
-     * <p>
-     * This operation is likely to be expensive and should be used sparingly.
-     * If possible, it should be buffered for batch processing on sets of call sites.
-     * <p style="font-size:smaller;">
-     * (This is a static method on a set of call sites, not a
-     * virtual method on a single call site, for performance reasons.
-     * Some implementations may incur a large fixed overhead cost
-     * for processing one or more synchronization operations,
-     * but a small incremental cost for each additional call site.
-     * In any case, this operation is likely to be costly, since
-     * other threads may have to be somehow interrupted
-     * in order to make them notice the updated target value.
-     * However, it may be observed that a single call to synchronize
-     * several sites has the same formal effect as many calls,
-     * each on just one of the sites.)
-     * <p>
-     * Simple implementations of {@code MutableCallSite} may use
-     * a volatile variable for the target of a mutable call site.
-     * In such an implementation, the {@code sync} method can be a no-op,
-     * and yet it will conform to the JMM behavior documented above.
-     */
-    public static void sync(MutableCallSite[] sites) {
-        STORE_BARRIER.lazySet(0);
-        // FIXME: NYI
-    }
-    private static final AtomicInteger STORE_BARRIER = new AtomicInteger();
-}
--- a/src/share/classes/java/dyn/NoAccessException.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-/**
- * Thrown to indicate that a caller has attempted to create a method handle
- * which accesses a field, method, or class to which the caller does not have access.
- * This unchecked exception is analogous to {@link IllegalAccessException},
- * which is a checked exception thrown when reflective invocation fails
- * because of an access check.  With method handles, this same access
- * checking is performed by the {@link MethodHandles.Lookup lookup object}
- * on behalf of the method handle creator,
- * at the time of creation.
- * @author John Rose, JSR 292 EG
- * @since 1.7
- */
-public class NoAccessException extends ReflectiveOperationException {
-    private static final long serialVersionUID = 292L;
-
-    /**
-     * Constructs a {@code NoAccessException} with no detail message.
-     */
-    public NoAccessException() {
-        super();
-    }
-
-    /**
-     * Constructs a {@code NoAccessException} with the specified
-     * detail message.
-     *
-     * @param s the detail message
-     */
-    public NoAccessException(String s) {
-        super(s);
-    }
-
-    /**
-     * Constructs a {@code NoAccessException} with the specified cause.
-     *
-     * @param cause the underlying cause of the exception
-     */
-    public NoAccessException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * Constructs a {@code NoAccessException} with the specified
-     * detail message and cause.
-     *
-     * @param s the detail message
-     * @param cause the underlying cause of the exception
-     */
-    public NoAccessException(String s, Throwable cause) {
-        super(s, cause);
-    }
-}
--- a/src/share/classes/java/dyn/Switcher.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2010, 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 java.dyn;
-
-/**
- * <p>
- * A {@code Switcher} is an object which can publish state transitions to other threads.
- * A switcher is initially in the <em>valid</em> state, but may at any time be
- * changed to the <em>invalid</em> state.  Invalidation cannot be reversed.
- * <p>
- * A single switcher may be used to create any number of guarded method handle pairs.
- * Each guarded pair is wrapped in a new method handle {@code M},
- * which is permanently associated with the switcher that created it.
- * Each pair consists of a target {@code T} and a fallback {@code F}.
- * While the switcher is valid, invocations to {@code M} are delegated to {@code T}.
- * After it is invalidated, invocations are delegated to {@code F}.
- * <p>
- * Invalidation is global and immediate, as if the switcher contained a
- * volatile boolean variable consulted on every call to {@code M}.
- * The invalidation is also permanent, which means the switcher
- * can change state only once.
- * <p>
- * Here is an example of a switcher in action:
- * <blockquote><pre>
-MethodType MT_str2 = MethodType.methodType(String.class, String.class);
-MethodHandle MH_strcat = MethodHandles.lookup()
-    .findVirtual(String.class, "concat", MT_str2);
-Switcher switcher = new Switcher();
-// the following steps may be repeated to re-use the same switcher:
-MethodHandle worker1 = strcat;
-MethodHandle worker2 = MethodHandles.permuteArguments(strcat, MT_str2, 1, 0);
-MethodHandle worker = switcher.guardWithTest(worker1, worker2);
-assertEquals("method", (String) worker.invokeExact("met", "hod"));
-switcher.invalidate();
-assertEquals("hodmet", (String) worker.invokeExact("met", "hod"));
- * </pre></blockquote>
- * <p>
- * <em>Implementation Note:</em>
- * A switcher behaves as if implemented on top of {@link MutableCallSite},
- * approximately as follows:
- * <blockquote><pre>
-public class Switcher {
-  private static final MethodHandle
-    K_true  = MethodHandles.constant(boolean.class, true),
-    K_false = MethodHandles.constant(boolean.class, false);
-  private final MutableCallSite mcs;
-  private final MethodHandle mcsInvoker;
-  public Switcher() {
-    this.mcs = new MutableCallSite(K_true);
-    this.mcsInvoker = mcs.dynamicInvoker();
-  }
-  public MethodHandle guardWithTest(
-                MethodHandle target, MethodHandle fallback) {
-    // Note:  mcsInvoker is of type boolean().
-    // Target and fallback may take any arguments, but must have the same type.
-    return MethodHandles.guardWithTest(this.mcsInvoker, target, fallback);
-  }
-  public static void invalidateAll(Switcher[] switchers) {
-    List<MutableCallSite> mcss = new ArrayList<>();
-    for (Switcher s : switchers)  mcss.add(s.mcs);
-    for (MutableCallSite mcs : mcss)  mcs.setTarget(K_false);
-    MutableCallSite.sync(mcss.toArray(new MutableCallSite[0]));
-  }
-}
- * </pre></blockquote>
- * @author Remi Forax, JSR 292 EG
- */
-public class Switcher {
-    private static final MethodHandle
-        K_true  = MethodHandles.constant(boolean.class, true),
-        K_false = MethodHandles.constant(boolean.class, false);
-
-    private final MutableCallSite mcs;
-    private final MethodHandle mcsInvoker;
-
-    /** Create a switcher. */
-    public Switcher() {
-        this.mcs = new MutableCallSite(K_true);
-        this.mcsInvoker = mcs.dynamicInvoker();
-    }
-
-    /**
-     * Return a method handle which always delegates either to the target or the fallback.
-     * The method handle will delegate to the target exactly as long as the switcher is valid.
-     * After that, it will permanently delegate to the fallback.
-     * <p>
-     * The target and fallback must be of exactly the same method type,
-     * and the resulting combined method handle will also be of this type.
-     * @see MethodHandles#guardWithTest
-     */
-    public MethodHandle guardWithTest(MethodHandle target, MethodHandle fallback) {
-        if (mcs.getTarget() == K_false)
-            return fallback;  // already invalid
-        return MethodHandles.guardWithTest(mcsInvoker, target, fallback);
-    }
-
-    /** Set all of the given switchers into the invalid state. */
-    public static void invalidateAll(Switcher[] switchers) {
-        MutableCallSite[] sites = new MutableCallSite[switchers.length];
-        int fillp = 0;
-        for (Switcher switcher : switchers) {
-            sites[fillp++] = switcher.mcs;
-            switcher.mcs.setTarget(K_false);
-        }
-        MutableCallSite.sync(sites);
-    }
-}
--- a/src/share/classes/java/dyn/VolatileCallSite.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2010, 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 java.dyn;
-
-import java.util.List;
-
-/**
- * A {@code VolatileCallSite} is a {@link CallSite} whose target acts like a volatile variable.
- * An {@code invokedynamic} instruction linked to a {@code VolatileCallSite} sees updates
- * to its call site target immediately, even if the update occurs in another thread.
- * There may be a performance penalty for such tight coupling between threads.
- * <p>
- * Unlike {@code MutableCallSite}, there is no
- * {@linkplain MutableCallSite#sync sync operation} on volatile
- * call sites, since every write to a volatile variable is implicitly
- * synchronized with reader threads.
- * <p>
- * In other respects, a {@code VolatileCallSite} is interchangeable
- * with {@code MutableCallSite}.
- * @see MutableCallSite
- * @author John Rose, JSR 292 EG
- */
-public class VolatileCallSite extends CallSite {
-    /** Create a call site with a volatile target.
-     *  The initial target is set to a method handle
-     *  of the given type which will throw {@code IllegalStateException}.
-     * @throws NullPointerException if the proposed type is null
-     */
-    public VolatileCallSite(MethodType type) {
-        super(type);
-    }
-
-    /** Create a call site with a volatile target.
-     *  The target is set to the given value.
-     * @throws NullPointerException if the proposed target is null
-     */
-    public VolatileCallSite(MethodHandle target) {
-        super(target);
-    }
-
-    /** Internal override to nominally final getTarget. */
-    @Override
-    MethodHandle getTarget0() {
-        return getTargetVolatile();
-    }
-
-    /**
-     * Set the target method of this call site, as a volatile variable.
-     * Has the same effect as {@link CallSite#setTarget CallSite.setTarget}, with the additional
-     * effects associated with volatiles, in the Java Memory Model.
-     */
-    @Override public void setTarget(MethodHandle newTarget) {
-        checkTargetChange(getTargetVolatile(), newTarget);
-        setTargetVolatile(newTarget);
-    }
-}
--- a/src/share/classes/java/dyn/WrongMethodTypeException.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 java.dyn;
-
-/**
- * Thrown to indicate that code has attempted to call a method handle
- * via the wrong method type.  As with the bytecode representation of
- * normal Java method calls, method handle calls are strongly typed
- * to a specific signature associated with a call site.
- * <p>
- * This exception may also be thrown when two method handles are
- * composed, and the system detects that their types cannot be
- * matched up correctly.  This amounts to an early evaluation
- * of the type mismatch, at method handle construction time,
- * instead of when the mismatched method handle is called.
- *
- * @author John Rose, JSR 292 EG
- * @since 1.7
- */
-public class WrongMethodTypeException extends RuntimeException {
-    private static final long serialVersionUID = 292L;
-
-    /**
-     * Constructs a {@code WrongMethodTypeException} with no detail message.
-     */
-    public WrongMethodTypeException() {
-        super();
-    }
-
-    /**
-     * Constructs a {@code WrongMethodTypeException} with the specified
-     * detail message.
-     *
-     * @param s the detail message.
-     */
-    public WrongMethodTypeException(String s) {
-        super(s);
-    }
-}
--- a/src/share/classes/java/dyn/package-info.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,466 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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.
- */
-
-/**
- * This package contains dynamic language support provided directly by
- * the Java core class libraries and virtual machine.
- * <p>
- * Certain types in this package have special relations to dynamic
- * language support in the virtual machine:
- * <ul>
- * <li>In source code, a call to
- * {@link java.dyn.MethodHandle#invokeExact   MethodHandle.invokeExact} or
- * {@link java.dyn.MethodHandle#invokeGeneric MethodHandle.invokeGeneric}
- * will compile and link, regardless of the requested type signature.
- * As usual, the Java compiler emits an {@code invokevirtual}
- * instruction with the given signature against the named method.
- * The JVM links any such call (regardless of signature) to a dynamically
- * typed method handle invocation.  In the case of {@code invokeGeneric},
- * argument and return value conversions are applied.
- * </li>
- *
- * <li>The JVM bytecode format supports immediate constants of
- * the classes {@link java.dyn.MethodHandle MethodHandle} and {@link java.dyn.MethodType MethodType}.
- * </li>
- * </ul>
- *
- * <h2><a name="jvm_mods"></a>Corresponding JVM bytecode format changes</h2>
- * <em>The following low-level information is presented here as a preview of
- * changes being made to the Java Virtual Machine specification for JSR 292.
- * This information will be incorporated in a future version of the JVM specification.</em>
- *
- * <h3><a name="indyinsn"></a>{@code invokedynamic} instruction format</h3>
- * In bytecode, an {@code invokedynamic} instruction is formatted as five bytes.
- * The first byte is the opcode 186 (hexadecimal {@code BA}).
- * The next two bytes are a constant pool index (in the same format as for the other {@code invoke} instructions).
- * The final two bytes are reserved for future use and required to be zero.
- * The constant pool reference of an {@code invokedynamic} instruction is to a entry
- * with tag {@code CONSTANT_InvokeDynamic} (decimal 18).  See below for its format.
- * (The tag value 17 is also temporarily allowed.  See below.)
- * The entry specifies the following information:
- * <ul>
- * <li>a bootstrap method (a {@link java.dyn.MethodHandle MethodHandle} constant)</li>
- * <li>the dynamic invocation name (a UTF8 string)</li>
- * <li>the argument and return types of the call (encoded as a signature in a UTF8 string)</li>
- * <li>optionally, a sequence of additional <em>static arguments</em> to the bootstrap method ({@code ldc}-type constants)</li>
- * </ul>
- * <p>
- * Each instance of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
- * Multiple instances of an {@code invokedynamic} instruction can share a single
- * {@code CONSTANT_InvokeDynamic} entry.
- * In any case, distinct call sites always have distinct linkage state.
- * <p>
- * A dynamic call site is originally in an unlinked state.  In this state, there is
- * no target method for the call site to invoke.
- * A dynamic call site is linked by means of a bootstrap method,
- * as <a href="#bsm">described below</a>.
- *
- * <p style="font-size:smaller;">
- * (Historic Note: Some older JVMs may allow the index of a {@code CONSTANT_NameAndType}
- * instead of a {@code CONSTANT_InvokeDynamic}.  In earlier, obsolete versions of this API, the
- * bootstrap method was specified dynamically, in a per-class basis, during class initialization.)
- *
- * <h3><a name="indycon"></a>constant pool entries for {@code invokedynamic} instructions</h3>
- * If a constant pool entry has the tag {@code CONSTANT_InvokeDynamic} (decimal 18),
- * it must contain exactly four more bytes after the tag.
- * These bytes are interpreted as two 16-bit indexes, in the usual {@code u2} format.
- * The first pair of bytes after the tag must be an index into a side table called the
- * <em>bootstrap method table</em>, which is stored in the {@code BootstrapMethods}
- * attribute as <a href="#bsmattr">described below</a>.
- * The second pair of bytes must be an index to a {@code CONSTANT_NameAndType}.
- * This table is not part of the constant pool.  Instead, it is stored
- * in a class attribute named {@code BootstrapMethods}, described below.
- * <p>
- * The first index specifies a bootstrap method used by the associated dynamic call sites.
- * The second index specifies the method name, argument types, and return type of the dynamic call site.
- * The structure of such an entry is therefore analogous to a {@code CONSTANT_Methodref},
- * except that the bootstrap method specifier reference replaces
- * the {@code CONSTANT_Class} reference of a {@code CONSTANT_Methodref} entry.
- * <p>
- * Some older JVMs may allow an older constant pool entry tag of decimal 17.
- * The format and behavior of a constant pool entry with this tag is identical to
- * an entry with a tag of decimal 18, except that the first index refers directly
- * to a {@code CONSTANT_MethodHandle} to use as the bootstrap method.
- * This format does not require the bootstrap method table.
- *
- * <p style="font-size:smaller;">
- * <em>(Note: The Proposed Final Draft of this specification is likely to support
- * only the tag 18, not the tag 17.)</em>
- *
- * <h3><a name="mtcon"></a>constant pool entries for {@linkplain java.dyn.MethodType method types}</h3>
- * If a constant pool entry has the tag {@code CONSTANT_MethodType} (decimal 16),
- * it must contain exactly two more bytes, which must be an index to a {@code CONSTANT_Utf8}
- * entry which represents a method type signature.
- * <p>
- * The JVM will ensure that on first
- * execution of an {@code ldc} instruction for this entry, a {@link java.dyn.MethodType MethodType}
- * will be created which represents the signature.
- * Any classes mentioned in the {@code MethodType} will be loaded if necessary,
- * but not initialized.
- * Access checking and error reporting is performed exactly as it is for
- * references by {@code ldc} instructions to {@code CONSTANT_Class} constants.
- *
- * <h3><a name="mhcon"></a>constant pool entries for {@linkplain java.dyn.MethodHandle method handles}</h3>
- * If a constant pool entry has the tag {@code CONSTANT_MethodHandle} (decimal 15),
- * it must contain exactly three more bytes.  The first byte after the tag is a subtag
- * value which must be in the range 1 through 9, and the last two must be an index to a
- * {@code CONSTANT_Fieldref}, {@code CONSTANT_Methodref}, or
- * {@code CONSTANT_InterfaceMethodref} entry which represents a field or method
- * for which a method handle is to be created.
- * Furthermore, the subtag value and the type of the constant index value
- * must agree according to the table below.
- * <p>
- * The JVM will ensure that on first execution of an {@code ldc} instruction
- * for this entry, a {@link java.dyn.MethodHandle MethodHandle} will be created which represents
- * the field or method reference, according to the specific mode implied by the subtag.
- * <p>
- * As with {@code CONSTANT_Class} and {@code CONSTANT_MethodType} constants,
- * the {@code Class} or {@code MethodType} object which reifies the field or method's
- * type is created.  Any classes mentioned in this reification will be loaded if necessary,
- * but not initialized, and access checking and error reporting performed as usual.
- * <p>
- * The method handle itself will have a type and behavior determined by the subtag as follows:
- * <code>
- * <table border=1 cellpadding=5 summary="CONSTANT_MethodHandle subtypes">
- * <tr><th>N</th><th>subtag name</th><th>member</th><th>MH type</th><th>MH behavior</th></tr>
- * <tr><td>1</td><td>REF_getField</td><td>C.f:T</td><td>(C)T</td><td>getfield C.f:T</td></tr>
- * <tr><td>2</td><td>REF_getStatic</td><td>C.f:T</td><td>(&nbsp;)T</td><td>getstatic C.f:T</td></tr>
- * <tr><td>3</td><td>REF_putField</td><td>C.f:T</td><td>(C,T)void</td><td>putfield C.f:T</td></tr>
- * <tr><td>4</td><td>REF_putStatic</td><td>C.f:T</td><td>(T)void</td><td>putstatic C.f:T</td></tr>
- * <tr><td>5</td><td>REF_invokeVirtual</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokevirtual C.m(A*)T</td></tr>
- * <tr><td>6</td><td>REF_invokeStatic</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokestatic C.m(A*)T</td></tr>
- * <tr><td>7</td><td>REF_invokeSpecial</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokespecial C.m(A*)T</td></tr>
- * <tr><td>8</td><td>REF_newInvokeSpecial</td><td>C.&lt;init&gt;(A*)void</td><td>(A*)C</td><td>new C; dup; invokespecial C.&lt;init&gt;(A*)void</td></tr>
- * <tr><td>9</td><td>REF_invokeInterface</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokeinterface C.m(A*)T</td></tr>
- * </table>
- * </code>
- * <p>
- * The special name {@code <clinit>} is not allowed.
- * The special name {@code <init>} is not allowed except for subtag 8 as shown.
- * <p>
- * The JVM verifier and linker apply the same access checks and restrictions for these references as for the hypothetical
- * bytecode instructions specified in the last column of the table.  In particular, method handles to
- * private and protected members can be created in exactly those classes for which the corresponding
- * normal accesses are legal.
- * <p>
- * A constant may refer to a method or constructor with the {@code varargs}
- * bit (hexadecimal {@code 80}) set in its modifier bitmask.
- * The method handle constant produced for such a method behaves the same
- * as if the {@code varargs} bit were not set.
- * The argument-collecting behavior of {@code varargs} can be emulated by
- * adapting the method handle constant with
- * {@link java.dyn.MethodHandle#asCollector asCollector}.
- * There is no provision for doing this automatically.
- * <p>
- * Although the {@code CONSTANT_MethodHandle} and {@code CONSTANT_MethodType} constant types
- * resolve class names, they do not force class initialization.
- * Method handle constants for subtags {@code REF_getStatic}, {@code REF_putStatic}, and {@code REF_invokeStatic}
- * may force class initialization on their first invocation, just like the corresponding bytecodes.
- * <p>
- * The rules of section 5.4.3 of the
- * <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ConstantPool.doc.html#73492">JVM Specification</a>
- * apply to the resolution of {@code CONSTANT_MethodType}, {@code CONSTANT_MethodHandle},
- * and {@code CONSTANT_InvokeDynamic} constants,
- * by the execution of {@code invokedynamic} and {@code ldc} instructions.
- * (Roughly speaking, this means that every use of a constant pool entry
- * must lead to the same outcome.
- * If the resoultion succeeds, the same object reference is produced
- * by every subsequent execution of the same instruction.
- * If the resolution of the constant causes an error to occur,
- * the same error will be re-thrown on every subsequent attempt
- * to use this particular constant.)
- * <p>
- * Constants created by the resolution of these constant pool types are not necessarily
- * interned.  Except for {@link CONSTANT_Class} and {@link CONSTANT_String} entries,
- * two distinct constant pool entries might not resolve to the same reference
- * even if they contain the same symbolic reference.
- *
- * <h2><a name="bsm"></a>Bootstrap Methods</h2>
- * Before the JVM can execute a dynamic call site (an {@code invokedynamic} instruction),
- * the call site must first be <em>linked</em>.
- * Linking is accomplished by calling a <em>bootstrap method</em>
- * which is given the static information content of the call site,
- * and which must produce a {@link java.dyn.MethodHandle method handle}
- * that gives the behavior of the call site.
- * <p>
- * Each {@code invokedynamic} instruction statically specifies its own
- * bootstrap method as a constant pool reference.
- * The constant pool reference also specifies the call site's name and type signature,
- * just like {@code invokevirtual} and the other invoke instructions.
- * <p>
- * Linking starts with resolving the constant pool entry for the
- * bootstrap method, and resolving a {@link java.dyn.MethodType MethodType} object for
- * the type signature of the dynamic call site.
- * This resolution process may trigger class loading.
- * It may therefore throw an error if a class fails to load.
- * This error becomes the abnormal termination of the dynamic
- * call site execution.
- * Linkage does not trigger class initialization.
- * <p>
- * Next, the bootstrap method call is started, with four or five values being stacked:
- * <ul>
- * <li>a {@code MethodHandle}, the resolved bootstrap method itself </li>
- * <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em> in which dynamic call site occurs </li>
- * <li>a {@code String}, the method name mentioned in the call site </li>
- * <li>a {@code MethodType}, the resolved type signature of the call </li>
- * <li>optionally, a single object representing one or more <a href="#args">additional static arguments</a> </li>
- * </ul>
- * The method handle is then applied to the other values as if by
- * {@link java.dyn.MethodHandle#invokeGeneric invokeGeneric}.
- * The returned result must be a {@link java.dyn.CallSite CallSite} (or a subclass).
- * The type of the call site's target must be exactly equal to the type
- * derived from the dynamic call site signature and passed to
- * the bootstrap method.
- * The call site then becomes permanently linked to the dynamic call site.
- * <p>
- * As long as each bootstrap method can be correctly invoked
- * by <code>invokeGeneric</code>, its detailed type is arbitrary.
- * For example, the first argument could be {@code Object}
- * instead of {@code MethodHandles.Lookup}, and the return type
- * could also be {@code Object} instead of {@code CallSite}.
- * <p>
- * As with any method handle constant, a {@code varargs} modifier bit
- * on the bootstrap method is ignored.
- * <p>
- * Note that the first argument of the bootstrap method cannot be
- * a simple {@code Class} reference.  (This is a change from earlier
- * versions of this specification.  If the caller class is needed,
- * it is easy to {@linkplain java.dyn.MethodHandles.Lookup#lookupClass() extract it}
- * from the {@code Lookup} object.)
- * <p>
- * After resolution, the linkage process may fail in a variety of ways.
- * All failures are reported by an {@link java.dyn.InvokeDynamicBootstrapError InvokeDynamicBootstrapError},
- * which is thrown as the abnormal termination of the dynamic call
- * site execution.
- * The following circumstances will cause this:
- * <ul>
- * <li>the index to the bootstrap method specifier is out of range </li>
- * <li>the bootstrap method cannot be resolved </li>
- * <li>the {@code MethodType} to pass to the bootstrap method cannot be resolved </li>
- * <li>a static argument to the bootstrap method cannot be resolved
- *     (i.e., a {@code CONSTANT_Class}, {@code CONSTANT_MethodType},
- *     or {@code CONSTANT_MethodHandle} argument cannot be linked) </li>
- * <li>the bootstrap method has the wrong arity,
- *     causing {@code invokeGeneric} to throw {@code WrongMethodTypeException} </li>
- * <li>the bootstrap method has a wrong argument or return type </li>
- * <li>the bootstrap method invocation completes abnormally </li>
- * <li>the result from the bootstrap invocation is not a reference to
- *     an object of type {@link java.dyn.CallSite CallSite} </li>
- * <li>the target of the {@code CallSite} does not have a target of
- *     the expected {@code MethodType} </li>
- * </ul>
- *
- * <h3><a name="linktime"></a>timing of linkage</h3>
- * A dynamic call site is linked just before its first execution.
- * The bootstrap method call implementing the linkage occurs within
- * a thread that is attempting a first execution.
- * <p>
- * If there are several such threads, the bootstrap method may be
- * invoked in several threads concurrently.
- * Therefore, bootstrap methods which access global application
- * data must take the usual precautions against race conditions.
- * In any case, every {@code invokedynamic} instruction is either
- * unlinked or linked to a unique {@code CallSite} object.
- * <p>
- * In an application which requires dynamic call sites with individually
- * mutable behaviors, their bootstrap methods should produce distinct
- * {@link java.dyn.CallSite CallSite} objects, one for each linkage request.
- * Alternatively, an application can link a single {@code CallSite} object
- * to several {@code invokedynamic} instructions, in which case
- * a change to the target method will become visible at each of
- * the instructions.
- * <p>
- * If several threads simultaneously execute a bootstrap method for a single dynamic
- * call site, the JVM must choose one {@code CallSite} object and install it visibly to
- * all threads.  Any other bootstrap method calls are allowed to complete, but their
- * results are ignored, and their dynamic call site invocations proceed with the originally
- * chosen target object.
- *
- * <p style="font-size:smaller;">
- * (Historic Note: Unlike some previous versions of this specification,
- * these rules do not enable the JVM to duplicate dynamic call sites,
- * or to issue &ldquo;causeless&rdquo; bootstrap method calls.
- * Every dynamic call site transitions at most once from unlinked to linked,
- * just before its first invocation.)
- *
- * <h3><a name="bsmattr">the {@code BootstrapMethods} attribute </h3>
- * Each {@code CONSTANT_InvokeDynamic} entry contains an index which references
- * a bootstrap method specifier; all such specifiers are contained in a separate array.
- * This array is defined by a class attribute named {@code BootstrapMethods}.
- * The body of this attribute consists of a sequence of byte pairs, all interpreted as
- * as 16-bit counts or constant pool indexes, in the {@code u2} format.
- * The attribute body starts with a count of bootstrap method specifiers,
- * which is immediately followed by the sequence of specifiers.
- * <p>
- * Each bootstrap method specifier contains an index to a
- * {@code CONSTANT_MethodHandle} constant, which is the bootstrap
- * method itself.
- * This is followed by a count, and then a sequence (perhaps empty) of
- * indexes to <a href="#args">additional static arguments</a>
- * for the bootstrap method.
- * <p>
- * During class loading, the verifier must check the structure of the
- * {@code BootstrapMethods} attribute.  In particular, each constant
- * pool index must be of the correct type.  A bootstrap method index
- * must refer to a {@code CONSTANT_MethodHandle} (tag 15).
- * Every other index must refer to a valid operand of an
- * {@code ldc_w} or {@code ldc2_w} instruction (tag 3..8 or 15..16).
- *
- * <h3><a name="args">static arguments to the bootstrap method</h3>
- * An {@code invokedynamic} instruction specifies at least three arguments
- * to pass to its bootstrap method:
- * The caller class (expressed as a {@link java.dyn.MethodHandles.Lookup Lookup object},
- * the name (extracted from the {@code CONSTANT_NameAndType} entry),
- * and the type (also extracted from the {@code CONSTANT_NameAndType} entry).
- * The {@code invokedynamic} instruction may specify additional metadata values
- * to pass to its bootstrap method.
- * Collectively, these values are called <em>static arguments</em> to the
- * {@code invokedynamic} instruction, because they are used once at link
- * time to determine the instruction's behavior on subsequent sets of
- * <em>dynamic arguments</em>.
- * <p>
- * Static arguments are used to communicate application-specific meta-data
- * to the bootstrap method.
- * Drawn from the constant pool, they may include references to classes, method handles,
- * strings, or numeric data that may be relevant to the task of linking that particular call site.
- * <p>
- * Static arguments are specified constant pool indexes stored in the {@code BootstrapMethods} attribute.
- * Before the bootstrap method is invoked, each index is used to compute an {@code Object}
- * reference to the indexed value in the constant pool.
- * If the value is a primitive type, it is converted to a reference by boxing conversion.
- * The valid constant pool entries are listed in this table:
- * <code>
- * <table border=1 cellpadding=5 summary="Static argument types">
- * <tr><th>entry type</th><th>argument type</th><th>argument value</th></tr>
- * <tr><td>CONSTANT_String</td><td><code>java.lang.String</code></td><td>the indexed string literal</td></tr>
- * <tr><td>CONSTANT_Class</td><td><code>java.lang.Class</code></td><td>the indexed class, resolved</td></tr>
- * <tr><td>CONSTANT_Integer</td><td><code>java.lang.Integer</code></td><td>the indexed int value</td></tr>
- * <tr><td>CONSTANT_Long</td><td><code>java.lang.Long</code></td><td>the indexed long value</td></tr>
- * <tr><td>CONSTANT_Float</td><td><code>java.lang.Float</code></td><td>the indexed float value</td></tr>
- * <tr><td>CONSTANT_Double</td><td><code>java.lang.Double</code></td><td>the indexed double value</td></tr>
- * <tr><td>CONSTANT_MethodHandle</td><td><code>java.dyn.MethodHandle</code></td><td>the indexed method handle constant</td></tr>
- * <tr><td>CONSTANT_MethodType</td><td><code>java.dyn.MethodType</code></td><td>the indexed method type constant</td></tr>
- * </table>
- * </code>
- * <p>
- * If a given {@code invokedynamic} instruction specifies no static arguments,
- * the instruction's bootstrap method will be invoked on three arguments,
- * conveying the instruction's caller class, name, and method type.
- * If the {@code invokedynamic} instruction specifies one or more static arguments,
- * a fourth argument will be passed to the bootstrap argument,
- * either an {@code Object} reference to the sole extra argument (if there is one)
- * or an {@code Object} array of references to all the arguments (if there are two or more),
- * as if the bootstrap method is a variable-arity method.
- * <code>
- * <table border=1 cellpadding=5 summary="Static argument types">
- * <tr><th>N</th><th>sample bootstrap method</th></tr>
- * <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
- * <tr><td>1</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
- * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
- * </table>
- * </code>
- * <p>
- * The argument and return types listed here are used by the {@code invokeGeneric}
- * call to the bootstrap method.
- * As noted above, the actual method type of the bootstrap method can vary.
- * For example, the fourth argument could be {@code MethodHandle},
- * if that is the type of the corresponding constant in
- * the {@code CONSTANT_InvokeDynamic} entry.
- * In that case, the {@code invokeGeneric} call will pass the extra method handle
- * constant as an {@code Object}, but the type matching machinery of {@code invokeGeneric}
- * will cast the reference back to {@code MethodHandle} before invoking the bootstrap method.
- * (If a string constant were passed instead, by badly generated code, that cast would then fail.)
- * <p>
- * If the fourth argument is an array, the array element type must be {@code Object},
- * since object arrays (as produced by the JVM at this point) cannot be converted
- * to other array types.
- * <p>
- * If an array is provided, it will appear to be freshly allocated.
- * That is, the same array will not appear to two bootstrap method calls.
- * <p>
- * Extra bootstrap method arguments are intended to allow language implementors
- * to safely and compactly encode metadata.
- * In principle, the name and extra arguments are redundant,
- * since each call site could be given its own unique bootstrap method.
- * Such a practice is likely to produce large class files and constant pools.
- *
- * <p style="font-size:smaller;">
- * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
- * (Usage Note: There is no mechanism for specifying five or more positional arguments to the bootstrap method.
- * If there are two or more arguments, the Java code of the bootstrap method is required to extract them from
- * a varargs-style object array.
- * This design uses varargs because it anticipates some use cases where bootstrap arguments
- * contribute components of variable-length structures, such as virtual function tables
- * or interpreter token streams.
- * Such parameters would be awkward or impossible to manage if represented
- * as normal positional method arguments,
- * since there would need to be one Java method per length.
- * On balance, leaving out the varargs feature would cause more trouble to users than keeping it.
- * Also, this design allows bootstrap methods to be called in a limited JVM stack depth.
- * At both the user and JVM level, the difference between varargs and non-varargs
- * calling sequences can easily be bridged via the
- * {@link java.dyn.MethodHandle#asSpreader asSpreader}
- * and {@link java.dyn.MethodHandle#asSpreader asCollector} methods.)
- *
- * <h2><a name="structs"></a>Structure Summary</h2>
- * <blockquote><pre>// summary of constant and attribute structures
-struct CONSTANT_MethodHandle_info {
-  u1 tag = 15;
-  u1 reference_kind;       // 1..8 (one of REF_invokeVirtual, etc.)
-  u2 reference_index;      // index to CONSTANT_Fieldref or *Methodref
-}
-struct CONSTANT_MethodType_info {
-  u1 tag = 16;
-  u2 descriptor_index;    // index to CONSTANT_Utf8, as in NameAndType
-}
-struct CONSTANT_InvokeDynamic_17_info {
-  u1 tag = 17;
-  u2 bootstrap_method_index;   // index to CONSTANT_MethodHandle
-  u2 name_and_type_index;      // same as for CONSTANT_Methodref, etc.
-}
-struct CONSTANT_InvokeDynamic_info {
-  u1 tag = 18;
-  u2 bootstrap_method_attr_index;  // index into BootstrapMethods_attr
-  u2 name_and_type_index;          // index to CONSTANT_NameAndType, as in Methodref
-}
-struct BootstrapMethods_attr {
- u2 name;  // CONSTANT_Utf8 = "BootstrapMethods"
- u4 size;
- u2 bootstrap_method_count;
- struct bootstrap_method_specifier {
-   u2 bootstrap_method_ref;  // index to CONSTANT_MethodHandle
-   u2 bootstrap_argument_count;
-   u2 bootstrap_arguments[bootstrap_argument_count];  // constant pool indexes
- } bootstrap_methods[bootstrap_method_count];
-}
- * </pre></blockquote>
- * <p>
- * <em>Note: The Proposed Final Draft of JSR 292 may remove the constant tag 17,
- * for the sake of simplicity.</em>
- *
- * @author John Rose, JSR 292 EG
- */
-
-package java.dyn;
--- a/src/share/classes/java/io/Console.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/io/Console.java	Wed Apr 20 04:38:36 2011 +0100
@@ -308,17 +308,29 @@
         char[] passwd = null;
         synchronized (writeLock) {
             synchronized(readLock) {
-                if (fmt.length() != 0)
-                    pw.format(fmt, args);
                 try {
                     echoOff = echo(false);
+                } catch (IOException x) {
+                    throw new IOError(x);
+                }
+                IOError ioe = null;
+                try {
+                    if (fmt.length() != 0)
+                        pw.format(fmt, args);
                     passwd = readline(true);
                 } catch (IOException x) {
-                    throw new IOError(x);
+                    ioe = new IOError(x);
                 } finally {
                     try {
                         echoOff = echo(true);
-                    } catch (IOException xx) {}
+                    } catch (IOException x) {
+                        if (ioe == null)
+                            ioe = new IOError(x);
+                        else
+                            ioe.addSuppressed(x);
+                    }
+                    if (ioe != null)
+                        throw ioe;
                 }
                 pw.println();
             }
--- a/src/share/classes/java/io/File.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/io/File.java	Wed Apr 20 04:38:36 2011 +0100
@@ -2055,7 +2055,7 @@
      *
      * @return  a {@code Path} constructed from this abstract path
      *
-     * @throws  InvalidPathException
+     * @throws  java.nio.file.InvalidPathException
      *          if a {@code Path} object cannot be constructed from the abstract
      *          path (see {@link java.nio.file.FileSystem#getPath FileSystem.getPath})
      *
--- a/src/share/classes/java/lang/AutoCloseable.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/lang/AutoCloseable.java	Wed Apr 20 04:38:36 2011 +0100
@@ -34,12 +34,27 @@
 public interface AutoCloseable {
     /**
      * Closes this resource, relinquishing any underlying resources.
-     * This method is invoked automatically by the {@code
-     * try}-with-resources statement.
+     * This method is invoked automatically on objects managed by the
+     * {@code try}-with-resources statement.
+     *
+     * <p>While this interface method is declared to throw {@code
+     * Exception}, implementers are <em>strongly</em> encouraged to
+     * declare concrete implementations of the {@code close} method to
+     * throw more specific exceptions, or to throw no exception at all
+     * if the close operation cannot fail.
      *
-     * <p>Classes implementing this method are strongly encouraged to
-     * be declared to throw more specific exceptions (or no exception
-     * at all, if the close cannot fail).
+     * <p><em>Implementers of this interface are also strongly advised
+     * to not have the {@code close} method throw {@link
+     * InterruptedException}.</em>
+     *
+     * This exception interacts with a thread's interrupted status,
+     * and runtime misbehavior is likely to occur if an {@code
+     * InterruptedException} is {@linkplain Throwable#addSuppressed
+     * suppressed}.
+     *
+     * More generally, if it would cause problems for an
+     * exception to be suppressed, the {@code AutoCloseable.close}
+     * method should not throw it.
      *
      * <p>Note that unlike the {@link java.io.Closeable#close close}
      * method of {@link java.io.Closeable}, this {@code close} method
@@ -48,9 +63,8 @@
      * visible side effect, unlike {@code Closeable.close} which is
      * required to have no effect if called more than once.
      *
-     * However, while not required to be idempotent, implementers of
-     * this interface are strongly encouraged to make their {@code
-     * close} methods idempotent.
+     * However, implementers of this interface are strongly encouraged
+     * to make their {@code close} methods idempotent.
      *
      * @throws Exception if this resource cannot be closed
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/BootstrapMethodError.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang;
+
+/**
+ * Thrown to indicate that an {@code invokedynamic} instruction has
+ * failed to find its bootstrap method,
+ * or the bootstrap method has failed to provide a
+ * {@linkplain java.lang.invoke.CallSite call site} with a {@linkplain java.lang.invoke.CallSite#getTarget target}
+ * of the correct {@linkplain java.lang.invoke.MethodHandle#type method type}.
+ *
+ * @author John Rose, JSR 292 EG
+ * @since 1.7
+ */
+public class BootstrapMethodError extends LinkageError {
+    private static final long serialVersionUID = 292L;
+
+    /**
+     * Constructs an {@code BootstrapMethodError} with no detail message.
+     */
+    public BootstrapMethodError() {
+        super();
+    }
+
+    /**
+     * Constructs an {@code BootstrapMethodError} with the specified
+     * detail message.
+     *
+     * @param s the detail message.
+     */
+    public BootstrapMethodError(String s) {
+        super(s);
+    }
+
+    /**
+     * Constructs a {@code BootstrapMethodError} with the specified
+     * detail message and cause.
+     *
+     * @param s the detail message.
+     * @param cause the cause, may be {@code null}.
+     */
+    public BootstrapMethodError(String s, Throwable cause) {
+        super(s, cause);
+    }
+
+    /**
+     * Constructs a {@code BootstrapMethodError} with the specified
+     * cause.
+     *
+     * @param cause the cause, may be {@code null}.
+     */
+    public BootstrapMethodError(Throwable cause) {
+        // cf. Throwable(Throwable cause) constructor.
+        super(cause == null ? null : cause.toString());
+        initCause(cause);
+    }
+}
--- a/src/share/classes/java/lang/ClassLoader.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/lang/ClassLoader.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2011, 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
@@ -51,7 +51,6 @@
 import java.util.Hashtable;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
-import sun.misc.BootClassLoaderHook;
 import sun.misc.ClassFileTransformer;
 import sun.misc.CompoundEnumeration;
 import sun.misc.Resource;
@@ -1300,7 +1299,6 @@
      * Find resources from the VM's built-in classloader.
      */
     private static URL getBootstrapResource(String name) {
-        BootClassLoaderHook.preLoadResource(name);
         URLClassPath ucp = getBootstrapClassPath();
         Resource res = ucp.getResource(name);
         return res != null ? res.getURL() : null;
@@ -1628,20 +1626,28 @@
      * @since  1.2
      */
     protected Package getPackage(String name) {
+        Package pkg;
         synchronized (packages) {
-            Package pkg = packages.get(name);
-            if (pkg == null) {
-                if (parent != null) {
-                    pkg = parent.getPackage(name);
-                } else {
-                    pkg = Package.getSystemPackage(name);
-                }
-                if (pkg != null) {
-                    packages.put(name, pkg);
+            pkg = packages.get(name);
+        }
+        if (pkg == null) {
+            if (parent != null) {
+                pkg = parent.getPackage(name);
+            } else {
+                pkg = Package.getSystemPackage(name);
+            }
+            if (pkg != null) {
+                synchronized (packages) {
+                    Package pkg2 = packages.get(name);
+                    if (pkg2 == null) {
+                        packages.put(name, pkg);
+                    } else {
+                        pkg = pkg2;
+                    }
                 }
             }
-            return pkg;
         }
+        return pkg;
     }
 
     /**
@@ -1814,7 +1820,6 @@
     // Invoked in the java.lang.Runtime class to implement load and loadLibrary.
     static void loadLibrary(Class fromClass, String name,
                             boolean isAbsolute) {
-        BootClassLoaderHook.preLoadLibrary(name);
         ClassLoader loader =
             (fromClass == null) ? null : fromClass.getClassLoader();
         if (sys_paths == null) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/ClassValue.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2010, 2011, 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 java.lang;
+
+import java.util.WeakHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Lazily associate a computed value with (potentially) every type.
+ * For example, if a dynamic language needs to construct a message dispatch
+ * table for each class encountered at a message send call site,
+ * it can use a {@code ClassValue} to cache information needed to
+ * perform the message send quickly, for each class encountered.
+ * @author John Rose, JSR 292 EG
+ * @since 1.7
+ */
+public abstract class ClassValue<T> {
+    /**
+     * Computes the given class's derived value for this {@code ClassValue}.
+     * <p>
+     * This method will be invoked within the first thread that accesses
+     * the value with the {@link #get get} method.
+     * <p>
+     * Normally, this method is invoked at most once per class,
+     * but it may be invoked again if there has been a call to
+     * {@link #remove remove}.
+     * <p>
+     * If this method throws an exception, the corresponding call to {@code get}
+     * will terminate abnormally with that exception, and no class value will be recorded.
+     *
+     * @param type the type whose class value must be computed
+     * @return the newly computed value associated with this {@code ClassValue}, for the given class or interface
+     * @see #get
+     * @see #remove
+     */
+    protected abstract T computeValue(Class<?> type);
+
+    /**
+     * Returns the value for the given class.
+     * If no value has yet been computed, it is obtained by
+     * an invocation of the {@link #computeValue computeValue} method.
+     * <p>
+     * The actual installation of the value on the class
+     * is performed atomically.
+     * At that point, if several racing threads have
+     * computed values, one is chosen, and returned to
+     * all the racing threads.
+     * <p>
+     * The {@code type} parameter is typically a class, but it may be any type,
+     * such as an interface, a primitive type (like {@code int.class}), or {@code void.class}.
+     * <p>
+     * In the absence of {@code remove} calls, a class value has a simple
+     * state diagram:  uninitialized and initialized.
+     * When {@code remove} calls are made,
+     * the rules for value observation are more complex.
+     * See the documentation for {@link #remove remove} for more information.
+     *
+     * @param type the type whose class value must be computed or retrieved
+     * @return the current value associated with this {@code ClassValue}, for the given class or interface
+     * @throws NullPointerException if the argument is null
+     * @see #remove
+     * @see #computeValue
+     */
+    public T get(Class<?> type) {
+        ClassValueMap map = getMap(type);
+        if (map != null) {
+            Object x = map.get(this);
+            if (x != null) {
+                return (T) map.unmaskNull(x);
+            }
+        }
+        return setComputedValue(type);
+    }
+
+    /**
+     * Removes the associated value for the given class.
+     * If this value is subsequently {@linkplain #get read} for the same class,
+     * its value will be reinitialized by invoking its {@link #computeValue computeValue} method.
+     * This may result in an additional invocation of the
+     * {@code computeValue computeValue} method for the given class.
+     * <p>
+     * In order to explain the interaction between {@code get} and {@code remove} calls,
+     * we must model the state transitions of a class value to take into account
+     * the alternation between uninitialized and initialized states.
+     * To do this, number these states sequentially from zero, and note that
+     * uninitialized (or removed) states are numbered with even numbers,
+     * while initialized (or re-initialized) states have odd numbers.
+     * <p>
+     * When a thread {@code T} removes a class value in state {@code 2N},
+     * nothing happens, since the class value is already uninitialized.
+     * Otherwise, the state is advanced atomically to {@code 2N+1}.
+     * <p>
+     * When a thread {@code T} queries a class value in state {@code 2N},
+     * the thread first attempts to initialize the class value to state {@code 2N+1}
+     * by invoking {@code computeValue} and installing the resulting value.
+     * <p>
+     * When {@code T} attempts to install the newly computed value,
+     * if the state is still at {@code 2N}, the class value will be initialized
+     * with the computed value, advancing it to state {@code 2N+1}.
+     * <p>
+     * Otherwise, whether the new state is even or odd,
+     * {@code T} will discard the newly computed value
+     * and retry the {@code get} operation.
+     * <p>
+     * Discarding and retrying is an important proviso,
+     * since otherwise {@code T} could potentially install
+     * a disastrously stale value.  For example:
+     * <ul>
+     * <li>{@code T} calls {@code CV.get(C)} and sees state {@code 2N}
+     * <li>{@code T} quickly computes a time-dependent value {@code V0} and gets ready to install it
+     * <li>{@code T} is hit by an unlucky paging or scheduling event, and goes to sleep for a long time
+     * <li>...meanwhile, {@code T2} also calls {@code CV.get(C)} and sees state {@code 2N}
+     * <li>{@code T2} quickly computes a similar time-dependent value {@code V1} and installs it on {@code CV.get(C)}
+     * <li>{@code T2} (or a third thread) then calls {@code CV.remove(C)}, undoing {@code T2}'s work
+     * <li> the previous actions of {@code T2} are repeated several times
+     * <li> also, the relevant computed values change over time: {@code V1}, {@code V2}, ...
+     * <li>...meanwhile, {@code T} wakes up and attempts to install {@code V0}; <em>this must fail</em>
+     * </ul>
+     * We can assume in the above scenario that {@code CV.computeValue} uses locks to properly
+     * observe the time-dependent states as it computes {@code V1}, etc.
+     * This does not remove the threat of a stale value, since there is a window of time
+     * between the return of {@code computeValue} in {@code T} and the installation
+     * of the the new value.  No user synchronization is possible during this time.
+     *
+     * @param type the type whose class value must be removed
+     * @throws NullPointerException if the argument is null
+     */
+    public void remove(Class<?> type) {
+        ClassValueMap map = getMap(type);
+        if (map != null) {
+            synchronized (map) {
+                map.remove(this);
+            }
+        }
+    }
+
+    /// Implementation...
+    // FIXME: Use a data structure here similar that of ThreadLocal (7030453).
+
+    private static final AtomicInteger STORE_BARRIER = new AtomicInteger();
+
+    /** Slow path for {@link #get}. */
+    private T setComputedValue(Class<?> type) {
+        ClassValueMap map = getMap(type);
+        if (map == null) {
+            map = initializeMap(type);
+        }
+        T value = computeValue(type);
+        STORE_BARRIER.lazySet(0);
+        // All stores pending from computeValue are completed.
+        synchronized (map) {
+            // Warm up the table with a null entry.
+            map.preInitializeEntry(this);
+        }
+        STORE_BARRIER.lazySet(0);
+        // All stores pending from table expansion are completed.
+        synchronized (map) {
+            value = (T) map.initializeEntry(this, value);
+            // One might fear a possible race condition here
+            // if the code for map.put has flushed the write
+            // to map.table[*] before the writes to the Map.Entry
+            // are done.  This is not possible, since we have
+            // warmed up the table with an empty entry.
+        }
+        return value;
+    }
+
+    // Replace this map by a per-class slot.
+    private static final WeakHashMap<Class<?>, ClassValueMap> ROOT
+        = new WeakHashMap<Class<?>, ClassValueMap>();
+
+    private static ClassValueMap getMap(Class<?> type) {
+        return ROOT.get(type);
+    }
+
+    private static ClassValueMap initializeMap(Class<?> type) {
+        synchronized (ClassValue.class) {
+            ClassValueMap map = ROOT.get(type);
+            if (map == null)
+                ROOT.put(type, map = new ClassValueMap());
+            return map;
+        }
+    }
+
+    static class ClassValueMap extends WeakHashMap<ClassValue, Object> {
+        /** Make sure this table contains an Entry for the given key, even if it is empty. */
+        void preInitializeEntry(ClassValue key) {
+            if (!this.containsKey(key))
+                this.put(key, null);
+        }
+        /** Make sure this table contains a non-empty Entry for the given key. */
+        Object initializeEntry(ClassValue key, Object value) {
+            Object prior = this.get(key);
+            if (prior != null) {
+                return unmaskNull(prior);
+            }
+            this.put(key, maskNull(value));
+            return value;
+        }
+
+        Object maskNull(Object x) {
+            return x == null ? this : x;
+        }
+        Object unmaskNull(Object x) {
+            return x == this ? null : x;
+        }
+    }
+}
--- a/src/share/classes/java/lang/Package.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/lang/Package.java	Wed Apr 20 04:38:36 2011 +0100
@@ -576,12 +576,10 @@
      * Returns the Manifest for the specified JAR file name.
      */
     private static Manifest loadManifest(String fn) {
-        try {
-            FileInputStream fis = new FileInputStream(fn);
-            JarInputStream jis = new JarInputStream(fis, false);
-            Manifest man = jis.getManifest();
-            jis.close();
-            return man;
+        try (FileInputStream fis = new FileInputStream(fn);
+             JarInputStream jis = new JarInputStream(fis, false))
+        {
+            return jis.getManifest();
         } catch (IOException e) {
             return null;
         }
--- a/src/share/classes/java/lang/System.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/lang/System.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1102,6 +1102,18 @@
      * Initialize the system class.  Called after thread initialization.
      */
     private static void initializeSystemClass() {
+
+        // VM might invoke JNU_NewStringPlatform() to set those encoding
+        // sensitive properties (user.home, user.name, boot.class.path, etc.)
+        // during "props" initialization, in which it may need access, via
+        // System.getProperty(), to the related system encoding property that
+        // have been initialized (put into "props") at early stage of the
+        // initialization. So make sure the "props" is available at the
+        // very beginning of the initialization and all system properties to
+        // be put into it directly.
+        props = new Properties();
+        initProperties(props);  // initialized by the VM
+
         // There are certain system configurations that may be controlled by
         // VM options such as the maximum amount of direct memory and
         // Integer cache size used to support the object identity semantics
@@ -1112,7 +1124,12 @@
         //
         // See java.lang.Integer.IntegerCache and the
         // sun.misc.VM.saveAndRemoveProperties method for example.
-        props = initSystemProperties();
+        //
+        // Save a private copy of the system properties object that
+        // can only be accessed by the internal implementation.  Remove
+        // certain system properties that are not intended for public access.
+        sun.misc.VM.saveAndRemoveProperties(props);
+
 
         lineSeparator = props.getProperty("line.separator");
         sun.misc.Version.init();
@@ -1123,7 +1140,6 @@
         setIn0(new BufferedInputStream(fdIn));
         setOut0(new PrintStream(new BufferedOutputStream(fdOut, 128), true));
         setErr0(new PrintStream(new BufferedOutputStream(fdErr, 128), true));
-
         // Load the zip library now in order to keep java.util.zip.ZipFile
         // from trying to use itself to load this library later.
         loadLibrary("zip");
@@ -1151,18 +1167,6 @@
         setJavaLangAccess();
     }
 
-    private static Properties initSystemProperties() {
-        Properties props = new Properties();
-        initProperties(props);  // initialized by the VM
-
-        // Save a private copy of the system properties object that
-        // can only be accessed by the internal implementation.  Remove
-        // certain system properties that are not intended for public access.
-        sun.misc.VM.saveAndRemoveProperties(props);
-
-        return props;
-    }
-
     private static void setJavaLangAccess() {
         // Allow privileged classes outside of java.lang
         sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){
--- a/src/share/classes/java/lang/Thread.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/lang/Thread.java	Wed Apr 20 04:38:36 2011 +0100
@@ -254,12 +254,6 @@
      */
     public final static int MAX_PRIORITY = 10;
 
-    /* If stop was called before start */
-    private boolean stopBeforeStart;
-
-    /* Remembered Throwable from stop before start */
-    private Throwable throwableFromStop;
-
     /**
      * Returns a reference to the currently executing thread object.
      *
@@ -706,10 +700,6 @@
                   it will be passed up the call stack */
             }
         }
-
-        if (stopBeforeStart) {
-            stop0(throwableFromStop);
-        }
     }
 
     private native void start0();
@@ -820,12 +810,7 @@
      */
     @Deprecated
     public final void stop() {
-        // If the thread is already dead, return.
-        // A zero status value corresponds to "NEW".
-        if ((threadStatus != 0) && !isAlive()) {
-            return;
-        }
-        stop1(new ThreadDeath());
+        stop(new ThreadDeath());
     }
 
     /**
@@ -879,36 +864,25 @@
      */
     @Deprecated
     public final synchronized void stop(Throwable obj) {
-        stop1(obj);
-    }
+        if (obj == null)
+            throw new NullPointerException();
 
-    /**
-     * Common impl for stop() and stop(Throwable).
-     */
-    private final synchronized void stop1(Throwable th) {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
             checkAccess();
             if ((this != Thread.currentThread()) ||
-                (!(th instanceof ThreadDeath))) {
+                (!(obj instanceof ThreadDeath))) {
                 security.checkPermission(SecurityConstants.STOP_THREAD_PERMISSION);
             }
         }
-        // A zero status value corresponds to "NEW"
+        // A zero status value corresponds to "NEW", it can't change to
+        // not-NEW because we hold the lock.
         if (threadStatus != 0) {
             resume(); // Wake up thread if it was suspended; no-op otherwise
-            stop0(th);
-        } else {
+        }
 
-            // Must do the null arg check that the VM would do with stop0
-            if (th == null) {
-                throw new NullPointerException();
-            }
-
-            // Remember this stop attempt for if/when start is used
-            stopBeforeStart = true;
-            throwableFromStop = th;
-        }
+        // The VM can handle all thread states
+        stop0(obj);
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/AdapterMethodHandle.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,943 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.VerifyType;
+import sun.invoke.util.Wrapper;
+import java.util.Arrays;
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * This method handle performs simple conversion or checking of a single argument.
+ * @author jrose
+ */
+class AdapterMethodHandle extends BoundMethodHandle {
+
+    //MethodHandle vmtarget;   // next AMH or BMH in chain or final DMH
+    //Object       argument;   // parameter to the conversion if needed
+    //int          vmargslot;  // which argument slot is affected
+    private final int conversion;  // the type of conversion: RETYPE_ONLY, etc.
+
+    // Constructors in this class *must* be package scoped or private.
+    private AdapterMethodHandle(MethodHandle target, MethodType newType,
+                long conv, Object convArg) {
+        super(newType, convArg, newType.parameterSlotDepth(1+convArgPos(conv)));
+        this.conversion = convCode(conv);
+        // JVM might update VM-specific bits of conversion (ignore)
+        MethodHandleNatives.init(this, target, convArgPos(conv));
+    }
+    private AdapterMethodHandle(MethodHandle target, MethodType newType,
+                long conv) {
+        this(target, newType, conv, null);
+    }
+
+    // TO DO:  When adapting another MH with a null conversion, clone
+    // the target and change its type, instead of adding another layer.
+
+    /** Can a JVM-level adapter directly implement the proposed
+     *  argument conversions, as if by MethodHandles.convertArguments?
+     */
+    static boolean canPairwiseConvert(MethodType newType, MethodType oldType) {
+        // same number of args, of course
+        int len = newType.parameterCount();
+        if (len != oldType.parameterCount())
+            return false;
+
+        // Check return type.  (Not much can be done with it.)
+        Class<?> exp = newType.returnType();
+        Class<?> ret = oldType.returnType();
+        if (!VerifyType.isNullConversion(ret, exp))
+            return false;
+
+        // Check args pairwise.
+        for (int i = 0; i < len; i++) {
+            Class<?> src = newType.parameterType(i); // source type
+            Class<?> dst = oldType.parameterType(i); // destination type
+            if (!canConvertArgument(src, dst))
+                return false;
+        }
+
+        return true;
+    }
+
+    /** Can a JVM-level adapter directly implement the proposed
+     *  argument conversion, as if by MethodHandles.convertArguments?
+     */
+    static boolean canConvertArgument(Class<?> src, Class<?> dst) {
+        // ? Retool this logic to use RETYPE_ONLY, CHECK_CAST, etc., as opcodes,
+        // so we don't need to repeat so much decision making.
+        if (VerifyType.isNullConversion(src, dst)) {
+            return true;
+        } else if (src.isPrimitive()) {
+            if (dst.isPrimitive())
+                return canPrimCast(src, dst);
+            else
+                return canBoxArgument(src, dst);
+        } else {
+            if (dst.isPrimitive())
+                return canUnboxArgument(src, dst);
+            else
+                return true;  // any two refs can be interconverted
+        }
+    }
+
+    /**
+     * Create a JVM-level adapter method handle to conform the given method
+     * handle to the similar newType, using only pairwise argument conversions.
+     * For each argument, convert incoming argument to the exact type needed.
+     * Only null conversions are allowed on the return value (until
+     * the JVM supports ricochet adapters).
+     * The argument conversions allowed are casting, unboxing,
+     * integral widening or narrowing, and floating point widening or narrowing.
+     * @param newType required call type
+     * @param target original method handle
+     * @return an adapter to the original handle with the desired new type,
+     *          or the original target if the types are already identical
+     *          or null if the adaptation cannot be made
+     */
+    static MethodHandle makePairwiseConvert(MethodType newType, MethodHandle target) {
+        MethodType oldType = target.type();
+        if (newType == oldType)  return target;
+
+        if (!canPairwiseConvert(newType, oldType))
+            return null;
+        // (after this point, it is an assertion error to fail to convert)
+
+        // Find last non-trivial conversion (if any).
+        int lastConv = newType.parameterCount()-1;
+        while (lastConv >= 0) {
+            Class<?> src = newType.parameterType(lastConv); // source type
+            Class<?> dst = oldType.parameterType(lastConv); // destination type
+            if (VerifyType.isNullConversion(src, dst)) {
+                --lastConv;
+            } else {
+                break;
+            }
+        }
+        // Now build a chain of one or more adapters.
+        MethodHandle adapter = target;
+        MethodType midType = oldType.changeReturnType(newType.returnType());
+        for (int i = 0; i <= lastConv; i++) {
+            Class<?> src = newType.parameterType(i); // source type
+            Class<?> dst = midType.parameterType(i); // destination type
+            if (VerifyType.isNullConversion(src, dst)) {
+                // do nothing: difference is trivial
+                continue;
+            }
+            // Work the current type backward toward the desired caller type:
+            if (i != lastConv) {
+                midType = midType.changeParameterType(i, src);
+            } else {
+                // When doing the last (or only) real conversion,
+                // force all remaining null conversions to happen also.
+                assert(VerifyType.isNullConversion(newType, midType.changeParameterType(i, src)));
+                midType = newType;
+            }
+
+            // Tricky case analysis follows.
+            // It parallels canConvertArgument() above.
+            if (src.isPrimitive()) {
+                if (dst.isPrimitive()) {
+                    adapter = makePrimCast(midType, adapter, i, dst);
+                } else {
+                    adapter = makeBoxArgument(midType, adapter, i, dst);
+                }
+            } else {
+                if (dst.isPrimitive()) {
+                    // Caller has boxed a primitive.  Unbox it for the target.
+                    // The box type must correspond exactly to the primitive type.
+                    // This is simpler than the powerful set of widening
+                    // conversions supported by reflect.Method.invoke.
+                    // Those conversions require a big nest of if/then/else logic,
+                    // which we prefer to make a user responsibility.
+                    adapter = makeUnboxArgument(midType, adapter, i, dst);
+                } else {
+                    // Simple reference conversion.
+                    // Note:  Do not check for a class hierarchy relation
+                    // between src and dst.  In all cases a 'null' argument
+                    // will pass the cast conversion.
+                    adapter = makeCheckCast(midType, adapter, i, dst);
+                }
+            }
+            assert(adapter != null);
+            assert(adapter.type() == midType);
+        }
+        if (adapter.type() != newType) {
+            // Only trivial conversions remain.
+            adapter = makeRetypeOnly(newType, adapter);
+            assert(adapter != null);
+            // Actually, that's because there were no non-trivial ones:
+            assert(lastConv == -1);
+        }
+        assert(adapter.type() == newType);
+        return adapter;
+    }
+
+    /**
+     * Create a JVM-level adapter method handle to permute the arguments
+     * of the given method.
+     * @param newType required call type
+     * @param target original method handle
+     * @param argumentMap for each target argument, position of its source in newType
+     * @return an adapter to the original handle with the desired new type,
+     *          or the original target if the types are already identical
+     *          and the permutation is null
+     * @throws IllegalArgumentException if the adaptation cannot be made
+     *          directly by a JVM-level adapter, without help from Java code
+     */
+    static MethodHandle makePermutation(MethodType newType, MethodHandle target,
+                int[] argumentMap) {
+        MethodType oldType = target.type();
+        boolean nullPermutation = true;
+        for (int i = 0; i < argumentMap.length; i++) {
+            int pos = argumentMap[i];
+            if (pos != i)
+                nullPermutation = false;
+            if (pos < 0 || pos >= newType.parameterCount()) {
+                argumentMap = new int[0]; break;
+            }
+        }
+        if (argumentMap.length != oldType.parameterCount())
+            throw newIllegalArgumentException("bad permutation: "+Arrays.toString(argumentMap));
+        if (nullPermutation) {
+            MethodHandle res = makePairwiseConvert(newType, target);
+            // well, that was easy
+            if (res == null)
+                throw newIllegalArgumentException("cannot convert pairwise: "+newType);
+            return res;
+        }
+
+        // Check return type.  (Not much can be done with it.)
+        Class<?> exp = newType.returnType();
+        Class<?> ret = oldType.returnType();
+        if (!VerifyType.isNullConversion(ret, exp))
+            throw newIllegalArgumentException("bad return conversion for "+newType);
+
+        // See if the argument types match up.
+        for (int i = 0; i < argumentMap.length; i++) {
+            int j = argumentMap[i];
+            Class<?> src = newType.parameterType(j);
+            Class<?> dst = oldType.parameterType(i);
+            if (!VerifyType.isNullConversion(src, dst))
+                throw newIllegalArgumentException("bad argument #"+j+" conversion for "+newType);
+        }
+
+        // Now figure out a nice mix of SWAP, ROT, DUP, and DROP adapters.
+        // A workable greedy algorithm is as follows:
+        // Drop unused outgoing arguments (right to left: shallowest first).
+        // Duplicate doubly-used outgoing arguments (left to right: deepest first).
+        // Then the remaining problem is a true argument permutation.
+        // Marshal the outgoing arguments as required from left to right.
+        // That is, find the deepest outgoing stack position that does not yet
+        // have the correct argument value, and correct at least that position
+        // by swapping or rotating in the misplaced value (from a shallower place).
+        // If the misplaced value is followed by one or more consecutive values
+        // (also misplaced)  issue a rotation which brings as many as possible
+        // into position.  Otherwise make progress with either a swap or a
+        // rotation.  Prefer the swap as cheaper, but do not use it if it
+        // breaks a slot pair.  Prefer the rotation over the swap if it would
+        // preserve more consecutive values shallower than the target position.
+        // When more than one rotation will work (because the required value
+        // is already adjacent to the target position), then use a rotation
+        // which moves the old value in the target position adjacent to
+        // one of its consecutive values.  Also, prefer shorter rotation
+        // spans, since they use fewer memory cycles for shuffling.
+
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    private static byte basicType(Class<?> type) {
+        if (type == null)  return T_VOID;
+        switch (Wrapper.forBasicType(type)) {
+            case BOOLEAN:  return T_BOOLEAN;
+            case CHAR:     return T_CHAR;
+            case FLOAT:    return T_FLOAT;
+            case DOUBLE:   return T_DOUBLE;
+            case BYTE:     return T_BYTE;
+            case SHORT:    return T_SHORT;
+            case INT:      return T_INT;
+            case LONG:     return T_LONG;
+            case OBJECT:   return T_OBJECT;
+            case VOID:     return T_VOID;
+        }
+        return 99; // T_ILLEGAL or some such
+    }
+
+    /** Number of stack slots for the given type.
+     *  Two for T_DOUBLE and T_FLOAT, one for the rest.
+     */
+    private static int type2size(int type) {
+        assert(type >= T_BOOLEAN && type <= T_OBJECT);
+        return (type == T_LONG || type == T_DOUBLE) ? 2 : 1;
+    }
+    private static int type2size(Class<?> type) {
+        return type2size(basicType(type));
+    }
+
+    /** The given stackMove is the number of slots pushed.
+     * It might be negative.  Scale it (multiply) by the
+     * VM's notion of how an address changes with a push,
+     * to get the raw SP change for stackMove.
+     * Then shift and mask it into the correct field.
+     */
+    private static long insertStackMove(int stackMove) {
+        // following variable must be long to avoid sign extension after '<<'
+        long spChange = stackMove * MethodHandleNatives.JVM_STACK_MOVE_UNIT;
+        return (spChange & CONV_STACK_MOVE_MASK) << CONV_STACK_MOVE_SHIFT;
+    }
+
+    /** Construct an adapter conversion descriptor for a single-argument conversion. */
+    private static long makeConv(int convOp, int argnum, int src, int dest) {
+        assert(src  == (src  & 0xF));
+        assert(dest == (dest & 0xF));
+        assert(convOp >= OP_CHECK_CAST && convOp <= OP_PRIM_TO_REF);
+        int stackMove = type2size(dest) - type2size(src);
+        return ((long) argnum << 32 |
+                (long) convOp << CONV_OP_SHIFT |
+                (int)  src    << CONV_SRC_TYPE_SHIFT |
+                (int)  dest   << CONV_DEST_TYPE_SHIFT |
+                insertStackMove(stackMove)
+                );
+    }
+    private static long makeConv(int convOp, int argnum, int stackMove) {
+        assert(convOp >= OP_DUP_ARGS && convOp <= OP_SPREAD_ARGS);
+        byte src = 0, dest = 0;
+        if (convOp >= OP_COLLECT_ARGS && convOp <= OP_SPREAD_ARGS)
+            src = dest = T_OBJECT;
+        return ((long) argnum << 32 |
+                (long) convOp << CONV_OP_SHIFT |
+                (int)  src    << CONV_SRC_TYPE_SHIFT |
+                (int)  dest   << CONV_DEST_TYPE_SHIFT |
+                insertStackMove(stackMove)
+                );
+    }
+    private static long makeSwapConv(int convOp, int srcArg, byte type, int destSlot) {
+        assert(convOp >= OP_SWAP_ARGS && convOp <= OP_ROT_ARGS);
+        return ((long) srcArg << 32 |
+                (long) convOp << CONV_OP_SHIFT |
+                (int)  type   << CONV_SRC_TYPE_SHIFT |
+                (int)  type   << CONV_DEST_TYPE_SHIFT |
+                (int)  destSlot << CONV_VMINFO_SHIFT
+                );
+    }
+    private static long makeConv(int convOp) {
+        assert(convOp == OP_RETYPE_ONLY || convOp == OP_RETYPE_RAW);
+        return ((long)-1 << 32) | (convOp << CONV_OP_SHIFT);   // stackMove, src, dst all zero
+    }
+    private static int convCode(long conv) {
+        return (int)conv;
+    }
+    private static int convArgPos(long conv) {
+        return (int)(conv >>> 32);
+    }
+    private static boolean convOpSupported(int convOp) {
+        assert(convOp >= 0 && convOp <= CONV_OP_LIMIT);
+        return ((1<<convOp) & MethodHandleNatives.CONV_OP_IMPLEMENTED_MASK) != 0;
+    }
+
+    /** One of OP_RETYPE_ONLY, etc. */
+    int conversionOp() { return (conversion & CONV_OP_MASK) >> CONV_OP_SHIFT; }
+
+    /* Return one plus the position of the first non-trivial difference
+     * between the given types.  This is not a symmetric operation;
+     * we are considering adapting the targetType to adapterType.
+     * Trivial differences are those which could be ignored by the JVM
+     * without subverting the verifier.  Otherwise, adaptable differences
+     * are ones for which we could create an adapter to make the type change.
+     * Return zero if there are no differences (other than trivial ones).
+     * Return 1+N if N is the only adaptable argument difference.
+     * Return the -2-N where N is the first of several adaptable
+     * argument differences.
+     * Return -1 if there there are differences which are not adaptable.
+     */
+    private static int diffTypes(MethodType adapterType,
+                                 MethodType targetType,
+                                 boolean raw) {
+        int diff;
+        diff = diffReturnTypes(adapterType, targetType, raw);
+        if (diff != 0)  return diff;
+        int nargs = adapterType.parameterCount();
+        if (nargs != targetType.parameterCount())
+            return -1;
+        diff = diffParamTypes(adapterType, 0, targetType, 0, nargs, raw);
+        //System.out.println("diff "+adapterType);
+        //System.out.println("  "+diff+" "+targetType);
+        return diff;
+    }
+    private static int diffReturnTypes(MethodType adapterType,
+                                       MethodType targetType,
+                                       boolean raw) {
+        Class<?> src = targetType.returnType();
+        Class<?> dst = adapterType.returnType();
+        if ((!raw
+             ? VerifyType.canPassUnchecked(src, dst)
+             : VerifyType.canPassRaw(src, dst)
+             ) > 0)
+            return 0;  // no significant difference
+        if (raw && !src.isPrimitive() && !dst.isPrimitive())
+            return 0;  // can force a reference return (very carefully!)
+        //if (false)  return 1;  // never adaptable!
+        return -1;  // some significant difference
+    }
+    private static int diffParamTypes(MethodType adapterType, int astart,
+                                      MethodType targetType, int tstart,
+                                      int nargs, boolean raw) {
+        assert(nargs >= 0);
+        int res = 0;
+        for (int i = 0; i < nargs; i++) {
+            Class<?> src  = adapterType.parameterType(astart+i);
+            Class<?> dest = targetType.parameterType(tstart+i);
+            if ((!raw
+                 ? VerifyType.canPassUnchecked(src, dest)
+                 : VerifyType.canPassRaw(src, dest)
+                ) <= 0) {
+                // found a difference; is it the only one so far?
+                if (res != 0)
+                    return -1-res; // return -2-i for prev. i
+                res = 1+i;
+            }
+        }
+        return res;
+    }
+
+    /** Can a retyping adapter (alone) validly convert the target to newType? */
+    static boolean canRetypeOnly(MethodType newType, MethodType targetType) {
+        return canRetype(newType, targetType, false);
+    }
+    /** Can a retyping adapter (alone) convert the target to newType?
+     *  It is allowed to widen subword types and void to int, to make bitwise
+     *  conversions between float/int and double/long, and to perform unchecked
+     *  reference conversions on return.  This last feature requires that the
+     *  caller be trusted, and perform explicit cast conversions on return values.
+     */
+    static boolean canRetypeRaw(MethodType newType, MethodType targetType) {
+        return canRetype(newType, targetType, true);
+    }
+    static boolean canRetype(MethodType newType, MethodType targetType, boolean raw) {
+        if (!convOpSupported(raw ? OP_RETYPE_RAW : OP_RETYPE_ONLY))  return false;
+        int diff = diffTypes(newType, targetType, raw);
+        // %%% This assert is too strong.  Factor diff into VerifyType and reconcile.
+        assert(raw || (diff == 0) == VerifyType.isNullConversion(newType, targetType));
+        return diff == 0;
+    }
+
+    /** Factory method:  Performs no conversions; simply retypes the adapter.
+     *  Allows unchecked argument conversions pairwise, if they are safe.
+     *  Returns null if not possible.
+     */
+    static MethodHandle makeRetypeOnly(MethodType newType, MethodHandle target) {
+        return makeRetype(newType, target, false);
+    }
+    static MethodHandle makeRetypeRaw(MethodType newType, MethodHandle target) {
+        return makeRetype(newType, target, true);
+    }
+    static MethodHandle makeRetype(MethodType newType, MethodHandle target, boolean raw) {
+        MethodType oldType = target.type();
+        if (oldType == newType)  return target;
+        if (!canRetype(newType, oldType, raw))
+            return null;
+        // TO DO:  clone the target guy, whatever he is, with new type.
+        return new AdapterMethodHandle(target, newType, makeConv(raw ? OP_RETYPE_RAW : OP_RETYPE_ONLY));
+    }
+
+    static MethodHandle makeVarargsCollector(MethodHandle target, Class<?> arrayType) {
+        return new AsVarargsCollector(target, arrayType);
+    }
+
+    static class AsVarargsCollector extends AdapterMethodHandle {
+        final MethodHandle target;
+        final Class<?> arrayType;
+        MethodHandle cache;
+
+        AsVarargsCollector(MethodHandle target, Class<?> arrayType) {
+            super(target, target.type(), makeConv(OP_RETYPE_ONLY));
+            this.target = target;
+            this.arrayType = arrayType;
+            this.cache = target.asCollector(arrayType, 0);
+        }
+
+        @Override
+        public boolean isVarargsCollector() {
+            return true;
+        }
+
+        @Override
+        public MethodHandle asType(MethodType newType) {
+            MethodType type = this.type();
+            int collectArg = type.parameterCount() - 1;
+            int newArity = newType.parameterCount();
+            if (newArity == collectArg+1 &&
+                type.parameterType(collectArg).isAssignableFrom(newType.parameterType(collectArg))) {
+                // if arity and trailing parameter are compatible, do normal thing
+                return super.asType(newType);
+            }
+            // check cache
+            if (cache.type().parameterCount() == newArity)
+                return cache.asType(newType);
+            // build and cache a collector
+            int arrayLength = newArity - collectArg;
+            MethodHandle collector;
+            try {
+                collector = target.asCollector(arrayType, arrayLength);
+            } catch (IllegalArgumentException ex) {
+                throw new WrongMethodTypeException("cannot build collector");
+            }
+            cache = collector;
+            return collector.asType(newType);
+        }
+
+        @Override
+        public MethodHandle asVarargsCollector(Class<?> arrayType) {
+            MethodType type = this.type();
+            if (type.parameterType(type.parameterCount()-1) == arrayType)
+                return this;
+            return super.asVarargsCollector(arrayType);
+        }
+    }
+
+    /** Can a checkcast adapter validly convert the target to newType?
+     *  The JVM supports all kind of reference casts, even silly ones.
+     */
+    static boolean canCheckCast(MethodType newType, MethodType targetType,
+                int arg, Class<?> castType) {
+        if (!convOpSupported(OP_CHECK_CAST))  return false;
+        Class<?> src = newType.parameterType(arg);
+        Class<?> dst = targetType.parameterType(arg);
+        if (!canCheckCast(src, castType)
+                || !VerifyType.isNullConversion(castType, dst))
+            return false;
+        int diff = diffTypes(newType, targetType, false);
+        return (diff == arg+1);  // arg is sole non-trivial diff
+    }
+    /** Can an primitive conversion adapter validly convert src to dst? */
+    static boolean canCheckCast(Class<?> src, Class<?> dst) {
+        return (!src.isPrimitive() && !dst.isPrimitive());
+    }
+
+    /** Factory method:  Forces a cast at the given argument.
+     *  The castType is the target of the cast, and can be any type
+     *  with a null conversion to the corresponding target parameter.
+     *  Return null if this cannot be done.
+     */
+    static MethodHandle makeCheckCast(MethodType newType, MethodHandle target,
+                int arg, Class<?> castType) {
+        if (!canCheckCast(newType, target.type(), arg, castType))
+            return null;
+        long conv = makeConv(OP_CHECK_CAST, arg, T_OBJECT, T_OBJECT);
+        return new AdapterMethodHandle(target, newType, conv, castType);
+    }
+
+    /** Can an primitive conversion adapter validly convert the target to newType?
+     *  The JVM currently supports all conversions except those between
+     *  floating and integral types.
+     */
+    static boolean canPrimCast(MethodType newType, MethodType targetType,
+                int arg, Class<?> convType) {
+        if (!convOpSupported(OP_PRIM_TO_PRIM))  return false;
+        Class<?> src = newType.parameterType(arg);
+        Class<?> dst = targetType.parameterType(arg);
+        if (!canPrimCast(src, convType)
+                || !VerifyType.isNullConversion(convType, dst))
+            return false;
+        int diff = diffTypes(newType, targetType, false);
+        return (diff == arg+1);  // arg is sole non-trivial diff
+    }
+    /** Can an primitive conversion adapter validly convert src to dst? */
+    static boolean canPrimCast(Class<?> src, Class<?> dst) {
+        if (src == dst || !src.isPrimitive() || !dst.isPrimitive()) {
+            return false;
+        } else if (Wrapper.forPrimitiveType(dst).isFloating()) {
+            // both must be floating types
+            return Wrapper.forPrimitiveType(src).isFloating();
+        } else {
+            // both are integral, and all combinations work fine
+            assert(Wrapper.forPrimitiveType(src).isIntegral() &&
+                   Wrapper.forPrimitiveType(dst).isIntegral());
+            return true;
+        }
+    }
+
+    /** Factory method:  Truncate the given argument with zero or sign extension,
+     *  and/or convert between single and doubleword versions of integer or float.
+     *  The convType is the target of the conversion, and can be any type
+     *  with a null conversion to the corresponding target parameter.
+     *  Return null if this cannot be done.
+     */
+    static MethodHandle makePrimCast(MethodType newType, MethodHandle target,
+                int arg, Class<?> convType) {
+        MethodType oldType = target.type();
+        if (!canPrimCast(newType, oldType, arg, convType))
+            return null;
+        Class<?> src = newType.parameterType(arg);
+        long conv = makeConv(OP_PRIM_TO_PRIM, arg, basicType(src), basicType(convType));
+        return new AdapterMethodHandle(target, newType, conv);
+    }
+
+    /** Can an unboxing conversion validly convert src to dst?
+     *  The JVM currently supports all kinds of casting and unboxing.
+     *  The convType is the unboxed type; it can be either a primitive or wrapper.
+     */
+    static boolean canUnboxArgument(MethodType newType, MethodType targetType,
+                int arg, Class<?> convType) {
+        if (!convOpSupported(OP_REF_TO_PRIM))  return false;
+        Class<?> src = newType.parameterType(arg);
+        Class<?> dst = targetType.parameterType(arg);
+        Class<?> boxType = Wrapper.asWrapperType(convType);
+        convType = Wrapper.asPrimitiveType(convType);
+        if (!canCheckCast(src, boxType)
+                || boxType == convType
+                || !VerifyType.isNullConversion(convType, dst))
+            return false;
+        int diff = diffTypes(newType, targetType, false);
+        return (diff == arg+1);  // arg is sole non-trivial diff
+    }
+    /** Can an primitive unboxing adapter validly convert src to dst? */
+    static boolean canUnboxArgument(Class<?> src, Class<?> dst) {
+        return (!src.isPrimitive() && Wrapper.asPrimitiveType(dst).isPrimitive());
+    }
+
+    /** Factory method:  Unbox the given argument.
+     *  Return null if this cannot be done.
+     */
+    static MethodHandle makeUnboxArgument(MethodType newType, MethodHandle target,
+                int arg, Class<?> convType) {
+        MethodType oldType = target.type();
+        Class<?> src = newType.parameterType(arg);
+        Class<?> dst = oldType.parameterType(arg);
+        Class<?> boxType = Wrapper.asWrapperType(convType);
+        Class<?> primType = Wrapper.asPrimitiveType(convType);
+        if (!canUnboxArgument(newType, oldType, arg, convType))
+            return null;
+        MethodType castDone = newType;
+        if (!VerifyType.isNullConversion(src, boxType))
+            castDone = newType.changeParameterType(arg, boxType);
+        long conv = makeConv(OP_REF_TO_PRIM, arg, T_OBJECT, basicType(primType));
+        MethodHandle adapter = new AdapterMethodHandle(target, castDone, conv, boxType);
+        if (castDone == newType)
+            return adapter;
+        return makeCheckCast(newType, adapter, arg, boxType);
+    }
+
+    /** Can an primitive boxing adapter validly convert src to dst? */
+    static boolean canBoxArgument(Class<?> src, Class<?> dst) {
+        if (!convOpSupported(OP_PRIM_TO_REF))  return false;
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    /** Factory method:  Unbox the given argument.
+     *  Return null if this cannot be done.
+     */
+    static MethodHandle makeBoxArgument(MethodType newType, MethodHandle target,
+                int arg, Class<?> convType) {
+        // this is difficult to do in the JVM because it must GC
+        return null;
+    }
+
+    /** Can an adapter simply drop arguments to convert the target to newType? */
+    static boolean canDropArguments(MethodType newType, MethodType targetType,
+                int dropArgPos, int dropArgCount) {
+        if (dropArgCount == 0)
+            return canRetypeOnly(newType, targetType);
+        if (!convOpSupported(OP_DROP_ARGS))  return false;
+        if (diffReturnTypes(newType, targetType, false) != 0)
+            return false;
+        int nptypes = newType.parameterCount();
+        // parameter types must be the same up to the drop point
+        if (dropArgPos != 0 && diffParamTypes(newType, 0, targetType, 0, dropArgPos, false) != 0)
+            return false;
+        int afterPos = dropArgPos + dropArgCount;
+        int afterCount = nptypes - afterPos;
+        if (dropArgPos < 0 || dropArgPos >= nptypes ||
+            dropArgCount < 1 || afterPos > nptypes ||
+            targetType.parameterCount() != nptypes - dropArgCount)
+            return false;
+        // parameter types after the drop point must also be the same
+        if (afterCount != 0 && diffParamTypes(newType, afterPos, targetType, dropArgPos, afterCount, false) != 0)
+            return false;
+        return true;
+    }
+
+    /** Factory method:  Drop selected arguments.
+     *  Allow unchecked retyping of remaining arguments, pairwise.
+     *  Return null if this is not possible.
+     */
+    static MethodHandle makeDropArguments(MethodType newType, MethodHandle target,
+                int dropArgPos, int dropArgCount) {
+        if (dropArgCount == 0)
+            return makeRetypeOnly(newType, target);
+        if (!canDropArguments(newType, target.type(), dropArgPos, dropArgCount))
+            return null;
+        // in  arglist: [0: ...keep1 | dpos: drop... | dpos+dcount: keep2... ]
+        // out arglist: [0: ...keep1 |                        dpos: keep2... ]
+        int keep2InPos  = dropArgPos + dropArgCount;
+        int dropSlot    = newType.parameterSlotDepth(keep2InPos);
+        int keep1InSlot = newType.parameterSlotDepth(dropArgPos);
+        int slotCount   = keep1InSlot - dropSlot;
+        assert(slotCount >= dropArgCount);
+        assert(target.type().parameterSlotCount() + slotCount == newType.parameterSlotCount());
+        long conv = makeConv(OP_DROP_ARGS, dropArgPos + dropArgCount - 1, -slotCount);
+        return new AdapterMethodHandle(target, newType, conv);
+    }
+
+    /** Can an adapter duplicate an argument to convert the target to newType? */
+    static boolean canDupArguments(MethodType newType, MethodType targetType,
+                int dupArgPos, int dupArgCount) {
+        if (!convOpSupported(OP_DUP_ARGS))  return false;
+        if (diffReturnTypes(newType, targetType, false) != 0)
+            return false;
+        int nptypes = newType.parameterCount();
+        if (dupArgCount < 0 || dupArgPos + dupArgCount > nptypes)
+            return false;
+        if (targetType.parameterCount() != nptypes + dupArgCount)
+            return false;
+        // parameter types must be the same up to the duplicated arguments
+        if (diffParamTypes(newType, 0, targetType, 0, nptypes, false) != 0)
+            return false;
+        // duplicated types must be, well, duplicates
+        if (diffParamTypes(newType, dupArgPos, targetType, nptypes, dupArgCount, false) != 0)
+            return false;
+        return true;
+    }
+
+    /** Factory method:  Duplicate the selected argument.
+     *  Return null if this is not possible.
+     */
+    static MethodHandle makeDupArguments(MethodType newType, MethodHandle target,
+                int dupArgPos, int dupArgCount) {
+        if (!canDupArguments(newType, target.type(), dupArgPos, dupArgCount))
+            return null;
+        if (dupArgCount == 0)
+            return target;
+        // in  arglist: [0: ...keep1 | dpos: dup... | dpos+dcount: keep2... ]
+        // out arglist: [0: ...keep1 | dpos: dup... | dpos+dcount: keep2... | dup... ]
+        int keep2InPos  = dupArgPos + dupArgCount;
+        int dupSlot     = newType.parameterSlotDepth(keep2InPos);
+        int keep1InSlot = newType.parameterSlotDepth(dupArgPos);
+        int slotCount   = keep1InSlot - dupSlot;
+        assert(target.type().parameterSlotCount() - slotCount == newType.parameterSlotCount());
+        long conv = makeConv(OP_DUP_ARGS, dupArgPos + dupArgCount - 1, slotCount);
+        return new AdapterMethodHandle(target, newType, conv);
+    }
+
+    /** Can an adapter swap two arguments to convert the target to newType? */
+    static boolean canSwapArguments(MethodType newType, MethodType targetType,
+                int swapArg1, int swapArg2) {
+        if (!convOpSupported(OP_SWAP_ARGS))  return false;
+        if (diffReturnTypes(newType, targetType, false) != 0)
+            return false;
+        if (swapArg1 >= swapArg2)  return false;  // caller resp
+        int nptypes = newType.parameterCount();
+        if (targetType.parameterCount() != nptypes)
+            return false;
+        if (swapArg1 < 0 || swapArg2 >= nptypes)
+            return false;
+        if (diffParamTypes(newType, 0, targetType, 0, swapArg1, false) != 0)
+            return false;
+        if (diffParamTypes(newType, swapArg1, targetType, swapArg2, 1, false) != 0)
+            return false;
+        if (diffParamTypes(newType, swapArg1+1, targetType, swapArg1+1, swapArg2-swapArg1-1, false) != 0)
+            return false;
+        if (diffParamTypes(newType, swapArg2, targetType, swapArg1, 1, false) != 0)
+            return false;
+        if (diffParamTypes(newType, swapArg2+1, targetType, swapArg2+1, nptypes-swapArg2-1, false) != 0)
+            return false;
+        return true;
+    }
+
+    /** Factory method:  Swap the selected arguments.
+     *  Return null if this is not possible.
+     */
+    static MethodHandle makeSwapArguments(MethodType newType, MethodHandle target,
+                int swapArg1, int swapArg2) {
+        if (swapArg1 == swapArg2)
+            return target;
+        if (swapArg1 > swapArg2) { int t = swapArg1; swapArg1 = swapArg2; swapArg2 = t; }
+        if (!canSwapArguments(newType, target.type(), swapArg1, swapArg2))
+            return null;
+        Class<?> swapType = newType.parameterType(swapArg1);
+        // in  arglist: [0: ...keep1 | pos1: a1 | pos1+1: keep2... | pos2: a2 | pos2+1: keep3... ]
+        // out arglist: [0: ...keep1 | pos1: a2 | pos1+1: keep2... | pos2: a1 | pos2+1: keep3... ]
+        int swapSlot2  = newType.parameterSlotDepth(swapArg2 + 1);
+        long conv = makeSwapConv(OP_SWAP_ARGS, swapArg1, basicType(swapType), swapSlot2);
+        return new AdapterMethodHandle(target, newType, conv);
+    }
+
+    static int positiveRotation(int argCount, int rotateBy) {
+        assert(argCount > 0);
+        if (rotateBy >= 0) {
+            if (rotateBy < argCount)
+                return rotateBy;
+            return rotateBy % argCount;
+        } else if (rotateBy >= -argCount) {
+            return rotateBy + argCount;
+        } else {
+            return (-1-((-1-rotateBy) % argCount)) + argCount;
+        }
+    }
+
+    final static int MAX_ARG_ROTATION = 1;
+
+    /** Can an adapter rotate arguments to convert the target to newType? */
+    static boolean canRotateArguments(MethodType newType, MethodType targetType,
+                int firstArg, int argCount, int rotateBy) {
+        if (!convOpSupported(OP_ROT_ARGS))  return false;
+        if (argCount <= 2)  return false;  // must be a swap, not a rotate
+        rotateBy = positiveRotation(argCount, rotateBy);
+        if (rotateBy == 0)  return false;  // no rotation
+        if (rotateBy > MAX_ARG_ROTATION && rotateBy < argCount - MAX_ARG_ROTATION)
+            return false;  // too many argument positions
+        // Rotate incoming args right N to the out args, N in 1..(argCouunt-1).
+        if (diffReturnTypes(newType, targetType, false) != 0)
+            return false;
+        int nptypes = newType.parameterCount();
+        if (targetType.parameterCount() != nptypes)
+            return false;
+        if (firstArg < 0 || firstArg >= nptypes)  return false;
+        int argLimit = firstArg + argCount;
+        if (argLimit > nptypes)  return false;
+        if (diffParamTypes(newType, 0, targetType, 0, firstArg, false) != 0)
+            return false;
+        int newChunk1 = argCount - rotateBy, newChunk2 = rotateBy;
+        // swap new chunk1 with target chunk2
+        if (diffParamTypes(newType, firstArg, targetType, argLimit-newChunk1, newChunk1, false) != 0)
+            return false;
+        // swap new chunk2 with target chunk1
+        if (diffParamTypes(newType, firstArg+newChunk1, targetType, firstArg, newChunk2, false) != 0)
+            return false;
+        return true;
+    }
+
+    /** Factory method:  Rotate the selected argument range.
+     *  Return null if this is not possible.
+     */
+    static MethodHandle makeRotateArguments(MethodType newType, MethodHandle target,
+                int firstArg, int argCount, int rotateBy) {
+        rotateBy = positiveRotation(argCount, rotateBy);
+        if (!canRotateArguments(newType, target.type(), firstArg, argCount, rotateBy))
+            return null;
+        // Decide whether it should be done as a right or left rotation,
+        // on the JVM stack.  Return the number of stack slots to rotate by,
+        // positive if right, negative if left.
+        int limit = firstArg + argCount;
+        int depth0 = newType.parameterSlotDepth(firstArg);
+        int depth1 = newType.parameterSlotDepth(limit-rotateBy);
+        int depth2 = newType.parameterSlotDepth(limit);
+        int chunk1Slots = depth0 - depth1; assert(chunk1Slots > 0);
+        int chunk2Slots = depth1 - depth2; assert(chunk2Slots > 0);
+        // From here on out, it assumes a single-argument shift.
+        assert(MAX_ARG_ROTATION == 1);
+        int srcArg, dstArg;
+        byte basicType;
+        if (chunk2Slots <= chunk1Slots) {
+            // Rotate right/down N (rotateBy = +N, N small, c2 small):
+            // in  arglist: [0: ...keep1 | arg1: c1...  | limit-N: c2 | limit: keep2... ]
+            // out arglist: [0: ...keep1 | arg1: c2 | arg1+N: c1...   | limit: keep2... ]
+            srcArg = limit-1;
+            dstArg = firstArg;
+            basicType = basicType(newType.parameterType(srcArg));
+            assert(chunk2Slots == type2size(basicType));
+        } else {
+            // Rotate left/up N (rotateBy = -N, N small, c1 small):
+            // in  arglist: [0: ...keep1 | arg1: c1 | arg1+N: c2...   | limit: keep2... ]
+            // out arglist: [0: ...keep1 | arg1: c2 ... | limit-N: c1 | limit: keep2... ]
+            srcArg = firstArg;
+            dstArg = limit-1;
+            basicType = basicType(newType.parameterType(srcArg));
+            assert(chunk1Slots == type2size(basicType));
+        }
+        int dstSlot = newType.parameterSlotDepth(dstArg + 1);
+        long conv = makeSwapConv(OP_ROT_ARGS, srcArg, basicType, dstSlot);
+        return new AdapterMethodHandle(target, newType, conv);
+    }
+
+    /** Can an adapter spread an argument to convert the target to newType? */
+    static boolean canSpreadArguments(MethodType newType, MethodType targetType,
+                Class<?> spreadArgType, int spreadArgPos, int spreadArgCount) {
+        if (!convOpSupported(OP_SPREAD_ARGS))  return false;
+        if (diffReturnTypes(newType, targetType, false) != 0)
+            return false;
+        int nptypes = newType.parameterCount();
+        // parameter types must be the same up to the spread point
+        if (spreadArgPos != 0 && diffParamTypes(newType, 0, targetType, 0, spreadArgPos, false) != 0)
+            return false;
+        int afterPos = spreadArgPos + spreadArgCount;
+        int afterCount = nptypes - (spreadArgPos + 1);
+        if (spreadArgPos < 0 || spreadArgPos >= nptypes ||
+            spreadArgCount < 0 ||
+            targetType.parameterCount() != afterPos + afterCount)
+            return false;
+        // parameter types after the spread point must also be the same
+        if (afterCount != 0 && diffParamTypes(newType, spreadArgPos+1, targetType, afterPos, afterCount, false) != 0)
+            return false;
+        // match the array element type to the spread arg types
+        Class<?> rawSpreadArgType = newType.parameterType(spreadArgPos);
+        if (rawSpreadArgType != spreadArgType && !canCheckCast(rawSpreadArgType, spreadArgType))
+            return false;
+        for (int i = 0; i < spreadArgCount; i++) {
+            Class<?> src = VerifyType.spreadArgElementType(spreadArgType, i);
+            Class<?> dst = targetType.parameterType(spreadArgPos + i);
+            if (src == null || !VerifyType.isNullConversion(src, dst))
+                return false;
+        }
+        return true;
+    }
+
+
+    /** Factory method:  Spread selected argument. */
+    static MethodHandle makeSpreadArguments(MethodType newType, MethodHandle target,
+                Class<?> spreadArgType, int spreadArgPos, int spreadArgCount) {
+        MethodType targetType = target.type();
+        if (!canSpreadArguments(newType, targetType, spreadArgType, spreadArgPos, spreadArgCount))
+            return null;
+        // in  arglist: [0: ...keep1 | spos: spreadArg | spos+1:      keep2... ]
+        // out arglist: [0: ...keep1 | spos: spread... | spos+scount: keep2... ]
+        int keep2OutPos  = spreadArgPos + spreadArgCount;
+        int spreadSlot   = targetType.parameterSlotDepth(keep2OutPos);
+        int keep1OutSlot = targetType.parameterSlotDepth(spreadArgPos);
+        int slotCount    = keep1OutSlot - spreadSlot;
+        assert(spreadSlot == newType.parameterSlotDepth(spreadArgPos+1));
+        assert(slotCount >= spreadArgCount);
+        long conv = makeConv(OP_SPREAD_ARGS, spreadArgPos, slotCount-1);
+        MethodHandle res = new AdapterMethodHandle(target, newType, conv, spreadArgType);
+        assert(res.type().parameterType(spreadArgPos) == spreadArgType);
+        return res;
+    }
+
+    // TO DO: makeCollectArguments, makeFlyby, makeRicochet
+
+    @Override
+    public String toString() {
+        return getNameString(nonAdapter((MethodHandle)vmtarget), this);
+    }
+
+    private static MethodHandle nonAdapter(MethodHandle mh) {
+        while (mh instanceof AdapterMethodHandle) {
+            mh = (MethodHandle) mh.vmtarget;
+        }
+        return mh;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.VerifyType;
+import sun.invoke.util.Wrapper;
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * The flavor of method handle which emulates an invoke instruction
+ * on a predetermined argument.  The JVM dispatches to the correct method
+ * when the handle is created, not when it is invoked.
+ * @author jrose
+ */
+class BoundMethodHandle extends MethodHandle {
+    //MethodHandle vmtarget;           // next BMH or final DMH or methodOop
+    private final Object argument;     // argument to insert
+    private final int    vmargslot;    // position at which it is inserted
+
+    // Constructors in this class *must* be package scoped or private.
+
+    /** Bind a direct MH to its receiver (or first ref. argument).
+     *  The JVM will pre-dispatch the MH if it is not already static.
+     */
+    /*non-public*/ BoundMethodHandle(DirectMethodHandle mh, Object argument) {
+        super(mh.type().dropParameterTypes(0, 1));
+        // check the type now, once for all:
+        this.argument = checkReferenceArgument(argument, mh, 0);
+        this.vmargslot = this.type().parameterSlotCount();
+        initTarget(mh, 0);
+    }
+
+    /** Insert an argument into an arbitrary method handle.
+     *  If argnum is zero, inserts the first argument, etc.
+     *  The argument type must be a reference.
+     */
+    /*non-public*/ BoundMethodHandle(MethodHandle mh, Object argument, int argnum) {
+        this(mh.type().dropParameterTypes(argnum, argnum+1),
+             mh, argument, argnum);
+    }
+
+    /** Insert an argument into an arbitrary method handle.
+     *  If argnum is zero, inserts the first argument, etc.
+     */
+    /*non-public*/ BoundMethodHandle(MethodType type, MethodHandle mh, Object argument, int argnum) {
+        super(type);
+        if (mh.type().parameterType(argnum).isPrimitive())
+            this.argument = bindPrimitiveArgument(argument, mh, argnum);
+        else {
+            this.argument = checkReferenceArgument(argument, mh, argnum);
+        }
+        this.vmargslot = type.parameterSlotDepth(argnum);
+        initTarget(mh, argnum);
+    }
+
+    private void initTarget(MethodHandle mh, int argnum) {
+        //this.vmtarget = mh;  // maybe updated by JVM
+        MethodHandleNatives.init(this, mh, argnum);
+    }
+
+    /** For the AdapterMethodHandle subclass.
+     */
+    /*non-public*/ BoundMethodHandle(MethodType type, Object argument, int vmargslot) {
+        super(type);
+        this.argument = argument;
+        this.vmargslot = vmargslot;
+        assert(this instanceof AdapterMethodHandle);
+    }
+
+    /** Initialize the current object as a self-bound method handle, binding it
+     *  as the first argument of the method handle {@code entryPoint}.
+     *  The invocation type of the resulting method handle will be the
+     *  same as {@code entryPoint},  except that the first argument
+     *  type will be dropped.
+     */
+    /*non-public*/ BoundMethodHandle(MethodHandle entryPoint) {
+        super(entryPoint.type().dropParameterTypes(0, 1));
+        this.argument = this; // kludge; get rid of
+        this.vmargslot = this.type().parameterSlotDepth(0);
+        initTarget(entryPoint, 0);
+    }
+
+    /** Make sure the given {@code argument} can be used as {@code argnum}-th
+     *  parameter of the given method handle {@code mh}, which must be a reference.
+     *  <p>
+     *  If this fails, throw a suitable {@code WrongMethodTypeException},
+     *  which will prevent the creation of an illegally typed bound
+     *  method handle.
+     */
+    final static Object checkReferenceArgument(Object argument, MethodHandle mh, int argnum) {
+        Class<?> ptype = mh.type().parameterType(argnum);
+        if (ptype.isPrimitive()) {
+            // fail
+        } else if (argument == null) {
+            return null;
+        } else if (VerifyType.isNullReferenceConversion(argument.getClass(), ptype)) {
+            return argument;
+        }
+        throw badBoundArgumentException(argument, mh, argnum);
+    }
+
+    /** Make sure the given {@code argument} can be used as {@code argnum}-th
+     *  parameter of the given method handle {@code mh}, which must be a primitive.
+     *  <p>
+     *  If this fails, throw a suitable {@code WrongMethodTypeException},
+     *  which will prevent the creation of an illegally typed bound
+     *  method handle.
+     */
+    final static Object bindPrimitiveArgument(Object argument, MethodHandle mh, int argnum) {
+        Class<?> ptype = mh.type().parameterType(argnum);
+        Wrapper  wrap = Wrapper.forPrimitiveType(ptype);
+        Object   zero  = wrap.zero();
+        if (zero == null) {
+            // fail
+        } else if (argument == null) {
+            if (ptype != int.class && wrap.isSubwordOrInt())
+                return Integer.valueOf(0);
+            else
+                return zero;
+        } else if (VerifyType.isNullReferenceConversion(argument.getClass(), zero.getClass())) {
+            if (ptype != int.class && wrap.isSubwordOrInt())
+                return Wrapper.INT.wrap(argument);
+            else
+                return argument;
+        }
+        throw badBoundArgumentException(argument, mh, argnum);
+    }
+
+    final static RuntimeException badBoundArgumentException(Object argument, MethodHandle mh, int argnum) {
+        String atype = (argument == null) ? "null" : argument.getClass().toString();
+        return new WrongMethodTypeException("cannot bind "+atype+" argument to parameter #"+argnum+" of "+mh.type());
+    }
+
+    @Override
+    public String toString() {
+        return addTypeString(baseName(), this);
+    }
+
+    /** Component of toString() before the type string. */
+    protected String baseName() {
+        MethodHandle mh = this;
+        while (mh instanceof BoundMethodHandle) {
+            Object info = MethodHandleNatives.getTargetInfo(mh);
+            if (info instanceof MethodHandle) {
+                mh = (MethodHandle) info;
+            } else {
+                String name = null;
+                if (info instanceof MemberName)
+                    name = ((MemberName)info).getName();
+                if (name != null)
+                    return name;
+                else
+                    return noParens(super.toString()); // "invoke", probably
+            }
+            assert(mh != this);
+        }
+        return noParens(mh.toString());
+    }
+
+    private static String noParens(String str) {
+        int paren = str.indexOf('(');
+        if (paren >= 0) str = str.substring(0, paren);
+        return str;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/CallSite.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.empty.Empty;
+import sun.misc.Unsafe;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * A {@code CallSite} is a holder for a variable {@link MethodHandle},
+ * which is called its {@code target}.
+ * An {@code invokedynamic} instruction linked to a {@code CallSite} delegates
+ * all calls to the site's current target.
+ * A {@code CallSite} may be associated with several {@code invokedynamic}
+ * instructions, or it may be "free floating", associated with none.
+ * In any case, it may be invoked through an associated method handle
+ * called its {@linkplain #dynamicInvoker dynamic invoker}.
+ * <p>
+ * {@code CallSite} is an abstract class which does not allow
+ * direct subclassing by users.  It has three immediate,
+ * concrete subclasses that may be either instantiated or subclassed.
+ * <ul>
+ * <li>If a mutable target is not required, an {@code invokedynamic} instruction
+ * may be permanently bound by means of a {@linkplain ConstantCallSite constant call site}.
+ * <li>If a mutable target is required which has volatile variable semantics,
+ * because updates to the target must be immediately and reliably witnessed by other threads,
+ * a {@linkplain VolatileCallSite volatile call site} may be used.
+ * <li>Otherwise, if a mutable target is required,
+ * a {@linkplain MutableCallSite mutable call site} may be used.
+ * </ul>
+ * <p>
+ * A non-constant call site may be <em>relinked</em> by changing its target.
+ * The new target must have the same {@linkplain MethodHandle#type() type}
+ * as the previous target.
+ * Thus, though a call site can be relinked to a series of
+ * successive targets, it cannot change its type.
+ * <p>
+ * Here is a sample use of call sites and bootstrap methods which links every
+ * dynamic call site to print its arguments:
+<blockquote><pre><!-- see indy-demo/src/PrintArgsDemo.java -->
+static void test() throws Throwable {
+    // THE FOLLOWING LINE IS PSEUDOCODE FOR A JVM INSTRUCTION
+    InvokeDynamic[#bootstrapDynamic].baz("baz arg", 2, 3.14);
+}
+private static void printArgs(Object... args) {
+  System.out.println(java.util.Arrays.deepToString(args));
+}
+private static final MethodHandle printArgs;
+static {
+  MethodHandles.Lookup lookup = MethodHandles.lookup();
+  Class thisClass = lookup.lookupClass();  // (who am I?)
+  printArgs = lookup.findStatic(thisClass,
+      "printArgs", MethodType.methodType(void.class, Object[].class));
+}
+private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String name, MethodType type) {
+  // ignore caller and name, but match the type:
+  return new ConstantCallSite(printArgs.asType(type));
+}
+</pre></blockquote>
+ * @author John Rose, JSR 292 EG
+ */
+abstract
+public class CallSite {
+    static { MethodHandleImpl.initStatics(); }
+
+    // Fields used only by the JVM.  Do not use or change.
+    private MemberName vmmethod; // supplied by the JVM (ref. to calling method)
+    private int        vmindex;  // supplied by the JVM (BCI within calling method)
+
+    // The actual payload of this call site:
+    /*package-private*/
+    MethodHandle target;
+
+    /**
+     * Make a blank call site object with the given method type.
+     * An initial target method is supplied which will throw
+     * an {@link IllegalStateException} if called.
+     * <p>
+     * Before this {@code CallSite} object is returned from a bootstrap method,
+     * it is usually provided with a more useful target method,
+     * via a call to {@link CallSite#setTarget(MethodHandle) setTarget}.
+     * @throws NullPointerException if the proposed type is null
+     */
+    /*package-private*/
+    CallSite(MethodType type) {
+        target = type.invokers().uninitializedCallSite();
+    }
+
+    /**
+     * Make a blank call site object, possibly equipped with an initial target method handle.
+     * @param target the method handle which will be the initial target of the call site
+     * @throws NullPointerException if the proposed target is null
+     */
+    /*package-private*/
+    CallSite(MethodHandle target) {
+        target.type();  // null check
+        this.target = target;
+    }
+
+    /**
+     * Returns the type of this call site's target.
+     * Although targets may change, any call site's type is permanent, and can never change to an unequal type.
+     * The {@code setTarget} method enforces this invariant by refusing any new target that does
+     * not have the previous target's type.
+     * @return the type of the current target, which is also the type of any future target
+     */
+    public MethodType type() {
+        return target.type();
+    }
+
+    /** Called from JVM (or low-level Java code) after the BSM returns the newly created CallSite.
+     *  The parameters are JVM-specific.
+     */
+    void initializeFromJVM(String name,
+                           MethodType type,
+                           MemberName callerMethod,
+                           int        callerBCI) {
+        if (this.vmmethod != null) {
+            // FIXME
+            throw new BootstrapMethodError("call site has already been linked to an invokedynamic instruction");
+        }
+        if (!this.type().equals(type)) {
+            throw wrongTargetType(target, type);
+        }
+        this.vmindex  = callerBCI;
+        this.vmmethod = callerMethod;
+    }
+
+    /**
+     * Returns the target method of the call site, according to the
+     * behavior defined by this call site's specific class.
+     * The immediate subclasses of {@code CallSite} document the
+     * class-specific behaviors of this method.
+     *
+     * @return the current linkage state of the call site, its target method handle
+     * @see ConstantCallSite
+     * @see VolatileCallSite
+     * @see #setTarget
+     * @see ConstantCallSite#getTarget
+     * @see MutableCallSite#getTarget
+     * @see VolatileCallSite#getTarget
+     */
+    public abstract MethodHandle getTarget();
+
+    /**
+     * Updates the target method of this call site, according to the
+     * behavior defined by this call site's specific class.
+     * The immediate subclasses of {@code CallSite} document the
+     * class-specific behaviors of this method.
+     * <p>
+     * The type of the new target must be {@linkplain MethodType#equals equal to}
+     * the type of the old target.
+     *
+     * @param newTarget the new target
+     * @throws NullPointerException if the proposed new target is null
+     * @throws WrongMethodTypeException if the proposed new target
+     *         has a method type that differs from the previous target
+     * @see CallSite#getTarget
+     * @see ConstantCallSite#setTarget
+     * @see MutableCallSite#setTarget
+     * @see VolatileCallSite#setTarget
+     */
+    public abstract void setTarget(MethodHandle newTarget);
+
+    void checkTargetChange(MethodHandle oldTarget, MethodHandle newTarget) {
+        MethodType oldType = oldTarget.type();
+        MethodType newType = newTarget.type();  // null check!
+        if (!newType.equals(oldType))
+            throw wrongTargetType(newTarget, oldType);
+    }
+
+    private static WrongMethodTypeException wrongTargetType(MethodHandle target, MethodType type) {
+        return new WrongMethodTypeException(String.valueOf(target)+" should be of type "+type);
+    }
+
+    /**
+     * Produces a method handle equivalent to an invokedynamic instruction
+     * which has been linked to this call site.
+     * <p>
+     * This method is equivalent to the following code:
+     * <blockquote><pre>
+     * MethodHandle getTarget, invoker, result;
+     * getTarget = MethodHandles.publicLookup().bind(this, "getTarget", MethodType.methodType(MethodHandle.class));
+     * invoker = MethodHandles.exactInvoker(this.type());
+     * result = MethodHandles.foldArguments(invoker, getTarget)
+     * </pre></blockquote>
+     *
+     * @return a method handle which always invokes this call site's current target
+     */
+    public abstract MethodHandle dynamicInvoker();
+
+    /*non-public*/ MethodHandle makeDynamicInvoker() {
+        MethodHandle getTarget = MethodHandleImpl.bindReceiver(GET_TARGET, this);
+        MethodHandle invoker = MethodHandles.exactInvoker(this.type());
+        return MethodHandles.foldArguments(invoker, getTarget);
+    }
+
+    private static final MethodHandle GET_TARGET;
+    static {
+        try {
+            GET_TARGET = IMPL_LOOKUP.
+                findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class));
+        } catch (ReflectiveOperationException ignore) {
+            throw new InternalError();
+        }
+    }
+
+    /** This guy is rolled into the default target if a MethodType is supplied to the constructor. */
+    /*package-private*/
+    static Empty uninitializedCallSite() {
+        throw new IllegalStateException("uninitialized call site");
+    }
+
+    // unsafe stuff:
+    private static final Unsafe unsafe = Unsafe.getUnsafe();
+    private static final long TARGET_OFFSET;
+
+    static {
+        try {
+            TARGET_OFFSET = unsafe.objectFieldOffset(CallSite.class.getDeclaredField("target"));
+        } catch (Exception ex) { throw new Error(ex); }
+    }
+
+    /*package-private*/
+    void setTargetNormal(MethodHandle newTarget) {
+        target = newTarget;
+    }
+    /*package-private*/
+    MethodHandle getTargetVolatile() {
+        return (MethodHandle) unsafe.getObjectVolatile(this, TARGET_OFFSET);
+    }
+    /*package-private*/
+    void setTargetVolatile(MethodHandle newTarget) {
+        unsafe.putObjectVolatile(this, TARGET_OFFSET, newTarget);
+    }
+
+    // this implements the upcall from the JVM, MethodHandleNatives.makeDynamicCallSite:
+    static CallSite makeSite(MethodHandle bootstrapMethod,
+                             // Callee information:
+                             String name, MethodType type,
+                             // Extra arguments for BSM, if any:
+                             Object info,
+                             // Caller information:
+                             MemberName callerMethod, int callerBCI) {
+        Class<?> callerClass = callerMethod.getDeclaringClass();
+        Object caller = IMPL_LOOKUP.in(callerClass);
+        CallSite site;
+        try {
+            Object binding;
+            info = maybeReBox(info);
+            if (info == null) {
+                binding = bootstrapMethod.invokeGeneric(caller, name, type);
+            } else if (!info.getClass().isArray()) {
+                binding = bootstrapMethod.invokeGeneric(caller, name, type, info);
+            } else {
+                Object[] argv = (Object[]) info;
+                maybeReBoxElements(argv);
+                if (3 + argv.length > 255)
+                    throw new BootstrapMethodError("too many bootstrap method arguments");
+                MethodType bsmType = bootstrapMethod.type();
+                if (bsmType.parameterCount() == 4 && bsmType.parameterType(3) == Object[].class)
+                    binding = bootstrapMethod.invokeGeneric(caller, name, type, argv);
+                else
+                    binding = MethodHandles.spreadInvoker(bsmType, 3)
+                        .invokeGeneric(bootstrapMethod, caller, name, type, argv);
+            }
+            //System.out.println("BSM for "+name+type+" => "+binding);
+            if (binding instanceof CallSite) {
+                site = (CallSite) binding;
+            }  else {
+                throw new ClassCastException("bootstrap method failed to produce a CallSite");
+            }
+            assert(site.getTarget() != null);
+            assert(site.getTarget().type().equals(type));
+        } catch (Throwable ex) {
+            BootstrapMethodError bex;
+            if (ex instanceof BootstrapMethodError)
+                bex = (BootstrapMethodError) ex;
+            else
+                bex = new BootstrapMethodError("call site initialization exception", ex);
+            throw bex;
+        }
+        return site;
+    }
+
+    private static Object maybeReBox(Object x) {
+        if (x instanceof Integer) {
+            int xi = (int) x;
+            if (xi == (byte) xi)
+                x = xi;  // must rebox; see JLS 5.1.7
+        }
+        return x;
+    }
+    private static void maybeReBoxElements(Object[] xa) {
+        for (int i = 0; i < xa.length; i++) {
+            xa[i] = maybeReBox(xa[i]);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/ConstantCallSite.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2010, 2011, 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 java.lang.invoke;
+
+/**
+ * A {@code ConstantCallSite} is a {@link CallSite} whose target is permanent, and can never be changed.
+ * An {@code invokedynamic} instruction linked to a {@code ConstantCallSite} is permanently
+ * bound to the call site's target.
+ * @author John Rose, JSR 292 EG
+ */
+public class ConstantCallSite extends CallSite {
+    /**
+     * Creates a call site with a permanent target.
+     * @param target the target to be permanently associated with this call site
+     * @throws NullPointerException if the proposed target is null
+     */
+    public ConstantCallSite(MethodHandle target) {
+        super(target);
+    }
+
+    /**
+     * Returns the target method of the call site, which behaves
+     * like a {@code final} field of the {@code ConstantCallSite}.
+     * That is, the the target is always the original value passed
+     * to the constructor call which created this instance.
+     *
+     * @return the immutable linkage state of this call site, a constant method handle
+     * @throws UnsupportedOperationException because this kind of call site cannot change its target
+     */
+    @Override public final MethodHandle getTarget() {
+        return target;
+    }
+
+    /**
+     * Always throws an {@link UnsupportedOperationException}.
+     * This kind of call site cannot change its target.
+     * @param ignore a new target proposed for the call site, which is ignored
+     * @throws UnsupportedOperationException because this kind of call site cannot change its target
+     */
+    @Override public final void setTarget(MethodHandle ignore) {
+        throw new UnsupportedOperationException("ConstantCallSite");
+    }
+
+    /**
+     * Returns this call site's permanent target.
+     * Since that target will never change, this is a correct implementation
+     * of {@link CallSite#dynamicInvoker CallSite.dynamicInvoker}.
+     * @return the immutable linkage state of this call site, a constant method handle
+     */
+    @Override
+    public final MethodHandle dynamicInvoker() {
+        return getTarget();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+
+/**
+ * The flavor of method handle which emulates invokespecial or invokestatic.
+ * @author jrose
+ */
+class DirectMethodHandle extends MethodHandle {
+    //inherited oop    vmtarget;    // methodOop or virtual class/interface oop
+    private final int  vmindex;     // method index within class or interface
+    { vmindex = VM_INDEX_UNINITIALIZED; }  // JVM may change this
+
+    // Constructors in this class *must* be package scoped or private.
+    DirectMethodHandle(MethodType mtype, MemberName m, boolean doDispatch, Class<?> lookupClass) {
+        super(mtype);
+
+        assert(m.isMethod() || !doDispatch && m.isConstructor());
+        if (!m.isResolved())
+            throw new InternalError();
+
+        MethodHandleNatives.init(this, (Object) m, doDispatch, lookupClass);
+    }
+
+    boolean isValid() {
+        return (vmindex != VM_INDEX_UNINITIALIZED);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/FilterGeneric.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,4496 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import java.lang.reflect.*;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * These adapters apply arbitrary conversions to arguments
+ * on the way to a ultimate target.
+ * For simplicity, these are all generically typed.
+ * @author jrose
+ */
+class FilterGeneric {
+    // type for the incoming call (will be generic)
+    private final MethodType entryType;
+    // prototype adapters (clone and customize for each new target & conversion!)
+    private final Adapter[] adapters;
+
+    /** Compute and cache information common to all filtering adapters
+     *  with the given generic type
+     */
+    FilterGeneric(MethodType entryType) {
+        this.entryType = entryType;
+        int tableSize = Kind.LIMIT.invokerIndex(1 + entryType.parameterCount());
+        this.adapters = new Adapter[tableSize];
+    }
+
+    Adapter getAdapter(Kind kind, int pos) {
+        int index = kind.invokerIndex(pos);
+        Adapter ad = adapters[index];
+        if (ad != null)  return ad;
+        ad = findAdapter(entryType, kind, pos);
+        if (ad == null)
+            ad = buildAdapterFromBytecodes(entryType, kind, pos);
+        adapters[index] = ad;
+        return ad;
+    }
+
+    Adapter makeInstance(Kind kind, int pos, MethodHandle filter, MethodHandle target) {
+        Adapter ad = getAdapter(kind, pos);
+        return ad.makeInstance(ad.prototypeEntryPoint(), filter, target);
+    }
+
+    /** Build an adapter of the given generic type, which invokes filter
+     *  on the selected incoming argument before passing it to the target.
+     * @param pos the argument to filter
+     * @param filter the function to call on the argument
+     * @param target the target to call with the modified argument list
+     * @return an adapter method handle
+     */
+    public static MethodHandle makeArgumentFilter(int pos, MethodHandle filter, MethodHandle target) {
+        return make(Kind.value, pos, filter, target);
+    }
+
+    /** Build an adapter of the given generic type, which invokes a combiner
+     *  on a selected group of leading arguments.
+     *  The result of the combiner is prepended before all those arguments.
+     * @param combiner the function to call on the selected leading arguments
+     * @param target the target to call with the modified argument list
+     * @return an adapter method handle
+     */
+    public static MethodHandle makeArgumentFolder(MethodHandle combiner, MethodHandle target) {
+        int num = combiner.type().parameterCount();
+        return make(Kind.fold, num, combiner, target);
+    }
+
+    /** Build an adapter of the given generic type, which invokes a filter
+     *  on the incoming arguments, reified as a group.
+     *  The argument may be modified (by side effects in the filter).
+     *  The arguments, possibly modified, are passed on to the target.
+     * @param filter the function to call on the arguments
+     * @param target the target to call with the possibly-modified argument list
+     * @return an adapter method handle
+     */
+    public static MethodHandle makeFlyby(MethodHandle filter, MethodHandle target) {
+        return make(Kind.flyby, 0, filter, target);
+    }
+
+    /** Build an adapter of the given generic type, which invokes a collector
+     *  on the selected incoming argument and all following arguments.
+     *  The result of the collector replaces all those arguments.
+     * @param collector the function to call on the selected trailing arguments
+     * @param target the target to call with the modified argument list
+     * @return an adapter method handle
+     */
+    public static MethodHandle makeArgumentCollector(MethodHandle collector, MethodHandle target) {
+        int pos = target.type().parameterCount() - 1;
+        return make(Kind.collect, pos, collector, target);
+    }
+
+    static MethodHandle make(Kind kind, int pos, MethodHandle filter, MethodHandle target) {
+        FilterGeneric fgen = of(kind, pos, filter.type(), target.type());
+        return fgen.makeInstance(kind, pos, filter, target);
+    }
+
+    /** Return the adapter information for this target and filter type. */
+    static FilterGeneric of(Kind kind, int pos, MethodType filterType, MethodType targetType) {
+        MethodType entryType = entryType(kind, pos, filterType, targetType);
+        if (entryType.generic() != entryType)
+            throw newIllegalArgumentException("must be generic: "+entryType);
+        MethodTypeForm form = entryType.form();
+        FilterGeneric filterGen = form.filterGeneric;
+        if (filterGen == null)
+            form.filterGeneric = filterGen = new FilterGeneric(entryType);
+        return filterGen;
+    }
+
+    public String toString() {
+        return "FilterGeneric/"+entryType;
+    }
+
+    static MethodType targetType(MethodType entryType, Kind kind, int pos, MethodType filterType) {
+        MethodType type = entryType;
+        switch (kind) {
+            case value:
+            case flyby:
+                break;  // no change
+            case fold:
+                type = type.insertParameterTypes(0, filterType.returnType());
+                break;
+            case collect:
+                type = type.dropParameterTypes(pos, type.parameterCount());
+                type = type.insertParameterTypes(pos, filterType.returnType());
+                break;
+            default:
+                throw new InternalError();
+        }
+        return type;
+    }
+
+    static MethodType entryType(Kind kind, int pos, MethodType filterType, MethodType targetType) {
+        MethodType type = targetType;
+        switch (kind) {
+            case value:
+            case flyby:
+                break;  // no change
+            case fold:
+                type = type.dropParameterTypes(0, 1);
+                break;
+            case collect:
+                type = type.dropParameterTypes(pos, pos+1);
+                type = type.insertParameterTypes(pos, filterType.parameterList());
+                break;
+            default:
+                throw new InternalError();
+        }
+        return type;
+    }
+
+    /* Create an adapter that handles spreading calls for the given type. */
+    static Adapter findAdapter(MethodType entryType, Kind kind, int pos) {
+        int argc = entryType.parameterCount();
+        String cname0 = "F"+argc;
+        String cname1 = "F"+argc+kind.key;
+        String[] cnames = { cname0, cname1 };
+        String iname = kind.invokerName(pos);
+        // e.g., F5; invoke_C3
+        for (String cname : cnames) {
+            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
+            if (acls == null)  continue;
+            // see if it has the required invoke method
+            MethodHandle entryPoint = null;
+            try {
+                entryPoint = IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
+            } catch (ReflectiveOperationException ex) {
+            }
+            if (entryPoint == null)  continue;
+            Constructor<? extends Adapter> ctor = null;
+            try {
+                ctor = acls.getDeclaredConstructor(MethodHandle.class);
+            } catch (NoSuchMethodException ex) {
+            } catch (SecurityException ex) {
+            }
+            if (ctor == null)  continue;
+            try {
+                // Produce an instance configured as a prototype.
+                return ctor.newInstance(entryPoint);
+            } catch (IllegalArgumentException ex) {
+            } catch (InvocationTargetException wex) {
+                Throwable ex = wex.getTargetException();
+                if (ex instanceof Error)  throw (Error)ex;
+                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
+            } catch (InstantiationException ex) {
+            } catch (IllegalAccessException ex) {
+            }
+        }
+        return null;
+    }
+
+    static Adapter buildAdapterFromBytecodes(MethodType entryType, Kind kind, int pos) {
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    /**
+     * This adapter takes some untyped arguments, and returns an untyped result.
+     * Internally, it applies the invoker to the target, which causes the
+     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
+     * This result is passed to convert, which is responsible for
+     * converting the raw result into a boxed object.
+     * The invoker is kept separate from the target because it can be
+     * generated once per type erasure family, and reused across adapters.
+     */
+    static abstract class Adapter extends BoundMethodHandle {
+        protected final MethodHandle filter; // transforms one or more arguments
+        protected final MethodHandle target; // ultimate target
+
+        @Override
+        public String toString() {
+            return addTypeString(target, this);
+        }
+
+        protected boolean isPrototype() { return target == null; }
+        protected Adapter(MethodHandle entryPoint) {
+            this(entryPoint, entryPoint, null);
+            assert(isPrototype());
+        }
+        protected MethodHandle prototypeEntryPoint() {
+            if (!isPrototype())  throw new InternalError();
+            return filter;
+        }
+
+        protected Adapter(MethodHandle entryPoint,
+                          MethodHandle filter, MethodHandle target) {
+            super(entryPoint);
+            this.filter = filter;
+            this.target = target;
+        }
+
+        /** Make a copy of self, with new fields. */
+        protected abstract Adapter makeInstance(MethodHandle entryPoint,
+                MethodHandle filter, MethodHandle target);
+        // { return new ThisType(entryPoint, filter, target); }
+
+        static private final String CLASS_PREFIX; // "java.lang.invoke.FilterGeneric$"
+        static {
+            String aname = Adapter.class.getName();
+            String sname = Adapter.class.getSimpleName();
+            if (!aname.endsWith(sname))  throw new InternalError();
+            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
+        }
+        /** Find a sibing class of Adapter. */
+        static Class<? extends Adapter> findSubClass(String name) {
+            String cname = Adapter.CLASS_PREFIX + name;
+            try {
+                return Class.forName(cname).asSubclass(Adapter.class);
+            } catch (ClassNotFoundException ex) {
+                return null;
+            } catch (ClassCastException ex) {
+                return null;
+            }
+        }
+    }
+
+    static enum Kind {
+        value('V'),      // filter and replace Nth argument value
+        fold('F'),       // fold first N arguments, prepend result
+        collect('C'),    // collect last N arguments, replace with result
+        flyby('Y'),      // reify entire argument list, filter, pass to target
+        LIMIT('?');
+        static final int COUNT = LIMIT.ordinal();
+
+        final char key;
+        Kind(char key) { this.key = key; }
+        String invokerName(int pos) { return "invoke_"+key+""+pos; }
+        int invokerIndex(int pos) { return pos * COUNT + ordinal(); }
+    }
+
+    /* generated classes follow this pattern:
+    static class F1X extends Adapter {
+        protected F1X(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F1X(MethodHandle e, MethodHandle f, MethodHandle t)
+                        { super(e, f, t); }
+        protected F1X makeInstance(MethodHandle e, MethodHandle f, MethodHandle t)
+                        { return new F1X(e, f, t); }
+        protected Object invoke_V0(Object a0) { return target.invokeExact(filter.invokeExact(a0)); }
+        protected Object invoke_F0(Object a0) { return target.invokeExact(filter.invokeExact(), a0); }
+        protected Object invoke_F1(Object a0) { return target.invokeExact(filter.invokeExact(a0), a0); }
+        protected Object invoke_C0(Object a0) { return target.invokeExact(filter.invokeExact(a0)); }
+        protected Object invoke_C1(Object a0) { return target.invokeExact(a0, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0) { Object[] av = { a0 };
+                       filter.invokeExact(av); return target.invokeExact(av[0]); }
+    }
+    static class F2X extends Adapter {
+        protected F2X(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F2X(MethodHandle e, MethodHandle f, MethodHandle t)
+                        { super(e, f, t); }
+        protected F2X makeInstance(MethodHandle e, MethodHandle f, MethodHandle t)
+                        { return new F2X(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0), a1); }
+        protected Object invoke_V1(Object a0, Object a1) { return target.invokeExact(a0, filter.invokeExact(a1)); }
+        protected Object invoke_F0(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(), a0, a1); }
+        protected Object invoke_F1(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0), a0, a1); }
+        protected Object invoke_F2(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0, a1), a0, a1); }
+        protected Object invoke_C0(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0, a1)); }
+        protected Object invoke_C1(Object a0, Object a1) { return target.invokeExact(a0, filter.invokeExact(a1)); }
+        protected Object invoke_C2(Object a0, Object a1) { return target.invokeExact(a0, a1, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1) { Object[] av = { a0, a1 };
+                       filter.invokeExact(av); return target.invokeExact(av[0], av[1]); }
+    }
+    // */
+
+    // This one is written by hand:
+    static class F0 extends Adapter {
+        protected F0(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F0(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F0 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F0(e, f, t); }
+        protected Object invoke_F0() throws Throwable {
+            return target.invokeExact(filter.invokeExact()); }
+        protected Object invoke_C0() throws Throwable {
+            return target.invokeExact(filter.invokeExact()); }
+        static final Object[] NO_ARGS = { };
+        protected Object invoke_Y0() throws Throwable {
+            filter.invokeExact(NO_ARGS); // make the flyby
+            return target.invokeExact(); }
+    }
+
+/*
+  : SHELL; n=FilterGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -ea -cp . genclasses | sed 's| *[/]/ *$||') >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
+//{{{
+import java.util.*;
+class genclasses {
+    static String[][] TEMPLATES = { {
+        "@for@ N=1..20",
+        "    //@each-cat@",
+        "    static class @cat@ extends Adapter {",
+        "        protected @cat@(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype",
+        "        protected @cat@(MethodHandle e, MethodHandle f, MethodHandle t) {",
+        "            super(e, f, t); }",
+        "        protected @cat@ makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {",
+        "            return new @cat@(e, f, t); }",
+        "        //@each-P@",
+        "        protected Object invoke_V@P@(@Tvav@) throws Throwable {",
+        "            return target.invokeExact(@a0_@@Psp@filter.invokeExact(a@P@)@_aN@); }",
+        "        //@end-P@",
+        "        //@each-P@",
+        "        protected Object invoke_F@P@(@Tvav@) throws Throwable {",
+        "            return target.invokeExact(filter.invokeExact(@a0@),",
+        "                                 @av@); }",
+        "        //@end-P@",
+        "        protected Object invoke_F@N@(@Tvav@) throws Throwable {",
+        "            return target.invokeExact(filter.invokeExact(@av@),",
+        "                                 @av@); }",
+        "        //@each-P@",
+        "        protected Object invoke_C@P@(@Tvav@) throws Throwable {",
+        "            return target.invokeExact(@a0_@filter.invokeExact(a@P@@_aN@)); }",
+        "        //@end-P@",
+        "        protected Object invoke_C@N@(@Tvav@) throws Throwable {",
+        "            return target.invokeExact(@av@, filter.invokeExact()); }",
+        "        protected Object invoke_Y0(@Tvav@) throws Throwable {",
+        "            Object[] av = { @av@ };",
+        "            filter.invokeExact(av); // make the flyby",
+        "            return target.invokeExact(@av[i]@); }",
+        "    }",
+    } };
+    static final String NEWLINE_INDENT = " //\n                                 ";
+    enum VAR {
+        cat, N, P, Tvav, av, a0, a0_, _aN, Psp, av_i_;
+        public final String pattern = "@"+toString().replace('_','.')+"@";
+        public String binding = toString();
+        static void makeBindings(boolean topLevel, int inargs, int pos) {
+            assert(-1 <= pos && pos < inargs);
+            VAR.cat.binding = "F"+inargs;
+            VAR.N.binding = String.valueOf(inargs); // incoming arg count
+            VAR.P.binding = String.valueOf(pos);  // selected arg position
+            String[] av = new String[inargs];
+            String[] Tvav = new String[inargs];
+            String[] av_i_ = new String[inargs];
+            for (int i = 0; i < inargs; i++) {
+                av[i] = arg(i);
+                av_i_[i] = "av["+i+"]";
+                String spc = "";
+                if (i > 0 && i % 4 == 0) spc = NEWLINE_INDENT+(pos>9?" ":"")+"  ";
+                Tvav[i] = spc+param("Object", av[i]);
+            }
+            VAR.av.binding = comma(av);
+            VAR.av_i_.binding = comma(av_i_);
+            VAR.Tvav.binding = comma(Tvav);
+            if (pos >= 0) {
+                VAR.Psp.binding = (pos > 0 && pos % 10 == 0) ? NEWLINE_INDENT : "";
+                String[] a0 = new String[pos];
+                String[] aN = new String[inargs - (pos+1)];
+                for (int i = 0; i < pos; i++) {
+                    String spc = "";
+                    if (i > 0 && i % 10 == 0) spc = NEWLINE_INDENT;
+                    a0[i] = spc+av[i];
+                }
+                VAR.a0.binding = comma(a0);
+                VAR.a0_.binding = comma(a0, ", ");
+                for (int i = pos+1; i < inargs; i++) {
+                    String spc = "";
+                    if (i > 0 && i % 10 == 0) spc = NEWLINE_INDENT;
+                    aN[i - (pos+1)] = spc+av[i];
+                }
+                VAR._aN.binding = comma(", ", aN);
+            }
+        }
+        static String arg(int i) { return "a"+i; }
+        static String param(String t, String a) { return t+" "+a; }
+        static String comma(String[] v) { return comma(v, ""); }
+        static String comma(String[] v, String sep) { return comma("", v, sep); }
+        static String comma(String sep, String[] v) { return comma(sep, v, ""); }
+        static String comma(String sep1, String[] v, String sep2) {
+            if (v.length == 0)  return "";
+            String res = v[0];
+            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
+            return sep1 + res + sep2;
+        }
+        static String transform(String string) {
+            for (VAR var : values())
+                string = string.replaceAll(var.pattern, var.binding);
+            return string;
+        }
+    }
+    static String[] stringsIn(String[] strings, int beg, int end) {
+        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
+    }
+    static String[] stringsBefore(String[] strings, int pos) {
+        return stringsIn(strings, 0, pos);
+    }
+    static String[] stringsAfter(String[] strings, int pos) {
+        return stringsIn(strings, pos, strings.length);
+    }
+    static int indexAfter(String[] strings, int pos, String tag) {
+        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
+    }
+    static int indexBefore(String[] strings, int pos, String tag) {
+        for (int i = pos, end = strings.length; ; i++) {
+            if (i == end || strings[i].endsWith(tag))  return i;
+        }
+    }
+    static int MIN_ARITY, MAX_ARITY;
+    public static void main(String... av) {
+        for (String[] template : TEMPLATES) {
+            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
+            String[] forLines = stringsBefore(template, forLinesLimit);
+            template = stringsAfter(template, forLinesLimit);
+            for (String forLine : forLines)
+                expandTemplate(forLine, template);
+        }
+    }
+    static void expandTemplate(String forLine, String[] template) {
+        String[] params = forLine.split("[^0-9]+");
+        if (params[0].length() == 0)  params = stringsAfter(params, 1);
+        System.out.println("//params="+Arrays.asList(params));
+        int pcur = 0;
+        MIN_ARITY = Integer.valueOf(params[pcur++]);
+        MAX_ARITY = Integer.valueOf(params[pcur++]);
+        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
+        for (int inargs = MIN_ARITY; inargs <= MAX_ARITY; inargs++) {
+            expandTemplate(template, true, inargs, -1);
+        }
+    }
+    static void expandTemplate(String[] template, boolean topLevel, int inargs, int pos) {
+        VAR.makeBindings(topLevel, inargs, pos);
+        for (int i = 0; i < template.length; i++) {
+            String line = template[i];
+            if (line.endsWith("@each-cat@")) {
+                // ignore
+            } else if (line.endsWith("@each-P@")) {
+                int blockEnd = indexAfter(template, i, "@end-P@");
+                String[] block = stringsIn(template, i+1, blockEnd-1);
+                for (int pos1 = Math.max(0,pos); pos1 < inargs; pos1++)
+                    expandTemplate(block, false, inargs, pos1);
+                VAR.makeBindings(topLevel, inargs, pos);
+                i = blockEnd-1; continue;
+            } else {
+                System.out.println(VAR.transform(line));
+            }
+        }
+    }
+}
+//}}} */
+//params=[1, 20]
+    static class F1 extends Adapter {
+        protected F1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F1(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F1 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F1(e, f, t); }
+        protected Object invoke_V0(Object a0) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0)); }
+        protected Object invoke_F0(Object a0) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0); }
+        protected Object invoke_F1(Object a0) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0); }
+        protected Object invoke_C0(Object a0) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0)); }
+        protected Object invoke_C1(Object a0) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0) throws Throwable {
+            Object[] av = { a0 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0]); }
+    }
+    static class F2 extends Adapter {
+        protected F2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F2(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F2 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F2(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1); }
+        protected Object invoke_V1(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1)); }
+        protected Object invoke_F0(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1); }
+        protected Object invoke_F1(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1); }
+        protected Object invoke_F2(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1); }
+        protected Object invoke_C0(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1)); }
+        protected Object invoke_C1(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1)); }
+        protected Object invoke_C2(Object a0, Object a1) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1) throws Throwable {
+            Object[] av = { a0, a1 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1]); }
+    }
+    static class F3 extends Adapter {
+        protected F3(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F3(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F3 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F3(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2) throws Throwable {
+            Object[] av = { a0, a1, a2 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2]); }
+    }
+    static class F4 extends Adapter {
+        protected F4(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F4(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F4 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F4(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            Object[] av = { a0, a1, a2, a3 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3]); }
+    }
+    static class F5 extends Adapter {
+        protected F5(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F5(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F5 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F5(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4]); }
+    }
+    static class F6 extends Adapter {
+        protected F6(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F6(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F6 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F6(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5]); }
+    }
+    static class F7 extends Adapter {
+        protected F7(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F7(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F7 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F7(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6]); }
+    }
+    static class F8 extends Adapter {
+        protected F8(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F8(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F8 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F8(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7]); }
+    }
+    static class F9 extends Adapter {
+        protected F9(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F9(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F9 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F9(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8]); }
+    }
+    static class F10 extends Adapter {
+        protected F10(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F10(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F10 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F10(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9]); }
+    }
+    static class F11 extends Adapter {
+        protected F11(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F11(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F11 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F11(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10]); }
+    }
+    static class F12 extends Adapter {
+        protected F12(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F12(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F12 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F12(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11]); }
+    }
+    static class F13 extends Adapter {
+        protected F13(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F13(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F13 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F13(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12]); }
+    }
+    static class F14 extends Adapter {
+        protected F14(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F14(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F14 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F14(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13]); }
+    }
+    static class F15 extends Adapter {
+        protected F15(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F15(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F15 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F15(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13, a14); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13, a14); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13, a14); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13, a14); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13), a14); }
+        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13, a14)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13, a14)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13, a14)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13, a14)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14)); }
+        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14]); }
+    }
+    static class F16 extends Adapter {
+        protected F16(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F16(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F16 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F16(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13, a14, a15); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13, a14, a15); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13, a14, a15); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13), a14, a15); }
+        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14), a15); }
+        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13, a14, a15)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13, a14, a15)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13, a14, a15)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14, a15)); }
+        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15)); }
+        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15]); }
+    }
+    static class F17 extends Adapter {
+        protected F17(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F17(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F17 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F17(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16); }
+        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16); }
+        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16); }
+        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16)); }
+        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16)); }
+        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16)); }
+        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16]); }
+    }
+    static class F18 extends Adapter {
+        protected F18(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F18(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F18 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F18(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16, a17); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16, a17); }
+        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16, a17); }
+        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16, a17); }
+        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16), a17); }
+        protected Object invoke_V17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_F18(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16, a17)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16, a17)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16, a17)); }
+        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16, a17)); }
+        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16, a17)); }
+        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17)); }
+        protected Object invoke_C18(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16], av[17]); }
+    }
+    static class F19 extends Adapter {
+        protected F19(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F19(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F19 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F19(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16, a17, a18); }
+        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16, a17, a18); }
+        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16, a17, a18); }
+        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16), a17, a18); }
+        protected Object invoke_V17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17), a18); }
+        protected Object invoke_V18(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F18(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_F19(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16, a17, a18)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16, a17, a18)); }
+        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16, a17, a18)); }
+        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16, a17, a18)); }
+        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17, a18)); }
+        protected Object invoke_C18(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18)); }
+        protected Object invoke_C19(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16], av[17], av[18]); }
+    }
+    static class F20 extends Adapter {
+        protected F20(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected F20(MethodHandle e, MethodHandle f, MethodHandle t) {
+            super(e, f, t); }
+        protected F20 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
+            return new F20(e, f, t); }
+        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16, a17, a18, a19); }
+        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16, a17, a18, a19); }
+        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16), a17, a18, a19); }
+        protected Object invoke_V17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17), a18, a19); }
+        protected Object invoke_V18(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18), a19); }
+        protected Object invoke_V19(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, filter.invokeExact(a19)); }
+        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F18(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F19(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_F20(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19),
+                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
+        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16, a17, a18, a19)); }
+        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16, a17, a18, a19)); }
+        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16, a17, a18, a19)); }
+        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17, a18, a19)); }
+        protected Object invoke_C18(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18, a19)); }
+        protected Object invoke_C19(Object a0, Object a1, Object a2, Object a3,
+                                    Object a4, Object a5, Object a6, Object a7,
+                                    Object a8, Object a9, Object a10, Object a11,
+                                    Object a12, Object a13, Object a14, Object a15,
+                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, filter.invokeExact(a19)); }
+        protected Object invoke_C20(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, filter.invokeExact()); }
+        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
+                                   Object a4, Object a5, Object a6, Object a7,
+                                   Object a8, Object a9, Object a10, Object a11,
+                                   Object a12, Object a13, Object a14, Object a15,
+                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
+            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19 };
+            filter.invokeExact(av); // make the flyby
+            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16], av[17], av[18], av[19]); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/FilterOneArgument.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Unary function composition, useful for many small plumbing jobs.
+ * The invoke method takes a single reference argument, and returns a reference
+ * Internally, it first calls the {@code filter} method on the argument,
+ * Making up the difference between the raw method type and the
+ * final method type is the responsibility of a JVM-level adapter.
+ * @author jrose
+ */
+class FilterOneArgument extends BoundMethodHandle {
+    protected final MethodHandle filter;  // Object -> Object
+    protected final MethodHandle target;  // Object -> Object
+
+    @Override
+    public String toString() {
+        return target.toString();
+    }
+
+    protected Object invoke(Object argument) throws Throwable {
+        Object filteredArgument = filter.invokeExact(argument);
+        return target.invokeExact(filteredArgument);
+    }
+
+    private static final MethodHandle INVOKE;
+    static {
+        try {
+            INVOKE =
+                IMPL_LOOKUP.findVirtual(FilterOneArgument.class, "invoke",
+                                        MethodType.genericMethodType(1));
+        } catch (ReflectiveOperationException ex) {
+            throw uncaughtException(ex);
+        }
+    }
+
+    protected FilterOneArgument(MethodHandle filter, MethodHandle target) {
+        super(INVOKE);
+        this.filter = filter;
+        this.target = target;
+    }
+
+    public static MethodHandle make(MethodHandle filter, MethodHandle target) {
+        if (filter == null)  return target;
+        if (target == null)  return filter;
+        return new FilterOneArgument(filter, target);
+    }
+
+//    MethodHandle make(MethodHandle filter1, MethodHandle filter2, MethodHandle target) {
+//        MethodHandle filter = make(filter1, filter2);
+//        return make(filter, target);
+//    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/FromGeneric.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,630 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.ValueConversions;
+import sun.invoke.util.Wrapper;
+import java.lang.reflect.*;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Adapters which mediate between incoming calls which are generic
+ * and outgoing calls which are not.  Any call can be represented generically
+ * boxing up its arguments, and (on return) unboxing the return value.
+ * <p>
+ * A call is "generic" (in MethodHandle terms) if its MethodType features
+ * only Object arguments.  A non-generic call therefore features
+ * primitives and/or reference types other than Object.
+ * An adapter has types for its incoming and outgoing calls.
+ * The incoming call type is simply determined by the adapter's type
+ * (the MethodType it presents to callers).  The outgoing call type
+ * is determined by the adapter's target (a MethodHandle that the adapter
+ * either binds internally or else takes as a leading argument).
+ * (To stretch the term, adapter-like method handles may have multiple
+ * targets or be polymorphic across multiple call types.)
+ * @author jrose
+ */
+class FromGeneric {
+    // type for the outgoing call (may have primitives, etc.)
+    private final MethodType targetType;
+    // type of the outgoing call internal to the adapter
+    private final MethodType internalType;
+    // prototype adapter (clone and customize for each new target!)
+    private final Adapter adapter;
+    // entry point for adapter (Adapter mh, a...) => ...
+    private final MethodHandle entryPoint;
+    // unboxing invoker of type (MH, Object**N) => raw return value
+    // it makes up the difference of internalType => targetType
+    private final MethodHandle unboxingInvoker;
+    // conversion which boxes a the target's raw return value
+    private final MethodHandle returnConversion;
+
+    /** Compute and cache information common to all unboxing adapters
+     *  that can call out to targets of the erasure-family of the given erased type.
+     */
+    private FromGeneric(MethodType targetType) {
+        this.targetType = targetType;
+        MethodType internalType0;
+        // the target invoker will generally need casts on reference arguments
+        Adapter ad = findAdapter(internalType0 = targetType.erase());
+        if (ad != null) {
+            // Immediate hit to exactly the adapter we want,
+            // with no monkeying around with primitive types.
+            this.internalType = internalType0;
+            this.adapter = ad;
+            this.entryPoint = ad.prototypeEntryPoint();
+            this.returnConversion = computeReturnConversion(targetType, internalType0);
+            this.unboxingInvoker = computeUnboxingInvoker(targetType, internalType0);
+            return;
+        }
+
+        // outgoing primitive arguments will be wrapped; unwrap them
+        MethodType primsAsObj = targetType.form().primArgsAsBoxes();
+        MethodType objArgsRawRet = primsAsObj.form().primsAsInts();
+        if (objArgsRawRet != targetType)
+            ad = findAdapter(internalType0 = objArgsRawRet);
+        if (ad == null) {
+            ad = buildAdapterFromBytecodes(internalType0 = targetType);
+        }
+        this.internalType = internalType0;
+        this.adapter = ad;
+        MethodType tepType = targetType.insertParameterTypes(0, adapter.getClass());
+        this.entryPoint = ad.prototypeEntryPoint();
+        this.returnConversion = computeReturnConversion(targetType, internalType0);
+        this.unboxingInvoker = computeUnboxingInvoker(targetType, internalType0);
+    }
+
+    /**
+     * The typed target will be called according to targetType.
+     * The adapter code will in fact see the raw result from internalType,
+     * and must box it into an object.  Produce a converter for this.
+     */
+    private static MethodHandle computeReturnConversion(
+            MethodType targetType, MethodType internalType) {
+        Class<?> tret = targetType.returnType();
+        Class<?> iret = internalType.returnType();
+        Wrapper wrap = Wrapper.forBasicType(tret);
+        if (!iret.isPrimitive()) {
+            assert(iret == Object.class);
+            return ValueConversions.identity();
+        } else if (wrap.primitiveType() == iret) {
+            return ValueConversions.box(wrap, false);
+        } else {
+            assert(tret == double.class ? iret == long.class : iret == int.class);
+            return ValueConversions.boxRaw(wrap, false);
+        }
+    }
+
+    /**
+     * The typed target will need an exact invocation point; provide it here.
+     * The adapter will possibly need to make a slightly different call,
+     * so adapt the invoker.  This way, the logic for making up the
+     * difference between what the adapter can call and what the target
+     * needs can be cached once per type.
+     */
+    private static MethodHandle computeUnboxingInvoker(
+            MethodType targetType, MethodType internalType) {
+        // All the adapters we have here have reference-untyped internal calls.
+        assert(internalType == internalType.erase());
+        MethodHandle invoker = targetType.invokers().exactInvoker();
+        // cast all narrow reference types, unbox all primitive arguments:
+        MethodType fixArgsType = internalType.changeReturnType(targetType.returnType());
+        MethodHandle fixArgs = MethodHandleImpl.convertArguments(
+                                 invoker, Invokers.invokerType(fixArgsType),
+                                 invoker.type(), null);
+        if (fixArgs == null)
+            throw new InternalError("bad fixArgs");
+        // reinterpret the calling sequence as raw:
+        MethodHandle retyper = AdapterMethodHandle.makeRetypeRaw(
+                                        Invokers.invokerType(internalType), fixArgs);
+        if (retyper == null)
+            throw new InternalError("bad retyper");
+        return retyper;
+    }
+
+    Adapter makeInstance(MethodHandle typedTarget) {
+        MethodType type = typedTarget.type();
+        if (type == targetType) {
+            return adapter.makeInstance(entryPoint, unboxingInvoker, returnConversion, typedTarget);
+        }
+        // my erased-type is not exactly the same as the desired type
+        assert(type.erase() == targetType);  // else we are busted
+        MethodHandle invoker = computeUnboxingInvoker(type, internalType);
+        return adapter.makeInstance(entryPoint, invoker, returnConversion, typedTarget);
+    }
+
+    /** Build an adapter of the given generic type, which invokes typedTarget
+     *  on the incoming arguments, after unboxing as necessary.
+     *  The return value is boxed if necessary.
+     * @param genericType  the required type of the result
+     * @param typedTarget the target
+     * @return an adapter method handle
+     */
+    public static MethodHandle make(MethodHandle typedTarget) {
+        MethodType type = typedTarget.type();
+        if (type == type.generic())  return typedTarget;
+        return FromGeneric.of(type).makeInstance(typedTarget);
+    }
+
+    /** Return the adapter information for this type's erasure. */
+    static FromGeneric of(MethodType type) {
+        MethodTypeForm form = type.form();
+        FromGeneric fromGen = form.fromGeneric;
+        if (fromGen == null)
+            form.fromGeneric = fromGen = new FromGeneric(form.erasedType());
+        return fromGen;
+    }
+
+    public String toString() {
+        return "FromGeneric"+targetType;
+    }
+
+    /* Create an adapter that handles spreading calls for the given type. */
+    static Adapter findAdapter(MethodType internalType) {
+        MethodType entryType = internalType.generic();
+        MethodTypeForm form = internalType.form();
+        Class<?> rtype = internalType.returnType();
+        int argc = form.parameterCount();
+        int lac = form.longPrimitiveParameterCount();
+        int iac = form.primitiveParameterCount() - lac;
+        String intsAndLongs = (iac > 0 ? "I"+iac : "")+(lac > 0 ? "J"+lac : "");
+        String rawReturn = String.valueOf(Wrapper.forPrimitiveType(rtype).basicTypeChar());
+        String cname0 = rawReturn + argc;
+        String cname1 = "A"       + argc;
+        String[] cnames = { cname0+intsAndLongs, cname0, cname1+intsAndLongs, cname1 };
+        String iname = "invoke_"+cname0+intsAndLongs;
+        // e.g., D5I2, D5, L5I2, L5; invoke_D5
+        for (String cname : cnames) {
+            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
+            if (acls == null)  continue;
+            // see if it has the required invoke method
+            MethodHandle entryPoint = null;
+            try {
+                entryPoint = IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
+            } catch (ReflectiveOperationException ex) {
+            }
+            if (entryPoint == null)  continue;
+            Constructor<? extends Adapter> ctor = null;
+            try {
+                ctor = acls.getDeclaredConstructor(MethodHandle.class);
+            } catch (NoSuchMethodException ex) {
+            } catch (SecurityException ex) {
+            }
+            if (ctor == null)  continue;
+            try {
+                // Produce an instance configured as a prototype.
+                return ctor.newInstance(entryPoint);
+            } catch (IllegalArgumentException ex) {
+            } catch (InvocationTargetException wex) {
+                Throwable ex = wex.getTargetException();
+                if (ex instanceof Error)  throw (Error)ex;
+                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
+            } catch (InstantiationException ex) {
+            } catch (IllegalAccessException ex) {
+            }
+        }
+        return null;
+    }
+
+    static Adapter buildAdapterFromBytecodes(MethodType internalType) {
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    /**
+     * This adapter takes some untyped arguments, and returns an untyped result.
+     * Internally, it applies the invoker to the target, which causes the
+     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
+     * This result is passed to convert, which is responsible for
+     * converting the raw result into a boxed object.
+     * The invoker is kept separate from the target because it can be
+     * generated once per type erasure family, and reused across adapters.
+     */
+    static abstract class Adapter extends BoundMethodHandle {
+        /*
+         * class X<<R,int N>> extends Adapter {
+         *   (MH, Object**N)=>raw(R) invoker;
+         *   (any**N)=>R target;
+         *   raw(R)=>Object convert;
+         *   Object invoke(Object**N a) = convert(invoker(target, a...))
+         * }
+         */
+        protected final MethodHandle invoker;  // (MH, Object**N) => raw(R)
+        protected final MethodHandle convert;  // raw(R) => Object
+        protected final MethodHandle target;   // (any**N) => R
+
+        @Override
+        public String toString() {
+            return addTypeString(target, this);
+        }
+
+        protected boolean isPrototype() { return target == null; }
+        protected Adapter(MethodHandle entryPoint) {
+            this(entryPoint, null, entryPoint, null);
+            assert(isPrototype());
+        }
+        protected MethodHandle prototypeEntryPoint() {
+            if (!isPrototype())  throw new InternalError();
+            return convert;
+        }
+
+        protected Adapter(MethodHandle entryPoint,
+                          MethodHandle invoker, MethodHandle convert, MethodHandle target) {
+            super(entryPoint);
+            this.invoker = invoker;
+            this.convert = convert;
+            this.target  = target;
+        }
+
+        /** Make a copy of self, with new fields. */
+        protected abstract Adapter makeInstance(MethodHandle entryPoint,
+                MethodHandle invoker, MethodHandle convert, MethodHandle target);
+        // { return new ThisType(entryPoint, convert, target); }
+
+        /// Conversions on the value returned from the target.
+        protected Object convert_L(Object result) throws Throwable { return convert.invokeExact(result); }
+        protected Object convert_I(int    result) throws Throwable { return convert.invokeExact(result); }
+        protected Object convert_J(long   result) throws Throwable { return convert.invokeExact(result); }
+        protected Object convert_F(float  result) throws Throwable { return convert.invokeExact(result); }
+        protected Object convert_D(double result) throws Throwable { return convert.invokeExact(result); }
+
+        static private final String CLASS_PREFIX; // "java.lang.invoke.FromGeneric$"
+        static {
+            String aname = Adapter.class.getName();
+            String sname = Adapter.class.getSimpleName();
+            if (!aname.endsWith(sname))  throw new InternalError();
+            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
+        }
+        /** Find a sibing class of Adapter. */
+        static Class<? extends Adapter> findSubClass(String name) {
+            String cname = Adapter.CLASS_PREFIX + name;
+            try {
+                return Class.forName(cname).asSubclass(Adapter.class);
+            } catch (ClassNotFoundException ex) {
+                return null;
+            } catch (ClassCastException ex) {
+                return null;
+            }
+        }
+    }
+
+    /* generated classes follow this pattern:
+    static class xA2 extends Adapter {
+        protected xA2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected xA2(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected xA2 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new xA2(e, i, c, t); }
+        protected Object invoke_L2(Object a0, Object a1) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_I2(Object a0, Object a1) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_J2(Object a0, Object a1) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_F2(Object a0, Object a1) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_D2(Object a0, Object a1) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1)); }
+    }
+    // */
+
+/*
+: SHELL; n=FromGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
+//{{{
+import java.util.*;
+class genclasses {
+    static String[] TYPES = { "Object",    "int   ",    "long  ",    "float ",    "double" };
+    static String[] WRAPS = { "         ", "(Integer)", "(Long)   ", "(Float)  ", "(Double) " };
+    static String[] TCHARS = { "L",     "I",      "J",      "F",      "D",     "A" };
+    static String[][] TEMPLATES = { {
+        "@for@ arity=0..10  rcat<=4 nrefs<=99 nints=0   nlongs=0",
+        "    //@each-cat@",
+        "    static class @cat@ extends Adapter {",
+        "        protected @cat@(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype",
+        "        protected @cat@(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)",
+        "                        { super(e, i, c, t); }",
+        "        protected @cat@ makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)",
+        "                        { return new @cat@(e, i, c, t); }",
+        "        //@each-R@",
+        "        protected Object invoke_@catN@(@Tvav@) throws Throwable { return convert_@Rc@((@R@)@W@invoker.invokeExact(target@av@)); }",
+        "        //@end-R@",
+        "    }",
+    } };
+    static final String NEWLINE_INDENT = "\n                ";
+    enum VAR {
+        cat, catN, R, Rc, W, av, Tvav, Ovav;
+        public final String pattern = "@"+toString().replace('_','.')+"@";
+        public String binding;
+        static void makeBindings(boolean topLevel, int rcat, int nrefs, int nints, int nlongs) {
+            int nargs = nrefs + nints + nlongs;
+            if (topLevel)
+                VAR.cat.binding = catstr(ALL_RETURN_TYPES ? TYPES.length : rcat, nrefs, nints, nlongs);
+            VAR.catN.binding = catstr(rcat, nrefs, nints, nlongs);
+            VAR.R.binding = TYPES[rcat];
+            VAR.Rc.binding = TCHARS[rcat];
+            VAR.W.binding = WRAPS[rcat];
+            String[] Tv = new String[nargs];
+            String[] av = new String[nargs];
+            String[] Tvav = new String[nargs];
+            String[] Ovav = new String[nargs];
+            for (int i = 0; i < nargs; i++) {
+                int tcat = (i < nrefs) ? 0 : (i < nrefs + nints) ? 1 : 2;
+                Tv[i] = TYPES[tcat];
+                av[i] = arg(i);
+                Tvav[i] = param(Tv[i], av[i]);
+                Ovav[i] = param("Object", av[i]);
+            }
+            VAR.av.binding = comma(", ", av);
+            VAR.Tvav.binding = comma(Tvav);
+            VAR.Ovav.binding = comma(Ovav);
+        }
+        static String arg(int i) { return "a"+i; }
+        static String param(String t, String a) { return t+" "+a; }
+        static String comma(String[] v) { return comma("", v); }
+        static String comma(String sep, String[] v) {
+            if (v.length == 0)  return "";
+            String res = sep+v[0];
+            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
+            return res;
+        }
+        static String transform(String string) {
+            for (VAR var : values())
+                string = string.replaceAll(var.pattern, var.binding);
+            return string;
+        }
+    }
+    static String[] stringsIn(String[] strings, int beg, int end) {
+        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
+    }
+    static String[] stringsBefore(String[] strings, int pos) {
+        return stringsIn(strings, 0, pos);
+    }
+    static String[] stringsAfter(String[] strings, int pos) {
+        return stringsIn(strings, pos, strings.length);
+    }
+    static int indexAfter(String[] strings, int pos, String tag) {
+        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
+    }
+    static int indexBefore(String[] strings, int pos, String tag) {
+        for (int i = pos, end = strings.length; ; i++) {
+            if (i == end || strings[i].endsWith(tag))  return i;
+        }
+    }
+    static int MIN_ARITY, MAX_ARITY, MAX_RCAT, MAX_REFS, MAX_INTS, MAX_LONGS;
+    static boolean ALL_ARG_TYPES, ALL_RETURN_TYPES;
+    static HashSet<String> done = new HashSet<String>();
+    public static void main(String... av) {
+        for (String[] template : TEMPLATES) {
+            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
+            String[] forLines = stringsBefore(template, forLinesLimit);
+            template = stringsAfter(template, forLinesLimit);
+            for (String forLine : forLines)
+                expandTemplate(forLine, template);
+        }
+    }
+    static void expandTemplate(String forLine, String[] template) {
+        String[] params = forLine.split("[^0-9]+");
+        if (params[0].length() == 0)  params = stringsAfter(params, 1);
+        System.out.println("//params="+Arrays.asList(params));
+        int pcur = 0;
+        MIN_ARITY = Integer.valueOf(params[pcur++]);
+        MAX_ARITY = Integer.valueOf(params[pcur++]);
+        MAX_RCAT  = Integer.valueOf(params[pcur++]);
+        MAX_REFS  = Integer.valueOf(params[pcur++]);
+        MAX_INTS  = Integer.valueOf(params[pcur++]);
+        MAX_LONGS = Integer.valueOf(params[pcur++]);
+        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
+        if (MAX_RCAT >= TYPES.length)  MAX_RCAT = TYPES.length - 1;
+        ALL_ARG_TYPES = (indexBefore(template, 0, "@each-Tv@") < template.length);
+        ALL_RETURN_TYPES = (indexBefore(template, 0, "@each-R@") < template.length);
+        for (int nargs = MIN_ARITY; nargs <= MAX_ARITY; nargs++) {
+            for (int rcat = 0; rcat <= MAX_RCAT; rcat++) {
+                expandTemplate(template, true, rcat, nargs, 0, 0);
+                if (ALL_ARG_TYPES)  break;
+                expandTemplateForPrims(template, true, rcat, nargs, 1, 1);
+                if (ALL_RETURN_TYPES)  break;
+            }
+        }
+    }
+    static String catstr(int rcat, int nrefs, int nints, int nlongs) {
+        int nargs = nrefs + nints + nlongs;
+        String cat = TCHARS[rcat] + nargs;
+        if (!ALL_ARG_TYPES)  cat += (nints==0?"":"I"+nints)+(nlongs==0?"":"J"+nlongs);
+        return cat;
+    }
+    static void expandTemplateForPrims(String[] template, boolean topLevel, int rcat, int nargs, int minints, int minlongs) {
+        for (int isLong = 0; isLong <= 1; isLong++) {
+            for (int nprims = 1; nprims <= nargs; nprims++) {
+                int nrefs = nargs - nprims;
+                int nints = ((1-isLong) * nprims);
+                int nlongs = (isLong * nprims);
+                expandTemplate(template, topLevel, rcat, nrefs, nints, nlongs);
+            }
+        }
+    }
+    static void expandTemplate(String[] template, boolean topLevel,
+                               int rcat, int nrefs, int nints, int nlongs) {
+        int nargs = nrefs + nints + nlongs;
+        if (nrefs > MAX_REFS || nints > MAX_INTS || nlongs > MAX_LONGS)  return;
+        VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
+        if (topLevel && !done.add(VAR.cat.binding)) {
+            System.out.println("    //repeat "+VAR.cat.binding);
+            return;
+        }
+        for (int i = 0; i < template.length; i++) {
+            String line = template[i];
+            if (line.endsWith("@each-cat@")) {
+                // ignore
+            } else if (line.endsWith("@each-R@")) {
+                int blockEnd = indexAfter(template, i, "@end-R@");
+                String[] block = stringsIn(template, i+1, blockEnd-1);
+                for (int rcat1 = rcat; rcat1 <= MAX_RCAT; rcat1++)
+                    expandTemplate(block, false, rcat1, nrefs, nints, nlongs);
+                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
+                i = blockEnd-1; continue;
+            } else if (line.endsWith("@each-Tv@")) {
+                int blockEnd = indexAfter(template, i, "@end-Tv@");
+                String[] block = stringsIn(template, i+1, blockEnd-1);
+                expandTemplate(block, false, rcat, nrefs, nints, nlongs);
+                expandTemplateForPrims(block, false, rcat, nargs, nints+1, nlongs+1);
+                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
+                i = blockEnd-1; continue;
+            } else {
+                System.out.println(VAR.transform(line));
+            }
+        }
+    }
+}
+//}}} */
+//params=[0, 10, 4, 99, 0, 0]
+    static class A0 extends Adapter {
+        protected A0(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A0(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A0 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A0(e, i, c, t); }
+        protected Object invoke_L0() throws Throwable { return convert_L((Object)invoker.invokeExact(target)); }
+        protected Object invoke_I0() throws Throwable { return convert_I((int)   invoker.invokeExact(target)); }
+        protected Object invoke_J0() throws Throwable { return convert_J((long)  invoker.invokeExact(target)); }
+        protected Object invoke_F0() throws Throwable { return convert_F((float) invoker.invokeExact(target)); }
+        protected Object invoke_D0() throws Throwable { return convert_D((double)invoker.invokeExact(target)); }
+    }
+    static class A1 extends Adapter {
+        protected A1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A1(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A1 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A1(e, i, c, t); }
+        protected Object invoke_L1(Object a0) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0)); }
+        protected Object invoke_I1(Object a0) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0)); }
+        protected Object invoke_J1(Object a0) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0)); }
+        protected Object invoke_F1(Object a0) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0)); }
+        protected Object invoke_D1(Object a0) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0)); }
+    }
+    static class A2 extends Adapter {
+        protected A2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A2(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A2 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A2(e, i, c, t); }
+        protected Object invoke_L2(Object a0, Object a1) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_I2(Object a0, Object a1) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_J2(Object a0, Object a1) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_F2(Object a0, Object a1) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1)); }
+        protected Object invoke_D2(Object a0, Object a1) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1)); }
+    }
+    static class A3 extends Adapter {
+        protected A3(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A3(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A3 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A3(e, i, c, t); }
+        protected Object invoke_L3(Object a0, Object a1, Object a2) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2)); }
+        protected Object invoke_I3(Object a0, Object a1, Object a2) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2)); }
+        protected Object invoke_J3(Object a0, Object a1, Object a2) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2)); }
+        protected Object invoke_F3(Object a0, Object a1, Object a2) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2)); }
+        protected Object invoke_D3(Object a0, Object a1, Object a2) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2)); }
+    }
+    static class A4 extends Adapter {
+        protected A4(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A4(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A4 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A4(e, i, c, t); }
+        protected Object invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3)); }
+        protected Object invoke_I4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3)); }
+        protected Object invoke_J4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3)); }
+        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3)); }
+        protected Object invoke_D4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3)); }
+    }
+    static class A5 extends Adapter {
+        protected A5(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A5(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A5 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A5(e, i, c, t); }
+        protected Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
+        protected Object invoke_I5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
+        protected Object invoke_J5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
+        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
+        protected Object invoke_D5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
+    }
+    static class A6 extends Adapter {
+        protected A6(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A6(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A6 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A6(e, i, c, t); }
+        protected Object invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_I6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_J6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_D6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
+    }
+    static class A7 extends Adapter {
+        protected A7(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A7(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A7 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A7(e, i, c, t); }
+        protected Object invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_I7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_J7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_D7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
+    }
+    static class A8 extends Adapter {
+        protected A8(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A8(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A8 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A8(e, i, c, t); }
+        protected Object invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_I8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_J8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_D8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
+    }
+    static class A9 extends Adapter {
+        protected A9(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A9(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A9 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A9(e, i, c, t); }
+        protected Object invoke_L9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_I9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_J9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_D9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+    }
+    static class A10 extends Adapter {
+        protected A10(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A10(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { super(e, i, c, t); }
+        protected A10 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
+                        { return new A10(e, i, c, t); }
+        protected Object invoke_L10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_I10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_J10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_D10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/InvokeDynamic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+/**
+ * This is a place-holder class.  Some HotSpot implementations need to see it.
+ */
+final class InvokeDynamic {
+    private InvokeDynamic() { throw new InternalError(); }  // do not instantiate
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/InvokeGeneric.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2009, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Adapters which manage MethodHandle.invokeGeneric calls.
+ * The JVM calls one of these when the exact type match fails.
+ * @author jrose
+ */
+class InvokeGeneric {
+    // erased type for the call, which originates from an invokeGeneric site
+    private final MethodType erasedCallerType;
+    // an invoker of type (MT, MH; A...) -> R
+    private final MethodHandle initialInvoker;
+
+    /** Compute and cache information for this adapter, so that it can
+     *  call out to targets of the erasure-family of the given erased type.
+     */
+    /*non-public*/ InvokeGeneric(MethodType erasedCallerType) throws ReflectiveOperationException {
+        assert(erasedCallerType.equals(erasedCallerType.erase()));
+        this.erasedCallerType = erasedCallerType;
+        this.initialInvoker = makeInitialInvoker();
+        assert initialInvoker.type().equals(erasedCallerType
+                                            .insertParameterTypes(0, MethodType.class, MethodHandle.class))
+            : initialInvoker.type();
+    }
+
+    private static MethodHandles.Lookup lookup() {
+        return IMPL_LOOKUP;
+    }
+
+    /** Return the adapter information for this type's erasure. */
+    /*non-public*/ static MethodHandle genericInvokerOf(MethodType erasedCallerType) throws ReflectiveOperationException {
+        InvokeGeneric gen = new InvokeGeneric(erasedCallerType);
+        return gen.initialInvoker;
+    }
+
+    private MethodHandle makeInitialInvoker() throws ReflectiveOperationException {
+        // postDispatch = #(MH'; MT, MH; A...){MH'(MT, MH; A)}
+        MethodHandle postDispatch = makePostDispatchInvoker();
+        MethodHandle invoker;
+        if (returnConversionPossible()) {
+            invoker = MethodHandles.foldArguments(postDispatch,
+                                                  dispatcher("dispatchWithConversion"));
+        } else {
+            invoker = MethodHandles.foldArguments(postDispatch, dispatcher("dispatch"));
+        }
+        return invoker;
+    }
+
+    private static final Class<?>[] EXTRA_ARGS = { MethodType.class, MethodHandle.class };
+    private MethodHandle makePostDispatchInvoker() {
+        // Take (MH'; MT, MH; A...) and run MH'(MT, MH; A...).
+        MethodType invokerType = erasedCallerType.insertParameterTypes(0, EXTRA_ARGS);
+        return invokerType.invokers().exactInvoker();
+    }
+    private MethodHandle dropDispatchArguments(MethodHandle targetInvoker) {
+        assert(targetInvoker.type().parameterType(0) == MethodHandle.class);
+        return MethodHandles.dropArguments(targetInvoker, 1, EXTRA_ARGS);
+    }
+
+    private MethodHandle dispatcher(String dispatchName) throws ReflectiveOperationException {
+        return lookup().bind(this, dispatchName,
+                             MethodType.methodType(MethodHandle.class,
+                                                   MethodType.class, MethodHandle.class));
+    }
+
+    static final boolean USE_AS_TYPE_PATH = true;
+
+    /** Return a method handle to invoke on the callerType, target, and remaining arguments.
+     *  The method handle must finish the call.
+     *  This is the first look at the caller type and target.
+     */
+    private MethodHandle dispatch(MethodType callerType, MethodHandle target) {
+        MethodType targetType = target.type();
+        if (USE_AS_TYPE_PATH || target.isVarargsCollector()) {
+            MethodHandle newTarget = target.asType(callerType);
+            targetType = callerType;
+            Invokers invokers = targetType.invokers();
+            MethodHandle invoker = invokers.erasedInvokerWithDrops;
+            if (invoker == null) {
+                invokers.erasedInvokerWithDrops = invoker =
+                    dropDispatchArguments(invokers.erasedInvoker());
+            }
+            return invoker.bindTo(newTarget);
+        }
+        throw new RuntimeException("NYI");
+    }
+
+    private MethodHandle dispatchWithConversion(MethodType callerType, MethodHandle target) {
+        MethodHandle finisher = dispatch(callerType, target);
+        if (returnConversionNeeded(callerType, target))
+            finisher = addReturnConversion(finisher, callerType.returnType());  //FIXME: slow
+        return finisher;
+    }
+
+    private boolean returnConversionPossible() {
+        Class<?> needType = erasedCallerType.returnType();
+        return !needType.isPrimitive();
+    }
+    private boolean returnConversionNeeded(MethodType callerType, MethodHandle target) {
+        Class<?> needType = callerType.returnType();
+        if (needType == erasedCallerType.returnType())
+            return false;  // no conversions possible, since must be primitive or Object
+        Class<?> haveType = target.type().returnType();
+        if (VerifyType.isNullConversion(haveType, needType))
+            return false;
+        return true;
+    }
+    private MethodHandle addReturnConversion(MethodHandle target, Class<?> type) {
+        if (true) throw new RuntimeException("NYI");
+        // FIXME: This is slow because it creates a closure node on every call that requires a return cast.
+        MethodType targetType = target.type();
+        MethodHandle caster = ValueConversions.identity(type);
+        caster = caster.asType(MethodType.methodType(type, targetType.returnType()));
+        // Drop irrelevant arguments, because we only care about the return value:
+        caster = MethodHandles.dropArguments(caster, 1, targetType.parameterList());
+        MethodHandle result = MethodHandles.foldArguments(caster, target);
+        return result.asType(target.type());
+    }
+
+    public String toString() {
+        return "InvokeGeneric"+erasedCallerType;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/Invokers.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.empty.Empty;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Construction and caching of often-used invokers.
+ * @author jrose
+ */
+class Invokers {
+    // exact type (sans leading taget MH) for the outgoing call
+    private final MethodType targetType;
+
+    // exact invoker for the outgoing call
+    private /*lazy*/ MethodHandle exactInvoker;
+
+    // erased (partially untyped but with primitives) invoker for the outgoing call
+    private /*lazy*/ MethodHandle erasedInvoker;
+    /*lazy*/ MethodHandle erasedInvokerWithDrops;  // for InvokeGeneric
+
+    // generic (untyped) invoker for the outgoing call
+    private /*lazy*/ MethodHandle genericInvoker;
+
+    // generic (untyped) invoker for the outgoing call; accepts a single Object[]
+    private final /*lazy*/ MethodHandle[] spreadInvokers;
+
+    // invoker for an unbound callsite
+    private /*lazy*/ MethodHandle uninitializedCallSite;
+
+    /** Compute and cache information common to all collecting adapters
+     *  that implement members of the erasure-family of the given erased type.
+     */
+    /*non-public*/ Invokers(MethodType targetType) {
+        this.targetType = targetType;
+        this.spreadInvokers = new MethodHandle[targetType.parameterCount()+1];
+    }
+
+    /*non-public*/ static MethodType invokerType(MethodType targetType) {
+        return targetType.insertParameterTypes(0, MethodHandle.class);
+    }
+
+    /*non-public*/ MethodHandle exactInvoker() {
+        MethodHandle invoker = exactInvoker;
+        if (invoker != null)  return invoker;
+        try {
+            invoker = IMPL_LOOKUP.findVirtual(MethodHandle.class, "invokeExact", targetType);
+        } catch (ReflectiveOperationException ex) {
+            throw new InternalError("JVM cannot find invoker for "+targetType);
+        }
+        assert(invokerType(targetType) == invoker.type());
+        exactInvoker = invoker;
+        return invoker;
+    }
+
+    /*non-public*/ MethodHandle genericInvoker() {
+        MethodHandle invoker1 = exactInvoker();
+        MethodHandle invoker = genericInvoker;
+        if (invoker != null)  return invoker;
+        MethodType genericType = targetType.generic();
+        invoker = MethodHandles.convertArguments(invoker1, invokerType(genericType));
+        genericInvoker = invoker;
+        return invoker;
+    }
+
+    /*non-public*/ MethodHandle erasedInvoker() {
+        MethodHandle invoker1 = exactInvoker();
+        MethodHandle invoker = erasedInvoker;
+        if (invoker != null)  return invoker;
+        MethodType erasedType = targetType.erase();
+        if (erasedType == targetType.generic())
+            invoker = genericInvoker();
+        else
+            invoker = MethodHandles.convertArguments(invoker1, invokerType(erasedType));
+        erasedInvoker = invoker;
+        return invoker;
+    }
+
+    /*non-public*/ MethodHandle spreadInvoker(int objectArgCount) {
+        MethodHandle vaInvoker = spreadInvokers[objectArgCount];
+        if (vaInvoker != null)  return vaInvoker;
+        MethodHandle gInvoker = genericInvoker();
+        vaInvoker = gInvoker.asSpreader(Object[].class, targetType.parameterCount() - objectArgCount);
+        spreadInvokers[objectArgCount] = vaInvoker;
+        return vaInvoker;
+    }
+
+    private static MethodHandle THROW_UCS = null;
+
+    /*non-public*/ MethodHandle uninitializedCallSite() {
+        MethodHandle invoker = uninitializedCallSite;
+        if (invoker != null)  return invoker;
+        if (targetType.parameterCount() > 0) {
+            MethodType type0 = targetType.dropParameterTypes(0, targetType.parameterCount());
+            Invokers invokers0 = type0.invokers();
+            invoker = MethodHandles.dropArguments(invokers0.uninitializedCallSite(),
+                                                  0, targetType.parameterList());
+            assert(invoker.type().equals(targetType));
+            uninitializedCallSite = invoker;
+            return invoker;
+        }
+        if (THROW_UCS == null) {
+            try {
+                THROW_UCS = IMPL_LOOKUP
+                    .findStatic(CallSite.class, "uninitializedCallSite",
+                                MethodType.methodType(Empty.class));
+            } catch (ReflectiveOperationException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+        invoker = AdapterMethodHandle.makeRetypeRaw(targetType, THROW_UCS);
+        assert(invoker.type().equals(targetType));
+        uninitializedCallSite = invoker;
+        return invoker;
+    }
+
+    public String toString() {
+        return "Invokers"+targetType;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MemberName.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,718 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.BytecodeDescriptor;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Member;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * A {@code MemberName} is a compact symbolic datum which fully characterizes
+ * a method or field reference.
+ * A member name refers to a field, method, constructor, or member type.
+ * Every member name has a simple name (a string) and a type (either a Class or MethodType).
+ * A member name may also have a non-null declaring class, or it may be simply
+ * a naked name/type pair.
+ * A member name may also have non-zero modifier flags.
+ * Finally, a member name may be either resolved or unresolved.
+ * If it is resolved, the existence of the named
+ * <p>
+ * Whether resolved or not, a member name provides no access rights or
+ * invocation capability to its possessor.  It is merely a compact
+ * representation of all symbolic information necessary to link to
+ * and properly use the named member.
+ * <p>
+ * When resolved, a member name's internal implementation may include references to JVM metadata.
+ * This representation is stateless and only decriptive.
+ * It provides no private information and no capability to use the member.
+ * <p>
+ * By contrast, a {@linkplain java.lang.reflect.Method} contains fuller information
+ * about the internals of a method (except its bytecodes) and also
+ * allows invocation.  A MemberName is much lighter than a Method,
+ * since it contains about 7 fields to the 16 of Method (plus its sub-arrays),
+ * and those seven fields omit much of the information in Method.
+ * @author jrose
+ */
+/*non-public*/ final class MemberName implements Member, Cloneable {
+    private Class<?>   clazz;       // class in which the method is defined
+    private String     name;        // may be null if not yet materialized
+    private Object     type;        // may be null if not yet materialized
+    private int        flags;       // modifier bits; see reflect.Modifier
+
+    private Object     vmtarget;    // VM-specific target value
+    private int        vmindex;     // method index within class or interface
+
+    { vmindex = VM_INDEX_UNINITIALIZED; }
+
+    /** Return the declaring class of this member.
+     *  In the case of a bare name and type, the declaring class will be null.
+     */
+    public Class<?> getDeclaringClass() {
+        if (clazz == null && isResolved()) {
+            expandFromVM();
+        }
+        return clazz;
+    }
+
+    /** Utility method producing the class loader of the declaring class. */
+    public ClassLoader getClassLoader() {
+        return clazz.getClassLoader();
+    }
+
+    /** Return the simple name of this member.
+     *  For a type, it is the same as {@link Class#getSimpleName}.
+     *  For a method or field, it is the simple name of the member.
+     *  For a constructor, it is always {@code "&lt;init&gt;"}.
+     */
+    public String getName() {
+        if (name == null) {
+            expandFromVM();
+            if (name == null)  return null;
+        }
+        return name;
+    }
+
+    /** Return the declared type of this member, which
+     *  must be a method or constructor.
+     */
+    public MethodType getMethodType() {
+        if (type == null) {
+            expandFromVM();
+            if (type == null)  return null;
+        }
+        if (!isInvocable())
+            throw newIllegalArgumentException("not invocable, no method type");
+        if (type instanceof MethodType) {
+            return (MethodType) type;
+        }
+        if (type instanceof String) {
+            String sig = (String) type;
+            MethodType res = MethodType.fromMethodDescriptorString(sig, getClassLoader());
+            this.type = res;
+            return res;
+        }
+        if (type instanceof Object[]) {
+            Object[] typeInfo = (Object[]) type;
+            Class<?>[] ptypes = (Class<?>[]) typeInfo[1];
+            Class<?> rtype = (Class<?>) typeInfo[0];
+            MethodType res = MethodType.methodType(rtype, ptypes);
+            this.type = res;
+            return res;
+        }
+        throw new InternalError("bad method type "+type);
+    }
+
+    /** Return the actual type under which this method or constructor must be invoked.
+     *  For non-static methods or constructors, this is the type with a leading parameter,
+     *  a reference to declaring class.  For static methods, it is the same as the declared type.
+     */
+    public MethodType getInvocationType() {
+        MethodType itype = getMethodType();
+        if (!isStatic())
+            itype = itype.insertParameterTypes(0, clazz);
+        return itype;
+    }
+
+    /** Utility method producing the parameter types of the method type. */
+    public Class<?>[] getParameterTypes() {
+        return getMethodType().parameterArray();
+    }
+
+    /** Utility method producing the return type of the method type. */
+    public Class<?> getReturnType() {
+        return getMethodType().returnType();
+    }
+
+    /** Return the declared type of this member, which
+     *  must be a field or type.
+     *  If it is a type member, that type itself is returned.
+     */
+    public Class<?> getFieldType() {
+        if (type == null) {
+            expandFromVM();
+            if (type == null)  return null;
+        }
+        if (isInvocable())
+            throw newIllegalArgumentException("not a field or nested class, no simple type");
+        if (type instanceof Class<?>) {
+            return (Class<?>) type;
+        }
+        if (type instanceof String) {
+            String sig = (String) type;
+            MethodType mtype = MethodType.fromMethodDescriptorString("()"+sig, getClassLoader());
+            Class<?> res = mtype.returnType();
+            this.type = res;
+            return res;
+        }
+        throw new InternalError("bad field type "+type);
+    }
+
+    /** Utility method to produce either the method type or field type of this member. */
+    public Object getType() {
+        return (isInvocable() ? getMethodType() : getFieldType());
+    }
+
+    /** Utility method to produce the signature of this member,
+     *  used within the class file format to describe its type.
+     */
+    public String getSignature() {
+        if (type == null) {
+            expandFromVM();
+            if (type == null)  return null;
+        }
+        if (type instanceof String)
+            return (String) type;
+        if (isInvocable())
+            return BytecodeDescriptor.unparse(getMethodType());
+        else
+            return BytecodeDescriptor.unparse(getFieldType());
+    }
+
+    /** Return the modifier flags of this member.
+     *  @see java.lang.reflect.Modifier
+     */
+    public int getModifiers() {
+        return (flags & RECOGNIZED_MODIFIERS);
+    }
+
+    private void setFlags(int flags) {
+        this.flags = flags;
+        assert(testAnyFlags(ALL_KINDS));
+    }
+
+    private boolean testFlags(int mask, int value) {
+        return (flags & mask) == value;
+    }
+    private boolean testAllFlags(int mask) {
+        return testFlags(mask, mask);
+    }
+    private boolean testAnyFlags(int mask) {
+        return !testFlags(mask, 0);
+    }
+
+    /** Utility method to query the modifier flags of this member. */
+    public boolean isStatic() {
+        return Modifier.isStatic(flags);
+    }
+    /** Utility method to query the modifier flags of this member. */
+    public boolean isPublic() {
+        return Modifier.isPublic(flags);
+    }
+    /** Utility method to query the modifier flags of this member. */
+    public boolean isPrivate() {
+        return Modifier.isPrivate(flags);
+    }
+    /** Utility method to query the modifier flags of this member. */
+    public boolean isProtected() {
+        return Modifier.isProtected(flags);
+    }
+    /** Utility method to query the modifier flags of this member. */
+    public boolean isFinal() {
+        return Modifier.isFinal(flags);
+    }
+    /** Utility method to query the modifier flags of this member. */
+    public boolean isAbstract() {
+        return Modifier.isAbstract(flags);
+    }
+    // let the rest (native, volatile, transient, etc.) be tested via Modifier.isFoo
+
+    // unofficial modifier flags, used by HotSpot:
+    static final int BRIDGE    = 0x00000040;
+    static final int VARARGS   = 0x00000080;
+    static final int SYNTHETIC = 0x00001000;
+    static final int ANNOTATION= 0x00002000;
+    static final int ENUM      = 0x00004000;
+    /** Utility method to query the modifier flags of this member; returns false if the member is not a method. */
+    public boolean isBridge() {
+        return testAllFlags(IS_METHOD | BRIDGE);
+    }
+    /** Utility method to query the modifier flags of this member; returns false if the member is not a method. */
+    public boolean isVarargs() {
+        return testAllFlags(VARARGS) && isInvocable();
+    }
+    /** Utility method to query the modifier flags of this member; returns false if the member is not a method. */
+    public boolean isSynthetic() {
+        return testAllFlags(SYNTHETIC);
+    }
+
+    static final String CONSTRUCTOR_NAME = "<init>";  // the ever-popular
+
+    // modifiers exported by the JVM:
+    static final int RECOGNIZED_MODIFIERS = 0xFFFF;
+
+    // private flags, not part of RECOGNIZED_MODIFIERS:
+    static final int
+            IS_METHOD      = MN_IS_METHOD,      // method (not constructor)
+            IS_CONSTRUCTOR = MN_IS_CONSTRUCTOR, // constructor
+            IS_FIELD       = MN_IS_FIELD,       // field
+            IS_TYPE        = MN_IS_TYPE;        // nested type
+    static final int  // for MethodHandleNatives.getMembers
+            SEARCH_SUPERCLASSES = MN_SEARCH_SUPERCLASSES,
+            SEARCH_INTERFACES   = MN_SEARCH_INTERFACES;
+
+    static final int ALL_ACCESS = Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED;
+    static final int ALL_KINDS = IS_METHOD | IS_CONSTRUCTOR | IS_FIELD | IS_TYPE;
+    static final int IS_INVOCABLE = IS_METHOD | IS_CONSTRUCTOR;
+    static final int IS_FIELD_OR_METHOD = IS_METHOD | IS_FIELD;
+    static final int SEARCH_ALL_SUPERS = SEARCH_SUPERCLASSES | SEARCH_INTERFACES;
+
+    /** Utility method to query whether this member is a method or constructor. */
+    public boolean isInvocable() {
+        return testAnyFlags(IS_INVOCABLE);
+    }
+    /** Utility method to query whether this member is a method, constructor, or field. */
+    public boolean isFieldOrMethod() {
+        return testAnyFlags(IS_FIELD_OR_METHOD);
+    }
+    /** Query whether this member is a method. */
+    public boolean isMethod() {
+        return testAllFlags(IS_METHOD);
+    }
+    /** Query whether this member is a constructor. */
+    public boolean isConstructor() {
+        return testAllFlags(IS_CONSTRUCTOR);
+    }
+    /** Query whether this member is a field. */
+    public boolean isField() {
+        return testAllFlags(IS_FIELD);
+    }
+    /** Query whether this member is a type. */
+    public boolean isType() {
+        return testAllFlags(IS_TYPE);
+    }
+    /** Utility method to query whether this member is neither public, private, nor protected. */
+    public boolean isPackage() {
+        return !testAnyFlags(ALL_ACCESS);
+    }
+
+    /** Initialize a query.   It is not resolved. */
+    private void init(Class<?> defClass, String name, Object type, int flags) {
+        // defining class is allowed to be null (for a naked name/type pair)
+        //name.toString();  // null check
+        //type.equals(type);  // null check
+        // fill in fields:
+        this.clazz = defClass;
+        this.name = name;
+        this.type = type;
+        setFlags(flags);
+        assert(!isResolved());
+    }
+
+    private void expandFromVM() {
+        if (!isResolved())  return;
+        if (type instanceof Object[])
+            type = null;  // don't saddle JVM w/ typeInfo
+        MethodHandleNatives.expand(this);
+    }
+
+    // Capturing information from the Core Reflection API:
+    private static int flagsMods(int flags, int mods) {
+        assert((flags & RECOGNIZED_MODIFIERS) == 0);
+        assert((mods & ~RECOGNIZED_MODIFIERS) == 0);
+        return flags | mods;
+    }
+    /** Create a name for the given reflected method.  The resulting name will be in a resolved state. */
+    public MemberName(Method m) {
+        Object[] typeInfo = { m.getReturnType(), m.getParameterTypes() };
+        init(m.getDeclaringClass(), m.getName(), typeInfo, flagsMods(IS_METHOD, m.getModifiers()));
+        // fill in vmtarget, vmindex while we have m in hand:
+        MethodHandleNatives.init(this, m);
+        assert(isResolved());
+    }
+    /** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
+    public MemberName(Constructor ctor) {
+        Object[] typeInfo = { void.class, ctor.getParameterTypes() };
+        init(ctor.getDeclaringClass(), CONSTRUCTOR_NAME, typeInfo, flagsMods(IS_CONSTRUCTOR, ctor.getModifiers()));
+        // fill in vmtarget, vmindex while we have ctor in hand:
+        MethodHandleNatives.init(this, ctor);
+        assert(isResolved());
+    }
+    /** Create a name for the given reflected field.  The resulting name will be in a resolved state. */
+    public MemberName(Field fld) {
+        init(fld.getDeclaringClass(), fld.getName(), fld.getType(), flagsMods(IS_FIELD, fld.getModifiers()));
+        // fill in vmtarget, vmindex while we have fld in hand:
+        MethodHandleNatives.init(this, fld);
+        assert(isResolved());
+    }
+    /** Create a name for the given class.  The resulting name will be in a resolved state. */
+    public MemberName(Class<?> type) {
+        init(type.getDeclaringClass(), type.getSimpleName(), type, flagsMods(IS_TYPE, type.getModifiers()));
+        vmindex = 0;  // isResolved
+        assert(isResolved());
+    }
+
+    // bare-bones constructor; the JVM will fill it in
+    MemberName() { }
+
+    // locally useful cloner
+    @Override protected MemberName clone() {
+        try {
+            return (MemberName) super.clone();
+        } catch (CloneNotSupportedException ex) {
+            throw new InternalError();
+        }
+     }
+
+    // %%% define equals/hashcode?
+
+    // Construction from symbolic parts, for queries:
+    /** Create a field or type name from the given components:  Declaring class, name, type, modifiers.
+     *  The declaring class may be supplied as null if this is to be a bare name and type.
+     *  The resulting name will in an unresolved state.
+     */
+    public MemberName(Class<?> defClass, String name, Class<?> type, int modifiers) {
+        init(defClass, name, type, IS_FIELD | (modifiers & RECOGNIZED_MODIFIERS));
+    }
+    /** Create a field or type name from the given components:  Declaring class, name, type.
+     *  The declaring class may be supplied as null if this is to be a bare name and type.
+     *  The modifier flags default to zero.
+     *  The resulting name will in an unresolved state.
+     */
+    public MemberName(Class<?> defClass, String name, Class<?> type) {
+        this(defClass, name, type, 0);
+    }
+    /** Create a method or constructor name from the given components:  Declaring class, name, type, modifiers.
+     *  It will be a constructor if and only if the name is {@code "&lt;init&gt;"}.
+     *  The declaring class may be supplied as null if this is to be a bare name and type.
+     *  The resulting name will in an unresolved state.
+     */
+    public MemberName(Class<?> defClass, String name, MethodType type, int modifiers) {
+        int flagBit = (name.equals(CONSTRUCTOR_NAME) ? IS_CONSTRUCTOR : IS_METHOD);
+        init(defClass, name, type, flagBit | (modifiers & RECOGNIZED_MODIFIERS));
+    }
+    /** Create a method or constructor name from the given components:  Declaring class, name, type, modifiers.
+     *  It will be a constructor if and only if the name is {@code "&lt;init&gt;"}.
+     *  The declaring class may be supplied as null if this is to be a bare name and type.
+     *  The modifier flags default to zero.
+     *  The resulting name will in an unresolved state.
+     */
+    public MemberName(Class<?> defClass, String name, MethodType type) {
+        this(defClass, name, type, 0);
+    }
+
+    /** Query whether this member name is resolved.
+     *  A resolved member name is one for which the JVM has found
+     *  a method, constructor, field, or type binding corresponding exactly to the name.
+     *  (Document?)
+     */
+    public boolean isResolved() {
+        return (vmindex != VM_INDEX_UNINITIALIZED);
+    }
+
+    /** Query whether this member name is resolved to a non-static, non-final method.
+     */
+    public boolean hasReceiverTypeDispatch() {
+        return (isMethod() && getVMIndex() >= 0);
+    }
+
+    /** Produce a string form of this member name.
+     *  For types, it is simply the type's own string (as reported by {@code toString}).
+     *  For fields, it is {@code "DeclaringClass.name/type"}.
+     *  For methods and constructors, it is {@code "DeclaringClass.name(ptype...)rtype"}.
+     *  If the declaring class is null, the prefix {@code "DeclaringClass."} is omitted.
+     *  If the member is unresolved, a prefix {@code "*."} is prepended.
+     */
+    @Override
+    public String toString() {
+        if (isType())
+            return type.toString();  // class java.lang.String
+        // else it is a field, method, or constructor
+        StringBuilder buf = new StringBuilder();
+        if (getDeclaringClass() != null) {
+            buf.append(getName(clazz));
+            buf.append('.');
+        }
+        String name = getName();
+        buf.append(name == null ? "*" : name);
+        Object type = getType();
+        if (!isInvocable()) {
+            buf.append('/');
+            buf.append(type == null ? "*" : getName(type));
+        } else {
+            buf.append(type == null ? "(*)*" : getName(type));
+        }
+        /*
+        buf.append('/');
+        // key: Public, private, pRotected, sTatic, Final, sYnchronized,
+        // transient/Varargs, native, (interface), abstract, sTrict, sYnthetic,
+        // (annotation), Enum, (unused)
+        final String FIELD_MOD_CHARS  = "PprTF?vt????Y?E?";
+        final String METHOD_MOD_CHARS = "PprTFybVn?atY???";
+        String modChars = (isInvocable() ? METHOD_MOD_CHARS : FIELD_MOD_CHARS);
+        for (int i = 0; i < modChars.length(); i++) {
+            if ((flags & (1 << i)) != 0) {
+                char mc = modChars.charAt(i);
+                if (mc != '?')
+                    buf.append(mc);
+            }
+        }
+         */
+        return buf.toString();
+    }
+    private static String getName(Object obj) {
+        if (obj instanceof Class<?>)
+            return ((Class<?>)obj).getName();
+        return String.valueOf(obj);
+    }
+
+    // Queries to the JVM:
+    /** Document? */
+    /*non-public*/ int getVMIndex() {
+        if (!isResolved())
+            throw newIllegalStateException("not resolved", this);
+        return vmindex;
+    }
+//    /*non-public*/ Object getVMTarget() {
+//        if (!isResolved())
+//            throw newIllegalStateException("not resolved", this);
+//        return vmtarget;
+//    }
+
+    public IllegalAccessException makeAccessException(String message, Object from) {
+        message = message + ": "+ toString();
+        if (from != null)  message += ", from " + from;
+        return new IllegalAccessException(message);
+    }
+    public ReflectiveOperationException makeAccessException(String message) {
+        message = message + ": "+ toString();
+        if (isResolved())
+            return new IllegalAccessException(message);
+        else if (isConstructor())
+            return new NoSuchMethodException(message);
+        else if (isMethod())
+            return new NoSuchMethodException(message);
+        else
+            return new NoSuchFieldException(message);
+    }
+
+    /** Actually making a query requires an access check. */
+    /*non-public*/ static Factory getFactory() {
+        return Factory.INSTANCE;
+    }
+    /** A factory type for resolving member names with the help of the VM.
+     *  TBD: Define access-safe public constructors for this factory.
+     */
+    public static class Factory {
+        private Factory() { } // singleton pattern
+        static Factory INSTANCE = new Factory();
+
+        private static int ALLOWED_FLAGS = SEARCH_ALL_SUPERS | ALL_KINDS;
+
+        /// Queries
+        List<MemberName> getMembers(Class<?> defc,
+                String matchName, Object matchType,
+                int matchFlags, Class<?> lookupClass) {
+            matchFlags &= ALLOWED_FLAGS;
+            String matchSig = null;
+            if (matchType != null) {
+                matchSig = BytecodeDescriptor.unparse(matchType);
+                if (matchSig.startsWith("("))
+                    matchFlags &= ~(ALL_KINDS & ~IS_INVOCABLE);
+                else
+                    matchFlags &= ~(ALL_KINDS & ~IS_FIELD);
+            }
+            final int BUF_MAX = 0x2000;
+            int len1 = matchName == null ? 10 : matchType == null ? 4 : 1;
+            MemberName[] buf = newMemberBuffer(len1);
+            int totalCount = 0;
+            ArrayList<MemberName[]> bufs = null;
+            int bufCount = 0;
+            for (;;) {
+                bufCount = MethodHandleNatives.getMembers(defc,
+                        matchName, matchSig, matchFlags,
+                        lookupClass,
+                        totalCount, buf);
+                if (bufCount <= buf.length) {
+                    if (bufCount < 0)  bufCount = 0;
+                    totalCount += bufCount;
+                    break;
+                }
+                // JVM returned to us with an intentional overflow!
+                totalCount += buf.length;
+                int excess = bufCount - buf.length;
+                if (bufs == null)  bufs = new ArrayList<MemberName[]>(1);
+                bufs.add(buf);
+                int len2 = buf.length;
+                len2 = Math.max(len2, excess);
+                len2 = Math.max(len2, totalCount / 4);
+                buf = newMemberBuffer(Math.min(BUF_MAX, len2));
+            }
+            ArrayList<MemberName> result = new ArrayList<MemberName>(totalCount);
+            if (bufs != null) {
+                for (MemberName[] buf0 : bufs) {
+                    Collections.addAll(result, buf0);
+                }
+            }
+            result.addAll(Arrays.asList(buf).subList(0, bufCount));
+            // Signature matching is not the same as type matching, since
+            // one signature might correspond to several types.
+            // So if matchType is a Class or MethodType, refilter the results.
+            if (matchType != null && matchType != matchSig) {
+                for (Iterator<MemberName> it = result.iterator(); it.hasNext();) {
+                    MemberName m = it.next();
+                    if (!matchType.equals(m.getType()))
+                        it.remove();
+                }
+            }
+            return result;
+        }
+        boolean resolveInPlace(MemberName m, boolean searchSupers, Class<?> lookupClass) {
+            if (m.name == null || m.type == null) {  // find unique non-overloaded name
+                Class<?> defc = m.getDeclaringClass();
+                List<MemberName> choices = null;
+                if (m.isMethod())
+                    choices = getMethods(defc, searchSupers, m.name, (MethodType) m.type, lookupClass);
+                else if (m.isConstructor())
+                    choices = getConstructors(defc, lookupClass);
+                else if (m.isField())
+                    choices = getFields(defc, searchSupers, m.name, (Class<?>) m.type, lookupClass);
+                //System.out.println("resolving "+m+" to "+choices);
+                if (choices == null || choices.size() != 1)
+                    return false;
+                if (m.name == null)  m.name = choices.get(0).name;
+                if (m.type == null)  m.type = choices.get(0).type;
+            }
+            MethodHandleNatives.resolve(m, lookupClass);
+            if (m.isResolved())  return true;
+            int matchFlags = m.flags | (searchSupers ? SEARCH_ALL_SUPERS : 0);
+            String matchSig = m.getSignature();
+            MemberName[] buf = { m };
+            int n = MethodHandleNatives.getMembers(m.getDeclaringClass(),
+                    m.getName(), matchSig, matchFlags, lookupClass, 0, buf);
+            if (n != 1)  return false;
+            return m.isResolved();
+        }
+        /** Produce a resolved version of the given member.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  If lookup fails or access is not permitted, null is returned.
+         *  Otherwise a fresh copy of the given member is returned, with modifier bits filled in.
+         */
+        public MemberName resolveOrNull(MemberName m, boolean searchSupers, Class<?> lookupClass) {
+            MemberName result = m.clone();
+            if (resolveInPlace(result, searchSupers, lookupClass))
+                return result;
+            return null;
+        }
+        /** Produce a resolved version of the given member.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  If lookup fails or access is not permitted, a {@linkplain ReflectiveOperationException} is thrown.
+         *  Otherwise a fresh copy of the given member is returned, with modifier bits filled in.
+         */
+        public
+        <NoSuchMemberException extends ReflectiveOperationException>
+        MemberName resolveOrFail(MemberName m, boolean searchSupers, Class<?> lookupClass,
+                                 Class<NoSuchMemberException> nsmClass)
+                throws IllegalAccessException, NoSuchMemberException {
+            MemberName result = resolveOrNull(m, searchSupers, lookupClass);
+            if (result != null)
+                return result;
+            ReflectiveOperationException ex = m.makeAccessException("no access");
+            if (ex instanceof IllegalAccessException)  throw (IllegalAccessException) ex;
+            throw nsmClass.cast(ex);
+        }
+        /** Return a list of all methods defined by the given class.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  Inaccessible members are not added to the last.
+         */
+        public List<MemberName> getMethods(Class<?> defc, boolean searchSupers,
+                Class<?> lookupClass) {
+            return getMethods(defc, searchSupers, null, null, lookupClass);
+        }
+        /** Return a list of matching methods defined by the given class.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Returned methods will match the name (if not null) and the type (if not null).
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  Inaccessible members are not added to the last.
+         */
+        public List<MemberName> getMethods(Class<?> defc, boolean searchSupers,
+                String name, MethodType type, Class<?> lookupClass) {
+            int matchFlags = IS_METHOD | (searchSupers ? SEARCH_ALL_SUPERS : 0);
+            return getMembers(defc, name, type, matchFlags, lookupClass);
+        }
+        /** Return a list of all constructors defined by the given class.
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  Inaccessible members are not added to the last.
+         */
+        public List<MemberName> getConstructors(Class<?> defc, Class<?> lookupClass) {
+            return getMembers(defc, null, null, IS_CONSTRUCTOR, lookupClass);
+        }
+        /** Return a list of all fields defined by the given class.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  Inaccessible members are not added to the last.
+         */
+        public List<MemberName> getFields(Class<?> defc, boolean searchSupers,
+                Class<?> lookupClass) {
+            return getFields(defc, searchSupers, null, null, lookupClass);
+        }
+        /** Return a list of all fields defined by the given class.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Returned fields will match the name (if not null) and the type (if not null).
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  Inaccessible members are not added to the last.
+         */
+        public List<MemberName> getFields(Class<?> defc, boolean searchSupers,
+                String name, Class<?> type, Class<?> lookupClass) {
+            int matchFlags = IS_FIELD | (searchSupers ? SEARCH_ALL_SUPERS : 0);
+            return getMembers(defc, name, type, matchFlags, lookupClass);
+        }
+        /** Return a list of all nested types defined by the given class.
+         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
+         *  Access checking is performed on behalf of the given {@code lookupClass}.
+         *  Inaccessible members are not added to the last.
+         */
+        public List<MemberName> getNestedTypes(Class<?> defc, boolean searchSupers,
+                Class<?> lookupClass) {
+            int matchFlags = IS_TYPE | (searchSupers ? SEARCH_ALL_SUPERS : 0);
+            return getMembers(defc, null, null, matchFlags, lookupClass);
+        }
+        private static MemberName[] newMemberBuffer(int length) {
+            MemberName[] buf = new MemberName[length];
+            // fill the buffer with dummy structs for the JVM to fill in
+            for (int i = 0; i < length; i++)
+                buf[i] = new MemberName();
+            return buf;
+        }
+    }
+
+//    static {
+//        System.out.println("Hello world!  My methods are:");
+//        System.out.println(Factory.INSTANCE.getMethods(MemberName.class, true, null));
+//    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandle.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,1028 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * A method handle is a typed, directly executable reference to an underlying method,
+ * constructor, field, or similar low-level operation, with optional
+ * transformations of arguments or return values.
+ * These transformations are quite general, and include such patterns as
+ * {@linkplain #asType conversion},
+ * {@linkplain #bindTo insertion},
+ * {@linkplain java.lang.invoke.MethodHandles#dropArguments deletion},
+ * and {@linkplain java.lang.invoke.MethodHandles#filterArguments substitution}.
+ *
+ * <h3>Method handle contents</h3>
+ * Method handles are dynamically and strongly typed according to type descriptor.
+ * They are not distinguished by the name or defining class of their underlying methods.
+ * A method handle must be invoked using type descriptor which matches
+ * the method handle's own {@linkplain #type method type}.
+ * <p>
+ * Every method handle reports its type via the {@link #type type} accessor.
+ * This type descriptor is a {@link java.lang.invoke.MethodType MethodType} object,
+ * whose structure is a series of classes, one of which is
+ * the return type of the method (or {@code void.class} if none).
+ * <p>
+ * A method handle's type controls the types of invocations it accepts,
+ * and the kinds of transformations that apply to it.
+ * <p>
+ * A method handle contains a pair of special invoker methods
+ * called {@link #invokeExact invokeExact} and {@link #invokeGeneric invokeGeneric}.
+ * Both invoker methods provide direct access to the method handle's
+ * underlying method, constructor, field, or other operation,
+ * as modified by transformations of arguments and return values.
+ * Both invokers accept calls which exactly match the method handle's own type.
+ * The {@code invokeGeneric} invoker also accepts a range of other call types.
+ * <p>
+ * Method handles are immutable and have no visible state.
+ * Of course, they can be bound to underlying methods or data which exhibit state.
+ * With respect to the Java Memory Model, any method handle will behave
+ * as if all of its (internal) fields are final variables.  This means that any method
+ * handle made visible to the application will always be fully formed.
+ * This is true even if the method handle is published through a shared
+ * variable in a data race.
+ * <p>
+ * Method handles cannot be subclassed by the user.
+ * Implementations may (or may not) create internal subclasses of {@code MethodHandle}
+ * which may be visible via the {@link java.lang.Object#getClass Object.getClass}
+ * operation.  The programmer should not draw conclusions about a method handle
+ * from its specific class, as the method handle class hierarchy (if any)
+ * may change from time to time or across implementations from different vendors.
+ *
+ * <h3>Method handle compilation</h3>
+ * A Java method call expression naming {@code invokeExact} or {@code invokeGeneric}
+ * can invoke a method handle from Java source code.
+ * From the viewpoint of source code, these methods can take any arguments
+ * and their result can be cast to any return type.
+ * Formally this is accomplished by giving the invoker methods
+ * {@code Object} return types and variable-arity {@code Object} arguments,
+ * but they have an additional quality called <em>signature polymorphism</em>
+ * which connects this freedom of invocation directly to the JVM execution stack.
+ * <p>
+ * As is usual with virtual methods, source-level calls to {@code invokeExact}
+ * and {@code invokeGeneric} compile to an {@code invokevirtual} instruction.
+ * More unusually, the compiler must record the actual argument types,
+ * and may not perform method invocation conversions on the arguments.
+ * Instead, it must push them on the stack according to their own unconverted types.
+ * The method handle object itself is pushed on the stack before the arguments.
+ * The compiler then calls the method handle with a type descriptor which
+ * describes the argument and return types.
+ * <p>
+ * To issue a complete type descriptor, the compiler must also determine
+ * the return type.  This is based on a cast on the method invocation expression,
+ * if there is one, or else {@code Object} if the invocation is an expression
+ * or else {@code void} if the invocation is a statement.
+ * The cast may be to a primitive type (but not {@code void}).
+ * <p>
+ * As a corner case, an uncasted {@code null} argument is given
+ * a type descriptor of {@code java.lang.Void}.
+ * The ambiguity with the type {@code Void} is harmless, since there are no references of type
+ * {@code Void} except the null reference.
+ *
+ * <h3>Method handle invocation</h3>
+ * The first time a {@code invokevirtual} instruction is executed
+ * it is linked, by symbolically resolving the names in the instruction
+ * and verifying that the method call is statically legal.
+ * This is true of calls to {@code invokeExact} and {@code invokeGeneric}.
+ * In this case, the type descriptor emitted by the compiler is checked for
+ * correct syntax and names it contains are resolved.
+ * Thus, an {@code invokevirtual} instruction which invokes
+ * a method handle will always link, as long
+ * as the type descriptor is syntactically well-formed
+ * and the types exist.
+ * <p>
+ * When the {@code invokevirtual} is executed after linking,
+ * the receiving method handle's type is first checked by the JVM
+ * to ensure that it matches the descriptor.
+ * If the type match fails, it means that the method which the
+ * caller is invoking is not present on the individual
+ * method handle being invoked.
+ * <p>
+ * In the case of {@code invokeExact}, the type descriptor of the invocation
+ * (after resolving symbolic type names) must exactly match the method type
+ * of the receiving method handle.
+ * In the case of {@code invokeGeneric}, the resolved type descriptor
+ * must be a valid argument to the receiver's {@link #asType asType} method.
+ * Thus, {@code invokeGeneric} is more permissive than {@code invokeExact}.
+ * <p>
+ * After type matching, a call to {@code invokeExact} directly
+ * and immediately invoke the method handle's underlying method
+ * (or other behavior, as the case may be).
+ * <p>
+ * A call to {@code invokeGeneric} works the same as a call to
+ * {@code invokeExact}, if the type descriptor specified by the caller
+ * exactly matches the method handle's own type.
+ * If there is a type mismatch, {@code invokeGeneric} attempts
+ * to adjust the type of the receiving method handle,
+ * as if by a call to {@link #asType asType},
+ * to obtain an exactly invokable method handle {@code M2}.
+ * This allows a more powerful negotiation of method type
+ * between caller and callee.
+ * <p>
+ * (<em>Note:</em> The adjusted method handle {@code M2} is not directly observable,
+ * and implementations are therefore not required to materialize it.)
+ *
+ * <h3>Invocation checking</h3>
+ * In typical programs, method handle type matching will usually succeed.
+ * But if a match fails, the JVM will throw a {@link WrongMethodTypeException},
+ * either directly (in the case of {@code invokeExact}) or indirectly as if
+ * by a failed call to {@code asType} (in the case of {@code invokeGeneric}).
+ * <p>
+ * Thus, a method type mismatch which might show up as a linkage error
+ * in a statically typed program can show up as
+ * a dynamic {@code WrongMethodTypeException}
+ * in a program which uses method handles.
+ * <p>
+ * Because method types contain "live" {@code Class} objects,
+ * method type matching takes into account both types names and class loaders.
+ * Thus, even if a method handle {@code M} is created in one
+ * class loader {@code L1} and used in another {@code L2},
+ * method handle calls are type-safe, because the caller's type
+ * descriptor, as resolved in {@code L2},
+ * is matched against the original callee method's type descriptor,
+ * as resolved in {@code L1}.
+ * The resolution in {@code L1} happens when {@code M} is created
+ * and its type is assigned, while the resolution in {@code L2} happens
+ * when the {@code invokevirtual} instruction is linked.
+ * <p>
+ * Apart from the checking of type descriptors,
+ * a method handle's capability to call its underlying method is unrestricted.
+ * If a method handle is formed on a non-public method by a class
+ * that has access to that method, the resulting handle can be used
+ * in any place by any caller who receives a reference to it.
+ * <p>
+ * Unlike with the Core Reflection API, where access is checked every time
+ * a reflective method is invoked,
+ * method handle access checking is performed
+ * <a href="MethodHandles.Lookup.html#access">when the method handle is created</a>.
+ * In the case of {@code ldc} (see below), access checking is performed as part of linking
+ * the constant pool entry underlying the constant method handle.
+ * <p>
+ * Thus, handles to non-public methods, or to methods in non-public classes,
+ * should generally be kept secret.
+ * They should not be passed to untrusted code unless their use from
+ * the untrusted code would be harmless.
+ *
+ * <h3>Method handle creation</h3>
+ * Java code can create a method handle that directly accesses
+ * any method, constructor, or field that is accessible to that code.
+ * This is done via a reflective, capability-based API called
+ * {@link java.lang.invoke.MethodHandles.Lookup MethodHandles.Lookup}
+ * For example, a static method handle can be obtained
+ * from {@link java.lang.invoke.MethodHandles.Lookup#findStatic Lookup.findStatic}.
+ * There are also conversion methods from Core Reflection API objects,
+ * such as {@link java.lang.invoke.MethodHandles.Lookup#unreflect Lookup.unreflect}.
+ * <p>
+ * Like classes and strings, method handles that correspond to accessible
+ * fields, methods, and constructors can also be represented directly
+ * in a class file's constant pool as constants to be loaded by {@code ldc} bytecodes.
+ * A new type of constant pool entry, {@code CONSTANT_MethodHandle},
+ * refers directly to an associated {@code CONSTANT_Methodref},
+ * {@code CONSTANT_InterfaceMethodref}, or {@code CONSTANT_Fieldref}
+ * constant pool entry.
+ * (For more details on method handle constants,
+ * see the <a href="package-summary.html#mhcon">package summary</a>.)
+ * <p>
+ * Method handles produced by lookups or constant loads from methods or
+ * constructors with the variable arity modifier bit ({@code 0x0080})
+ * have a corresponding variable arity, as if they were defined with
+ * the help of {@link #asVarargsCollector asVarargsCollector}.
+ * <p>
+ * A method reference may refer either to a static or non-static method.
+ * In the non-static case, the method handle type includes an explicit
+ * receiver argument, prepended before any other arguments.
+ * In the method handle's type, the initial receiver argument is typed
+ * according to the class under which the method was initially requested.
+ * (E.g., if a non-static method handle is obtained via {@code ldc},
+ * the type of the receiver is the class named in the constant pool entry.)
+ * <p>
+ * When a method handle to a virtual method is invoked, the method is
+ * always looked up in the receiver (that is, the first argument).
+ * <p>
+ * A non-virtual method handle to a specific virtual method implementation
+ * can also be created.  These do not perform virtual lookup based on
+ * receiver type.  Such a method handle simulates the effect of
+ * an {@code invokespecial} instruction to the same method.
+ *
+ * <h3>Usage examples</h3>
+ * Here are some examples of usage:
+ * <p><blockquote><pre>
+Object x, y; String s; int i;
+MethodType mt; MethodHandle mh;
+MethodHandles.Lookup lookup = MethodHandles.lookup();
+// mt is (char,char)String
+mt = MethodType.methodType(String.class, char.class, char.class);
+mh = lookup.findVirtual(String.class, "replace", mt);
+s = (String) mh.invokeExact("daddy",'d','n');
+// invokeExact(Ljava/lang/String;CC)Ljava/lang/String;
+assert(s.equals("nanny"));
+// weakly typed invocation (using MHs.invoke)
+s = (String) mh.invokeWithArguments("sappy", 'p', 'v');
+assert(s.equals("savvy"));
+// mt is (Object[])List
+mt = MethodType.methodType(java.util.List.class, Object[].class);
+mh = lookup.findStatic(java.util.Arrays.class, "asList", mt);
+assert(mh.isVarargsCollector());
+x = mh.invokeGeneric("one", "two");
+// invokeGeneric(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
+assert(x.equals(java.util.Arrays.asList("one","two")));
+// mt is (Object,Object,Object)Object
+mt = MethodType.genericMethodType(3);
+mh = mh.asType(mt);
+x = mh.invokeExact((Object)1, (Object)2, (Object)3);
+// invokeExact(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+assert(x.equals(java.util.Arrays.asList(1,2,3)));
+// mt is int()
+mt = MethodType.methodType(int.class);
+mh = lookup.findVirtual(java.util.List.class, "size", mt);
+i = (int) mh.invokeExact(java.util.Arrays.asList(1,2,3));
+// invokeExact(Ljava/util/List;)I
+assert(i == 3);
+mt = MethodType.methodType(void.class, String.class);
+mh = lookup.findVirtual(java.io.PrintStream.class, "println", mt);
+mh.invokeExact(System.out, "Hello, world.");
+// invokeExact(Ljava/io/PrintStream;Ljava/lang/String;)V
+ * </pre></blockquote>
+ * Each of the above calls to {@code invokeExact} or {@code invokeGeneric}
+ * generates a single invokevirtual instruction with
+ * the type descriptor indicated in the following comment.
+ *
+ * <h3>Exceptions</h3>
+ * The methods {@code invokeExact} and {@code invokeGeneric} are declared
+ * to throw {@link java.lang.Throwable Throwable},
+ * which is to say that there is no static restriction on what a method handle
+ * can throw.  Since the JVM does not distinguish between checked
+ * and unchecked exceptions (other than by their class, of course),
+ * there is no particular effect on bytecode shape from ascribing
+ * checked exceptions to method handle invocations.  But in Java source
+ * code, methods which perform method handle calls must either explicitly
+ * throw {@code java.lang.Throwable Throwable}, or else must catch all
+ * throwables locally, rethrowing only those which are legal in the context,
+ * and wrapping ones which are illegal.
+ *
+ * <h3><a name="sigpoly"></a>Signature polymorphism</h3>
+ * The unusual compilation and linkage behavior of
+ * {@code invokeExact} and {@code invokeGeneric}
+ * is referenced by the term <em>signature polymorphism</em>.
+ * A signature polymorphic method is one which can operate with
+ * any of a wide range of call signatures and return types.
+ * In order to make this work, both the Java compiler and the JVM must
+ * give special treatment to signature polymorphic methods.
+ * <p>
+ * In source code, a call to a signature polymorphic method will
+ * compile, regardless of the requested type descriptor.
+ * As usual, the Java compiler emits an {@code invokevirtual}
+ * instruction with the given type descriptor against the named method.
+ * The unusual part is that the type descriptor is derived from
+ * the actual argument and return types, not from the method declaration.
+ * <p>
+ * When the JVM processes bytecode containing signature polymorphic calls,
+ * it will successfully link any such call, regardless of its type descriptor.
+ * (In order to retain type safety, the JVM will guard such calls with suitable
+ * dynamic type checks, as described elsewhere.)
+ * <p>
+ * Bytecode generators, including the compiler back end, are required to emit
+ * untransformed type descriptors for these methods.
+ * Tools which determine symbolic linkage are required to accept such
+ * untransformed descriptors, without reporting linkage errors.
+ * <p>
+ * For the sake of tools (but not as a programming API), the signature polymorphic
+ * methods are marked with a private yet standard annotation,
+ * {@code @java.lang.invoke.MethodHandle.PolymorphicSignature}.
+ * The annotation's retention is {@code RUNTIME}, so that all tools can see it.
+ *
+ * <h3>Formal rules for processing signature polymorphic methods</h3>
+ * <p>
+ * The following methods (and no others) are signature polymorphic:
+ * <ul>
+ * <li>{@link java.lang.invoke.MethodHandle#invokeExact   MethodHandle.invokeExact}
+ * <li>{@link java.lang.invoke.MethodHandle#invokeGeneric MethodHandle.invokeGeneric}
+ * </ul>
+ * <p>
+ * A signature polymorphic method will be declared with the following properties:
+ * <ul>
+ * <li>It must be native.
+ * <li>It must take a single varargs parameter of the form {@code Object...}.
+ * <li>It must produce a return value of type {@code Object}.
+ * <li>It must be contained within the {@code java.lang.invoke} package.
+ * </ul>
+ * Because of these requirements, a signature polymorphic method is able to accept
+ * any number and type of actual arguments, and can, with a cast, produce a value of any type.
+ * However, the JVM will treat these declaration features as a documentation convention,
+ * rather than a description of the actual structure of the methods as executed.
+ * <p>
+ * When a call to a signature polymorphic method is compiled, the associated linkage information for
+ * its arguments is not array of {@code Object} (as for other similar varargs methods)
+ * but rather the erasure of the static types of all the arguments.
+ * <p>
+ * In an argument position of a method invocation on a signature polymorphic method,
+ * a null literal has type {@code java.lang.Void}, unless cast to a reference type.
+ * (<em>Note:</em> This typing rule allows the null type to have its own encoding in linkage information
+ * distinct from other types.
+ * <p>
+ * The linkage information for the return type is derived from a context-dependent target typing convention.
+ * The return type for a signature polymorphic method invocation is determined as follows:
+ * <ul>
+ * <li>If the method invocation expression is an expression statement, the method is {@code void}.
+ * <li>Otherwise, if the method invocation expression is the immediate operand of a cast,
+ * the return type is the erasure of the cast type.
+ * <li>Otherwise, the return type is the method's nominal return type, {@code Object}.
+ * </ul>
+ * (Programmers are encouraged to use explicit casts unless it is clear that a signature polymorphic
+ * call will be used as a plain {@code Object} expression.)
+ * <p>
+ * The linkage information for argument and return types is stored in the descriptor for the
+ * compiled (bytecode) call site. As for any invocation instruction, the arguments and return value
+ * will be passed directly on the JVM stack, in accordance with the descriptor,
+ * and without implicit boxing or unboxing.
+ *
+ * <h3>Interoperation between method handles and the Core Reflection API</h3>
+ * Using factory methods in the {@link java.lang.invoke.MethodHandles.Lookup Lookup} API,
+ * any class member represented by a Core Reflection API object
+ * can be converted to a behaviorally equivalent method handle.
+ * For example, a reflective {@link java.lang.reflect.Method Method} can
+ * be converted to a method handle using
+ * {@link java.lang.invoke.MethodHandles.Lookup#unreflect Lookup.unreflect}.
+ * The resulting method handles generally provide more direct and efficient
+ * access to the underlying class members.
+ * <p>
+ * As a special case,
+ * when the Core Reflection API is used to view the signature polymorphic
+ * methods {@code invokeExact} or {@code invokeGeneric} in this class,
+ * they appear as single, non-polymorphic native methods.
+ * Calls to these native methods do not result in method handle invocations.
+ * Since {@code invokevirtual} instructions can natively
+ * invoke method handles under any type descriptor, this reflective view conflicts
+ * with the normal presentation via bytecodes.
+ * Thus, these two native methods, as viewed by
+ * {@link java.lang.Class#getDeclaredMethod Class.getDeclaredMethod},
+ * are placeholders only.
+ * If invoked via {@link java.lang.reflect.Method#invoke Method.invoke},
+ * they will throw {@code UnsupportedOperationException}.
+ * <p>
+ * In order to obtain an invoker method for a particular type descriptor,
+ * use {@link java.lang.invoke.MethodHandles#exactInvoker MethodHandles.exactInvoker},
+ * or {@link java.lang.invoke.MethodHandles#genericInvoker MethodHandles.genericInvoker}.
+ * The {@link java.lang.invoke.MethodHandles.Lookup#findVirtual Lookup.findVirtual}
+ * API is also able to return a method handle
+ * to call {@code invokeExact} or {@code invokeGeneric},
+ * for any specified type descriptor .
+ *
+ * <h3>Interoperation between method handles and Java generics</h3>
+ * A method handle can be obtained on a method, constructor, or field
+ * which is declared with Java generic types.
+ * As with the Core Reflection API, the type of the method handle
+ * will constructed from the erasure of the source-level type.
+ * When a method handle is invoked, the types of its arguments
+ * or the return value cast type may be generic types or type instances.
+ * If this occurs, the compiler will replace those
+ * types by their erasures when when it constructs the type descriptor
+ * for the {@code invokevirtual} instruction.
+ * <p>
+ * Method handles do not represent
+ * their function-like types in terms of Java parameterized (generic) types,
+ * because there are three mismatches between function-like types and parameterized
+ * Java types.
+ * <ul>
+ * <li>Method types range over all possible arities,
+ * from no arguments to up to 255 of arguments (a limit imposed by the JVM).
+ * Generics are not variadic, and so cannot represent this.</li>
+ * <li>Method types can specify arguments of primitive types,
+ * which Java generic types cannot range over.</li>
+ * <li>Higher order functions over method handles (combinators) are
+ * often generic across a wide range of function types, including
+ * those of multiple arities.  It is impossible to represent such
+ * genericity with a Java type parameter.</li>
+ * </ul>
+ *
+ * @see MethodType
+ * @see MethodHandles
+ * @author John Rose, JSR 292 EG
+ */
+public abstract class MethodHandle {
+    // { JVM internals:
+
+    private byte       vmentry;    // adapter stub or method entry point
+    //private int      vmslots;    // optionally, hoist type.form.vmslots
+    /*non-public*/ Object vmtarget;   // VM-specific, class-specific target value
+
+    // TO DO:  vmtarget should be invisible to Java, since the JVM puts internal
+    // managed pointers into it.  Making it visible exposes it to debuggers,
+    // which can cause errors when they treat the pointer as an Object.
+
+    // These two dummy fields are present to force 'I' and 'J' signatures
+    // into this class's constant pool, so they can be transferred
+    // to vmentry when this class is loaded.
+    static final int  INT_FIELD = 0;
+    static final long LONG_FIELD = 0;
+
+    // vmentry (a void* field) is used *only* by the JVM.
+    // The JVM adjusts its type to int or long depending on system wordsize.
+    // Since it is statically typed as neither int nor long, it is impossible
+    // to use this field from Java bytecode.  (Please don't try to, either.)
+
+    // The vmentry is an assembly-language stub which is jumped to
+    // immediately after the method type is verified.
+    // For a direct MH, this stub loads the vmtarget's entry point
+    // and jumps to it.
+
+    // } End of JVM internals.
+
+    static { MethodHandleImpl.initStatics(); }
+
+    // interface MethodHandle<R throws X extends Exception,A...>
+    // { MethodType<R throws X,A...> type(); public R invokeExact(A...) throws X; }
+
+    /**
+     * Internal marker interface which distinguishes (to the Java compiler)
+     * those methods which are <a href="MethodHandle.html#sigpoly">signature polymorphic</a>.
+     */
+    @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})
+    @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
+    @interface PolymorphicSignature { }
+
+    private MethodType type;
+
+    /**
+     * Reports the type of this method handle.
+     * Every invocation of this method handle via {@code invokeExact} must exactly match this type.
+     * @return the method handle type
+     */
+    public MethodType type() {
+        return type;
+    }
+
+    /**
+     * Package-private constructor for the method handle implementation hierarchy.
+     * Method handle inheritance will be contained completely within
+     * the {@code java.lang.invoke} package.
+     */
+    // @param type type (permanently assigned) of the new method handle
+    /*non-public*/ MethodHandle(MethodType type) {
+        type.getClass();  // elicit NPE
+        this.type = type;
+    }
+
+    /**
+     * Invokes the method handle, allowing any caller type descriptor, but requiring an exact type match.
+     * The type descriptor at the call site of {@code invokeExact} must
+     * exactly match this method handle's {@link #type type}.
+     * No conversions are allowed on arguments or return values.
+     * <p>
+     * When this method is observed via the Core Reflection API,
+     * it will appear as a single native method, taking an object array and returning an object.
+     * If this native method is invoked directly via
+     * {@link java.lang.reflect.Method#invoke Method.invoke}, via JNI,
+     * or indirectly via {@link java.lang.invoke.MethodHandles.Lookup#unreflect Lookup.unreflect},
+     * it will throw an {@code UnsupportedOperationException}.
+     * @throws WrongMethodTypeException if the target's type is not identical with the caller's type descriptor
+     * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call
+     */
+    public final native @PolymorphicSignature Object invokeExact(Object... args) throws Throwable;
+
+    /**
+     * Invokes the method handle, allowing any caller type descriptor,
+     * and optionally performing conversions on arguments and return values.
+     * <p>
+     * If the call site type descriptor exactly matches this method handle's {@link #type type},
+     * the call proceeds as if by {@link #invokeExact invokeExact}.
+     * <p>
+     * Otherwise, the call proceeds as if this method handle were first
+     * adjusted by calling {@link #asType asType} to adjust this method handle
+     * to the required type, and then the call proceeds as if by
+     * {@link #invokeExact invokeExact} on the adjusted method handle.
+     * <p>
+     * There is no guarantee that the {@code asType} call is actually made.
+     * If the JVM can predict the results of making the call, it may perform
+     * adaptations directly on the caller's arguments,
+     * and call the target method handle according to its own exact type.
+     * <p>
+     * The type descriptor at the call site of {@code invokeGeneric} must
+     * be a valid argument to the receivers {@code asType} method.
+     * In particular, the caller must specify the same argument arity
+     * as the callee's type,
+     * if the callee is not a {@linkplain #asVarargsCollector variable arity collector}.
+     * <p>
+     * When this method is observed via the Core Reflection API,
+     * it will appear as a single native method, taking an object array and returning an object.
+     * If this native method is invoked directly via
+     * {@link java.lang.reflect.Method#invoke Method.invoke}, via JNI,
+     * or indirectly via {@link java.lang.invoke.MethodHandles.Lookup#unreflect Lookup.unreflect},
+     * it will throw an {@code UnsupportedOperationException}.
+     * @throws WrongMethodTypeException if the target's type cannot be adjusted to the caller's type descriptor
+     * @throws ClassCastException if the target's type can be adjusted to the caller, but a reference cast fails
+     * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call
+     */
+    public final native @PolymorphicSignature Object invokeGeneric(Object... args) throws Throwable;
+
+    /**
+     * Performs a varargs invocation, passing the arguments in the given array
+     * to the method handle, as if via {@link #invokeGeneric invokeGeneric} from a call site
+     * which mentions only the type {@code Object}, and whose arity is the length
+     * of the argument array.
+     * <p>
+     * Specifically, execution proceeds as if by the following steps,
+     * although the methods are not guaranteed to be called if the JVM
+     * can predict their effects.
+     * <ul>
+     * <li>Determine the length of the argument array as {@code N}.
+     *     For a null reference, {@code N=0}. </li>
+     * <li>Determine the generic type {@code TN} of {@code N} arguments as
+     *     as {@code TN=MethodType.genericMethodType(N)}.</li>
+     * <li>Force the original target method handle {@code MH0} to the
+     *     required type, as {@code MH1 = MH0.asType(TN)}. </li>
+     * <li>Spread the array into {@code N} separate arguments {@code A0, ...}. </li>
+     * <li>Invoke the type-adjusted method handle on the unpacked arguments:
+     *     MH1.invokeExact(A0, ...). </li>
+     * <li>Take the return value as an {@code Object} reference. </li>
+     * </ul>
+     * <p>
+     * Because of the action of the {@code asType} step, the following argument
+     * conversions are applied as necessary:
+     * <ul>
+     * <li>reference casting
+     * <li>unboxing
+     * <li>widening primitive conversions
+     * </ul>
+     * <p>
+     * The result returned by the call is boxed if it is a primitive,
+     * or forced to null if the return type is void.
+     * <p>
+     * This call is equivalent to the following code:
+     * <p><blockquote><pre>
+     * MethodHandle invoker = MethodHandles.spreadInvoker(this.type(), 0);
+     * Object result = invoker.invokeExact(this, arguments);
+     * </pre></blockquote>
+     * <p>
+     * Unlike the signature polymorphic methods {@code invokeExact} and {@code invokeGeneric},
+     * {@code invokeWithArguments} can be accessed normally via the Core Reflection API and JNI.
+     * It can therefore be used as a bridge between native or reflective code and method handles.
+     *
+     * @param arguments the arguments to pass to the target
+     * @return the result returned by the target
+     * @throws ClassCastException if an argument cannot be converted by reference casting
+     * @throws WrongMethodTypeException if the target's type cannot be adjusted to take the given number of {@code Object} arguments
+     * @throws Throwable anything thrown by the target method invocation
+     * @see MethodHandles#spreadInvoker
+     */
+    public Object invokeWithArguments(Object... arguments) throws Throwable {
+        int argc = arguments == null ? 0 : arguments.length;
+        MethodType type = type();
+        if (type.parameterCount() != argc) {
+            // simulate invokeGeneric
+            return asType(MethodType.genericMethodType(argc)).invokeWithArguments(arguments);
+        }
+        if (argc <= 10) {
+            MethodHandle invoker = type.invokers().genericInvoker();
+            switch (argc) {
+                case 0:  return invoker.invokeExact(this);
+                case 1:  return invoker.invokeExact(this,
+                                    arguments[0]);
+                case 2:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1]);
+                case 3:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2]);
+                case 4:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3]);
+                case 5:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3], arguments[4]);
+                case 6:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3], arguments[4], arguments[5]);
+                case 7:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3], arguments[4], arguments[5],
+                                    arguments[6]);
+                case 8:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3], arguments[4], arguments[5],
+                                    arguments[6], arguments[7]);
+                case 9:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3], arguments[4], arguments[5],
+                                    arguments[6], arguments[7], arguments[8]);
+                case 10:  return invoker.invokeExact(this,
+                                    arguments[0], arguments[1], arguments[2],
+                                    arguments[3], arguments[4], arguments[5],
+                                    arguments[6], arguments[7], arguments[8],
+                                    arguments[9]);
+            }
+        }
+
+        // more than ten arguments get boxed in a varargs list:
+        MethodHandle invoker = type.invokers().spreadInvoker(0);
+        return invoker.invokeExact(this, arguments);
+    }
+
+    /**
+     * Performs a varargs invocation, passing the arguments in the given array
+     * to the method handle, as if via {@link #invokeGeneric invokeGeneric} from a call site
+     * which mentions only the type {@code Object}, and whose arity is the length
+     * of the argument array.
+     * <p>
+     * This method is also equivalent to the following code:
+     * <p><blockquote><pre>
+     * {@link #invokeWithArguments(Object...) invokeWithArguments}(arguments.toArray())
+     * </pre></blockquote>
+     *
+     * @param arguments the arguments to pass to the target
+     * @return the result returned by the target
+     * @throws ClassCastException if an argument cannot be converted by reference casting
+     * @throws WrongMethodTypeException if the target's type cannot be adjusted to take the given number of {@code Object} arguments
+     * @throws Throwable anything thrown by the target method invocation
+     */
+    public Object invokeWithArguments(java.util.List<?> arguments) throws Throwable {
+        return invokeWithArguments(arguments.toArray());
+    }
+
+    /**
+     * Produces an adapter method handle which adapts the type of the
+     * current method handle to a new type.
+     * The resulting method handle is guaranteed to report a type
+     * which is equal to the desired new type.
+     * <p>
+     * If the original type and new type are equal, returns {@code this}.
+     * <p>
+     * This method provides the crucial behavioral difference between
+     * {@link #invokeExact invokeExact} and {@link #invokeGeneric invokeGeneric}.  The two methods
+     * perform the same steps when the caller's type descriptor is identical
+     * with the callee's, but when the types differ, {@link #invokeGeneric invokeGeneric}
+     * also calls {@code asType} (or some internal equivalent) in order
+     * to match up the caller's and callee's types.
+     * <p>
+     * This method is equivalent to {@link MethodHandles#convertArguments convertArguments},
+     * except for variable arity method handles produced by {@link #asVarargsCollector asVarargsCollector}.
+     *
+     * @param newType the expected type of the new method handle
+     * @return a method handle which delegates to {@code this} after performing
+     *           any necessary argument conversions, and arranges for any
+     *           necessary return value conversions
+     * @throws WrongMethodTypeException if the conversion cannot be made
+     * @see MethodHandles#convertArguments
+     */
+    public MethodHandle asType(MethodType newType) {
+        return MethodHandles.convertArguments(this, newType);
+    }
+
+    /**
+     * Makes an adapter which accepts a trailing array argument
+     * and spreads its elements as positional arguments.
+     * The new method handle adapts, as its <i>target</i>,
+     * the current method handle.  The type of the adapter will be
+     * the same as the type of the target, except that the final
+     * {@code arrayLength} parameters of the target's type are replaced
+     * by a single array parameter of type {@code arrayType}.
+     * <p>
+     * If the array element type differs from any of the corresponding
+     * argument types on the original target,
+     * the original target is adapted to take the array elements directly,
+     * as if by a call to {@link #asType asType}.
+     * <p>
+     * When called, the adapter replaces a trailing array argument
+     * by the array's elements, each as its own argument to the target.
+     * (The order of the arguments is preserved.)
+     * They are converted pairwise by casting and/or unboxing
+     * to the types of the trailing parameters of the target.
+     * Finally the target is called.
+     * What the target eventually returns is returned unchanged by the adapter.
+     * <p>
+     * Before calling the target, the adapter verifies that the array
+     * contains exactly enough elements to provide a correct argument count
+     * to the target method handle.
+     * (The array may also be null when zero elements are required.)
+     * @param arrayType usually {@code Object[]}, the type of the array argument from which to extract the spread arguments
+     * @param arrayLength the number of arguments to spread from an incoming array argument
+     * @return a new method handle which spreads its final array argument,
+     *         before calling the original method handle
+     * @throws IllegalArgumentException if {@code arrayType} is not an array type
+     * @throws IllegalArgumentException if target does not have at least
+     *         {@code arrayLength} parameter types
+     * @throws WrongMethodTypeException if the implied {@code asType} call fails
+     * @see #asCollector
+     */
+    public MethodHandle asSpreader(Class<?> arrayType, int arrayLength) {
+        Class<?> arrayElement = arrayType.getComponentType();
+        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
+        MethodType oldType = type();
+        int nargs = oldType.parameterCount();
+        if (nargs < arrayLength)  throw newIllegalArgumentException("bad spread array length");
+        int keepPosArgs = nargs - arrayLength;
+        MethodType newType = oldType.dropParameterTypes(keepPosArgs, nargs);
+        newType = newType.insertParameterTypes(keepPosArgs, arrayType);
+        return MethodHandles.spreadArguments(this, newType);
+    }
+
+    /**
+     * Makes an adapter which accepts a given number of trailing
+     * positional arguments and collects them into an array argument.
+     * The new method handle adapts, as its <i>target</i>,
+     * the current method handle.  The type of the adapter will be
+     * the same as the type of the target, except that a single trailing
+     * parameter (usually of type {@code arrayType}) is replaced by
+     * {@code arrayLength} parameters whose type is element type of {@code arrayType}.
+     * <p>
+     * If the array type differs from the final argument type on the original target,
+     * the original target is adapted to take the array type directly,
+     * as if by a call to {@link #asType asType}.
+     * <p>
+     * When called, the adapter replaces its trailing {@code arrayLength}
+     * arguments by a single new array of type {@code arrayType}, whose elements
+     * comprise (in order) the replaced arguments.
+     * Finally the target is called.
+     * What the target eventually returns is returned unchanged by the adapter.
+     * <p>
+     * (The array may also be a shared constant when {@code arrayLength} is zero.)
+     * <p>
+     * (<em>Note:</em> The {@code arrayType} is often identical to the last
+     * parameter type of the original target.
+     * It is an explicit argument for symmetry with {@code asSpreader}, and also
+     * to allow the target to use a simple {@code Object} as its last parameter type.)
+     * <p>
+     * In order to create a collecting adapter which is not restricted to a particular
+     * number of collected arguments, use {@link #asVarargsCollector asVarargsCollector} instead.
+     * @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments
+     * @param arrayLength the number of arguments to collect into a new array argument
+     * @return a new method handle which collects some trailing argument
+     *         into an array, before calling the original method handle
+     * @throws IllegalArgumentException if {@code arrayType} is not an array type
+     *         or {@code arrayType} is not assignable to this method handle's trailing parameter type,
+     *         or {@code arrayLength} is not a legal array size
+     * @throws WrongMethodTypeException if the implied {@code asType} call fails
+     * @see #asSpreader
+     * @see #asVarargsCollector
+     */
+    public MethodHandle asCollector(Class<?> arrayType, int arrayLength) {
+        Class<?> arrayElement = arrayType.getComponentType();
+        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
+        MethodType oldType = type();
+        int nargs = oldType.parameterCount();
+        if (nargs == 0)  throw newIllegalArgumentException("no trailing argument");
+        MethodType newType = oldType.dropParameterTypes(nargs-1, nargs);
+        newType = newType.insertParameterTypes(nargs-1,
+                    java.util.Collections.<Class<?>>nCopies(arrayLength, arrayElement));
+        return MethodHandles.collectArguments(this, newType);
+    }
+
+    /**
+     * Makes a <em>variable arity</em> adapter which is able to accept
+     * any number of trailing positional arguments and collect them
+     * into an array argument.
+     * <p>
+     * The type and behavior of the adapter will be the same as
+     * the type and behavior of the target, except that certain
+     * {@code invokeGeneric} and {@code asType} requests can lead to
+     * trailing positional arguments being collected into target's
+     * trailing parameter.
+     * Also, the last parameter type of the adapter will be
+     * {@code arrayType}, even if the target has a different
+     * last parameter type.
+     * <p>
+     * When called with {@link #invokeExact invokeExact}, the adapter invokes
+     * the target with no argument changes.
+     * (<em>Note:</em> This behavior is different from a
+     * {@linkplain #asCollector fixed arity collector},
+     * since it accepts a whole array of indeterminate length,
+     * rather than a fixed number of arguments.)
+     * <p>
+     * When called with {@link #invokeGeneric invokeGeneric}, if the caller
+     * type is the same as the adapter, the adapter invokes the target as with
+     * {@code invokeExact}.
+     * (This is the normal behavior for {@code invokeGeneric} when types match.)
+     * <p>
+     * Otherwise, if the caller and adapter arity are the same, and the
+     * trailing parameter type of the caller is a reference type identical to
+     * or assignable to the trailing parameter type of the adapter,
+     * the arguments and return values are converted pairwise,
+     * as if by {@link MethodHandles#convertArguments convertArguments}.
+     * (This is also normal behavior for {@code invokeGeneric} in such a case.)
+     * <p>
+     * Otherwise, the arities differ, or the adapter's trailing parameter
+     * type is not assignable from the corresponding caller type.
+     * In this case, the adapter replaces all trailing arguments from
+     * the original trailing argument position onward, by
+     * a new array of type {@code arrayType}, whose elements
+     * comprise (in order) the replaced arguments.
+     * <p>
+     * The caller type must provides as least enough arguments,
+     * and of the correct type, to satisfy the target's requirement for
+     * positional arguments before the trailing array argument.
+     * Thus, the caller must supply, at a minimum, {@code N-1} arguments,
+     * where {@code N} is the arity of the target.
+     * Also, there must exist conversions from the incoming arguments
+     * to the target's arguments.
+     * As with other uses of {@code invokeGeneric}, if these basic
+     * requirements are not fulfilled, a {@code WrongMethodTypeException}
+     * may be thrown.
+     * <p>
+     * In all cases, what the target eventually returns is returned unchanged by the adapter.
+     * <p>
+     * In the final case, it is exactly as if the target method handle were
+     * temporarily adapted with a {@linkplain #asCollector fixed arity collector}
+     * to the arity required by the caller type.
+     * (As with {@code asCollector}, if the array length is zero,
+     * a shared constant may be used instead of a new array.
+     * If the implied call to {@code asCollector} would throw
+     * an {@code IllegalArgumentException} or {@code WrongMethodTypeException},
+     * the call to the variable arity adapter must throw
+     * {@code WrongMethodTypeException}.)
+     * <p>
+     * The behavior of {@link #asType asType} is also specialized for
+     * variable arity adapters, to maintain the invariant that
+     * {@code invokeGeneric} is always equivalent to an {@code asType}
+     * call to adjust the target type, followed by {@code invokeExact}.
+     * Therefore, a variable arity adapter responds
+     * to an {@code asType} request by building a fixed arity collector,
+     * if and only if the adapter and requested type differ either
+     * in arity or trailing argument type.
+     * The resulting fixed arity collector has its type further adjusted
+     * (if necessary) to the requested type by pairwise conversion,
+     * as if by another application of {@code asType}.
+     * <p>
+     * When a method handle is obtained by executing an {@code ldc} instruction
+     * of a {@code CONSTANT_MethodHandle} constant, and the target method is marked
+     * as a variable arity method (with the modifier bit {@code 0x0080}),
+     * the method handle will accept multiple arities, as if the method handle
+     * constant were created by means of a call to {@code asVarargsCollector}.
+     * <p>
+     * In order to create a collecting adapter which collects a predetermined
+     * number of arguments, and whose type reflects this predetermined number,
+     * use {@link #asCollector asCollector} instead.
+     * <p>
+     * No method handle transformations produce new method handles with
+     * variable arity, unless they are documented as doing so.
+     * Therefore, besides {@code asVarargsCollector},
+     * all methods in {@code MethodHandle} and {@code MethodHandles}
+     * will return a method handle with fixed arity,
+     * except in the cases where they are specified to return their original
+     * operand (e.g., {@code asType} of the method handle's own type).
+     * <p>
+     * Calling {@code asVarargsCollector} on a method handle which is already
+     * of variable arity will produce a method handle with the same type and behavior.
+     * It may (or may not) return the original variable arity method handle.
+     * <p>
+     * Here is an example, of a list-making variable arity method handle:
+     * <blockquote><pre>
+MethodHandle asList = publicLookup()
+  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class))
+  .asVarargsCollector(Object[].class);
+assertEquals("[]", asList.invokeGeneric().toString());
+assertEquals("[1]", asList.invokeGeneric(1).toString());
+assertEquals("[two, too]", asList.invokeGeneric("two", "too").toString());
+Object[] argv = { "three", "thee", "tee" };
+assertEquals("[three, thee, tee]", asList.invokeGeneric(argv).toString());
+List ls = (List) asList.invokeGeneric((Object)argv);
+assertEquals(1, ls.size());
+assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0)));
+     * </pre></blockquote>
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * These rules are designed as a dynamically-typed variation
+     * of the Java rules for variable arity methods.
+     * In both cases, callers to a variable arity method or method handle
+     * can either pass zero or more positional arguments, or else pass
+     * pre-collected arrays of any length.  Users should be aware of the
+     * special role of the final argument, and of the effect of a
+     * type match on that final argument, which determines whether
+     * or not a single trailing argument is interpreted as a whole
+     * array or a single element of an array to be collected.
+     * Note that the dynamic type of the trailing argument has no
+     * effect on this decision, only a comparison between the static
+     * type descriptor of the call site and the type of the method handle.)
+     * <p style="font-size:smaller;">
+     * As a result of the previously stated rules, the variable arity behavior
+     * of a method handle may be suppressed, by binding it to the exact invoker
+     * of its own type, as follows:
+     * <blockquote><pre>
+MethodHandle vamh = publicLookup()
+  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class))
+  .asVarargsCollector(Object[].class);
+MethodHandle mh = MethodHandles.exactInvoker(vamh.type()).bindTo(vamh);
+assert(vamh.type().equals(mh.type()));
+assertEquals("[1, 2, 3]", vamh.invokeGeneric(1,2,3).toString());
+boolean failed = false;
+try { mh.invokeGeneric(1,2,3); }
+catch (WrongMethodTypeException ex) { failed = true; }
+assert(failed);
+     * </pre></blockquote>
+     * This transformation has no behavioral effect if the method handle is
+     * not of variable arity.
+     *
+     * @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments
+     * @return a new method handle which can collect any number of trailing arguments
+     *         into an array, before calling the original method handle
+     * @throws IllegalArgumentException if {@code arrayType} is not an array type
+     *         or {@code arrayType} is not assignable to this method handle's trailing parameter type
+     * @see #asCollector
+     * @see #isVarargsCollector
+     */
+    public MethodHandle asVarargsCollector(Class<?> arrayType) {
+        Class<?> arrayElement = arrayType.getComponentType();
+        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
+        return MethodHandles.asVarargsCollector(this, arrayType);
+    }
+
+    /**
+     * Determines if this method handle
+     * supports {@linkplain #asVarargsCollector variable arity} calls.
+     * Such method handles arise from the following sources:
+     * <ul>
+     * <li>a call to {@linkplain #asVarargsCollector asVarargsCollector}
+     * <li>a call to a {@linkplain java.lang.invoke.MethodHandles.Lookup lookup method}
+     *     which resolves to a variable arity Java method or constructor
+     * <li>an {@code ldc} instruction of a {@code CONSTANT_MethodHandle}
+     *     which resolves to a variable arity Java method or constructor
+     * </ul>
+     * @return true if this method handle accepts more than one arity of {@code invokeGeneric} calls
+     * @see #asVarargsCollector
+     */
+    public boolean isVarargsCollector() {
+        return false;
+    }
+
+    /**
+     * Binds a value {@code x} to the first argument of a method handle, without invoking it.
+     * The new method handle adapts, as its <i>target</i>,
+     * the current method handle by binding it to the given argument.
+     * The type of the bound handle will be
+     * the same as the type of the target, except that a single leading
+     * reference parameter will be omitted.
+     * <p>
+     * When called, the bound handle inserts the given value {@code x}
+     * as a new leading argument to the target.  The other arguments are
+     * also passed unchanged.
+     * What the target eventually returns is returned unchanged by the bound handle.
+     * <p>
+     * The reference {@code x} must be convertible to the first parameter
+     * type of the target.
+     * <p>
+     * (<em>Note:</em>  Because method handles are immutable, the target method handle
+     * retains its original type and behavior.)
+     * @param x  the value to bind to the first argument of the target
+     * @return a new method handle which prepends the given value to the incoming
+     *         argument list, before calling the original method handle
+     * @throws IllegalArgumentException if the target does not have a
+     *         leading parameter type that is a reference type
+     * @throws ClassCastException if {@code x} cannot be converted
+     *         to the leading parameter type of the target
+     * @see MethodHandles#insertArguments
+     */
+    public MethodHandle bindTo(Object x) {
+        Class<?> ptype;
+        if (type().parameterCount() == 0 ||
+            (ptype = type().parameterType(0)).isPrimitive())
+            throw newIllegalArgumentException("no leading reference parameter", x);
+        x = MethodHandles.checkValue(ptype, x);
+        // Cf. MethodHandles.insertArguments for the following logic:
+        MethodHandle bmh = MethodHandleImpl.bindReceiver(this, x);
+        if (bmh != null)  return bmh;
+        return MethodHandleImpl.bindArgument(this, 0, x);
+    }
+
+    /**
+     * Returns a string representation of the method handle,
+     * starting with the string {@code "MethodHandle"} and
+     * ending with the string representation of the method handle's type.
+     * In other words, this method returns a string equal to the value of:
+     * <blockquote><pre>
+     * "MethodHandle" + type().toString()
+     * </pre></blockquote>
+     * <p>
+     * (<em>Note:</em>  Future releases of this API may add further information
+     * to the string representation.
+     * Therefore, the present syntax should not be parsed by applications.)
+     *
+     * @return a string representation of the method handle
+     */
+    @Override
+    public String toString() {
+        return getNameString(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,1106 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.VerifyType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import sun.invoke.empty.Empty;
+import sun.invoke.util.ValueConversions;
+import sun.invoke.util.Wrapper;
+import sun.misc.Unsafe;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Trusted implementation code for MethodHandle.
+ * @author jrose
+ */
+/*non-public*/ abstract class MethodHandleImpl {
+    /// Factory methods to create method handles:
+
+    private static final MemberName.Factory LOOKUP = MemberName.Factory.INSTANCE;
+
+    static void initStatics() {
+        // Trigger preceding sequence.
+    }
+
+    /** Look up a given method.
+     * Callable only from sun.invoke and related packages.
+     * <p>
+     * The resulting method handle type will be of the given type,
+     * with a receiver type {@code rcvc} prepended if the member is not static.
+     * <p>
+     * Access checks are made as of the given lookup class.
+     * In particular, if the method is protected and {@code defc} is in a
+     * different package from the lookup class, then {@code rcvc} must be
+     * the lookup class or a subclass.
+     * @param token Proof that the lookup class has access to this package.
+     * @param member Resolved method or constructor to call.
+     * @param name Name of the desired method.
+     * @param rcvc Receiver type of desired non-static method (else null)
+     * @param doDispatch whether the method handle will test the receiver type
+     * @param lookupClass access-check relative to this class
+     * @return a direct handle to the matching method
+     * @throws IllegalAccessException if the given method cannot be accessed by the lookup class
+     */
+    static
+    MethodHandle findMethod(MemberName method,
+                            boolean doDispatch, Class<?> lookupClass) throws IllegalAccessException {
+        MethodType mtype = method.getMethodType();
+        if (!method.isStatic()) {
+            // adjust the advertised receiver type to be exactly the one requested
+            // (in the case of invokespecial, this will be the calling class)
+            Class<?> recvType = method.getDeclaringClass();
+            mtype = mtype.insertParameterTypes(0, recvType);
+        }
+        DirectMethodHandle mh = new DirectMethodHandle(mtype, method, doDispatch, lookupClass);
+        if (!mh.isValid())
+            throw method.makeAccessException("no access", lookupClass);
+        assert(mh.type() == mtype);
+        if (!method.isVarargs())
+            return mh;
+        else
+            return mh.asVarargsCollector(mtype.parameterType(mtype.parameterCount()-1));
+    }
+
+    static
+    MethodHandle makeAllocator(MethodHandle rawConstructor) {
+        MethodType rawConType = rawConstructor.type();
+        // Wrap the raw (unsafe) constructor with the allocation of a suitable object.
+        MethodHandle allocator
+            = AllocateObject.make(rawConType.parameterType(0), rawConstructor);
+        assert(allocator.type()
+               .equals(rawConType.dropParameterTypes(0, 1).changeReturnType(rawConType.parameterType(0))));
+        return allocator;
+    }
+
+    static final class AllocateObject<C> extends BoundMethodHandle {
+        private static final Unsafe unsafe = Unsafe.getUnsafe();
+
+        private final Class<C> allocateClass;
+        private final MethodHandle rawConstructor;
+
+        private AllocateObject(MethodHandle invoker,
+                               Class<C> allocateClass, MethodHandle rawConstructor) {
+            super(invoker);
+            this.allocateClass = allocateClass;
+            this.rawConstructor = rawConstructor;
+        }
+        static MethodHandle make(Class<?> allocateClass, MethodHandle rawConstructor) {
+            MethodType rawConType = rawConstructor.type();
+            assert(rawConType.parameterType(0) == allocateClass);
+            MethodType newType = rawConType.dropParameterTypes(0, 1).changeReturnType(allocateClass);
+            int nargs = rawConType.parameterCount() - 1;
+            if (nargs < INVOKES.length) {
+                MethodHandle invoke = INVOKES[nargs];
+                MethodType conType = CON_TYPES[nargs];
+                MethodHandle gcon = convertArguments(rawConstructor, conType, rawConType, null);
+                if (gcon == null)  return null;
+                MethodHandle galloc = new AllocateObject(invoke, allocateClass, gcon);
+                assert(galloc.type() == newType.generic());
+                return convertArguments(galloc, newType, galloc.type(), null);
+            } else {
+                MethodHandle invoke = VARARGS_INVOKE;
+                MethodType conType = CON_TYPES[nargs];
+                MethodHandle gcon = spreadArguments(rawConstructor, conType, 1);
+                if (gcon == null)  return null;
+                MethodHandle galloc = new AllocateObject(invoke, allocateClass, gcon);
+                return collectArguments(galloc, newType, 1, null);
+            }
+        }
+        @Override
+        public String toString() {
+            return addTypeString(allocateClass.getSimpleName(), this);
+        }
+        @SuppressWarnings("unchecked")
+        private C allocate() throws InstantiationException {
+            return (C) unsafe.allocateInstance(allocateClass);
+        }
+        private C invoke_V(Object... av) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, av);
+            return obj;
+        }
+        private C invoke_L0() throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj);
+            return obj;
+        }
+        private C invoke_L1(Object a0) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0);
+            return obj;
+        }
+        private C invoke_L2(Object a0, Object a1) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1);
+            return obj;
+        }
+        private C invoke_L3(Object a0, Object a1, Object a2) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1, a2);
+            return obj;
+        }
+        private C invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3);
+            return obj;
+        }
+        private C invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4);
+            return obj;
+        }
+        private C invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4, a5);
+            return obj;
+        }
+        private C invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4, a5, a6);
+            return obj;
+        }
+        private C invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            C obj = allocate();
+            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4, a5, a6, a7);
+            return obj;
+        }
+        static MethodHandle[] makeInvokes() {
+            ArrayList<MethodHandle> invokes = new ArrayList<MethodHandle>();
+            MethodHandles.Lookup lookup = IMPL_LOOKUP;
+            for (;;) {
+                int nargs = invokes.size();
+                String name = "invoke_L"+nargs;
+                MethodHandle invoke = null;
+                try {
+                    invoke = lookup.findVirtual(AllocateObject.class, name, MethodType.genericMethodType(nargs));
+                } catch (ReflectiveOperationException ex) {
+                }
+                if (invoke == null)  break;
+                invokes.add(invoke);
+            }
+            assert(invokes.size() == 9);  // current number of methods
+            return invokes.toArray(new MethodHandle[0]);
+        };
+        static final MethodHandle[] INVOKES = makeInvokes();
+        // For testing use this:
+        //static final MethodHandle[] INVOKES = Arrays.copyOf(makeInvokes(), 2);
+        static final MethodHandle VARARGS_INVOKE;
+        static {
+            try {
+                VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(AllocateObject.class, "invoke_V", MethodType.genericMethodType(0, true));
+            } catch (ReflectiveOperationException ex) {
+                throw uncaughtException(ex);
+            }
+        }
+        // Corresponding generic constructor types:
+        static final MethodType[] CON_TYPES = new MethodType[INVOKES.length];
+        static {
+            for (int i = 0; i < INVOKES.length; i++)
+                CON_TYPES[i] = makeConType(INVOKES[i]);
+        }
+        static final MethodType VARARGS_CON_TYPE = makeConType(VARARGS_INVOKE);
+        static MethodType makeConType(MethodHandle invoke) {
+            MethodType invType = invoke.type();
+            return invType.changeParameterType(0, Object.class).changeReturnType(void.class);
+        }
+    }
+
+    static
+    MethodHandle accessField(MemberName member, boolean isSetter,
+                             Class<?> lookupClass) {
+        // Use sun. misc.Unsafe to dig up the dirt on the field.
+        MethodHandle mh = new FieldAccessor(member, isSetter);
+        return mh;
+    }
+
+    static
+    MethodHandle accessArrayElement(Class<?> arrayClass, boolean isSetter) {
+        if (!arrayClass.isArray())
+            throw newIllegalArgumentException("not an array: "+arrayClass);
+        Class<?> elemClass = arrayClass.getComponentType();
+        MethodHandle[] mhs = FieldAccessor.ARRAY_CACHE.get(elemClass);
+        if (mhs == null) {
+            if (!FieldAccessor.doCache(elemClass))
+                return FieldAccessor.ahandle(arrayClass, isSetter);
+            mhs = new MethodHandle[] {
+                FieldAccessor.ahandle(arrayClass, false),
+                FieldAccessor.ahandle(arrayClass, true)
+            };
+            if (mhs[0].type().parameterType(0) == Class.class) {
+                mhs[0] = MethodHandles.insertArguments(mhs[0], 0, elemClass);
+                mhs[1] = MethodHandles.insertArguments(mhs[1], 0, elemClass);
+            }
+            synchronized (FieldAccessor.ARRAY_CACHE) {}  // memory barrier
+            FieldAccessor.ARRAY_CACHE.put(elemClass, mhs);
+        }
+        return mhs[isSetter ? 1 : 0];
+    }
+
+    static final class FieldAccessor<C,V> extends BoundMethodHandle {
+        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        final Object base;  // for static refs only
+        final long offset;
+        final String name;
+
+        FieldAccessor(MemberName field, boolean isSetter) {
+            super(fhandle(field.getDeclaringClass(), field.getFieldType(), isSetter, field.isStatic()));
+            this.offset = (long) field.getVMIndex();
+            this.name = field.getName();
+            this.base = staticBase(field);
+        }
+        @Override
+        public String toString() { return addTypeString(name, this); }
+
+        int getFieldI(C obj) { return unsafe.getInt(obj, offset); }
+        void setFieldI(C obj, int x) { unsafe.putInt(obj, offset, x); }
+        long getFieldJ(C obj) { return unsafe.getLong(obj, offset); }
+        void setFieldJ(C obj, long x) { unsafe.putLong(obj, offset, x); }
+        float getFieldF(C obj) { return unsafe.getFloat(obj, offset); }
+        void setFieldF(C obj, float x) { unsafe.putFloat(obj, offset, x); }
+        double getFieldD(C obj) { return unsafe.getDouble(obj, offset); }
+        void setFieldD(C obj, double x) { unsafe.putDouble(obj, offset, x); }
+        boolean getFieldZ(C obj) { return unsafe.getBoolean(obj, offset); }
+        void setFieldZ(C obj, boolean x) { unsafe.putBoolean(obj, offset, x); }
+        byte getFieldB(C obj) { return unsafe.getByte(obj, offset); }
+        void setFieldB(C obj, byte x) { unsafe.putByte(obj, offset, x); }
+        short getFieldS(C obj) { return unsafe.getShort(obj, offset); }
+        void setFieldS(C obj, short x) { unsafe.putShort(obj, offset, x); }
+        char getFieldC(C obj) { return unsafe.getChar(obj, offset); }
+        void setFieldC(C obj, char x) { unsafe.putChar(obj, offset, x); }
+        @SuppressWarnings("unchecked")
+        V getFieldL(C obj) { return (V) unsafe.getObject(obj, offset); }
+        @SuppressWarnings("unchecked")
+        void setFieldL(C obj, V x) { unsafe.putObject(obj, offset, x); }
+        // cast (V) is OK here, since we wrap convertArguments around the MH.
+
+        static Object staticBase(MemberName field) {
+            if (!field.isStatic())  return null;
+            Class c = field.getDeclaringClass();
+            java.lang.reflect.Field f;
+            try {
+                // FIXME:  Should not have to create 'f' to get this value.
+                f = c.getDeclaredField(field.getName());
+                return unsafe.staticFieldBase(f);
+            } catch (Exception ee) {
+                throw uncaughtException(ee);
+            }
+        }
+
+        int getStaticI() { return unsafe.getInt(base, offset); }
+        void setStaticI(int x) { unsafe.putInt(base, offset, x); }
+        long getStaticJ() { return unsafe.getLong(base, offset); }
+        void setStaticJ(long x) { unsafe.putLong(base, offset, x); }
+        float getStaticF() { return unsafe.getFloat(base, offset); }
+        void setStaticF(float x) { unsafe.putFloat(base, offset, x); }
+        double getStaticD() { return unsafe.getDouble(base, offset); }
+        void setStaticD(double x) { unsafe.putDouble(base, offset, x); }
+        boolean getStaticZ() { return unsafe.getBoolean(base, offset); }
+        void setStaticZ(boolean x) { unsafe.putBoolean(base, offset, x); }
+        byte getStaticB() { return unsafe.getByte(base, offset); }
+        void setStaticB(byte x) { unsafe.putByte(base, offset, x); }
+        short getStaticS() { return unsafe.getShort(base, offset); }
+        void setStaticS(short x) { unsafe.putShort(base, offset, x); }
+        char getStaticC() { return unsafe.getChar(base, offset); }
+        void setStaticC(char x) { unsafe.putChar(base, offset, x); }
+        V getStaticL() { return (V) unsafe.getObject(base, offset); }
+        void setStaticL(V x) { unsafe.putObject(base, offset, x); }
+
+        static String fname(Class<?> vclass, boolean isSetter, boolean isStatic) {
+            String stem;
+            if (!isStatic)
+                stem = (!isSetter ? "getField" : "setField");
+            else
+                stem = (!isSetter ? "getStatic" : "setStatic");
+            return stem + Wrapper.basicTypeChar(vclass);
+        }
+        static MethodType ftype(Class<?> cclass, Class<?> vclass, boolean isSetter, boolean isStatic) {
+            MethodType type;
+            if (!isStatic) {
+                if (!isSetter)
+                    return MethodType.methodType(vclass, cclass);
+                else
+                    return MethodType.methodType(void.class, cclass, vclass);
+            } else {
+                if (!isSetter)
+                    return MethodType.methodType(vclass);
+                else
+                    return MethodType.methodType(void.class, vclass);
+            }
+        }
+        static MethodHandle fhandle(Class<?> cclass, Class<?> vclass, boolean isSetter, boolean isStatic) {
+            String name = FieldAccessor.fname(vclass, isSetter, isStatic);
+            if (cclass.isPrimitive())  throw newIllegalArgumentException("primitive "+cclass);
+            Class<?> ecclass = Object.class;  //erase this type
+            Class<?> evclass = vclass;
+            if (!evclass.isPrimitive())  evclass = Object.class;
+            MethodType type = FieldAccessor.ftype(ecclass, evclass, isSetter, isStatic);
+            MethodHandle mh;
+            try {
+                mh = IMPL_LOOKUP.findVirtual(FieldAccessor.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+                throw uncaughtException(ex);
+            }
+            if (evclass != vclass || (!isStatic && ecclass != cclass)) {
+                MethodType strongType = FieldAccessor.ftype(cclass, vclass, isSetter, isStatic);
+                strongType = strongType.insertParameterTypes(0, FieldAccessor.class);
+                mh = MethodHandles.convertArguments(mh, strongType);
+            }
+            return mh;
+        }
+
+        /// Support for array element access
+        static final HashMap<Class<?>, MethodHandle[]> ARRAY_CACHE =
+                new HashMap<Class<?>, MethodHandle[]>();
+        // FIXME: Cache on the classes themselves, not here.
+        static boolean doCache(Class<?> elemClass) {
+            if (elemClass.isPrimitive())  return true;
+            ClassLoader cl = elemClass.getClassLoader();
+            return cl == null || cl == ClassLoader.getSystemClassLoader();
+        }
+        static int getElementI(int[] a, int i) { return a[i]; }
+        static void setElementI(int[] a, int i, int x) { a[i] = x; }
+        static long getElementJ(long[] a, int i) { return a[i]; }
+        static void setElementJ(long[] a, int i, long x) { a[i] = x; }
+        static float getElementF(float[] a, int i) { return a[i]; }
+        static void setElementF(float[] a, int i, float x) { a[i] = x; }
+        static double getElementD(double[] a, int i) { return a[i]; }
+        static void setElementD(double[] a, int i, double x) { a[i] = x; }
+        static boolean getElementZ(boolean[] a, int i) { return a[i]; }
+        static void setElementZ(boolean[] a, int i, boolean x) { a[i] = x; }
+        static byte getElementB(byte[] a, int i) { return a[i]; }
+        static void setElementB(byte[] a, int i, byte x) { a[i] = x; }
+        static short getElementS(short[] a, int i) { return a[i]; }
+        static void setElementS(short[] a, int i, short x) { a[i] = x; }
+        static char getElementC(char[] a, int i) { return a[i]; }
+        static void setElementC(char[] a, int i, char x) { a[i] = x; }
+        static Object getElementL(Object[] a, int i) { return a[i]; }
+        static void setElementL(Object[] a, int i, Object x) { a[i] = x; }
+        static <V> V getElementL(Class<V[]> aclass, V[] a, int i) { return aclass.cast(a)[i]; }
+        static <V> void setElementL(Class<V[]> aclass, V[] a, int i, V x) { aclass.cast(a)[i] = x; }
+
+        static String aname(Class<?> aclass, boolean isSetter) {
+            Class<?> vclass = aclass.getComponentType();
+            if (vclass == null)  throw new IllegalArgumentException();
+            return (!isSetter ? "getElement" : "setElement") + Wrapper.basicTypeChar(vclass);
+        }
+        static MethodType atype(Class<?> aclass, boolean isSetter) {
+            Class<?> vclass = aclass.getComponentType();
+            if (!isSetter)
+                return MethodType.methodType(vclass, aclass, int.class);
+            else
+                return MethodType.methodType(void.class, aclass, int.class, vclass);
+        }
+        static MethodHandle ahandle(Class<?> aclass, boolean isSetter) {
+            Class<?> vclass = aclass.getComponentType();
+            String name = FieldAccessor.aname(aclass, isSetter);
+            Class<?> caclass = null;
+            if (!vclass.isPrimitive() && vclass != Object.class) {
+                caclass = aclass;
+                aclass = Object[].class;
+                vclass = Object.class;
+            }
+            MethodType type = FieldAccessor.atype(aclass, isSetter);
+            if (caclass != null)
+                type = type.insertParameterTypes(0, Class.class);
+            MethodHandle mh;
+            try {
+                mh = IMPL_LOOKUP.findStatic(FieldAccessor.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+                throw uncaughtException(ex);
+            }
+            if (caclass != null) {
+                MethodType strongType = FieldAccessor.atype(caclass, isSetter);
+                mh = MethodHandles.insertArguments(mh, 0, caclass);
+                mh = MethodHandles.convertArguments(mh, strongType);
+            }
+            return mh;
+        }
+    }
+
+    /** Bind a predetermined first argument to the given direct method handle.
+     * Callable only from MethodHandles.
+     * @param token Proof that the caller has access to this package.
+     * @param target Any direct method handle.
+     * @param receiver Receiver (or first static method argument) to pre-bind.
+     * @return a BoundMethodHandle for the given DirectMethodHandle, or null if it does not exist
+     */
+    static
+    MethodHandle bindReceiver(MethodHandle target, Object receiver) {
+        if (target instanceof AdapterMethodHandle &&
+            ((AdapterMethodHandle)target).conversionOp() == MethodHandleNatives.Constants.OP_RETYPE_ONLY
+            ) {
+            Object info = MethodHandleNatives.getTargetInfo(target);
+            if (info instanceof DirectMethodHandle) {
+                DirectMethodHandle dmh = (DirectMethodHandle) info;
+                if (receiver == null ||
+                    dmh.type().parameterType(0).isAssignableFrom(receiver.getClass())) {
+                    MethodHandle bmh = new BoundMethodHandle(dmh, receiver, 0);
+                    MethodType newType = target.type().dropParameterTypes(0, 1);
+                    return convertArguments(bmh, newType, bmh.type(), null);
+                }
+            }
+        }
+        if (target instanceof DirectMethodHandle)
+            return new BoundMethodHandle((DirectMethodHandle)target, receiver, 0);
+        return null;   // let caller try something else
+    }
+
+    /** Bind a predetermined argument to the given arbitrary method handle.
+     * Callable only from MethodHandles.
+     * @param token Proof that the caller has access to this package.
+     * @param target Any method handle.
+     * @param receiver Argument (which can be a boxed primitive) to pre-bind.
+     * @return a suitable BoundMethodHandle
+     */
+    static
+    MethodHandle bindArgument(MethodHandle target, int argnum, Object receiver) {
+        return new BoundMethodHandle(target, receiver, argnum);
+    }
+
+    static MethodHandle convertArguments(MethodHandle target,
+                                                MethodType newType,
+                                                MethodType oldType,
+                                                int[] permutationOrNull) {
+        assert(oldType.parameterCount() == target.type().parameterCount());
+        if (permutationOrNull != null) {
+            int outargs = oldType.parameterCount(), inargs = newType.parameterCount();
+            if (permutationOrNull.length != outargs)
+                throw newIllegalArgumentException("wrong number of arguments in permutation");
+            // Make the individual outgoing argument types match up first.
+            Class<?>[] callTypeArgs = new Class<?>[outargs];
+            for (int i = 0; i < outargs; i++)
+                callTypeArgs[i] = newType.parameterType(permutationOrNull[i]);
+            MethodType callType = MethodType.methodType(oldType.returnType(), callTypeArgs);
+            target = convertArguments(target, callType, oldType, null);
+            assert(target != null);
+            oldType = target.type();
+            List<Integer> goal = new ArrayList<Integer>();  // i*TOKEN
+            List<Integer> state = new ArrayList<Integer>(); // i*TOKEN
+            List<Integer> drops = new ArrayList<Integer>(); // not tokens
+            List<Integer> dups = new ArrayList<Integer>();  // not tokens
+            final int TOKEN = 10; // to mark items which are symbolic only
+            // state represents the argument values coming into target
+            for (int i = 0; i < outargs; i++) {
+                state.add(permutationOrNull[i] * TOKEN);
+            }
+            // goal represents the desired state
+            for (int i = 0; i < inargs; i++) {
+                if (state.contains(i * TOKEN)) {
+                    goal.add(i * TOKEN);
+                } else {
+                    // adapter must initially drop all unused arguments
+                    drops.add(i);
+                }
+            }
+            // detect duplications
+            while (state.size() > goal.size()) {
+                for (int i2 = 0; i2 < state.size(); i2++) {
+                    int arg1 = state.get(i2);
+                    int i1 = state.indexOf(arg1);
+                    if (i1 != i2) {
+                        // found duplicate occurrence at i2
+                        int arg2 = (inargs++) * TOKEN;
+                        state.set(i2, arg2);
+                        dups.add(goal.indexOf(arg1));
+                        goal.add(arg2);
+                    }
+                }
+            }
+            assert(state.size() == goal.size());
+            int size = goal.size();
+            while (!state.equals(goal)) {
+                // Look for a maximal sequence of adjacent misplaced arguments,
+                // and try to rotate them into place.
+                int bestRotArg = -10 * TOKEN, bestRotLen = 0;
+                int thisRotArg = -10 * TOKEN, thisRotLen = 0;
+                for (int i = 0; i < size; i++) {
+                    int arg = state.get(i);
+                    // Does this argument match the current run?
+                    if (arg == thisRotArg + TOKEN) {
+                        thisRotArg = arg;
+                        thisRotLen += 1;
+                        if (bestRotLen < thisRotLen) {
+                            bestRotLen = thisRotLen;
+                            bestRotArg = thisRotArg;
+                        }
+                    } else {
+                        // The old sequence (if any) stops here.
+                        thisRotLen = 0;
+                        thisRotArg = -10 * TOKEN;
+                        // But maybe a new one starts here also.
+                        int wantArg = goal.get(i);
+                        final int MAX_ARG_ROTATION = AdapterMethodHandle.MAX_ARG_ROTATION;
+                        if (arg != wantArg &&
+                            arg >= wantArg - TOKEN * MAX_ARG_ROTATION &&
+                            arg <= wantArg + TOKEN * MAX_ARG_ROTATION) {
+                            thisRotArg = arg;
+                            thisRotLen = 1;
+                        }
+                    }
+                }
+                if (bestRotLen >= 2) {
+                    // Do a rotation if it can improve argument positioning
+                    // by at least 2 arguments.  This is not always optimal,
+                    // but it seems to catch common cases.
+                    int dstEnd = state.indexOf(bestRotArg);
+                    int srcEnd = goal.indexOf(bestRotArg);
+                    int rotBy = dstEnd - srcEnd;
+                    int dstBeg = dstEnd - (bestRotLen - 1);
+                    int srcBeg = srcEnd - (bestRotLen - 1);
+                    assert((dstEnd | dstBeg | srcEnd | srcBeg) >= 0); // no negs
+                    // Make a span which covers both source and destination.
+                    int rotBeg = Math.min(dstBeg, srcBeg);
+                    int rotEnd = Math.max(dstEnd, srcEnd);
+                    int score = 0;
+                    for (int i = rotBeg; i <= rotEnd; i++) {
+                        if ((int)state.get(i) != (int)goal.get(i))
+                            score += 1;
+                    }
+                    List<Integer> rotSpan = state.subList(rotBeg, rotEnd+1);
+                    Collections.rotate(rotSpan, -rotBy);  // reverse direction
+                    for (int i = rotBeg; i <= rotEnd; i++) {
+                        if ((int)state.get(i) != (int)goal.get(i))
+                            score -= 1;
+                    }
+                    if (score >= 2) {
+                        // Improved at least two argument positions.  Do it.
+                        List<Class<?>> ptypes = Arrays.asList(oldType.parameterArray());
+                        Collections.rotate(ptypes.subList(rotBeg, rotEnd+1), -rotBy);
+                        MethodType rotType = MethodType.methodType(oldType.returnType(), ptypes);
+                        MethodHandle nextTarget
+                                = AdapterMethodHandle.makeRotateArguments(rotType, target,
+                                        rotBeg, rotSpan.size(), rotBy);
+                        if (nextTarget != null) {
+                            //System.out.println("Rot: "+rotSpan+" by "+rotBy);
+                            target = nextTarget;
+                            oldType = rotType;
+                            continue;
+                        }
+                    }
+                    // Else de-rotate, and drop through to the swap-fest.
+                    Collections.rotate(rotSpan, rotBy);
+                }
+
+                // Now swap like the wind!
+                List<Class<?>> ptypes = Arrays.asList(oldType.parameterArray());
+                for (int i = 0; i < size; i++) {
+                    // What argument do I want here?
+                    int arg = goal.get(i);
+                    if (arg != state.get(i)) {
+                        // Where is it now?
+                        int j = state.indexOf(arg);
+                        Collections.swap(ptypes, i, j);
+                        MethodType swapType = MethodType.methodType(oldType.returnType(), ptypes);
+                        target = AdapterMethodHandle.makeSwapArguments(swapType, target, i, j);
+                        if (target == null)  throw newIllegalArgumentException("cannot swap");
+                        assert(target.type() == swapType);
+                        oldType = swapType;
+                        Collections.swap(state, i, j);
+                    }
+                }
+                // One pass of swapping must finish the job.
+                assert(state.equals(goal));
+            }
+            while (!dups.isEmpty()) {
+                // Grab a contiguous trailing sequence of dups.
+                int grab = dups.size() - 1;
+                int dupArgPos = dups.get(grab), dupArgCount = 1;
+                while (grab - 1 >= 0) {
+                    int dup0 = dups.get(grab - 1);
+                    if (dup0 != dupArgPos - 1)  break;
+                    dupArgPos -= 1;
+                    dupArgCount += 1;
+                    grab -= 1;
+                }
+                //if (dupArgCount > 1)  System.out.println("Dup: "+dups.subList(grab, dups.size()));
+                dups.subList(grab, dups.size()).clear();
+                // In the new target type drop that many args from the tail:
+                List<Class<?>> ptypes = oldType.parameterList();
+                ptypes = ptypes.subList(0, ptypes.size() - dupArgCount);
+                MethodType dupType = MethodType.methodType(oldType.returnType(), ptypes);
+                target = AdapterMethodHandle.makeDupArguments(dupType, target, dupArgPos, dupArgCount);
+                if (target == null)
+                    throw newIllegalArgumentException("cannot dup");
+                oldType = target.type();
+            }
+            while (!drops.isEmpty()) {
+                // Grab a contiguous initial sequence of drops.
+                int dropArgPos = drops.get(0), dropArgCount = 1;
+                while (dropArgCount < drops.size()) {
+                    int drop1 = drops.get(dropArgCount);
+                    if (drop1 != dropArgPos + dropArgCount)  break;
+                    dropArgCount += 1;
+                }
+                //if (dropArgCount > 1)  System.out.println("Drop: "+drops.subList(0, dropArgCount));
+                drops.subList(0, dropArgCount).clear();
+                List<Class<?>> dropTypes = newType.parameterList()
+                        .subList(dropArgPos, dropArgPos + dropArgCount);
+                MethodType dropType = oldType.insertParameterTypes(dropArgPos, dropTypes);
+                target = AdapterMethodHandle.makeDropArguments(dropType, target, dropArgPos, dropArgCount);
+                if (target == null)  throw newIllegalArgumentException("cannot drop");
+                oldType = target.type();
+            }
+        }
+        if (newType == oldType)
+            return target;
+        if (oldType.parameterCount() != newType.parameterCount())
+            throw newIllegalArgumentException("mismatched parameter count");
+        MethodHandle res = AdapterMethodHandle.makePairwiseConvert(newType, target);
+        if (res != null)
+            return res;
+        int argc = oldType.parameterCount();
+        // The JVM can't do it directly, so fill in the gap with a Java adapter.
+        // TO DO: figure out what to put here from case-by-case experience
+        // Use a heavier method:  Convert all the arguments to Object,
+        // then back to the desired types.  We might have to use Java-based
+        // method handles to do this.
+        MethodType objType = MethodType.genericMethodType(argc);
+        MethodHandle objTarget = AdapterMethodHandle.makePairwiseConvert(objType, target);
+        if (objTarget == null)
+            objTarget = FromGeneric.make(target);
+        res = AdapterMethodHandle.makePairwiseConvert(newType, objTarget);
+        if (res != null)
+            return res;
+        return ToGeneric.make(newType, objTarget);
+    }
+
+    static MethodHandle spreadArguments(MethodHandle target,
+                                               MethodType newType,
+                                               int spreadArg) {
+        // TO DO: maybe allow the restarg to be Object and implicitly cast to Object[]
+        MethodType oldType = target.type();
+        // spread the last argument of newType to oldType
+        int spreadCount = oldType.parameterCount() - spreadArg;
+        Class<Object[]> spreadArgType = Object[].class;
+        MethodHandle res = AdapterMethodHandle.makeSpreadArguments(newType, target, spreadArgType, spreadArg, spreadCount);
+        if (res != null)
+            return res;
+        // try an intermediate adapter
+        Class<?> spreadType = null;
+        if (spreadArg < 0 || spreadArg >= newType.parameterCount()
+            || !VerifyType.isSpreadArgType(spreadType = newType.parameterType(spreadArg)))
+            throw newIllegalArgumentException("no restarg in "+newType);
+        Class<?>[] ptypes = oldType.parameterArray();
+        for (int i = 0; i < spreadCount; i++)
+            ptypes[spreadArg + i] = VerifyType.spreadArgElementType(spreadType, i);
+        MethodType midType = MethodType.methodType(newType.returnType(), ptypes);
+        // after spreading, some arguments may need further conversion
+        MethodHandle target2 = convertArguments(target, midType, oldType, null);
+        if (target2 == null)
+            throw new UnsupportedOperationException("NYI: convert "+midType+" =calls=> "+oldType);
+        res = AdapterMethodHandle.makeSpreadArguments(newType, target2, spreadArgType, spreadArg, spreadCount);
+        if (res != null)
+            return res;
+        res = SpreadGeneric.make(target2, spreadCount);
+        if (res != null)
+            res = convertArguments(res, newType, res.type(), null);
+        return res;
+    }
+
+    static MethodHandle collectArguments(MethodHandle target,
+                                                MethodType newType,
+                                                int collectArg,
+                                                MethodHandle collector) {
+        MethodType oldType = target.type();     // (a...,c)=>r
+        if (collector == null) {
+            int numCollect = newType.parameterCount() - oldType.parameterCount() + 1;
+            collector = ValueConversions.varargsArray(numCollect);
+        }
+        //         newType                      // (a..., b...)=>r
+        MethodType colType = collector.type();  // (b...)=>c
+        //         oldType                      // (a..., b...)=>r
+        assert(newType.parameterCount() == collectArg + colType.parameterCount());
+        assert(oldType.parameterCount() == collectArg + 1);
+        MethodHandle gtarget = convertArguments(target, oldType.generic(), oldType, null);
+        MethodHandle gcollector = convertArguments(collector, colType.generic(), colType, null);
+        if (gtarget == null || gcollector == null)  return null;
+        MethodHandle gresult = FilterGeneric.makeArgumentCollector(gcollector, gtarget);
+        MethodHandle result = convertArguments(gresult, newType, gresult.type(), null);
+        return result;
+    }
+
+    static MethodHandle filterArgument(MethodHandle target,
+                                              int pos,
+                                              MethodHandle filter) {
+        MethodType ttype = target.type(), gttype = ttype.generic();
+        if (ttype != gttype) {
+            target = convertArguments(target, gttype, ttype, null);
+            ttype = gttype;
+        }
+        MethodType ftype = filter.type(), gftype = ftype.generic();
+        if (ftype.parameterCount() != 1)
+            throw new InternalError();
+        if (ftype != gftype) {
+            filter = convertArguments(filter, gftype, ftype, null);
+            ftype = gftype;
+        }
+        if (ftype == ttype) {
+            // simple unary case
+            return FilterOneArgument.make(filter, target);
+        }
+        return FilterGeneric.makeArgumentFilter(pos, filter, target);
+    }
+
+    static MethodHandle foldArguments(MethodHandle target,
+                                             MethodType newType,
+                                             MethodHandle combiner) {
+        MethodType oldType = target.type();
+        MethodType ctype = combiner.type();
+        MethodHandle gtarget = convertArguments(target, oldType.generic(), oldType, null);
+        MethodHandle gcombiner = convertArguments(combiner, ctype.generic(), ctype, null);
+        if (gtarget == null || gcombiner == null)  return null;
+        MethodHandle gresult = FilterGeneric.makeArgumentFolder(gcombiner, gtarget);
+        MethodHandle result = convertArguments(gresult, newType, gresult.type(), null);
+        return result;
+    }
+
+    static
+    MethodHandle dropArguments(MethodHandle target,
+                               MethodType newType, int argnum) {
+        int drops = newType.parameterCount() - target.type().parameterCount();
+        MethodHandle res = AdapterMethodHandle.makeDropArguments(newType, target, argnum, drops);
+        if (res != null)
+            return res;
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    private static class GuardWithTest extends BoundMethodHandle {
+        private final MethodHandle test, target, fallback;
+        private GuardWithTest(MethodHandle invoker,
+                              MethodHandle test, MethodHandle target, MethodHandle fallback) {
+            super(invoker);
+            this.test = test;
+            this.target = target;
+            this.fallback = fallback;
+        }
+        static MethodHandle make(MethodHandle test, MethodHandle target, MethodHandle fallback) {
+            MethodType type = target.type();
+            int nargs = type.parameterCount();
+            if (nargs < INVOKES.length) {
+                MethodHandle invoke = INVOKES[nargs];
+                MethodType gtype = type.generic();
+                assert(invoke.type().dropParameterTypes(0,1) == gtype);
+                MethodHandle gtest = convertArguments(test, gtype.changeReturnType(boolean.class), test.type(), null);
+                MethodHandle gtarget = convertArguments(target, gtype, type, null);
+                MethodHandle gfallback = convertArguments(fallback, gtype, type, null);
+                if (gtest == null || gtarget == null || gfallback == null)  return null;
+                MethodHandle gguard = new GuardWithTest(invoke, gtest, gtarget, gfallback);
+                return convertArguments(gguard, type, gtype, null);
+            } else {
+                MethodHandle invoke = VARARGS_INVOKE;
+                MethodType gtype = MethodType.genericMethodType(1);
+                assert(invoke.type().dropParameterTypes(0,1) == gtype);
+                MethodHandle gtest = spreadArguments(test, gtype.changeReturnType(boolean.class), 0);
+                MethodHandle gtarget = spreadArguments(target, gtype, 0);
+                MethodHandle gfallback = spreadArguments(fallback, gtype, 0);
+                MethodHandle gguard = new GuardWithTest(invoke, gtest, gtarget, gfallback);
+                if (gtest == null || gtarget == null || gfallback == null)  return null;
+                return collectArguments(gguard, type, 0, null);
+            }
+        }
+        @Override
+        public String toString() {
+            return addTypeString(target, this);
+        }
+        private Object invoke_V(Object... av) throws Throwable {
+            if ((boolean) test.invokeExact(av))
+                return target.invokeExact(av);
+            return fallback.invokeExact(av);
+        }
+        private Object invoke_L0() throws Throwable {
+            if ((boolean) test.invokeExact())
+                return target.invokeExact();
+            return fallback.invokeExact();
+        }
+        private Object invoke_L1(Object a0) throws Throwable {
+            if ((boolean) test.invokeExact(a0))
+                return target.invokeExact(a0);
+            return fallback.invokeExact(a0);
+        }
+        private Object invoke_L2(Object a0, Object a1) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1))
+                return target.invokeExact(a0, a1);
+            return fallback.invokeExact(a0, a1);
+        }
+        private Object invoke_L3(Object a0, Object a1, Object a2) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1, a2))
+                return target.invokeExact(a0, a1, a2);
+            return fallback.invokeExact(a0, a1, a2);
+        }
+        private Object invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1, a2, a3))
+                return target.invokeExact(a0, a1, a2, a3);
+            return fallback.invokeExact(a0, a1, a2, a3);
+        }
+        private Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4))
+                return target.invokeExact(a0, a1, a2, a3, a4);
+            return fallback.invokeExact(a0, a1, a2, a3, a4);
+        }
+        private Object invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4, a5))
+                return target.invokeExact(a0, a1, a2, a3, a4, a5);
+            return fallback.invokeExact(a0, a1, a2, a3, a4, a5);
+        }
+        private Object invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4, a5, a6))
+                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6);
+            return fallback.invokeExact(a0, a1, a2, a3, a4, a5, a6);
+        }
+        private Object invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7))
+                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7);
+            return fallback.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7);
+        }
+        static MethodHandle[] makeInvokes() {
+            ArrayList<MethodHandle> invokes = new ArrayList<MethodHandle>();
+            MethodHandles.Lookup lookup = IMPL_LOOKUP;
+            for (;;) {
+                int nargs = invokes.size();
+                String name = "invoke_L"+nargs;
+                MethodHandle invoke = null;
+                try {
+                    invoke = lookup.findVirtual(GuardWithTest.class, name, MethodType.genericMethodType(nargs));
+                } catch (ReflectiveOperationException ex) {
+                }
+                if (invoke == null)  break;
+                invokes.add(invoke);
+            }
+            assert(invokes.size() == 9);  // current number of methods
+            return invokes.toArray(new MethodHandle[0]);
+        };
+        static final MethodHandle[] INVOKES = makeInvokes();
+        // For testing use this:
+        //static final MethodHandle[] INVOKES = Arrays.copyOf(makeInvokes(), 2);
+        static final MethodHandle VARARGS_INVOKE;
+        static {
+            try {
+                VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(GuardWithTest.class, "invoke_V", MethodType.genericMethodType(0, true));
+            } catch (ReflectiveOperationException ex) {
+                throw uncaughtException(ex);
+            }
+        }
+    }
+
+    static
+    MethodHandle makeGuardWithTest(MethodHandle test,
+                                   MethodHandle target,
+                                   MethodHandle fallback) {
+        return GuardWithTest.make(test, target, fallback);
+    }
+
+    private static class GuardWithCatch extends BoundMethodHandle {
+        private final MethodHandle target;
+        private final Class<? extends Throwable> exType;
+        private final MethodHandle catcher;
+        GuardWithCatch(MethodHandle target, Class<? extends Throwable> exType, MethodHandle catcher) {
+            this(INVOKES[target.type().parameterCount()], target, exType, catcher);
+        }
+       GuardWithCatch(MethodHandle invoker,
+                      MethodHandle target, Class<? extends Throwable> exType, MethodHandle catcher) {
+            super(invoker);
+            this.target = target;
+            this.exType = exType;
+            this.catcher = catcher;
+        }
+        @Override
+        public String toString() {
+            return addTypeString(target, this);
+        }
+        private Object invoke_V(Object... av) throws Throwable {
+            try {
+                return target.invokeExact(av);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, av);
+            }
+        }
+        private Object invoke_L0() throws Throwable {
+            try {
+                return target.invokeExact();
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t);
+            }
+        }
+        private Object invoke_L1(Object a0) throws Throwable {
+            try {
+                return target.invokeExact(a0);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0);
+            }
+        }
+        private Object invoke_L2(Object a0, Object a1) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1);
+            }
+        }
+        private Object invoke_L3(Object a0, Object a1, Object a2) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1, a2);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1, a2);
+            }
+        }
+        private Object invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1, a2, a3);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1, a2, a3);
+            }
+        }
+        private Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1, a2, a3, a4);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1, a2, a3, a4);
+            }
+        }
+        private Object invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1, a2, a3, a4, a5);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1, a2, a3, a4, a5);
+            }
+        }
+        private Object invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1, a2, a3, a4, a5, a6);
+            }
+        }
+        private Object invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable {
+            try {
+                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7);
+            } catch (Throwable t) {
+                if (!exType.isInstance(t))  throw t;
+                return catcher.invokeExact(t, a0, a1, a2, a3, a4, a5, a6, a7);
+            }
+        }
+        static MethodHandle[] makeInvokes() {
+            ArrayList<MethodHandle> invokes = new ArrayList<MethodHandle>();
+            MethodHandles.Lookup lookup = IMPL_LOOKUP;
+            for (;;) {
+                int nargs = invokes.size();
+                String name = "invoke_L"+nargs;
+                MethodHandle invoke = null;
+                try {
+                    invoke = lookup.findVirtual(GuardWithCatch.class, name, MethodType.genericMethodType(nargs));
+                } catch (ReflectiveOperationException ex) {
+                }
+                if (invoke == null)  break;
+                invokes.add(invoke);
+            }
+            assert(invokes.size() == 9);  // current number of methods
+            return invokes.toArray(new MethodHandle[0]);
+        };
+        static final MethodHandle[] INVOKES = makeInvokes();
+        // For testing use this:
+        //static final MethodHandle[] INVOKES = Arrays.copyOf(makeInvokes(), 2);
+        static final MethodHandle VARARGS_INVOKE;
+        static {
+            try {
+                VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(GuardWithCatch.class, "invoke_V", MethodType.genericMethodType(0, true));
+            } catch (ReflectiveOperationException ex) {
+                throw uncaughtException(ex);
+            }
+        }
+    }
+
+
+    static
+    MethodHandle makeGuardWithCatch(MethodHandle target,
+                                    Class<? extends Throwable> exType,
+                                    MethodHandle catcher) {
+        MethodType type = target.type();
+        MethodType ctype = catcher.type();
+        int nargs = type.parameterCount();
+        if (nargs < GuardWithCatch.INVOKES.length) {
+            MethodType gtype = type.generic();
+            MethodType gcatchType = gtype.insertParameterTypes(0, Throwable.class);
+            MethodHandle gtarget = convertArguments(target, gtype, type, null);
+            MethodHandle gcatcher = convertArguments(catcher, gcatchType, ctype, null);
+            MethodHandle gguard = new GuardWithCatch(gtarget, exType, gcatcher);
+            if (gtarget == null || gcatcher == null || gguard == null)  return null;
+            return convertArguments(gguard, type, gtype, null);
+        } else {
+            MethodType gtype = MethodType.genericMethodType(0, true);
+            MethodType gcatchType = gtype.insertParameterTypes(0, Throwable.class);
+            MethodHandle gtarget = spreadArguments(target, gtype, 0);
+            MethodHandle gcatcher = spreadArguments(catcher, gcatchType, 1);
+            MethodHandle gguard = new GuardWithCatch(GuardWithCatch.VARARGS_INVOKE, gtarget, exType, gcatcher);
+            if (gtarget == null || gcatcher == null || gguard == null)  return null;
+            return collectArguments(gguard, type, 0, null);
+        }
+    }
+
+    static
+    MethodHandle throwException(MethodType type) {
+        return AdapterMethodHandle.makeRetypeRaw(type, throwException());
+    }
+
+    static MethodHandle THROW_EXCEPTION;
+    static MethodHandle throwException() {
+        if (THROW_EXCEPTION != null)  return THROW_EXCEPTION;
+        try {
+            THROW_EXCEPTION
+            = IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "throwException",
+                    MethodType.methodType(Empty.class, Throwable.class));
+        } catch (ReflectiveOperationException ex) {
+            throw new RuntimeException(ex);
+        }
+        return THROW_EXCEPTION;
+    }
+    static <T extends Throwable> Empty throwException(T t) throws T { throw t; }
+
+    // Linkage support:
+    static void registerBootstrap(Class<?> callerClass, MethodHandle bootstrapMethod) {
+        MethodHandleNatives.registerBootstrap(callerClass, bootstrapMethod);
+    }
+    static MethodHandle getBootstrap(Class<?> callerClass) {
+        return MethodHandleNatives.getBootstrap(callerClass);
+    }
+
+    static MethodHandle asVarargsCollector(MethodHandle target, Class<?> arrayType) {
+        return AdapterMethodHandle.makeVarargsCollector(target, arrayType);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,368 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * The JVM interface for the method handles package is all here.
+ * This is an interface internal and private to an implemetantion of JSR 292.
+ * <em>This class is not part of the JSR 292 standard.</em>
+ * @author jrose
+ */
+class MethodHandleNatives {
+
+    private MethodHandleNatives() { } // static only
+
+    /// MethodName support
+
+    static native void init(MemberName self, Object ref);
+    static native void expand(MemberName self);
+    static native void resolve(MemberName self, Class<?> caller);
+    static native int getMembers(Class<?> defc, String matchName, String matchSig,
+            int matchFlags, Class<?> caller, int skip, MemberName[] results);
+
+    /// MethodHandle support
+
+    /** Initialize the method handle to adapt the call. */
+    static native void init(AdapterMethodHandle self, MethodHandle target, int argnum);
+    /** Initialize the method handle to call the correct method, directly. */
+    static native void init(BoundMethodHandle self, Object target, int argnum);
+    /** Initialize the method handle to call as if by an invoke* instruction. */
+    static native void init(DirectMethodHandle self, Object ref, boolean doDispatch, Class<?> caller);
+
+    /** Initialize a method type, once per form. */
+    static native void init(MethodType self);
+
+    /** Tell the JVM about a class's bootstrap method. */
+    static native void registerBootstrap(Class<?> caller, MethodHandle bootstrapMethod);
+
+    /** Ask the JVM about a class's bootstrap method. */
+    static native MethodHandle getBootstrap(Class<?> caller);
+
+    /** Tell the JVM that we need to change the target of an invokedynamic. */
+    static native void setCallSiteTarget(CallSite site, MethodHandle target);
+
+    /** Fetch the vmtarget field.
+     *  It will be sanitized as necessary to avoid exposing non-Java references.
+     *  This routine is for debugging and reflection.
+     */
+    static native Object getTarget(MethodHandle self, int format);
+
+    /** Fetch the name of the handled method, if available.
+     *  This routine is for debugging and reflection.
+     */
+    static MemberName getMethodName(MethodHandle self) {
+        return (MemberName) getTarget(self, ETF_METHOD_NAME);
+    }
+
+    /** Fetch the reflective version of the handled method, if available.
+     */
+    static AccessibleObject getTargetMethod(MethodHandle self) {
+        return (AccessibleObject) getTarget(self, ETF_REFLECT_METHOD);
+    }
+
+    /** Fetch the target of this method handle.
+     *  If it directly targets a method, return a MemberName for the method.
+     *  If it is chained to another method handle, return that handle.
+     */
+    static Object getTargetInfo(MethodHandle self) {
+        return getTarget(self, ETF_HANDLE_OR_METHOD_NAME);
+    }
+
+    static Object[] makeTarget(Class<?> defc, String name, String sig, int mods, Class<?> refc) {
+        return new Object[] { defc, name, sig, mods, refc };
+    }
+
+    /** Fetch MH-related JVM parameter.
+     *  which=0 retrieves MethodHandlePushLimit
+     *  which=1 retrieves stack slot push size (in address units)
+     */
+    static native int getConstant(int which);
+
+    /** Java copy of MethodHandlePushLimit in range 2..255. */
+    static final int JVM_PUSH_LIMIT;
+    /** JVM stack motion (in words) after one slot is pushed, usually -1.
+     */
+    static final int JVM_STACK_MOVE_UNIT;
+
+    /** Which conv-ops are implemented by the JVM? */
+    static final int CONV_OP_IMPLEMENTED_MASK;
+
+    private static native void registerNatives();
+    static {
+        int     JVM_PUSH_LIMIT_;
+        int     JVM_STACK_MOVE_UNIT_;
+        int     CONV_OP_IMPLEMENTED_MASK_;
+        try {
+            registerNatives();
+            JVM_PUSH_LIMIT_ = getConstant(Constants.GC_JVM_PUSH_LIMIT);
+            JVM_STACK_MOVE_UNIT_ = getConstant(Constants.GC_JVM_STACK_MOVE_UNIT);
+            CONV_OP_IMPLEMENTED_MASK_ = getConstant(Constants.GC_CONV_OP_IMPLEMENTED_MASK);
+            //sun.reflect.Reflection.registerMethodsToFilter(MethodHandleImpl.class, "init");
+        } catch (UnsatisfiedLinkError ee) {
+            // ignore; if we use init() methods later we'll see linkage errors
+            JVM_PUSH_LIMIT_ = 3;  // arbitrary
+            JVM_STACK_MOVE_UNIT_ = -1;  // arbitrary
+            CONV_OP_IMPLEMENTED_MASK_ = 0;
+            JVM_PUSH_LIMIT = JVM_PUSH_LIMIT_;
+            JVM_STACK_MOVE_UNIT = JVM_STACK_MOVE_UNIT_;
+            throw ee;  // just die; hopeless to try to run with an older JVM
+        }
+        JVM_PUSH_LIMIT = JVM_PUSH_LIMIT_;
+        JVM_STACK_MOVE_UNIT = JVM_STACK_MOVE_UNIT_;
+        if (CONV_OP_IMPLEMENTED_MASK_ == 0)
+            CONV_OP_IMPLEMENTED_MASK_ = DEFAULT_CONV_OP_IMPLEMENTED_MASK;
+        CONV_OP_IMPLEMENTED_MASK = CONV_OP_IMPLEMENTED_MASK_;
+    }
+
+    // All compile-time constants go here.
+    // There is an opportunity to check them against the JVM's idea of them.
+    static class Constants {
+        Constants() { } // static only
+        // MethodHandleImpl
+        static final int // for getConstant
+                GC_JVM_PUSH_LIMIT = 0,
+                GC_JVM_STACK_MOVE_UNIT = 1,
+                GC_CONV_OP_IMPLEMENTED_MASK = 2;
+        static final int
+                ETF_HANDLE_OR_METHOD_NAME = 0, // all available data (immediate MH or method)
+                ETF_DIRECT_HANDLE         = 1, // ultimate method handle (will be a DMH, may be self)
+                ETF_METHOD_NAME           = 2, // ultimate method as MemberName
+                ETF_REFLECT_METHOD        = 3; // ultimate method as java.lang.reflect object (sans refClass)
+
+        // MemberName
+        // The JVM uses values of -2 and above for vtable indexes.
+        // Field values are simple positive offsets.
+        // Ref: src/share/vm/oops/methodOop.hpp
+        // This value is negative enough to avoid such numbers,
+        // but not too negative.
+        static final int
+                MN_IS_METHOD           = 0x00010000, // method (not constructor)
+                MN_IS_CONSTRUCTOR      = 0x00020000, // constructor
+                MN_IS_FIELD            = 0x00040000, // field
+                MN_IS_TYPE             = 0x00080000, // nested type
+                MN_SEARCH_SUPERCLASSES = 0x00100000, // for MHN.getMembers
+                MN_SEARCH_INTERFACES   = 0x00200000, // for MHN.getMembers
+                VM_INDEX_UNINITIALIZED = -99;
+
+        // BoundMethodHandle
+        /** Constants for decoding the vmargslot field, which contains 2 values. */
+        static final int
+            ARG_SLOT_PUSH_SHIFT = 16,
+            ARG_SLOT_MASK = (1<<ARG_SLOT_PUSH_SHIFT)-1;
+
+        // AdapterMethodHandle
+        /** Conversions recognized by the JVM.
+         *  They must align with the constants in java.lang.invoke.AdapterMethodHandle,
+         *  in the JVM file hotspot/src/share/vm/classfile/javaClasses.hpp.
+         */
+        static final int
+            OP_RETYPE_ONLY   = 0x0, // no argument changes; straight retype
+            OP_RETYPE_RAW    = 0x1, // no argument changes; straight retype
+            OP_CHECK_CAST    = 0x2, // ref-to-ref conversion; requires a Class argument
+            OP_PRIM_TO_PRIM  = 0x3, // converts from one primitive to another
+            OP_REF_TO_PRIM   = 0x4, // unboxes a wrapper to produce a primitive
+            OP_PRIM_TO_REF   = 0x5, // boxes a primitive into a wrapper (NYI)
+            OP_SWAP_ARGS     = 0x6, // swap arguments (vminfo is 2nd arg)
+            OP_ROT_ARGS      = 0x7, // rotate arguments (vminfo is displaced arg)
+            OP_DUP_ARGS      = 0x8, // duplicates one or more arguments (at TOS)
+            OP_DROP_ARGS     = 0x9, // remove one or more argument slots
+            OP_COLLECT_ARGS  = 0xA, // combine one or more arguments into a varargs (NYI)
+            OP_SPREAD_ARGS   = 0xB, // expand in place a varargs array (of known size)
+            OP_FLYBY         = 0xC, // operate first on reified argument list (NYI)
+            OP_RICOCHET      = 0xD, // run an adapter chain on the return value (NYI)
+            CONV_OP_LIMIT    = 0xE; // limit of CONV_OP enumeration
+        /** Shift and mask values for decoding the AMH.conversion field.
+         *  These numbers are shared with the JVM for creating AMHs.
+         */
+        static final int
+            CONV_OP_MASK     = 0xF00, // this nybble contains the conversion op field
+            CONV_VMINFO_MASK = 0x0FF, // LSB is reserved for JVM use
+            CONV_VMINFO_SHIFT     =  0, // position of bits in CONV_VMINFO_MASK
+            CONV_OP_SHIFT         =  8, // position of bits in CONV_OP_MASK
+            CONV_DEST_TYPE_SHIFT  = 12, // byte 2 has the adapter BasicType (if needed)
+            CONV_SRC_TYPE_SHIFT   = 16, // byte 2 has the source BasicType (if needed)
+            CONV_STACK_MOVE_SHIFT = 20, // high 12 bits give signed SP change
+            CONV_STACK_MOVE_MASK  = (1 << (32 - CONV_STACK_MOVE_SHIFT)) - 1;
+
+        /** Which conv-ops are implemented by the JVM? */
+        static final int DEFAULT_CONV_OP_IMPLEMENTED_MASK =
+                // Value to use if the corresponding JVM query fails.
+                ((1<<OP_RETYPE_ONLY)
+                |(1<<OP_RETYPE_RAW)
+                |(1<<OP_CHECK_CAST)
+                |(1<<OP_PRIM_TO_PRIM)
+                |(1<<OP_REF_TO_PRIM)
+                |(1<<OP_SWAP_ARGS)
+                |(1<<OP_ROT_ARGS)
+                |(1<<OP_DUP_ARGS)
+                |(1<<OP_DROP_ARGS)
+                //|(1<<OP_SPREAD_ARGS)
+                );
+
+        /**
+         * Basic types as encoded in the JVM.  These code values are not
+         * intended for use outside this class.  They are used as part of
+         * a private interface between the JVM and this class.
+         */
+        static final int
+            T_BOOLEAN  =  4,
+            T_CHAR     =  5,
+            T_FLOAT    =  6,
+            T_DOUBLE   =  7,
+            T_BYTE     =  8,
+            T_SHORT    =  9,
+            T_INT      = 10,
+            T_LONG     = 11,
+            T_OBJECT   = 12,
+            //T_ARRAY    = 13
+            T_VOID     = 14;
+            //T_ADDRESS  = 15
+
+        /**
+         * Constant pool reference-kind codes, as used by CONSTANT_MethodHandle CP entries.
+         */
+        static final int
+            REF_getField                = 1,
+            REF_getStatic               = 2,
+            REF_putField                = 3,
+            REF_putStatic               = 4,
+            REF_invokeVirtual           = 5,
+            REF_invokeStatic            = 6,
+            REF_invokeSpecial           = 7,
+            REF_newInvokeSpecial        = 8,
+            REF_invokeInterface         = 9;
+    }
+
+    private static native int getNamedCon(int which, Object[] name);
+    static boolean verifyConstants() {
+        Object[] box = { null };
+        for (int i = 0; ; i++) {
+            box[0] = null;
+            int vmval = getNamedCon(i, box);
+            if (box[0] == null)  break;
+            String name = (String) box[0];
+            try {
+                Field con = Constants.class.getDeclaredField(name);
+                int jval = con.getInt(null);
+                if (jval != vmval)
+                    throw new InternalError(name+": JVM has "+vmval+" while Java has "+jval);
+            } catch (Exception ex) {
+                throw new InternalError(name+": access failed, got "+ex);
+            }
+        }
+        return true;
+    }
+    static {
+        verifyConstants();
+    }
+
+    // Up-calls from the JVM.
+    // These must NOT be public.
+
+    /**
+     * The JVM is linking an invokedynamic instruction.  Create a reified call site for it.
+     */
+    static CallSite makeDynamicCallSite(MethodHandle bootstrapMethod,
+                                        String name, MethodType type,
+                                        Object info,
+                                        MemberName callerMethod, int callerBCI) {
+        return CallSite.makeSite(bootstrapMethod, name, type, info, callerMethod, callerBCI);
+    }
+
+    /**
+     * Called by the JVM to check the length of a spread array.
+     */
+    static void checkSpreadArgument(Object av, int n) {
+        MethodHandleStatics.checkSpreadArgument(av, n);
+    }
+
+    /**
+     * The JVM wants a pointer to a MethodType.  Oblige it by finding or creating one.
+     */
+    static MethodType findMethodHandleType(Class<?> rtype, Class<?>[] ptypes) {
+        return MethodType.makeImpl(rtype, ptypes, true);
+    }
+
+    /**
+     * The JVM wants to use a MethodType with invokeGeneric.  Give the runtime fair warning.
+     */
+    static void notifyGenericMethodType(MethodType type) {
+        type.form().notifyGenericMethodType();
+    }
+
+    /**
+     * The JVM wants to raise an exception.  Here's the path.
+     */
+    static void raiseException(int code, Object actual, Object required) {
+        String message;
+        // disregard the identity of the actual object, if it is not a class:
+        if (!(actual instanceof Class) && !(actual instanceof MethodType))
+            actual = actual.getClass();
+        if (actual != null)
+            message = "required "+required+" but encountered "+actual;
+        else
+            message = "required "+required;
+        switch (code) {
+        case 192: // checkcast
+            throw new ClassCastException(message);
+        default:
+            throw new InternalError("unexpected code "+code+": "+message);
+        }
+    }
+
+    /**
+     * The JVM is resolving a CONSTANT_MethodHandle CP entry.  And it wants our help.
+     * It will make an up-call to this method.  (Do not change the name or signature.)
+     */
+    static MethodHandle linkMethodHandleConstant(Class<?> callerClass, int refKind,
+                                                 Class<?> defc, String name, Object type) {
+        try {
+            Lookup lookup = IMPL_LOOKUP.in(callerClass);
+            switch (refKind) {
+            case REF_getField:          return lookup.findGetter(       defc, name, (Class<?>)   type );
+            case REF_getStatic:         return lookup.findStaticGetter( defc, name, (Class<?>)   type );
+            case REF_putField:          return lookup.findSetter(       defc, name, (Class<?>)   type );
+            case REF_putStatic:         return lookup.findStaticSetter( defc, name, (Class<?>)   type );
+            case REF_invokeVirtual:     return lookup.findVirtual(      defc, name, (MethodType) type );
+            case REF_invokeStatic:      return lookup.findStatic(       defc, name, (MethodType) type );
+            case REF_invokeSpecial:     return lookup.findSpecial(      defc, name, (MethodType) type, callerClass );
+            case REF_newInvokeSpecial:  return lookup.findConstructor(  defc,       (MethodType) type );
+            case REF_invokeInterface:   return lookup.findVirtual(      defc, name, (MethodType) type );
+            }
+            throw new IllegalArgumentException("bad MethodHandle constant "+name+" : "+type);
+        } catch (ReflectiveOperationException ex) {
+            Error err = new IncompatibleClassChangeError();
+            err.initCause(ex);
+            throw err;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandleStatics.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2011, 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 java.lang.invoke;
+
+/**
+ * This class consists exclusively of static names internal to the
+ * method handle implementation.
+ * Usage:  {@code import static java.lang.invoke.MethodHandleStatics.*}
+ * @author John Rose, JSR 292 EG
+ */
+/*non-public*/ class MethodHandleStatics {
+
+    private MethodHandleStatics() { }  // do not instantiate
+
+    /*non-public*/ static String getNameString(MethodHandle target, MethodType type) {
+        if (type == null)
+            type = target.type();
+        MemberName name = null;
+        if (target != null)
+            name = MethodHandleNatives.getMethodName(target);
+        if (name == null)
+            return "invoke" + type;
+        return name.getName() + type;
+    }
+
+    /*non-public*/ static String getNameString(MethodHandle target, MethodHandle typeHolder) {
+        return getNameString(target, typeHolder == null ? (MethodType) null : typeHolder.type());
+    }
+
+    /*non-public*/ static String getNameString(MethodHandle target) {
+        return getNameString(target, (MethodType) null);
+    }
+
+    /*non-public*/ static String addTypeString(Object obj, MethodHandle target) {
+        String str = String.valueOf(obj);
+        if (target == null)  return str;
+        int paren = str.indexOf('(');
+        if (paren >= 0) str = str.substring(0, paren);
+        return str + target.type();
+    }
+
+    static void checkSpreadArgument(Object av, int n) {
+        if (av == null ? n != 0 : ((Object[])av).length != n)
+            throw newIllegalArgumentException("Array is not of length "+n);
+    }
+
+    // handy shared exception makers (they simplify the common case code)
+    /*non-public*/ static RuntimeException newIllegalStateException(String message) {
+        return new IllegalStateException(message);
+    }
+    /*non-public*/ static RuntimeException newIllegalStateException(String message, Object obj) {
+        return new IllegalStateException(message(message, obj));
+    }
+    /*non-public*/ static RuntimeException newIllegalArgumentException(String message) {
+        return new IllegalArgumentException(message);
+    }
+    /*non-public*/ static RuntimeException newIllegalArgumentException(String message, Object obj) {
+        return new IllegalArgumentException(message(message, obj));
+    }
+    /*non-public*/ static Error uncaughtException(Exception ex) {
+        Error err = new InternalError("uncaught exception");
+        err.initCause(ex);
+        return err;
+    }
+    private static String message(String message, Object obj) {
+        if (obj != null)  message = message + ": " + obj;
+        return message;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandles.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,2357 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import java.lang.reflect.*;
+import sun.invoke.WrapperInstance;
+import sun.invoke.util.ValueConversions;
+import sun.invoke.util.VerifyAccess;
+import sun.invoke.util.Wrapper;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
+import sun.reflect.Reflection;
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * This class consists exclusively of static methods that operate on or return
+ * method handles. They fall into several categories:
+ * <ul>
+ * <li>Lookup methods which help create method handles for methods and fields.
+ * <li>Combinator methods, which combine or transform pre-existing method handles into new ones.
+ * <li>Other factory methods to create method handles that emulate other common JVM operations or control flow patterns.
+ * <li>Wrapper methods which can convert between method handles and interface types.
+ * </ul>
+ * <p>
+ * @author John Rose, JSR 292 EG
+ */
+public class MethodHandles {
+
+    private MethodHandles() { }  // do not instantiate
+
+    private static final MemberName.Factory IMPL_NAMES = MemberName.getFactory();
+    static { MethodHandleImpl.initStatics(); }
+    // See IMPL_LOOKUP below.
+
+    //// Method handle creation from ordinary methods.
+
+    /**
+     * Returns a {@link Lookup lookup object} on the caller,
+     * which has the capability to access any method handle that the caller has access to,
+     * including direct method handles to private fields and methods.
+     * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
+     * Do not store it in place where untrusted code can access it.
+     */
+    public static Lookup lookup() {
+        return new Lookup();
+    }
+
+    /**
+     * Returns a {@link Lookup lookup object} which is trusted minimally.
+     * It can only be used to create method handles to
+     * publicly accessible fields and methods.
+     * <p>
+     * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class}
+     * of this lookup object will be {@link java.lang.Object}.
+     * <p>
+     * The lookup class can be changed to any other class {@code C} using an expression of the form
+     * {@linkplain Lookup#in <code>publicLookup().in(C.class)</code>}.
+     * Since all classes have equal access to public names,
+     * such a change would confer no new access rights.
+     */
+    public static Lookup publicLookup() {
+        return Lookup.PUBLIC_LOOKUP;
+    }
+
+    /**
+     * A <em>lookup object</em> is a factory for creating method handles,
+     * when the creation requires access checking.
+     * Method handles do not perform
+     * access checks when they are called, but rather when they are created.
+     * Therefore, method handle access
+     * restrictions must be enforced when a method handle is created.
+     * The caller class against which those restrictions are enforced
+     * is known as the {@linkplain #lookupClass lookup class}.
+     * <p>
+     * A lookup class which needs to create method handles will call
+     * {@link MethodHandles#lookup MethodHandles.lookup} to create a factory for itself.
+     * When the {@code Lookup} factory object is created, the identity of the lookup class is
+     * determined, and securely stored in the {@code Lookup} object.
+     * The lookup class (or its delegates) may then use factory methods
+     * on the {@code Lookup} object to create method handles for access-checked members.
+     * This includes all methods, constructors, and fields which are allowed to the lookup class,
+     * even private ones.
+     * <p>
+     * The factory methods on a {@code Lookup} object correspond to all major
+     * use cases for methods, constructors, and fields.
+     * Here is a summary of the correspondence between these factory methods and
+     * the behavior the resulting method handles:
+     * <code>
+     * <table border=1 cellpadding=5 summary="lookup method behaviors">
+     * <tr><th>lookup expression</th><th>member</th><th>behavior</th></tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findGetter lookup.findGetter(C.class,"f",FT.class)}</td>
+     *     <td>FT f;</td><td>(T) this.f;</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStaticGetter lookup.findStaticGetter(C.class,"f",FT.class)}</td>
+     *     <td>static<br>FT f;</td><td>(T) C.f;</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findSetter lookup.findSetter(C.class,"f",FT.class)}</td>
+     *     <td>FT f;</td><td>this.f = x;</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStaticSetter lookup.findStaticSetter(C.class,"f",FT.class)}</td>
+     *     <td>static<br>FT f;</td><td>C.f = arg;</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findVirtual lookup.findVirtual(C.class,"m",MT)}</td>
+     *     <td>T m(A*);</td><td>(T) this.m(arg*);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStatic lookup.findStatic(C.class,"m",MT)}</td>
+     *     <td>static<br>T m(A*);</td><td>(T) C.m(arg*);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findSpecial lookup.findSpecial(C.class,"m",MT,this.class)}</td>
+     *     <td>T m(A*);</td><td>(T) super.m(arg*);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findConstructor lookup.findConstructor(C.class,MT)}</td>
+     *     <td>C(A*);</td><td>(T) new C(arg*);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflectGetter lookup.unreflectGetter(aField)}</td>
+     *     <td>(static)?<br>FT f;</td><td>(FT) aField.get(thisOrNull);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflectSetter lookup.unreflectSetter(aField)}</td>
+     *     <td>(static)?<br>FT f;</td><td>aField.set(thisOrNull, arg);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflect lookup.unreflect(aMethod)}</td>
+     *     <td>(static)?<br>T m(A*);</td><td>(T) aMethod.invoke(thisOrNull, arg*);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflectConstructor lookup.unreflectConstructor(aConstructor)}</td>
+     *     <td>C(A*);</td><td>(C) aConstructor.newInstance(arg*);</td>
+     * </tr>
+     * <tr>
+     *     <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflect lookup.unreflect(aMethod)}</td>
+     *     <td>(static)?<br>T m(A*);</td><td>(T) aMethod.invoke(thisOrNull, arg*);</td>
+     * </tr>
+     * </table>
+     * </code>
+     * Here, the type {@code C} is the class or interface being searched for a member,
+     * documented as a parameter named {@code refc} in the lookup methods.
+     * The method or constructor type {@code MT} is composed from the return type {@code T}
+     * and the sequence of argument types {@code A*}.
+     * Both {@code MT} and the field type {@code FT} are documented as a parameter named {@code type}.
+     * The formal parameter {@code this} stands for the self-reference of type {@code C};
+     * if it is present, it is always the leading argument to the method handle invocation.
+     * The name {@code arg} stands for all the other method handle arguments.
+     * In the code examples for the Core Reflection API, the name {@code thisOrNull}
+     * stands for a null reference if the accessed method or field is static,
+     * and {@code this} otherwise.
+     * The names {@code aMethod}, {@code aField}, and {@code aConstructor} stand
+     * for reflective objects corresponding to the given members.
+     * <p>
+     * The equivalence between looked-up method handles and underlying
+     * class members can break down in a few ways:
+     * <ul>
+     * <li>If {@code C} is not symbolically accessible from the lookup class's loader,
+     * the lookup can still succeed, even when there is no equivalent
+     * Java expression or bytecoded constant.
+     * <li>Likewise, if {@code T} or {@code MT}
+     * is not symbolically accessible from the lookup class's loader,
+     * the lookup can still succeed.
+     * For example, lookups for {@code MethodHandle.invokeExact} and
+     * {@code MethodHandle.invokeGeneric} will always succeed, regardless of requested type.
+     * <li>If there is a security manager installed, it can forbid the lookup
+     * on various grounds (<a href="#secmgr">see below</a>).
+     * By contrast, the {@code ldc} instruction is not subject to
+     * security manager checks.
+     * </ul>
+     *
+     * <h3><a name="access"></a>Access checking</h3>
+     * Access checks are applied in the factory methods of {@code Lookup},
+     * when a method handle is created.
+     * This is a key difference from the Core Reflection API, since
+     * {@link java.lang.reflect.Method#invoke Method.invoke}
+     * performs access checking against every caller, on every call.
+     * <p>
+     * All access checks start from a {@code Lookup} object, which
+     * compares its recorded lookup class against all requests to
+     * create method handles.
+     * A single {@code Lookup} object can be used to create any number
+     * of access-checked method handles, all checked against a single
+     * lookup class.
+     * <p>
+     * A {@code Lookup} object can be shared with other trusted code,
+     * such as a metaobject protocol.
+     * A shared {@code Lookup} object delegates the capability
+     * to create method handles on private members of the lookup class.
+     * Even if privileged code uses the {@code Lookup} object,
+     * the access checking is confined to the privileges of the
+     * original lookup class.
+     * <p>
+     * A lookup can fail, because
+     * the containing class is not accessible to the lookup class, or
+     * because the desired class member is missing, or because the
+     * desired class member is not accessible to the lookup class.
+     * In any of these cases, a {@code ReflectiveOperationException} will be
+     * thrown from the attempted lookup.  The exact class will be one of
+     * the following:
+     * <ul>
+     * <li>NoSuchMethodException &mdash; if a method is requested but does not exist
+     * <li>NoSuchFieldException &mdash; if a field is requested but does not exist
+     * <li>IllegalAccessException &mdash; if the member exists but an access check fails
+     * </ul>
+     * <p>
+     * In general, the conditions under which a method handle may be
+     * looked up for a method {@code M} are exactly equivalent to the conditions
+     * under which the lookup class could have compiled and resolved a call to {@code M}.
+     * And the effect of invoking the method handle resulting from the lookup
+     * is exactly equivalent to executing the compiled and resolved call to {@code M}.
+     * The same point is true of fields and constructors.
+     * <p>
+     * In some cases, access between nested classes is obtained by the Java compiler by creating
+     * an wrapper method to access a private method of another class
+     * in the same top-level declaration.
+     * For example, a nested class {@code C.D}
+     * can access private members within other related classes such as
+     * {@code C}, {@code C.D.E}, or {@code C.B},
+     * but the Java compiler may need to generate wrapper methods in
+     * those related classes.  In such cases, a {@code Lookup} object on
+     * {@code C.E} would be unable to those private members.
+     * A workaround for this limitation is the {@link Lookup#in Lookup.in} method,
+     * which can transform a lookup on {@code C.E} into one on any of those other
+     * classes, without special elevation of privilege.
+     * <p>
+     * Although bytecode instructions can only refer to classes in
+     * a related class loader, this API can search for methods in any
+     * class, as long as a reference to its {@code Class} object is
+     * available.  Such cross-loader references are also possible with the
+     * Core Reflection API, and are impossible to bytecode instructions
+     * such as {@code invokestatic} or {@code getfield}.
+     * There is a {@linkplain java.lang.SecurityManager security manager API}
+     * to allow applications to check such cross-loader references.
+     * These checks apply to both the {@code MethodHandles.Lookup} API
+     * and the Core Reflection API
+     * (as found on {@link java.lang.Class Class}).
+     * <p>
+     * Access checks only apply to named and reflected methods,
+     * constructors, and fields.
+     * Other method handle creation methods, such as
+     * {@link #convertArguments MethodHandles.convertArguments},
+     * do not require any access checks, and are done
+     * with static methods of {@link MethodHandles},
+     * independently of any {@code Lookup} object.
+     *
+     * <h3>Security manager interactions</h3>
+     * <a name="secmgr"></a>
+     * If a security manager is present, member lookups are subject to
+     * additional checks.
+     * From one to four calls are made to the security manager.
+     * Any of these calls can refuse access by throwing a
+     * {@link java.lang.SecurityException SecurityException}.
+     * Define {@code smgr} as the security manager,
+     * {@code refc} as the containing class in which the member
+     * is being sought, and {@code defc} as the class in which the
+     * member is actually defined.
+     * The calls are made according to the following rules:
+     * <ul>
+     * <li>In all cases, {@link SecurityManager#checkMemberAccess
+     *     smgr.checkMemberAccess(refc, Member.PUBLIC)} is called.
+     * <li>If the class loader of the lookup class is not
+     *     the same as or an ancestor of the class loader of {@code refc},
+     *     then {@link SecurityManager#checkPackageAccess
+     *     smgr.checkPackageAccess(refcPkg)} is called,
+     *     where {@code refcPkg} is the package of {@code refc}.
+     * <li>If the retrieved member is not public,
+     *     {@link SecurityManager#checkMemberAccess
+     *     smgr.checkMemberAccess(defc, Member.DECLARED)} is called.
+     *     (Note that {@code defc} might be the same as {@code refc}.)
+     * <li>If the retrieved member is not public,
+     *     and if {@code defc} and {@code refc} are in different class loaders,
+     *     and if the class loader of the lookup class is not
+     *     the same as or an ancestor of the class loader of {@code defc},
+     *     then {@link SecurityManager#checkPackageAccess
+     *     smgr.checkPackageAccess(defcPkg)} is called,
+     *     where {@code defcPkg} is the package of {@code defc}.
+     * </ul>
+     * In all cases, the requesting class presented to the security
+     * manager will be the lookup class from the current {@code Lookup} object.
+     */
+    public static final
+    class Lookup {
+        /** The class on behalf of whom the lookup is being performed. */
+        private final Class<?> lookupClass;
+
+        /** The allowed sorts of members which may be looked up (PUBLIC, etc.). */
+        private final int allowedModes;
+
+        /** A single-bit mask representing {@code public} access,
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value, {@code 0x01}, happens to be the same as the value of the
+         *  {@code public} {@linkplain java.lang.reflect.Modifier#PUBLIC modifier bit}.
+         */
+        public static final int PUBLIC = Modifier.PUBLIC;
+
+        /** A single-bit mask representing {@code private} access,
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value, {@code 0x02}, happens to be the same as the value of the
+         *  {@code private} {@linkplain java.lang.reflect.Modifier#PRIVATE modifier bit}.
+         */
+        public static final int PRIVATE = Modifier.PRIVATE;
+
+        /** A single-bit mask representing {@code protected} access,
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value, {@code 0x04}, happens to be the same as the value of the
+         *  {@code protected} {@linkplain java.lang.reflect.Modifier#PROTECTED modifier bit}.
+         */
+        public static final int PROTECTED = Modifier.PROTECTED;
+
+        /** A single-bit mask representing {@code package} access (default access),
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value is {@code 0x08}, which does not correspond meaningfully to
+         *  any particular {@linkplain java.lang.reflect.Modifier modifier bit}.
+         */
+        public static final int PACKAGE = Modifier.STATIC;
+
+        private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE);
+        private static final int TRUSTED   = -1;
+
+        private static int fixmods(int mods) {
+            mods &= (ALL_MODES - PACKAGE);
+            return (mods != 0) ? mods : PACKAGE;
+        }
+
+        /** Tells which class is performing the lookup.  It is this class against
+         *  which checks are performed for visibility and access permissions.
+         *  <p>
+         *  The class implies a maximum level of access permission,
+         *  but the permissions may be additionally limited by the bitmask
+         *  {@link #lookupModes lookupModes}, which controls whether non-public members
+         *  can be accessed.
+         */
+        public Class<?> lookupClass() {
+            return lookupClass;
+        }
+
+        // This is just for calling out to MethodHandleImpl.
+        private Class<?> lookupClassOrNull() {
+            return (allowedModes == TRUSTED) ? null : lookupClass;
+        }
+
+        /** Tells which access-protection classes of members this lookup object can produce.
+         *  The result is a bit-mask of the bits
+         *  {@linkplain #PUBLIC PUBLIC (0x01)},
+         *  {@linkplain #PRIVATE PRIVATE (0x02)},
+         *  {@linkplain #PROTECTED PROTECTED (0x04)},
+         *  and {@linkplain #PACKAGE PACKAGE (0x08)}.
+         *  <p>
+         *  A freshly-created lookup object
+         *  on the {@linkplain java.lang.invoke.MethodHandles#lookup() caller's class}
+         *  has all possible bits set, since the caller class can access all its own members.
+         *  A lookup object on a new lookup class
+         *  {@linkplain java.lang.invoke.MethodHandles.Lookup#in created from a previous lookup object}
+         *  may have some mode bits set to zero.
+         *  The purpose of this is to restrict access via the new lookup object,
+         *  so that it can access only names which can be reached by the original
+         *  lookup object, and also by the new lookup class.
+         */
+        public int lookupModes() {
+            return allowedModes & ALL_MODES;
+        }
+
+        /** Embody the current class (the lookupClass) as a lookup class
+         * for method handle creation.
+         * Must be called by from a method in this package,
+         * which in turn is called by a method not in this package.
+         * <p>
+         * Also, don't make it private, lest javac interpose
+         * an access$N method.
+         */
+        Lookup() {
+            this(getCallerClassAtEntryPoint(), ALL_MODES);
+            // make sure we haven't accidentally picked up a privileged class:
+            checkUnprivilegedlookupClass(lookupClass);
+        }
+
+        Lookup(Class<?> lookupClass) {
+            this(lookupClass, ALL_MODES);
+        }
+
+        private Lookup(Class<?> lookupClass, int allowedModes) {
+            this.lookupClass = lookupClass;
+            this.allowedModes = allowedModes;
+        }
+
+        /**
+         * Creates a lookup on the specified new lookup class.
+         * The resulting object will report the specified
+         * class as its own {@link #lookupClass lookupClass}.
+         * <p>
+         * However, the resulting {@code Lookup} object is guaranteed
+         * to have no more access capabilities than the original.
+         * In particular, access capabilities can be lost as follows:<ul>
+         * <li>If the new lookup class differs from the old one,
+         * protected members will not be accessible by virtue of inheritance.
+         * (Protected members may continue to be accessible because of package sharing.)
+         * <li>If the new lookup class is in a different package
+         * than the old one, protected and default (package) members will not be accessible.
+         * <li>If the new lookup class is not within the same package member
+         * as the old one, private members will not be accessible.
+         * <li>If the new lookup class is not accessible to the old lookup class,
+         * then no members, not even public members, will be accessible.
+         * (In all other cases, public members will continue to be accessible.)
+         * </ul>
+         *
+         * @param requestedLookupClass the desired lookup class for the new lookup object
+         * @return a lookup object which reports the desired lookup class
+         * @throws NullPointerException if the argument is null
+         */
+        public Lookup in(Class<?> requestedLookupClass) {
+            requestedLookupClass.getClass();  // null check
+            if (allowedModes == TRUSTED)  // IMPL_LOOKUP can make any lookup at all
+                return new Lookup(requestedLookupClass, ALL_MODES);
+            if (requestedLookupClass == this.lookupClass)
+                return this;  // keep same capabilities
+            int newModes = (allowedModes & (ALL_MODES & ~PROTECTED));
+            if ((newModes & PACKAGE) != 0
+                && !VerifyAccess.isSamePackage(this.lookupClass, requestedLookupClass)) {
+                newModes &= ~(PACKAGE|PRIVATE);
+            }
+            // Allow nestmate lookups to be created without special privilege:
+            if ((newModes & PRIVATE) != 0
+                && !VerifyAccess.isSamePackageMember(this.lookupClass, requestedLookupClass)) {
+                newModes &= ~PRIVATE;
+            }
+            if (newModes == PUBLIC
+                && !VerifyAccess.isClassAccessible(requestedLookupClass, this.lookupClass)) {
+                // The requested class it not accessible from the lookup class.
+                // No permissions.
+                newModes = 0;
+            }
+            checkUnprivilegedlookupClass(requestedLookupClass);
+            return new Lookup(requestedLookupClass, newModes);
+        }
+
+        // Make sure outer class is initialized first.
+        static { IMPL_NAMES.getClass(); }
+
+        /** Version of lookup which is trusted minimally.
+         *  It can only be used to create method handles to
+         *  publicly accessible members.
+         */
+        static final Lookup PUBLIC_LOOKUP = new Lookup(Object.class, PUBLIC);
+
+        /** Package-private version of lookup which is trusted. */
+        static final Lookup IMPL_LOOKUP = new Lookup(Object.class, TRUSTED);
+
+        private static void checkUnprivilegedlookupClass(Class<?> lookupClass) {
+            String name = lookupClass.getName();
+            if (name.startsWith("java.lang.invoke."))
+                throw newIllegalArgumentException("illegal lookupClass: "+lookupClass);
+        }
+
+        /**
+         * Displays the name of the class from which lookups are to be made.
+         * (The name is the one reported by {@link java.lang.Class#getName() Class.getName}.)
+         * If there are restrictions on the access permitted to this lookup,
+         * this is indicated by adding a suffix to the class name, consisting
+         * of a slash and a keyword.  The keyword represents the strongest
+         * allowed access, and is chosen as follows:
+         * <ul>
+         * <li>If no access is allowed, the suffix is "/noaccess".
+         * <li>If only public access is allowed, the suffix is "/public".
+         * <li>If only public and package access are allowed, the suffix is "/package".
+         * <li>If only public, package, and private access are allowed, the suffix is "/private".
+         * </ul>
+         * If none of the above cases apply, it is the case that full
+         * access (public, package, private, and protected) is allowed.
+         * In this case, no suffix is added.
+         * This is true only of an object obtained originally from
+         * {@link java.lang.invoke.MethodHandles#lookup MethodHandles.lookup}.
+         * Objects created by {@link java.lang.invoke.MethodHandles.Lookup#in Lookup.in}
+         * always have restricted access, and will display a suffix.
+         * <p>
+         * (It may seem strange that protected access should be
+         * stronger than private access.  Viewed independently from
+         * package access, protected access is the first to be lost,
+         * because it requires a direct subclass relationship between
+         * caller and callee.)
+         * @see #in
+         */
+        @Override
+        public String toString() {
+            String cname = lookupClass.getName();
+            switch (allowedModes) {
+            case 0:  // no privileges
+                return cname + "/noaccess";
+            case PUBLIC:
+                return cname + "/public";
+            case PUBLIC|PACKAGE:
+                return cname + "/package";
+            case ALL_MODES & ~PROTECTED:
+                return cname + "/private";
+            case ALL_MODES:
+                return cname;
+            case TRUSTED:
+                return "/trusted";  // internal only; not exported
+            default:  // Should not happen, but it's a bitfield...
+                cname = cname + "/" + Integer.toHexString(allowedModes);
+                assert(false) : cname;
+                return cname;
+            }
+        }
+
+        // call this from an entry point method in Lookup with extraFrames=0.
+        private static Class<?> getCallerClassAtEntryPoint() {
+            final int CALLER_DEPTH = 4;
+            // 0: Reflection.getCC, 1: getCallerClassAtEntryPoint,
+            // 2: Lookup.<init>, 3: MethodHandles.*, 4: caller
+            // Note:  This should be the only use of getCallerClass in this file.
+            assert(Reflection.getCallerClass(CALLER_DEPTH-1) == MethodHandles.class);
+            return Reflection.getCallerClass(CALLER_DEPTH);
+        }
+
+        /**
+         * Produces a method handle for a static method.
+         * The type of the method handle will be that of the method.
+         * (Since static methods do not take receivers, there is no
+         * additional receiver argument inserted into the method handle type,
+         * as there would be with {@link #findVirtual findVirtual} or {@link #findSpecial findSpecial}.)
+         * The method and all its argument types must be accessible to the lookup class.
+         * If the method's class has not yet been initialized, that is done
+         * immediately, before the method handle is returned.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * @param refc the class from which the method is accessed
+         * @param name the name of the method
+         * @param type the type of the method
+         * @return the desired method handle
+         * @throws NoSuchMethodException if the method does not exist
+         * @throws IllegalAccessException if access checking fails, or if the method is not {@code static}
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public
+        MethodHandle findStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
+            MemberName method = resolveOrFail(refc, name, type, true);
+            checkMethod(refc, method, true);
+            return MethodHandleImpl.findMethod(method, false, lookupClassOrNull());
+        }
+
+        /**
+         * Produces a method handle for a virtual method.
+         * The type of the method handle will be that of the method,
+         * with the receiver type (usually {@code refc}) prepended.
+         * The method and all its argument types must be accessible to the lookup class.
+         * <p>
+         * When called, the handle will treat the first argument as a receiver
+         * and dispatch on the receiver's type to determine which method
+         * implementation to enter.
+         * (The dispatching action is identical with that performed by an
+         * {@code invokevirtual} or {@code invokeinterface} instruction.)
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * <p>
+         * Because of the general equivalence between {@code invokevirtual}
+         * instructions and method handles produced by {@code findVirtual},
+         * if the class is {@code MethodHandle} and the name string is
+         * {@code invokeExact} or {@code invokeGeneric}, the resulting
+         * method handle is equivalent to one produced by
+         * {@link java.lang.invoke.MethodHandles#exactInvoker MethodHandles.exactInvoker} or
+         * {@link java.lang.invoke.MethodHandles#genericInvoker MethodHandles.genericInvoker}
+         * with the same {@code type} argument.
+         *
+         * @param refc the class or interface from which the method is accessed
+         * @param name the name of the method
+         * @param type the type of the method, with the receiver argument omitted
+         * @return the desired method handle
+         * @throws NoSuchMethodException if the method does not exist
+         * @throws IllegalAccessException if access checking fails, or if the method is {@code static}
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
+            MemberName method = resolveOrFail(refc, name, type, false);
+            checkMethod(refc, method, false);
+            MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull());
+            return restrictProtectedReceiver(method, mh);
+        }
+
+        /**
+         * Produces a method handle which creates an object and initializes it, using
+         * the constructor of the specified type.
+         * The parameter types of the method handle will be those of the constructor,
+         * while the return type will be a reference to the constructor's class.
+         * The constructor and all its argument types must be accessible to the lookup class.
+         * If the constructor's class has not yet been initialized, that is done
+         * immediately, before the method handle is returned.
+         * <p>
+         * Note:  The requested type must have a return type of {@code void}.
+         * This is consistent with the JVM's treatment of constructor type descriptors.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the constructor's variable arity modifier bit ({@code 0x0080}) is set.
+         * @param refc the class or interface from which the method is accessed
+         * @param type the type of the method, with the receiver argument omitted, and a void return type
+         * @return the desired method handle
+         * @throws NoSuchMethodException if the constructor does not exist
+         * @throws IllegalAccessException if access checking fails
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException {
+            String name = "<init>";
+            MemberName ctor = resolveOrFail(refc, name, type, false, false, lookupClassOrNull());
+            assert(ctor.isConstructor());
+            checkAccess(refc, ctor);
+            MethodHandle rawMH = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull());
+            MethodHandle allocMH = MethodHandleImpl.makeAllocator(rawMH);
+            return fixVarargs(allocMH, rawMH);
+        }
+
+        /** Return a version of MH which matches matchMH w.r.t. isVarargsCollector. */
+        private static MethodHandle fixVarargs(MethodHandle mh, MethodHandle matchMH) {
+            boolean va1 = mh.isVarargsCollector();
+            boolean va2 = matchMH.isVarargsCollector();
+            if (va1 == va2) {
+                return mh;
+            } else if (va2) {
+                MethodType type = mh.type();
+                int arity = type.parameterCount();
+                return mh.asVarargsCollector(type.parameterType(arity-1));
+            } else {
+                throw new InternalError("already varargs, but template is not: "+mh);
+            }
+        }
+
+        /**
+         * Produces an early-bound method handle for a virtual method,
+         * as if called from an {@code invokespecial}
+         * instruction from {@code caller}.
+         * The type of the method handle will be that of the method,
+         * with a suitably restricted receiver type (such as {@code caller}) prepended.
+         * The method and all its argument types must be accessible
+         * to the caller.
+         * <p>
+         * When called, the handle will treat the first argument as a receiver,
+         * but will not dispatch on the receiver's type.
+         * (This direct invocation action is identical with that performed by an
+         * {@code invokespecial} instruction.)
+         * <p>
+         * If the explicitly specified caller class is not identical with the
+         * lookup class, or if this lookup object does not have private access
+         * privileges, the access fails.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * @param refc the class or interface from which the method is accessed
+         * @param name the name of the method (which must not be "&lt;init&gt;")
+         * @param type the type of the method, with the receiver argument omitted
+         * @param specialCaller the proposed calling class to perform the {@code invokespecial}
+         * @return the desired method handle
+         * @throws NoSuchMethodException if the method does not exist
+         * @throws IllegalAccessException if access checking fails
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findSpecial(Class<?> refc, String name, MethodType type,
+                                        Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException {
+            checkSpecialCaller(specialCaller);
+            MemberName method = resolveOrFail(refc, name, type, false, false, specialCaller);
+            checkMethod(refc, method, false);
+            MethodHandle mh = MethodHandleImpl.findMethod(method, false, specialCaller);
+            return restrictReceiver(method, mh, specialCaller);
+        }
+
+        /**
+         * Produces a method handle giving read access to a non-static field.
+         * The type of the method handle will have a return type of the field's
+         * value type.
+         * The method handle's single argument will be the instance containing
+         * the field.
+         * Access checking is performed immediately on behalf of the lookup class.
+         * @param refc the class or interface from which the method is accessed
+         * @param name the field's name
+         * @param type the field's type
+         * @return a method handle which can load values from the field
+         * @throws NoSuchFieldException if the field does not exist
+         * @throws IllegalAccessException if access checking fails, or if the field is {@code static}
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
+            return makeAccessor(refc, name, type, false, false);
+        }
+
+        /**
+         * Produces a method handle giving write access to a non-static field.
+         * The type of the method handle will have a void return type.
+         * The method handle will take two arguments, the instance containing
+         * the field, and the value to be stored.
+         * The second argument will be of the field's value type.
+         * Access checking is performed immediately on behalf of the lookup class.
+         * @param refc the class or interface from which the method is accessed
+         * @param name the field's name
+         * @param type the field's type
+         * @return a method handle which can store values into the field
+         * @throws NoSuchFieldException if the field does not exist
+         * @throws IllegalAccessException if access checking fails, or if the field is {@code static}
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
+            return makeAccessor(refc, name, type, false, true);
+        }
+
+        /**
+         * Produces a method handle giving read access to a static field.
+         * The type of the method handle will have a return type of the field's
+         * value type.
+         * The method handle will take no arguments.
+         * Access checking is performed immediately on behalf of the lookup class.
+         * @param refc the class or interface from which the method is accessed
+         * @param name the field's name
+         * @param type the field's type
+         * @return a method handle which can load values from the field
+         * @throws NoSuchFieldException if the field does not exist
+         * @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
+            return makeAccessor(refc, name, type, true, false);
+        }
+
+        /**
+         * Produces a method handle giving write access to a static field.
+         * The type of the method handle will have a void return type.
+         * The method handle will take a single
+         * argument, of the field's value type, the value to be stored.
+         * Access checking is performed immediately on behalf of the lookup class.
+         * @param refc the class or interface from which the method is accessed
+         * @param name the field's name
+         * @param type the field's type
+         * @return a method handle which can store values into the field
+         * @throws NoSuchFieldException if the field does not exist
+         * @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
+            return makeAccessor(refc, name, type, true, true);
+        }
+
+        /**
+         * Produces an early-bound method handle for a non-static method.
+         * The receiver must have a supertype {@code defc} in which a method
+         * of the given name and type is accessible to the lookup class.
+         * The method and all its argument types must be accessible to the lookup class.
+         * The type of the method handle will be that of the method,
+         * without any insertion of an additional receiver parameter.
+         * The given receiver will be bound into the method handle,
+         * so that every call to the method handle will invoke the
+         * requested method on the given receiver.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the method's variable arity modifier bit ({@code 0x0080}) is set
+         * <em>and</em> the trailing array argument is not the only argument.
+         * (If the trailing array argument is the only argument,
+         * the given receiver value will be bound to it.)
+         * <p>
+         * This is equivalent to the following code:
+         * <blockquote><pre>
+MethodHandle mh0 = {@link #findVirtual findVirtual}(defc, name, type);
+MethodHandle mh1 = mh0.{@link MethodHandle#bindTo bindTo}(receiver);
+MethodType mt1 = mh1.type();
+if (mh0.isVarargsCollector() && mt1.parameterCount() > 0) {
+  mh1 = mh1.asVarargsCollector(mt1.parameterType(mt1.parameterCount()-1));
+return mh1;
+         * </pre></blockquote>
+         * where {@code defc} is either {@code receiver.getClass()} or a super
+         * type of that class, in which the requested method is accessible
+         * to the lookup class.
+         * (Note that {@code bindTo} does not preserve variable arity.)
+         * @param receiver the object from which the method is accessed
+         * @param name the name of the method
+         * @param type the type of the method, with the receiver argument omitted
+         * @return the desired method handle
+         * @throws NoSuchMethodException if the method does not exist
+         * @throws IllegalAccessException if access checking fails
+         * @exception SecurityException if a security manager is present and it
+         *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle bind(Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
+            Class<? extends Object> refc = receiver.getClass(); // may get NPE
+            MemberName method = resolveOrFail(refc, name, type, false);
+            checkMethod(refc, method, false);
+            MethodHandle dmh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull());
+            MethodHandle bmh = MethodHandleImpl.bindReceiver(dmh, receiver);
+            if (bmh == null)
+                throw method.makeAccessException("no access", this);
+            if (dmh.type().parameterCount() == 0)
+                return dmh;  // bound the trailing parameter; no varargs possible
+            return fixVarargs(bmh, dmh);
+        }
+
+        /**
+         * Makes a direct method handle to <i>m</i>, if the lookup class has permission.
+         * If <i>m</i> is non-static, the receiver argument is treated as an initial argument.
+         * If <i>m</i> is virtual, overriding is respected on every call.
+         * Unlike the Core Reflection API, exceptions are <em>not</em> wrapped.
+         * The type of the method handle will be that of the method,
+         * with the receiver type prepended (but only if it is non-static).
+         * If the method's {@code accessible} flag is not set,
+         * access checking is performed immediately on behalf of the lookup class.
+         * If <i>m</i> is not public, do not share the resulting handle with untrusted parties.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * @param m the reflected method
+         * @return a method handle which can invoke the reflected method
+         * @throws IllegalAccessException if access checking fails
+         * @throws NullPointerException if the argument is null
+         */
+        public MethodHandle unreflect(Method m) throws IllegalAccessException {
+            MemberName method = new MemberName(m);
+            assert(method.isMethod());
+            if (!m.isAccessible())  checkMethod(method.getDeclaringClass(), method, method.isStatic());
+            MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull());
+            if (!m.isAccessible())  mh = restrictProtectedReceiver(method, mh);
+            return mh;
+        }
+
+        /**
+         * Produces a method handle for a reflected method.
+         * It will bypass checks for overriding methods on the receiver,
+         * as if by a {@code invokespecial} instruction from within the {@code specialCaller}.
+         * The type of the method handle will be that of the method,
+         * with the special caller type prepended (and <em>not</em> the receiver of the method).
+         * If the method's {@code accessible} flag is not set,
+         * access checking is performed immediately on behalf of the lookup class,
+         * as if {@code invokespecial} instruction were being linked.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * @param m the reflected method
+         * @param specialCaller the class nominally calling the method
+         * @return a method handle which can invoke the reflected method
+         * @throws IllegalAccessException if access checking fails
+         * @throws NullPointerException if any argument is null
+         */
+        public MethodHandle unreflectSpecial(Method m, Class<?> specialCaller) throws IllegalAccessException {
+            checkSpecialCaller(specialCaller);
+            MemberName method = new MemberName(m);
+            assert(method.isMethod());
+            // ignore m.isAccessible:  this is a new kind of access
+            checkMethod(m.getDeclaringClass(), method, false);
+            MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull());
+            return restrictReceiver(method, mh, specialCaller);
+        }
+
+        /**
+         * Produces a method handle for a reflected constructor.
+         * The type of the method handle will be that of the constructor,
+         * with the return type changed to the declaring class.
+         * The method handle will perform a {@code newInstance} operation,
+         * creating a new instance of the constructor's class on the
+         * arguments passed to the method handle.
+         * <p>
+         * If the constructor's {@code accessible} flag is not set,
+         * access checking is performed immediately on behalf of the lookup class.
+         * <p>
+         * The returned method handle will have
+         * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
+         * the constructor's variable arity modifier bit ({@code 0x0080}) is set.
+         * @param c the reflected constructor
+         * @return a method handle which can invoke the reflected constructor
+         * @throws IllegalAccessException if access checking fails
+         * @throws NullPointerException if the argument is null
+         */
+        public MethodHandle unreflectConstructor(Constructor c) throws IllegalAccessException {
+            MemberName ctor = new MemberName(c);
+            assert(ctor.isConstructor());
+            if (!c.isAccessible())  checkAccess(c.getDeclaringClass(), ctor);
+            MethodHandle rawCtor = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull());
+            MethodHandle allocator = MethodHandleImpl.makeAllocator(rawCtor);
+            return fixVarargs(allocator, rawCtor);
+        }
+
+        /**
+         * Produces a method handle giving read access to a reflected field.
+         * The type of the method handle will have a return type of the field's
+         * value type.
+         * If the field is static, the method handle will take no arguments.
+         * Otherwise, its single argument will be the instance containing
+         * the field.
+         * If the field's {@code accessible} flag is not set,
+         * access checking is performed immediately on behalf of the lookup class.
+         * @param f the reflected field
+         * @return a method handle which can load values from the reflected field
+         * @throws IllegalAccessException if access checking fails
+         * @throws NullPointerException if the argument is null
+         */
+        public MethodHandle unreflectGetter(Field f) throws IllegalAccessException {
+            return makeAccessor(f.getDeclaringClass(), new MemberName(f), f.isAccessible(), false);
+        }
+
+        /**
+         * Produces a method handle giving write access to a reflected field.
+         * The type of the method handle will have a void return type.
+         * If the field is static, the method handle will take a single
+         * argument, of the field's value type, the value to be stored.
+         * Otherwise, the two arguments will be the instance containing
+         * the field, and the value to be stored.
+         * If the field's {@code accessible} flag is not set,
+         * access checking is performed immediately on behalf of the lookup class.
+         * @param f the reflected field
+         * @return a method handle which can store values into the reflected field
+         * @throws IllegalAccessException if access checking fails
+         * @throws NullPointerException if the argument is null
+         */
+        public MethodHandle unreflectSetter(Field f) throws IllegalAccessException {
+            return makeAccessor(f.getDeclaringClass(), new MemberName(f), f.isAccessible(), true);
+        }
+
+        /// Helper methods, all package-private.
+
+        MemberName resolveOrFail(Class<?> refc, String name, Class<?> type, boolean isStatic) throws NoSuchFieldException, IllegalAccessException {
+            checkSymbolicClass(refc);  // do this before attempting to resolve
+            name.getClass(); type.getClass();  // NPE
+            int mods = (isStatic ? Modifier.STATIC : 0);
+            return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), true, lookupClassOrNull(),
+                                            NoSuchFieldException.class);
+        }
+
+        MemberName resolveOrFail(Class<?> refc, String name, MethodType type, boolean isStatic) throws NoSuchMethodException, IllegalAccessException {
+            checkSymbolicClass(refc);  // do this before attempting to resolve
+            name.getClass(); type.getClass();  // NPE
+            int mods = (isStatic ? Modifier.STATIC : 0);
+            return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), true, lookupClassOrNull(),
+                                            NoSuchMethodException.class);
+        }
+
+        MemberName resolveOrFail(Class<?> refc, String name, MethodType type, boolean isStatic,
+                                 boolean searchSupers, Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException {
+            checkSymbolicClass(refc);  // do this before attempting to resolve
+            name.getClass(); type.getClass();  // NPE
+            int mods = (isStatic ? Modifier.STATIC : 0);
+            return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), searchSupers, specialCaller,
+                                            NoSuchMethodException.class);
+        }
+
+        void checkSymbolicClass(Class<?> refc) throws IllegalAccessException {
+            Class<?> caller = lookupClassOrNull();
+            if (caller != null && !VerifyAccess.isClassAccessible(refc, caller))
+                throw new MemberName(refc).makeAccessException("symbolic reference class is not public", this);
+        }
+
+        void checkMethod(Class<?> refc, MemberName m, boolean wantStatic) throws IllegalAccessException {
+            String message;
+            if (m.isConstructor())
+                message = "expected a method, not a constructor";
+            else if (!m.isMethod())
+                message = "expected a method";
+            else if (wantStatic != m.isStatic())
+                message = wantStatic ? "expected a static method" : "expected a non-static method";
+            else
+                { checkAccess(refc, m); return; }
+            throw m.makeAccessException(message, this);
+        }
+
+        void checkAccess(Class<?> refc, MemberName m) throws IllegalAccessException {
+            int allowedModes = this.allowedModes;
+            if (allowedModes == TRUSTED)  return;
+            int mods = m.getModifiers();
+            if (Modifier.isPublic(mods) && Modifier.isPublic(refc.getModifiers()) && allowedModes != 0)
+                return;  // common case
+            int requestedModes = fixmods(mods);  // adjust 0 => PACKAGE
+            if ((requestedModes & allowedModes) != 0
+                && VerifyAccess.isMemberAccessible(refc, m.getDeclaringClass(),
+                                                   mods, lookupClass()))
+                return;
+            if (((requestedModes & ~allowedModes) & PROTECTED) != 0
+                && VerifyAccess.isSamePackage(m.getDeclaringClass(), lookupClass()))
+                // Protected members can also be checked as if they were package-private.
+                return;
+            throw m.makeAccessException(accessFailedMessage(refc, m), this);
+        }
+
+        String accessFailedMessage(Class<?> refc, MemberName m) {
+            Class<?> defc = m.getDeclaringClass();
+            int mods = m.getModifiers();
+            // check the class first:
+            boolean classOK = (Modifier.isPublic(defc.getModifiers()) &&
+                               (defc == refc ||
+                                Modifier.isPublic(refc.getModifiers())));
+            if (!classOK && (allowedModes & PACKAGE) != 0) {
+                classOK = (VerifyAccess.isClassAccessible(defc, lookupClass()) &&
+                           (defc == refc ||
+                            VerifyAccess.isClassAccessible(refc, lookupClass())));
+            }
+            if (!classOK)
+                return "class is not public";
+            if (Modifier.isPublic(mods))
+                return "access to public member failed";  // (how?)
+            if (Modifier.isPrivate(mods))
+                return "member is private";
+            if (Modifier.isProtected(mods))
+                return "member is protected";
+            return "member is private to package";
+        }
+
+        private static final boolean ALLOW_NESTMATE_ACCESS = false;
+
+        void checkSpecialCaller(Class<?> specialCaller) throws IllegalAccessException {
+            if (allowedModes == TRUSTED)  return;
+            if ((allowedModes & PRIVATE) == 0
+                || (specialCaller != lookupClass()
+                    && !(ALLOW_NESTMATE_ACCESS &&
+                         VerifyAccess.isSamePackageMember(specialCaller, lookupClass()))))
+                throw new MemberName(specialCaller).
+                    makeAccessException("no private access for invokespecial", this);
+        }
+
+        MethodHandle restrictProtectedReceiver(MemberName method, MethodHandle mh) throws IllegalAccessException {
+            // The accessing class only has the right to use a protected member
+            // on itself or a subclass.  Enforce that restriction, from JVMS 5.4.4, etc.
+            if (!method.isProtected() || method.isStatic()
+                || allowedModes == TRUSTED
+                || method.getDeclaringClass() == lookupClass()
+                || (ALLOW_NESTMATE_ACCESS &&
+                    VerifyAccess.isSamePackageMember(method.getDeclaringClass(), lookupClass())))
+                return mh;
+            else
+                return restrictReceiver(method, mh, lookupClass());
+        }
+        MethodHandle restrictReceiver(MemberName method, MethodHandle mh, Class<?> caller) throws IllegalAccessException {
+            assert(!method.isStatic());
+            Class<?> defc = method.getDeclaringClass();  // receiver type of mh is too wide
+            if (defc.isInterface() || !defc.isAssignableFrom(caller)) {
+                throw method.makeAccessException("caller class must be a subclass below the method", caller);
+            }
+            MethodType rawType = mh.type();
+            if (rawType.parameterType(0) == caller)  return mh;
+            MethodType narrowType = rawType.changeParameterType(0, caller);
+            MethodHandle narrowMH = MethodHandleImpl.convertArguments(mh, narrowType, rawType, null);
+            return fixVarargs(narrowMH, mh);
+        }
+
+        MethodHandle makeAccessor(Class<?> refc, String name, Class<?> type,
+                                  boolean isStatic, boolean isSetter) throws NoSuchFieldException, IllegalAccessException {
+            MemberName field = resolveOrFail(refc, name, type, isStatic);
+            if (isStatic != field.isStatic())
+                throw field.makeAccessException(isStatic
+                                                ? "expected a static field"
+                                                : "expected a non-static field", this);
+            return makeAccessor(refc, field, false, isSetter);
+        }
+
+        MethodHandle makeAccessor(Class<?> refc, MemberName field,
+                                  boolean trusted, boolean isSetter) throws IllegalAccessException {
+            assert(field.isField());
+            if (trusted)
+                return MethodHandleImpl.accessField(field, isSetter, lookupClassOrNull());
+            checkAccess(refc, field);
+            MethodHandle mh = MethodHandleImpl.accessField(field, isSetter, lookupClassOrNull());
+            return restrictProtectedReceiver(field, mh);
+        }
+    }
+
+    /**
+     * Produces a method handle giving read access to elements of an array.
+     * The type of the method handle will have a return type of the array's
+     * element type.  Its first argument will be the array type,
+     * and the second will be {@code int}.
+     * @param arrayClass an array type
+     * @return a method handle which can load values from the given array type
+     * @throws NullPointerException if the argument is null
+     * @throws  IllegalArgumentException if arrayClass is not an array type
+     */
+    public static
+    MethodHandle arrayElementGetter(Class<?> arrayClass) throws IllegalArgumentException {
+        return MethodHandleImpl.accessArrayElement(arrayClass, false);
+    }
+
+    /**
+     * Produces a method handle giving write access to elements of an array.
+     * The type of the method handle will have a void return type.
+     * Its last argument will be the array's element type.
+     * The first and second arguments will be the array type and int.
+     * @return a method handle which can store values into the array type
+     * @throws NullPointerException if the argument is null
+     * @throws IllegalArgumentException if arrayClass is not an array type
+     */
+    public static
+    MethodHandle arrayElementSetter(Class<?> arrayClass) throws IllegalArgumentException {
+        return MethodHandleImpl.accessArrayElement(arrayClass, true);
+    }
+
+    /// method handle invocation (reflective style)
+
+    /**
+     * Produces a method handle which will invoke any method handle of the
+     * given {@code type} on a standard set of {@code Object} type arguments
+     * and a single trailing {@code Object[]} array.
+     * The resulting invoker will be a method handle with the following
+     * arguments:
+     * <ul>
+     * <li>a single {@code MethodHandle} target
+     * <li>zero or more {@code Object} values (counted by {@code objectArgCount})
+     * <li>an {@code Object[]} array containing more arguments
+     * </ul>
+     * <p>
+     * The invoker will behave like a call to {@link MethodHandle#invokeGeneric invokeGeneric} with
+     * the indicated {@code type}.
+     * That is, if the target is exactly of the given {@code type}, it will behave
+     * like {@code invokeExact}; otherwise it behave as if {@link MethodHandle#asType asType}
+     * is used to convert the target to the required {@code type}.
+     * <p>
+     * The type of the returned invoker will not be the given {@code type}, but rather
+     * will have all parameter and return types replaced by {@code Object}, except for
+     * the last parameter type, which will be the array type {@code Object[]}.
+     * <p>
+     * Before invoking its target, the invoker will spread the varargs array, apply
+     * reference casts as necessary, and unbox and widen primitive arguments.
+     * The return value of the invoker will be an {@code Object} reference,
+     * boxing a primitive value if the original type returns a primitive,
+     * and always null if the original type returns void.
+     * <p>
+     * This method is equivalent to the following code (though it may be more efficient):
+     * <p><blockquote><pre>
+MethodHandle invoker = MethodHandles.genericInvoker(type);
+int spreadArgCount = type.parameterCount - objectArgCount;
+invoker = invoker.asSpreader(Object[].class, spreadArgCount);
+return invoker;
+     * </pre></blockquote>
+     * <p>
+     * This method throws no reflective or security exceptions.
+     * @param type the desired target type
+     * @param objectArgCount number of fixed (non-varargs) {@code Object} arguments
+     * @return a method handle suitable for invoking any method handle of the given type
+     */
+    static public
+    MethodHandle spreadInvoker(MethodType type, int objectArgCount) {
+        if (objectArgCount < 0 || objectArgCount > type.parameterCount())
+            throw new IllegalArgumentException("bad argument count "+objectArgCount);
+        return type.invokers().spreadInvoker(objectArgCount);
+    }
+
+    /**
+     * Produces a special <em>invoker method handle</em> which can be used to
+     * invoke any method handle of the given type, as if by {@code invokeExact}.
+     * The resulting invoker will have a type which is
+     * exactly equal to the desired type, except that it will accept
+     * an additional leading argument of type {@code MethodHandle}.
+     * <p>
+     * This method is equivalent to the following code (though it may be more efficient):
+     * <p><blockquote><pre>
+publicLookup().findVirtual(MethodHandle.class, "invokeExact", type)
+     * </pre></blockquote>
+     *
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * Invoker method handles can be useful when working with variable method handles
+     * of unknown types.
+     * For example, to emulate an {@code invokeExact} call to a variable method
+     * handle {@code M}, extract its type {@code T},
+     * look up the invoker method {@code X} for {@code T},
+     * and call the invoker method, as {@code X.invokeGeneric(T, A...)}.
+     * (It would not work to call {@code X.invokeExact}, since the type {@code T}
+     * is unknown.)
+     * If spreading, collecting, or other argument transformations are required,
+     * they can be applied once to the invoker {@code X} and reused on many {@code M}
+     * method handle values, as long as they are compatible with the type of {@code X}.
+     * <p>
+     * <em>(Note:  The invoker method is not available via the Core Reflection API.
+     * An attempt to call {@linkplain java.lang.reflect.Method#invoke Method.invoke}
+     * on the declared {@code invokeExact} or {@code invokeGeneric} method will raise an
+     * {@link java.lang.UnsupportedOperationException UnsupportedOperationException}.)</em>
+     * <p>
+     * This method throws no reflective or security exceptions.
+     * @param type the desired target type
+     * @return a method handle suitable for invoking any method handle of the given type
+     */
+    static public
+    MethodHandle exactInvoker(MethodType type) {
+        return type.invokers().exactInvoker();
+    }
+
+    /**
+     * Produces a special <em>invoker method handle</em> which can be used to
+     * invoke any method handle of the given type, as if by {@code invokeGeneric}.
+     * The resulting invoker will have a type which is
+     * exactly equal to the desired type, except that it will accept
+     * an additional leading argument of type {@code MethodHandle}.
+     * <p>
+     * Before invoking its target, the invoker will apply reference casts as
+     * necessary and unbox and widen primitive arguments, as if by {@link #convertArguments convertArguments}.
+     * The return value of the invoker will be an {@code Object} reference,
+     * boxing a primitive value if the original type returns a primitive,
+     * and always null if the original type returns void.
+     * <p>
+     * This method is equivalent to the following code (though it may be more efficient):
+     * <p><blockquote><pre>
+publicLookup().findVirtual(MethodHandle.class, "invokeGeneric", type)
+     * </pre></blockquote>
+     * <p>
+     * This method throws no reflective or security exceptions.
+     * @param type the desired target type
+     * @return a method handle suitable for invoking any method handle convertible to the given type
+     */
+    static public
+    MethodHandle genericInvoker(MethodType type) {
+        return type.invokers().genericInvoker();
+    }
+
+    /**
+     * Perform value checking, exactly as if for an adapted method handle.
+     * It is assumed that the given value is either null, of type T0,
+     * or (if T0 is primitive) of the wrapper type corresponding to T0.
+     * The following checks and conversions are made:
+     * <ul>
+     * <li>If T0 and T1 are references, then a cast to T1 is applied.
+     *     (The types do not need to be related in any particular way.)
+     * <li>If T0 and T1 are primitives, then a widening or narrowing
+     *     conversion is applied, if one exists.
+     * <li>If T0 is a primitive and T1 a reference, and
+     *     T0 has a wrapper type TW, a boxing conversion to TW is applied,
+     *     possibly followed by a reference conversion.
+     *     T1 must be TW or a supertype.
+     * <li>If T0 is a reference and T1 a primitive, and
+     *     T1 has a wrapper type TW, an unboxing conversion is applied,
+     *     possibly preceded by a reference conversion.
+     *     T0 must be TW or a supertype.
+     * <li>If T1 is void, the return value is discarded
+     * <li>If T0 is void and T1 a reference, a null value is introduced.
+     * <li>If T0 is void and T1 a primitive, a zero value is introduced.
+     * </ul>
+     * If the value is discarded, null will be returned.
+     * @param valueType
+     * @param value
+     * @return the value, converted if necessary
+     * @throws java.lang.ClassCastException if a cast fails
+     */
+    static
+    <T0, T1> T1 checkValue(Class<T0> t0, Class<T1> t1, Object value)
+       throws ClassCastException
+    {
+        if (t0 == t1) {
+            // no conversion needed; just reassert the same type
+            if (t0.isPrimitive())
+                return Wrapper.asPrimitiveType(t1).cast(value);
+            else
+                return Wrapper.OBJECT.convert(value, t1);
+        }
+        boolean prim0 = t0.isPrimitive(), prim1 = t1.isPrimitive();
+        if (!prim0) {
+            // check contract with caller
+            Wrapper.OBJECT.convert(value, t0);
+            if (!prim1) {
+                return Wrapper.OBJECT.convert(value, t1);
+            }
+            // convert reference to primitive by unboxing
+            Wrapper w1 = Wrapper.forPrimitiveType(t1);
+            return w1.convert(value, t1);
+        }
+        // check contract with caller:
+        Wrapper.asWrapperType(t0).cast(value);
+        Wrapper w1 = Wrapper.forPrimitiveType(t1);
+        return w1.convert(value, t1);
+    }
+
+    static
+    Object checkValue(Class<?> T1, Object value)
+       throws ClassCastException
+    {
+        Class<?> T0;
+        if (value == null)
+            T0 = Object.class;
+        else
+            T0 = value.getClass();
+        return checkValue(T0, T1, value);
+    }
+
+    /// method handle modification (creation from other method handles)
+
+    /**
+     * Produces a method handle which adapts the type of the
+     * given method handle to a new type by pairwise argument conversion.
+     * The original type and new type must have the same number of arguments.
+     * The resulting method handle is guaranteed to report a type
+     * which is equal to the desired new type.
+     * <p>
+     * If the original type and new type are equal, returns target.
+     * <p>
+     * The following conversions are applied as needed both to
+     * arguments and return types.  Let T0 and T1 be the differing
+     * new and old parameter types (or old and new return types)
+     * for corresponding values passed by the new and old method types.
+     * Given those types T0, T1, one of the following conversions is applied
+     * if possible:
+     * <ul>
+     * <li>If T0 and T1 are references, then a cast to T1 is applied.
+     *     (The types do not need to be related in any particular way.)
+     * <li>If T0 and T1 are primitives, then a Java method invocation
+     *     conversion (JLS 5.3) is applied, if one exists.
+     * <li>If T0 is a primitive and T1 a reference, a boxing
+     *     conversion is applied if one exists, possibly followed by
+     *     a reference conversion to a superclass.
+     *     T1 must be a wrapper class or a supertype of one.
+     * <li>If T0 is a reference and T1 a primitive, an unboxing
+     *     conversion will be applied at runtime, possibly followed
+     *     by a Java method invocation conversion (JLS 5.3)
+     *     on the primitive value.  (These are the widening conversions.)
+     *     T0 must be a wrapper class or a supertype of one.
+     *     (In the case where T0 is Object, these are the conversions
+     *     allowed by java.lang.reflect.Method.invoke.)
+     * <li>If the return type T1 is void, any returned value is discarded
+     * <li>If the return type T0 is void and T1 a reference, a null value is introduced.
+     * <li>If the return type T0 is void and T1 a primitive, a zero value is introduced.
+     * </ul>
+     * @param target the method handle to invoke after arguments are retyped
+     * @param newType the expected type of the new method handle
+     * @return a method handle which delegates to {@code target} after performing
+     *           any necessary argument conversions, and arranges for any
+     *           necessary return value conversions
+     * @throws NullPointerException if either argument is null
+     * @throws WrongMethodTypeException if the conversion cannot be made
+     * @see MethodHandle#asType
+     * @see MethodHandles#explicitCastArguments
+     */
+    public static
+    MethodHandle convertArguments(MethodHandle target, MethodType newType) {
+        MethodType oldType = target.type();
+        if (oldType.equals(newType))
+            return target;
+        MethodHandle res = null;
+        try {
+            res = MethodHandleImpl.convertArguments(target,
+                                                    newType, oldType, null);
+        } catch (IllegalArgumentException ex) {
+        }
+        if (res == null)
+            throw new WrongMethodTypeException("cannot convert to "+newType+": "+target);
+        return res;
+    }
+
+    /**
+     * Produces a method handle which adapts the type of the
+     * given method handle to a new type by pairwise argument conversion.
+     * The original type and new type must have the same number of arguments.
+     * The resulting method handle is guaranteed to report a type
+     * which is equal to the desired new type.
+     * <p>
+     * If the original type and new type are equal, returns target.
+     * <p>
+     * The same conversions are allowed as for {@link #convertArguments convertArguments},
+     * and some additional conversions are also applied if those conversions fail.
+     * Given types T0, T1, one of the following conversions is applied
+     * in addition, if the conversions specified for {@code convertArguments}
+     * would be insufficient:
+     * <ul>
+     * <li>If T0 and T1 are references, and T1 is an interface type,
+     *     then the value of type T0 is passed as a T1 without a cast.
+     *     (This treatment of interfaces follows the usage of the bytecode verifier.)
+     * <li>If T0 and T1 are primitives and one is boolean,
+     *     the boolean is treated as a one-bit unsigned integer.
+     *     (This treatment follows the usage of the bytecode verifier.)
+     *     A conversion from another primitive type behaves as if
+     *     it first converts to byte, and then masks all but the low bit.
+     * <li>If a primitive value would be converted by {@code convertArguments}
+     *     using Java method invocation conversion (JLS 5.3),
+     *     Java casting conversion (JLS 5.5) may be used also.
+     *     This allows primitives to be narrowed as well as widened.
+     * </ul>
+     * @param target the method handle to invoke after arguments are retyped
+     * @param newType the expected type of the new method handle
+     * @return a method handle which delegates to {@code target} after performing
+     *           any necessary argument conversions, and arranges for any
+     *           necessary return value conversions
+     * @throws NullPointerException if either argument is null
+     * @throws WrongMethodTypeException if the conversion cannot be made
+     * @see MethodHandle#asType
+     * @see MethodHandles#convertArguments
+     */
+    public static
+    MethodHandle explicitCastArguments(MethodHandle target, MethodType newType) {
+        return convertArguments(target, newType);  // FIXME!
+    }
+
+    /*
+      FIXME: Reconcile javadoc with 10/22/2010 EG notes on conversion:
+
+      Both converters arrange for their method handles to convert arguments
+      and return values.  The conversion rules are the same for arguments
+      and return values, and depend only on source and target types, S and
+      T.  The conversions allowed by castConvertArguments are a strict
+      superset of those performed by convertArguments.
+
+      In all cases, if S and T are references, a simple checkcast is done.
+      If neither S nor T is a primitive, no attempt is made to unbox and
+      box.  A failed conversion throws ClassCastException.
+
+      If T is void, the value is dropped.
+
+      For compatibility with reflection, if S is void and T is a reference,
+      a null value is produced.
+
+      For compatibility with reflection, if S is a reference and T is a
+      primitive, S is first unboxed and then undergoes primitive conversion.
+      In the case of 'convertArguments', only assignment conversion is
+      performed (no narrowing primitive conversion).
+
+      If S is a primitive, S is boxed, and then the above rules are applied.
+      If S and T are both primitives, the boxing will be undetectable; only
+      the primitive conversions will be apparent to the user.  The key point
+      is that if S is a primitive type, the implementation may box it and
+      treat is as Object, without loss of information, or it may use a "fast
+      path" which does not use boxing.
+
+      Notwithstanding the rules above, for compatibility with the verifier,
+      if T is an interface, it is treated as if it were Object.  [KEEP THIS?]
+
+      Also, for compatibility with the verifier, a boolean may be undergo
+      widening or narrowing conversion to any other primitive type.  [KEEP THIS?]
+    */
+
+    /**
+     * Produces a method handle which adapts the calling sequence of the
+     * given method handle to a new type, by reordering the arguments.
+     * The resulting method handle is guaranteed to report a type
+     * which is equal to the desired new type.
+     * <p>
+     * The given array controls the reordering.
+     * Call {@code #I} the number of incoming parameters (the value
+     * {@code newType.parameterCount()}, and call {@code #O} the number
+     * of outgoing parameters (the value {@code target.type().parameterCount()}).
+     * Then the length of the reordering array must be {@code #O},
+     * and each element must be a non-negative number less than {@code #I}.
+     * For every {@code N} less than {@code #O}, the {@code N}-th
+     * outgoing argument will be taken from the {@code I}-th incoming
+     * argument, where {@code I} is {@code reorder[N]}.
+     * <p>
+     * No argument or return value conversions are applied.
+     * The type of each incoming argument, as determined by {@code newType},
+     * must be identical to the type of the corresponding outgoing argument
+     * or arguments in the target method handle.
+     * The return type of {@code newType} must be identical to the return
+     * type of the original target.
+     * <p>
+     * The reordering array need not specify an actual permutation.
+     * An incoming argument will be duplicated if its index appears
+     * more than once in the array, and an incoming argument will be dropped
+     * if its index does not appear in the array.
+     * As in the case of {@link #dropArguments(MethodHandle,int,List) dropArguments},
+     * incoming arguments which are not mentioned in the reordering array
+     * are may be any type, as determined only by {@code newType}.
+     * <blockquote><pre>
+MethodType intfn1 = MethodType.methodType(int.class, int.class);
+MethodType intfn2 = MethodType.methodType(int.class, int.class, int.class);
+MethodHandle sub = ... {int x, int y => x-y} ...;
+assert(sub.type().equals(intfn2));
+MethodHandle sub1 = MethodHandles.permuteArguments(sub, intfn2, 0, 1);
+MethodHandle rsub = MethodHandles.permuteArguments(sub, intfn2, 1, 0);
+assert((int)rsub.invokeExact(1, 100) == 99);
+MethodHandle add = ... {int x, int y => x+y} ...;
+assert(add.type().equals(intfn2));
+MethodHandle twice = MethodHandles.permuteArguments(add, intfn1, 0, 0);
+assert(twice.type().equals(intfn1));
+assert((int)twice.invokeExact(21) == 42);
+     * </pre></blockquote>
+     * @param target the method handle to invoke after arguments are reordered
+     * @param newType the expected type of the new method handle
+     * @param reorder a string which controls the reordering
+     * @return a method handle which delegates to {@code target} after it
+     *           drops unused arguments and moves and/or duplicates the other arguments
+     * @throws NullPointerException if any argument is null
+     */
+    public static
+    MethodHandle permuteArguments(MethodHandle target, MethodType newType, int... reorder) {
+        MethodType oldType = target.type();
+        checkReorder(reorder, newType, oldType);
+        return MethodHandleImpl.convertArguments(target,
+                                                 newType, oldType,
+                                                 reorder);
+    }
+
+    private static void checkReorder(int[] reorder, MethodType newType, MethodType oldType) {
+        if (reorder.length == oldType.parameterCount()) {
+            int limit = newType.parameterCount();
+            boolean bad = false;
+            for (int i : reorder) {
+                if (i < 0 || i >= limit) {
+                    bad = true; break;
+                }
+            }
+            if (!bad)  return;
+        }
+        throw newIllegalArgumentException("bad reorder array");
+    }
+
+    /**
+     * Equivalent to the following code:
+     * <p><blockquote><pre>
+     * int spreadPos = newType.parameterCount() - 1;
+     * Class&lt;?&gt; spreadType = newType.parameterType(spreadPos);
+     * int spreadCount = target.type().parameterCount() - spreadPos;
+     * MethodHandle adapter = target.asSpreader(spreadType, spreadCount);
+     * adapter = adapter.asType(newType);
+     * return adapter;
+     * </pre></blockquote>
+     * @param target the method handle to invoke after argument spreading
+     * @param newType the expected type of the new method handle
+     * @return a method handle which spreads its final argument,
+     *         before calling the original method handle
+     */
+    /*non-public*/ static
+    MethodHandle spreadArguments(MethodHandle target, MethodType newType) {
+        MethodType oldType = target.type();
+        int inargs  = newType.parameterCount();
+        int outargs = oldType.parameterCount();
+        int spreadPos = inargs - 1;
+        int numSpread = (outargs - spreadPos);
+        MethodHandle res = null;
+        if (spreadPos >= 0 && numSpread >= 0) {
+            res = MethodHandleImpl.spreadArguments(target, newType, spreadPos);
+        }
+        if (res == null) {
+            throw newIllegalArgumentException("cannot spread "+newType+" to " +oldType);
+        }
+        return res;
+    }
+
+    /**
+     * Equivalent to the following code:
+     * <p><blockquote><pre>
+     * int collectPos = target.type().parameterCount() - 1;
+     * Class&lt;?&gt; collectType = target.type().parameterType(collectPos);
+     * if (!collectType.isArray())  collectType = Object[].class;
+     * int collectCount = newType.parameterCount() - collectPos;
+     * MethodHandle adapter = target.asCollector(collectType, collectCount);
+     * adapter = adapter.asType(newType);
+     * return adapter;
+     * </pre></blockquote>
+     * @param target the method handle to invoke after argument collection
+     * @param newType the expected type of the new method handle
+     * @return a method handle which collects some trailing argument
+     *         into an array, before calling the original method handle
+     */
+    /*non-public*/ static
+    MethodHandle collectArguments(MethodHandle target, MethodType newType) {
+        MethodType oldType = target.type();
+        int inargs  = newType.parameterCount();
+        int outargs = oldType.parameterCount();
+        int collectPos = outargs - 1;
+        int numCollect = (inargs - collectPos);
+        if (collectPos < 0 || numCollect < 0)
+            throw newIllegalArgumentException("wrong number of arguments");
+        MethodHandle res = MethodHandleImpl.collectArguments(target, newType, collectPos, null);
+        if (res == null) {
+            throw newIllegalArgumentException("cannot collect from "+newType+" to " +oldType);
+        }
+        return res;
+    }
+
+    /**
+     * Produces a method handle of the requested return type which returns the given
+     * constant value every time it is invoked.
+     * <p>
+     * Before the method handle is returned, the passed-in value is converted to the requested type.
+     * If the requested type is primitive, widening primitive conversions are attempted,
+     * else reference conversions are attempted.
+     * <p>The returned method handle is equivalent to {@code identity(type).bindTo(value)},
+     * unless the type is {@code void}, in which case it is {@code identity(type)}.
+     * @param type the return type of the desired method handle
+     * @param value the value to return
+     * @return a method handle of the given return type and no arguments, which always returns the given value
+     * @throws NullPointerException if the {@code type} argument is null
+     * @throws ClassCastException if the value cannot be converted to the required return type
+     * @throws IllegalArgumentException if the given type is {@code void.class}
+     */
+    public static
+    MethodHandle constant(Class<?> type, Object value) {
+        if (type.isPrimitive()) {
+            if (type == void.class)
+                throw newIllegalArgumentException("void type");
+            Wrapper w = Wrapper.forPrimitiveType(type);
+            return identity(type).bindTo(w.convert(value, type));
+        } else {
+            return identity(type).bindTo(type.cast(value));
+        }
+    }
+
+    /**
+     * Produces a method handle which returns its sole argument when invoked.
+     * <p>The identity function for {@code void} takes no arguments and returns no values.
+     * @param type the type of the sole parameter and return value of the desired method handle
+     * @return a unary method handle which accepts and returns the given type
+     * @throws NullPointerException if the argument is null
+     * @throws IllegalArgumentException if the given type is {@code void.class}
+     */
+    public static
+    MethodHandle identity(Class<?> type) {
+        if (type == void.class)
+            throw newIllegalArgumentException("void type");
+        else if (type == Object.class)
+            return ValueConversions.identity();
+        else if (type.isPrimitive())
+            return ValueConversions.identity(Wrapper.forPrimitiveType(type));
+        else
+            return AdapterMethodHandle.makeRetypeRaw(
+                    MethodType.methodType(type, type), ValueConversions.identity());
+    }
+
+    /**
+     * Produces a method handle which calls the original method handle {@code target},
+     * after inserting the given argument(s) at the given position.
+     * The formal parameters to {@code target} which will be supplied by those
+     * arguments are called <em>bound parameters</em>, because the new method
+     * will contain bindings for those parameters take from {@code values}.
+     * The type of the new method handle will drop the types for the bound
+     * parameters from the original target type, since the new method handle
+     * will no longer require those arguments to be supplied by its callers.
+     * <p>
+     * Each given argument object must match the corresponding bound parameter type.
+     * If a bound parameter type is a primitive, the argument object
+     * must be a wrapper, and will be unboxed to produce the primitive value.
+     * <p>
+     * The  <i>pos</i> may range between zero and <i>N</i> (inclusively),
+     * where <i>N</i> is the number of argument types in resulting method handle
+     * (after bound parameter types are dropped).
+     * @param target the method handle to invoke after the argument is inserted
+     * @param pos where to insert the argument (zero for the first)
+     * @param values the series of arguments to insert
+     * @return a method handle which inserts an additional argument,
+     *         before calling the original method handle
+     * @throws NullPointerException if the {@code target} argument or the {@code values} array is null
+     * @see MethodHandle#bindTo
+     */
+    public static
+    MethodHandle insertArguments(MethodHandle target, int pos, Object... values) {
+        int insCount = values.length;
+        MethodType oldType = target.type();
+        int outargs = oldType.parameterCount();
+        int inargs  = outargs - insCount;
+        if (inargs < 0)
+            throw newIllegalArgumentException("too many values to insert");
+        if (pos < 0 || pos > inargs)
+            throw newIllegalArgumentException("no argument type to append");
+        MethodHandle result = target;
+        for (int i = 0; i < insCount; i++) {
+            Object value = values[i];
+            Class<?> valueType = oldType.parameterType(pos+i);
+            value = checkValue(valueType, value);
+            if (pos == 0 && !valueType.isPrimitive()) {
+                // At least for now, make bound method handles a special case.
+                MethodHandle bmh = MethodHandleImpl.bindReceiver(result, value);
+                if (bmh != null) {
+                    result = bmh;
+                    continue;
+                }
+                // else fall through to general adapter machinery
+            }
+            result = MethodHandleImpl.bindArgument(result, pos, value);
+        }
+        return result;
+    }
+
+    /**
+     * Produces a method handle which calls the original method handle,
+     * after dropping the given argument(s) at the given position.
+     * The type of the new method handle will insert the given argument
+     * type(s), at that position, into the original handle's type.
+     * <p>
+     * The <i>pos</i> may range between zero and <i>N</i>,
+     * where <i>N</i> is the number of argument types in <i>target</i>,
+     * meaning to drop the first or last argument (respectively),
+     * or an argument somewhere in between.
+     * <p>
+     * <b>Example:</b>
+     * <p><blockquote><pre>
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodType bigType = cat.type().insertParameterTypes(0, int.class, String.class);
+MethodHandle d0 = dropArguments(cat, 0, bigType.parameterList().subList(0,2));
+assertEquals(bigType, d0.type());
+assertEquals("yz", (String) d0.invokeExact(123, "x", "y", "z"));
+     * </pre></blockquote>
+     * <p>
+     * This method is also equivalent to the following code:
+     * <p><blockquote><pre>
+     * {@link #dropArguments(MethodHandle,int,Class...) dropArguments}(target, pos, valueTypes.toArray(new Class[0]))
+     * </pre></blockquote>
+     * @param target the method handle to invoke after the arguments are dropped
+     * @param valueTypes the type(s) of the argument(s) to drop
+     * @param pos position of first argument to drop (zero for the leftmost)
+     * @return a method handle which drops arguments of the given types,
+     *         before calling the original method handle
+     * @throws NullPointerException if the {@code target} argument is null,
+     *                              or if the {@code valueTypes} list or any of its elements is null
+     * @throws IllegalArgumentException if any of the {@code valueTypes} is {@code void.class}
+     */
+    public static
+    MethodHandle dropArguments(MethodHandle target, int pos, List<Class<?>> valueTypes) {
+        if (valueTypes.size() == 0)  return target;
+        MethodType oldType = target.type();
+        int outargs = oldType.parameterCount();
+        int inargs  = outargs + valueTypes.size();
+        if (pos < 0 || pos >= inargs)
+            throw newIllegalArgumentException("no argument type to remove");
+        ArrayList<Class<?>> ptypes =
+                new ArrayList<Class<?>>(oldType.parameterList());
+        ptypes.addAll(pos, valueTypes);
+        MethodType newType = MethodType.methodType(oldType.returnType(), ptypes);
+        return MethodHandleImpl.dropArguments(target, newType, pos);
+    }
+
+    /**
+     * Produces a method handle which calls the original method handle,
+     * after dropping the given argument(s) at the given position.
+     * The type of the new method handle will insert the given argument
+     * type(s), at that position, into the original handle's type.
+     * <p>
+     * The <i>pos</i> may range between zero and <i>N</i>,
+     * where <i>N</i> is the number of argument types in <i>target</i>,
+     * meaning to drop the first or last argument (respectively),
+     * or an argument somewhere in between.
+     * <p>
+     * <b>Example:</b>
+     * <p><blockquote><pre>
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodHandle d0 = dropArguments(cat, 0, String.class);
+assertEquals("yz", (String) d0.invokeExact("x", "y", "z"));
+MethodHandle d1 = dropArguments(cat, 1, String.class);
+assertEquals("xz", (String) d1.invokeExact("x", "y", "z"));
+MethodHandle d2 = dropArguments(cat, 2, String.class);
+assertEquals("xy", (String) d2.invokeExact("x", "y", "z"));
+MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
+assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
+     * </pre></blockquote>
+     * <p>
+     * This method is also equivalent to the following code:
+     * <p><blockquote><pre>
+     * {@link #dropArguments(MethodHandle,int,List) dropArguments}(target, pos, Arrays.asList(valueTypes))
+     * </pre></blockquote>
+     * @param target the method handle to invoke after the arguments are dropped
+     * @param valueTypes the type(s) of the argument(s) to drop
+     * @param pos position of first argument to drop (zero for the leftmost)
+     * @return a method handle which drops arguments of the given types,
+     *         before calling the original method handle
+     * @throws NullPointerException if the {@code target} argument is null,
+     *                              or if the {@code valueTypes} array or any of its elements is null
+     * @throws IllegalArgumentException if any of the {@code valueTypes} is {@code void.class}
+     */
+    public static
+    MethodHandle dropArguments(MethodHandle target, int pos, Class<?>... valueTypes) {
+        return dropArguments(target, pos, Arrays.asList(valueTypes));
+    }
+
+    /**
+     * Adapts a target method handle {@code target} by pre-processing
+     * one or more of its arguments, each with its own unary filter function,
+     * and then calling the target with each pre-processed argument
+     * replaced by the result of its corresponding filter function.
+     * <p>
+     * The pre-processing is performed by one or more method handles,
+     * specified in the elements of the {@code filters} array.
+     * Null arguments in the array are ignored, and the corresponding arguments left unchanged.
+     * (If there are no non-null elements in the array, the original target is returned.)
+     * Each filter is applied to the corresponding argument of the adapter.
+     * <p>
+     * If a filter {@code F} applies to the {@code N}th argument of
+     * the method handle, then {@code F} must be a method handle which
+     * takes exactly one argument.  The type of {@code F}'s sole argument
+     * replaces the corresponding argument type of the target
+     * in the resulting adapted method handle.
+     * The return type of {@code F} must be identical to the corresponding
+     * parameter type of the target.
+     * <p>
+     * It is an error if there are elements of {@code filters}
+     * which do not correspond to argument positions in the target.
+     * <b>Example:</b>
+     * <p><blockquote><pre>
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle upcase = lookup().findVirtual(String.class,
+  "toUpperCase", methodType(String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodHandle f0 = filterArguments(cat, 0, upcase);
+assertEquals("Xy", (String) f0.invokeExact("x", "y")); // Xy
+MethodHandle f1 = filterArguments(cat, 1, upcase);
+assertEquals("xY", (String) f1.invokeExact("x", "y")); // xY
+MethodHandle f2 = filterArguments(cat, 0, upcase, upcase);
+assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
+     * </pre></blockquote>
+     *
+     * @param target the method handle to invoke after arguments are filtered
+     * @param pos the position of the first argument to filter
+     * @param filters method handles to call initially on filtered arguments
+     * @return method handle which incorporates the specified argument filtering logic
+     * @throws NullPointerException if the {@code target} argument is null
+     *                              or if the {@code filters} array is null
+     * @throws IllegalArgumentException if a non-null element of {@code filters}
+     *          does not match a corresponding argument type of {@code target} as described above,
+     *          or if the {@code pos+filters.length} is greater than {@code target.type().parameterCount()}
+     */
+    public static
+    MethodHandle filterArguments(MethodHandle target, int pos, MethodHandle... filters) {
+        MethodType targetType = target.type();
+        MethodHandle adapter = target;
+        MethodType adapterType = targetType;
+        int maxPos = targetType.parameterCount();
+        if (pos + filters.length > maxPos)
+            throw newIllegalArgumentException("too many filters");
+        int curPos = pos-1;  // pre-incremented
+        for (MethodHandle filter : filters) {
+            curPos += 1;
+            if (filter == null)  continue;  // ignore null elements of filters
+            MethodType filterType = filter.type();
+            if (filterType.parameterCount() != 1
+                || filterType.returnType() != targetType.parameterType(curPos))
+                throw newIllegalArgumentException("target and filter types do not match");
+            adapterType = adapterType.changeParameterType(curPos, filterType.parameterType(0));
+            adapter = MethodHandleImpl.filterArgument(adapter, curPos, filter);
+        }
+        MethodType midType = adapter.type();
+        if (midType != adapterType)
+            adapter = MethodHandleImpl.convertArguments(adapter, adapterType, midType, null);
+        return adapter;
+    }
+
+    /**
+     * Adapts a target method handle {@code target} by post-processing
+     * its return value with a unary filter function.
+     * <p>
+     * If a filter {@code F} applies to the return value of
+     * the target method handle, then {@code F} must be a method handle which
+     * takes exactly one argument.  The return type of {@code F}
+     * replaces the return type of the target
+     * in the resulting adapted method handle.
+     * The argument type of {@code F} must be identical to the
+     * return type of the target.
+     * <b>Example:</b>
+     * <p><blockquote><pre>
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle length = lookup().findVirtual(String.class,
+  "length", methodType(int.class));
+System.out.println((String) cat.invokeExact("x", "y")); // xy
+MethodHandle f0 = filterReturnValue(cat, length);
+System.out.println((int) f0.invokeExact("x", "y")); // 2
+     * </pre></blockquote>
+     * @param target the method handle to invoke before filtering the return value
+     * @param filter method handle to call on the return value
+     * @return method handle which incorporates the specified return value filtering logic
+     * @throws NullPointerException if either argument is null
+     * @throws IllegalArgumentException if {@code filter}
+     *          does not match the return type of {@code target} as described above
+     */
+    public static
+    MethodHandle filterReturnValue(MethodHandle target, MethodHandle filter) {
+        MethodType targetType = target.type();
+        MethodType filterType = filter.type();
+        if (filterType.parameterCount() != 1
+            || filterType.parameterType(0) != targetType.returnType())
+            throw newIllegalArgumentException("target and filter types do not match");
+        // result = fold( lambda(retval, arg...) { filter(retval) },
+        //                lambda(        arg...) { target(arg...) } )
+        // FIXME: Too many nodes here.
+        MethodHandle returner = dropArguments(filter, 1, targetType.parameterList());
+        return foldArguments(returner, target);
+    }
+
+    /**
+     * Adapts a target method handle {@code target} by pre-processing
+     * some of its arguments, and then calling the target with
+     * the result of the pre-processing, plus all original arguments.
+     * <p>
+     * The pre-processing is performed by a second method handle, the {@code combiner}.
+     * The first {@code N} arguments passed to the adapter,
+     * are copied to the combiner, which then produces a result.
+     * (Here, {@code N} is defined as the parameter count of the adapter.)
+     * After this, control passes to the {@code target}, with both the result
+     * of the combiner, and all the original incoming arguments.
+     * <p>
+     * The first argument type of the target must be identical with the
+     * return type of the combiner.
+     * The resulting adapter is the same type as the target, except that the
+     * initial argument type of the target is dropped.
+     * <p>
+     * (Note that {@link #dropArguments(MethodHandle,int,List) dropArguments} can be used to remove any arguments
+     * that either the {@code combiner} or {@code target} does not wish to receive.
+     * If some of the incoming arguments are destined only for the combiner,
+     * consider using {@link MethodHandle#asCollector asCollector} instead, since those
+     * arguments will not need to be live on the stack on entry to the
+     * target.)
+     * <p>
+     * The first argument of the target must be identical with the
+     * return value of the combiner.
+     * <p> Here is pseudocode for the resulting adapter:
+     * <blockquote><pre>
+     * // there are N arguments in the A sequence
+     * T target(V, A[N]..., B...);
+     * V combiner(A...);
+     * T adapter(A... a, B... b) {
+     *   V v = combiner(a...);
+     *   return target(v, a..., b...);
+     * }
+     * </pre></blockquote>
+     * @param target the method handle to invoke after arguments are combined
+     * @param combiner method handle to call initially on the incoming arguments
+     * @return method handle which incorporates the specified argument folding logic
+     * @throws NullPointerException if either argument is null
+     * @throws IllegalArgumentException if the first argument type of
+     *          {@code target} is not the same as {@code combiner}'s return type,
+     *          or if the following argument types of {@code target}
+     *          are not identical with the argument types of {@code combiner}
+     */
+    public static
+    MethodHandle foldArguments(MethodHandle target, MethodHandle combiner) {
+        MethodType targetType = target.type();
+        MethodType combinerType = combiner.type();
+        int foldArgs = combinerType.parameterCount();
+        boolean ok = (targetType.parameterCount() >= 1 + foldArgs);
+        if (ok && !combinerType.parameterList().equals(targetType.parameterList().subList(1, foldArgs+1)))
+            ok = false;
+        if (ok && !combinerType.returnType().equals(targetType.parameterType(0)))
+            ok = false;
+        if (!ok)
+            throw misMatchedTypes("target and combiner types", targetType, combinerType);
+        MethodType newType = targetType.dropParameterTypes(0, 1);
+        return MethodHandleImpl.foldArguments(target, newType, combiner);
+    }
+
+    /**
+     * Makes a method handle which adapts a target method handle,
+     * by guarding it with a test, a boolean-valued method handle.
+     * If the guard fails, a fallback handle is called instead.
+     * All three method handles must have the same corresponding
+     * argument and return types, except that the return type
+     * of the test must be boolean, and the test is allowed
+     * to have fewer arguments than the other two method handles.
+     * <p> Here is pseudocode for the resulting adapter:
+     * <blockquote><pre>
+     * boolean test(A...);
+     * T target(A...,B...);
+     * T fallback(A...,B...);
+     * T adapter(A... a,B... b) {
+     *   if (test(a...))
+     *     return target(a..., b...);
+     *   else
+     *     return fallback(a..., b...);
+     * }
+     * </pre></blockquote>
+     * Note that the test arguments ({@code a...} in the pseudocode) cannot
+     * be modified by execution of the test, and so are passed unchanged
+     * from the caller to the target or fallback as appropriate.
+     * @param test method handle used for test, must return boolean
+     * @param target method handle to call if test passes
+     * @param fallback method handle to call if test fails
+     * @return method handle which incorporates the specified if/then/else logic
+     * @throws NullPointerException if any argument is null
+     * @throws IllegalArgumentException if {@code test} does not return boolean,
+     *          or if all three method types do not match (with the return
+     *          type of {@code test} changed to match that of {@code target}).
+     */
+    public static
+    MethodHandle guardWithTest(MethodHandle test,
+                               MethodHandle target,
+                               MethodHandle fallback) {
+        MethodType gtype = test.type();
+        MethodType ttype = target.type();
+        MethodType ftype = fallback.type();
+        if (!ttype.equals(ftype))
+            throw misMatchedTypes("target and fallback types", ttype, ftype);
+        if (gtype.returnType() != boolean.class)
+            throw newIllegalArgumentException("guard type is not a predicate "+gtype);
+        List<Class<?>> targs = ttype.parameterList();
+        List<Class<?>> gargs = gtype.parameterList();
+        if (!targs.equals(gargs)) {
+            int gpc = gargs.size(), tpc = targs.size();
+            if (gpc >= tpc || !targs.subList(0, gpc).equals(gargs))
+                throw misMatchedTypes("target and test types", ttype, gtype);
+            test = dropArguments(test, gpc, targs.subList(gpc, tpc));
+            gtype = test.type();
+        }
+        return MethodHandleImpl.makeGuardWithTest(test, target, fallback);
+    }
+
+    static RuntimeException misMatchedTypes(String what, MethodType t1, MethodType t2) {
+        return newIllegalArgumentException(what + " must match: " + t1 + " != " + t2);
+    }
+
+    /**
+     * Makes a method handle which adapts a target method handle,
+     * by running it inside an exception handler.
+     * If the target returns normally, the adapter returns that value.
+     * If an exception matching the specified type is thrown, the fallback
+     * handle is called instead on the exception, plus the original arguments.
+     * <p>
+     * The target and handler must have the same corresponding
+     * argument and return types, except that handler may omit trailing arguments
+     * (similarly to the predicate in {@link #guardWithTest guardWithTest}).
+     * Also, the handler must have an extra leading parameter of {@code exType} or a supertype.
+     * <p> Here is pseudocode for the resulting adapter:
+     * <blockquote><pre>
+     * T target(A..., B...);
+     * T handler(ExType, A...);
+     * T adapter(A... a, B... b) {
+     *   try {
+     *     return target(a..., b...);
+     *   } catch (ExType ex) {
+     *     return handler(ex, a...);
+     *   }
+     * }
+     * </pre></blockquote>
+     * Note that the saved arguments ({@code a...} in the pseudocode) cannot
+     * be modified by execution of the target, and so are passed unchanged
+     * from the caller to the handler, if the handler is invoked.
+     * <p>
+     * The target and handler must return the same type, even if the handler
+     * always throws.  (This might happen, for instance, because the handler
+     * is simulating a {@code finally} clause).
+     * To create such a throwing handler, compose the handler creation logic
+     * with {@link #throwException throwException},
+     * in order to create a method handle of the correct return type.
+     * @param target method handle to call
+     * @param exType the type of exception which the handler will catch
+     * @param handler method handle to call if a matching exception is thrown
+     * @return method handle which incorporates the specified try/catch logic
+     * @throws NullPointerException if any argument is null
+     * @throws IllegalArgumentException if {@code handler} does not accept
+     *          the given exception type, or if the method handle types do
+     *          not match in their return types and their
+     *          corresponding parameters
+     */
+    public static
+    MethodHandle catchException(MethodHandle target,
+                                Class<? extends Throwable> exType,
+                                MethodHandle handler) {
+        MethodType ttype = target.type();
+        MethodType htype = handler.type();
+        if (htype.parameterCount() < 1 ||
+            !htype.parameterType(0).isAssignableFrom(exType))
+            throw newIllegalArgumentException("handler does not accept exception type "+exType);
+        if (htype.returnType() != ttype.returnType())
+            throw misMatchedTypes("target and handler return types", ttype, htype);
+        List<Class<?>> targs = ttype.parameterList();
+        List<Class<?>> hargs = htype.parameterList();
+        hargs = hargs.subList(1, hargs.size());  // omit leading parameter from handler
+        if (!targs.equals(hargs)) {
+            int hpc = hargs.size(), tpc = targs.size();
+            if (hpc >= tpc || !targs.subList(0, hpc).equals(hargs))
+                throw misMatchedTypes("target and handler types", ttype, htype);
+            handler = dropArguments(handler, hpc, hargs.subList(hpc, tpc));
+            htype = handler.type();
+        }
+        return MethodHandleImpl.makeGuardWithCatch(target, exType, handler);
+    }
+
+    /**
+     * Produces a method handle which will throw exceptions of the given {@code exType}.
+     * The method handle will accept a single argument of {@code exType},
+     * and immediately throw it as an exception.
+     * The method type will nominally specify a return of {@code returnType}.
+     * The return type may be anything convenient:  It doesn't matter to the
+     * method handle's behavior, since it will never return normally.
+     * @return method handle which can throw the given exceptions
+     * @throws NullPointerException if either argument is null
+     */
+    public static
+    MethodHandle throwException(Class<?> returnType, Class<? extends Throwable> exType) {
+        return MethodHandleImpl.throwException(MethodType.methodType(returnType, exType));
+    }
+
+    /**
+     * Produces an instance of the given single-method interface which redirects
+     * its calls to the given method handle.
+     * <p>
+     * A single-method interface is an interface which declares a unique method.
+     * When determining the unique method of a single-method interface,
+     * the public {@code Object} methods ({@code toString}, {@code equals}, {@code hashCode})
+     * are disregarded.  For example, {@link java.util.Comparator} is a single-method interface,
+     * even though it re-declares the {@code Object.equals} method.
+     * <p>
+     * The type must be public.  No additional access checks are performed.
+     * <p>
+     * The resulting instance of the required type will respond to
+     * invocation of the type's single abstract method by calling
+     * the given {@code target} on the incoming arguments,
+     * and returning or throwing whatever the {@code target}
+     * returns or throws.  The invocation will be as if by
+     * {@code target.invokeGeneric}.
+     * The target's type will be checked before the
+     * instance is created, as if by a call to {@code asType},
+     * which may result in a {@code WrongMethodTypeException}.
+     * <p>
+     * The wrapper instance will implement the requested interface
+     * and its super-types, but no other single-method interfaces.
+     * This means that the instance will not unexpectedly
+     * pass an {@code instanceof} test for any unrequested type.
+     * <p style="font-size:smaller;">
+     * <em>Implementation Note:</em>
+     * Therefore, each instance must implement a unique single-method interface.
+     * Implementations may not bundle together
+     * multiple single-method interfaces onto single implementation classes
+     * in the style of {@link java.awt.AWTEventMulticaster}.
+     * <p>
+     * The method handle may throw an <em>undeclared exception</em>,
+     * which means any checked exception (or other checked throwable)
+     * not declared by the requested type's single abstract method.
+     * If this happens, the throwable will be wrapped in an instance of
+     * {@link java.lang.reflect.UndeclaredThrowableException UndeclaredThrowableException}
+     * and thrown in that wrapped form.
+     * <p>
+     * Like {@link java.lang.Integer#valueOf Integer.valueOf},
+     * {@code asInstance} is a factory method whose results are defined
+     * by their behavior.
+     * It is not guaranteed to return a new instance for every call.
+     * <p>
+     * Because of the possibility of {@linkplain java.lang.reflect.Method#isBridge bridge methods}
+     * and other corner cases, the interface may also have several abstract methods
+     * with the same name but having distinct descriptors (types of returns and parameters).
+     * In this case, all the methods are bound in common to the one given {@code target}.
+     * The type check and effective {@code asType} conversion is applied to each
+     * method type descriptor, and all abstract methods are bound to the {@code target} in common.
+     * Beyond this type check, no further checks are made to determine that the
+     * abstract methods are related in any way.
+     * <p>
+     * Future versions of this API may accept additional types,
+     * such as abstract classes with single abstract methods.
+     * Future versions of this API may also equip wrapper instances
+     * with one or more additional public "marker" interfaces.
+     *
+     * @param target the method handle to invoke from the wrapper
+     * @param smType the desired type of the wrapper, a single-method interface
+     * @return a correctly-typed wrapper for the given {@code target}
+     * @throws NullPointerException if either argument is null
+     * @throws IllegalArgumentException if the {@code smType} is not a
+     *         valid argument to this method
+     * @throws WrongMethodTypeException if the {@code target} cannot
+     *         be converted to the type required by the requested interface
+     */
+    // Other notes to implementors:
+    // <p>
+    // No stable mapping is promised between the single-method interface and
+    // the implementation class C.  Over time, several implementation
+    // classes might be used for the same type.
+    // <p>
+    // If the implementation is able
+    // to prove that a wrapper of the required type
+    // has already been created for a given
+    // method handle, or for another method handle with the
+    // same behavior, the implementation may return that wrapper in place of
+    // a new wrapper.
+    // <p>
+    // This method is designed to apply to common use cases
+    // where a single method handle must interoperate with
+    // an interface that implements a function-like
+    // API.  Additional variations, such as single-abstract-method classes with
+    // private constructors, or interfaces with multiple but related
+    // entry points, must be covered by hand-written or automatically
+    // generated adapter classes.
+    //
+    public static
+    <T> T asInstance(final MethodHandle target, final Class<T> smType) {
+        // POC implementation only; violates the above contract several ways
+        final Method sm = getSingleMethod(smType);
+        if (sm == null)
+            throw new IllegalArgumentException("not a single-method interface: "+smType.getName());
+        MethodType smMT = MethodType.methodType(sm.getReturnType(), sm.getParameterTypes());
+        MethodHandle checkTarget = target.asType(smMT);  // make throw WMT
+        checkTarget = checkTarget.asType(checkTarget.type().changeReturnType(Object.class));
+        final MethodHandle vaTarget = checkTarget.asSpreader(Object[].class, smMT.parameterCount());
+        return smType.cast(Proxy.newProxyInstance(
+                smType.getClassLoader(),
+                new Class[]{ smType, WrapperInstance.class },
+                new InvocationHandler() {
+                    private Object getArg(String name) {
+                        if ((Object)name == "getWrapperInstanceTarget")  return target;
+                        if ((Object)name == "getWrapperInstanceType")    return smType;
+                        throw new AssertionError();
+                    }
+                    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+                        if (method.getDeclaringClass() == WrapperInstance.class)
+                            return getArg(method.getName());
+                        if (method.equals(sm))
+                            return vaTarget.invokeExact(args);
+                        if (isObjectMethod(method))
+                            return callObjectMethod(this, method, args);
+                        throw new InternalError();
+                    }
+                }));
+    }
+
+    /**
+     * Determines if the given object was produced by a call to {@link #asInstance asInstance}.
+     * @param x any reference
+     * @return true if the reference is not null and points to an object produced by {@code asInstance}
+     */
+    public static
+    boolean isWrapperInstance(Object x) {
+        return x instanceof WrapperInstance;
+    }
+
+    private static WrapperInstance asWrapperInstance(Object x) {
+        try {
+            if (x != null)
+                return (WrapperInstance) x;
+        } catch (ClassCastException ex) {
+        }
+        throw new IllegalArgumentException("not a wrapper instance");
+    }
+
+    /**
+     * Produces or recovers a target method handle which is behaviorally
+     * equivalent to the unique method of this wrapper instance.
+     * The object {@code x} must have been produced by a call to {@link #asInstance asInstance}.
+     * This requirement may be tested via {@link #isWrapperInstance isWrapperInstance}.
+     * @param x any reference
+     * @return a method handle implementing the unique method
+     * @throws IllegalArgumentException if the reference x is not to a wrapper instance
+     */
+    public static
+    MethodHandle wrapperInstanceTarget(Object x) {
+        return asWrapperInstance(x).getWrapperInstanceTarget();
+    }
+
+    /**
+     * Recovers the unique single-method interface type for which this wrapper instance was created.
+     * The object {@code x} must have been produced by a call to {@link #asInstance asInstance}.
+     * This requirement may be tested via {@link #isWrapperInstance isWrapperInstance}.
+     * @param x any reference
+     * @return the single-method interface type for which the wrapper was created
+     * @throws IllegalArgumentException if the reference x is not to a wrapper instance
+     */
+    public static
+    Class<?> wrapperInstanceType(Object x) {
+        return asWrapperInstance(x).getWrapperInstanceType();
+    }
+
+    private static
+    boolean isObjectMethod(Method m) {
+        switch (m.getName()) {
+        case "toString":
+            return (m.getReturnType() == String.class
+                    && m.getParameterTypes().length == 0);
+        case "hashCode":
+            return (m.getReturnType() == int.class
+                    && m.getParameterTypes().length == 0);
+        case "equals":
+            return (m.getReturnType() == boolean.class
+                    && m.getParameterTypes().length == 1
+                    && m.getParameterTypes()[0] == Object.class);
+        }
+        return false;
+    }
+
+    private static
+    Object callObjectMethod(Object self, Method m, Object[] args) {
+        assert(isObjectMethod(m)) : m;
+        switch (m.getName()) {
+        case "toString":
+            return self.getClass().getName() + "@" + Integer.toHexString(self.hashCode());
+        case "hashCode":
+            return System.identityHashCode(self);
+        case "equals":
+            return (self == args[0]);
+        }
+        return null;
+    }
+
+    private static
+    Method getSingleMethod(Class<?> smType) {
+        Method sm = null;
+        for (Method m : smType.getMethods()) {
+            int mod = m.getModifiers();
+            if (Modifier.isAbstract(mod)) {
+                if (sm != null && !isObjectMethod(sm))
+                    return null;  // too many abstract methods
+                sm = m;
+            }
+        }
+        if (!smType.isInterface() && getSingleConstructor(smType) == null)
+            return null;  // wrong kind of constructor
+        return sm;
+    }
+
+    private static
+    Constructor getSingleConstructor(Class<?> smType) {
+        for (Constructor c : smType.getDeclaredConstructors()) {
+            if (c.getParameterTypes().length == 0) {
+                int mod = c.getModifiers();
+                if (Modifier.isPublic(mod) || Modifier.isProtected(mod))
+                    return c;
+            }
+        }
+        return null;
+    }
+
+    /*non-public*/
+    static MethodHandle asVarargsCollector(MethodHandle target, Class<?> arrayType) {
+        return MethodHandleImpl.asVarargsCollector(target, arrayType);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodType.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,841 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import sun.invoke.util.BytecodeDescriptor;
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * A method type represents the arguments and return type accepted and
+ * returned by a method handle, or the arguments and return type passed
+ * and expected  by a method handle caller.  Method types must be properly
+ * matched between a method handle and all its callers,
+ * and the JVM's operations enforce this matching at, specifically
+ * during calls to {@link MethodHandle#invokeExact MethodHandle.invokeExact}
+ * and {@link MethodHandle#invokeGeneric MethodHandle.invokeGeneric}, and during execution
+ * of {@code invokedynamic} instructions.
+ * <p>
+ * The structure is a return type accompanied by any number of parameter types.
+ * The types (primitive, {@code void}, and reference) are represented by {@link Class} objects.
+ * (For ease of exposition, we treat {@code void} as if it were a type.
+ * In fact, it denotes the absence of a return type.)
+ * <p>
+ * All instances of {@code MethodType} are immutable.
+ * Two instances are completely interchangeable if they compare equal.
+ * Equality depends on pairwise correspondence of the return and parameter types and on nothing else.
+ * <p>
+ * This type can be created only by factory methods.
+ * All factory methods may cache values, though caching is not guaranteed.
+ * Some factory methods are static, while others are virtual methods which
+ * modify precursor method types, e.g., by changing a selected parameter.
+ * <p>
+ * Factory methods which operate on groups of parameter types
+ * are systematically presented in two versions, so that both Java arrays and
+ * Java lists can be used to work with groups of parameter types.
+ * The query methods {@code parameterArray} and {@code parameterList}
+ * also provide a choice between arrays and lists.
+ * <p>
+ * {@code MethodType} objects are sometimes derived from bytecode instructions
+ * such as {@code invokedynamic}, specifically from the type descriptor strings associated
+ * with the instructions in a class file's constant pool.
+ * <p>
+ * Like classes and strings, method types can also be represented directly
+ * in a class file's constant pool as constants.
+ * A method type may be loaded by an {@code ldc} instruction which refers
+ * to a suitable {@code CONSTANT_MethodType} constant pool entry.
+ * The entry refers to a {@code CONSTANT_Utf8} spelling for the descriptor string.
+ * For more details, see the <a href="package-summary.html#mtcon">package summary</a>.
+ * <p>
+ * When the JVM materializes a {@code MethodType} from a descriptor string,
+ * all classes named in the descriptor must be accessible, and will be loaded.
+ * (But the classes need not be initialized, as is the case with a {@code CONSTANT_Class}.)
+ * This loading may occur at any time before the {@code MethodType} object is first derived.
+ * @author John Rose, JSR 292 EG
+ */
+public final
+class MethodType implements java.io.Serializable {
+    private static final long serialVersionUID = 292L;  // {rtype, {ptype...}}
+
+    // The rtype and ptypes fields define the structural identity of the method type:
+    private final Class<?>   rtype;
+    private final Class<?>[] ptypes;
+
+    // The remaining fields are caches of various sorts:
+    private MethodTypeForm form; // erased form, plus cached data about primitives
+    private MethodType wrapAlt;  // alternative wrapped/unwrapped version
+    private Invokers invokers;   // cache of handy higher-order adapters
+
+    /**
+     * Check the given parameters for validity and store them into the final fields.
+     */
+    private MethodType(Class<?> rtype, Class<?>[] ptypes) {
+        checkRtype(rtype);
+        checkPtypes(ptypes);
+        this.rtype = rtype;
+        this.ptypes = ptypes;
+    }
+
+    /*trusted*/ MethodTypeForm form() { return form; }
+    /*trusted*/ Class<?> rtype() { return rtype; }
+    /*trusted*/ Class<?>[] ptypes() { return ptypes; }
+
+    private static void checkRtype(Class<?> rtype) {
+        rtype.equals(rtype);  // null check
+    }
+    private static int checkPtype(Class<?> ptype) {
+        ptype.getClass();  //NPE
+        if (ptype == void.class)
+            throw newIllegalArgumentException("parameter type cannot be void");
+        if (ptype == double.class || ptype == long.class)  return 1;
+        return 0;
+    }
+    /** Return number of extra slots (count of long/double args). */
+    private static int checkPtypes(Class<?>[] ptypes) {
+        int slots = 0;
+        for (Class<?> ptype : ptypes) {
+            slots += checkPtype(ptype);
+        }
+        checkSlotCount(ptypes.length + slots);
+        return slots;
+    }
+    private static void checkSlotCount(int count) {
+        if ((count & 0xFF) != count)
+            throw newIllegalArgumentException("bad parameter count "+count);
+    }
+    private static IndexOutOfBoundsException newIndexOutOfBoundsException(Object num) {
+        if (num instanceof Integer)  num = "bad index: "+num;
+        return new IndexOutOfBoundsException(num.toString());
+    }
+
+    static final HashMap<MethodType,MethodType> internTable
+            = new HashMap<MethodType, MethodType>();
+
+    static final Class<?>[] NO_PTYPES = {};
+
+    /**
+     * Finds or creates an instance of the given method type.
+     * @param rtype  the return type
+     * @param ptypes the parameter types
+     * @return a method type with the given components
+     * @throws NullPointerException if {@code rtype} or {@code ptypes} or any element of {@code ptypes} is null
+     * @throws IllegalArgumentException if any element of {@code ptypes} is {@code void.class}
+     */
+    public static
+    MethodType methodType(Class<?> rtype, Class<?>[] ptypes) {
+        return makeImpl(rtype, ptypes, false);
+    }
+
+    /**
+     * Finds or creates a method type with the given components.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @return a method type with the given components
+     * @throws NullPointerException if {@code rtype} or {@code ptypes} or any element of {@code ptypes} is null
+     * @throws IllegalArgumentException if any element of {@code ptypes} is {@code void.class}
+     */
+    public static
+    MethodType methodType(Class<?> rtype, List<Class<?>> ptypes) {
+        boolean notrust = false;  // random List impl. could return evil ptypes array
+        return makeImpl(rtype, ptypes.toArray(NO_PTYPES), notrust);
+    }
+
+    /**
+     * Finds or creates a method type with the given components.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * The leading parameter type is prepended to the remaining array.
+     * @return a method type with the given components
+     * @throws NullPointerException if {@code rtype} or {@code ptype0} or {@code ptypes} or any element of {@code ptypes} is null
+     * @throws IllegalArgumentException if {@code ptype0} or {@code ptypes} or any element of {@code ptypes} is {@code void.class}
+     */
+    public static
+    MethodType methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes) {
+        Class<?>[] ptypes1 = new Class<?>[1+ptypes.length];
+        ptypes1[0] = ptype0;
+        System.arraycopy(ptypes, 0, ptypes1, 1, ptypes.length);
+        return makeImpl(rtype, ptypes1, true);
+    }
+
+    /**
+     * Finds or creates a method type with the given components.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * The resulting method has no parameter types.
+     * @return a method type with the given return value
+     * @throws NullPointerException if {@code rtype} is null
+     */
+    public static
+    MethodType methodType(Class<?> rtype) {
+        return makeImpl(rtype, NO_PTYPES, true);
+    }
+
+    /**
+     * Finds or creates a method type with the given components.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * The resulting method has the single given parameter type.
+     * @return a method type with the given return value and parameter type
+     * @throws NullPointerException if {@code rtype} or {@code ptype0} is null
+     * @throws IllegalArgumentException if {@code ptype0} is {@code void.class}
+     */
+    public static
+    MethodType methodType(Class<?> rtype, Class<?> ptype0) {
+        return makeImpl(rtype, new Class<?>[]{ ptype0 }, true);
+    }
+
+    /**
+     * Finds or creates a method type with the given components.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * The resulting method has the same parameter types as {@code ptypes},
+     * and the specified return type.
+     * @throws NullPointerException if {@code rtype} or {@code ptypes} is null
+     */
+    public static
+    MethodType methodType(Class<?> rtype, MethodType ptypes) {
+        return makeImpl(rtype, ptypes.ptypes, true);
+    }
+
+    /**
+     * Sole factory method to find or create an interned method type.
+     * @param rtype desired return type
+     * @param ptypes desired parameter types
+     * @param trusted whether the ptypes can be used without cloning
+     * @return the unique method type of the desired structure
+     */
+    /*trusted*/ static
+    MethodType makeImpl(Class<?> rtype, Class<?>[] ptypes, boolean trusted) {
+        if (ptypes == null || ptypes.length == 0) {
+            ptypes = NO_PTYPES; trusted = true;
+        }
+        MethodType mt1 = new MethodType(rtype, ptypes);
+        MethodType mt0;
+        synchronized (internTable) {
+            mt0 = internTable.get(mt1);
+            if (mt0 != null)
+                return mt0;
+        }
+        if (!trusted)
+            // defensively copy the array passed in by the user
+            mt1 = new MethodType(rtype, ptypes.clone());
+        // promote the object to the Real Thing, and reprobe
+        MethodTypeForm form = MethodTypeForm.findForm(mt1);
+        mt1.form = form;
+        if (form.erasedType == mt1) {
+            // This is a principal (erased) type; show it to the JVM.
+            MethodHandleNatives.init(mt1);
+        }
+        synchronized (internTable) {
+            mt0 = internTable.get(mt1);
+            if (mt0 != null)
+                return mt0;
+            internTable.put(mt1, mt1);
+        }
+        return mt1;
+    }
+
+    private static final MethodType[] objectOnlyTypes = new MethodType[20];
+
+    /**
+     * Finds or creates a method type whose components are {@code Object} with an optional trailing {@code Object[]} array.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * All parameters and the return type will be {@code Object},
+     * except the final varargs parameter if any, which will be {@code Object[]}.
+     * @param objectArgCount number of parameters (excluding the varargs parameter if any)
+     * @param varargs whether there will be a varargs parameter, of type {@code Object[]}
+     * @return a totally generic method type, given only its count of parameters and varargs
+     * @throws IllegalArgumentException if {@code objectArgCount} is negative or greater than 255
+     * @see #genericMethodType(int)
+     */
+    public static
+    MethodType genericMethodType(int objectArgCount, boolean varargs) {
+        MethodType mt;
+        checkSlotCount(objectArgCount);
+        int ivarargs = (!varargs ? 0 : 1);
+        int ootIndex = objectArgCount*2 + ivarargs;
+        if (ootIndex < objectOnlyTypes.length) {
+            mt = objectOnlyTypes[ootIndex];
+            if (mt != null)  return mt;
+        }
+        Class<?>[] ptypes = new Class<?>[objectArgCount + ivarargs];
+        Arrays.fill(ptypes, Object.class);
+        if (ivarargs != 0)  ptypes[objectArgCount] = Object[].class;
+        mt = makeImpl(Object.class, ptypes, true);
+        if (ootIndex < objectOnlyTypes.length) {
+            objectOnlyTypes[ootIndex] = mt;     // cache it here also!
+        }
+        return mt;
+    }
+
+    /**
+     * Finds or creates a method type whose components are all {@code Object}.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * All parameters and the return type will be Object.
+     * @param objectArgCount number of parameters
+     * @return a totally generic method type, given only its count of parameters
+     * @throws IllegalArgumentException if {@code objectArgCount} is negative or greater than 255
+     * @see #genericMethodType(int, boolean)
+     */
+    public static
+    MethodType genericMethodType(int objectArgCount) {
+        return genericMethodType(objectArgCount, false);
+    }
+
+    /**
+     * Finds or creates a method type with a single different parameter type.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param num    the index (zero-based) of the parameter type to change
+     * @param nptype a new parameter type to replace the old one with
+     * @return the same type, except with the selected parameter changed
+     * @throws IndexOutOfBoundsException if {@code num} is not a valid index into {@code parameterArray()}
+     * @throws IllegalArgumentException if {@code nptype} is {@code void.class}
+     * @throws NullPointerException if {@code nptype} is null
+     */
+    public MethodType changeParameterType(int num, Class<?> nptype) {
+        if (parameterType(num) == nptype)  return this;
+        checkPtype(nptype);
+        Class<?>[] nptypes = ptypes.clone();
+        nptypes[num] = nptype;
+        return makeImpl(rtype, nptypes, true);
+    }
+
+    /**
+     * Finds or creates a method type with additional parameter types.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param num    the position (zero-based) of the inserted parameter type(s)
+     * @param ptypesToInsert zero or more new parameter types to insert into the parameter list
+     * @return the same type, except with the selected parameter(s) inserted
+     * @throws IndexOutOfBoundsException if {@code num} is negative or greater than {@code parameterCount()}
+     * @throws IllegalArgumentException if any element of {@code ptypesToInsert} is {@code void.class}
+     *                                  or if the resulting method type would have more than 255 parameter slots
+     * @throws NullPointerException if {@code ptypesToInsert} or any of its elements is null
+     */
+    public MethodType insertParameterTypes(int num, Class<?>... ptypesToInsert) {
+        int len = ptypes.length;
+        if (num < 0 || num > len)
+            throw newIndexOutOfBoundsException(num);
+        int ins = checkPtypes(ptypesToInsert);
+        checkSlotCount(parameterSlotCount() + ptypesToInsert.length + ins);
+        int ilen = ptypesToInsert.length;
+        if (ilen == 0)  return this;
+        Class<?>[] nptypes = Arrays.copyOfRange(ptypes, 0, len+ilen);
+        System.arraycopy(nptypes, num, nptypes, num+ilen, len-num);
+        System.arraycopy(ptypesToInsert, 0, nptypes, num, ilen);
+        return makeImpl(rtype, nptypes, true);
+    }
+
+    /**
+     * Finds or creates a method type with additional parameter types.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param ptypesToInsert zero or more new parameter types to insert after the end of the parameter list
+     * @return the same type, except with the selected parameter(s) appended
+     * @throws IllegalArgumentException if any element of {@code ptypesToInsert} is {@code void.class}
+     *                                  or if the resulting method type would have more than 255 parameter slots
+     * @throws NullPointerException if {@code ptypesToInsert} or any of its elements is null
+     */
+    public MethodType appendParameterTypes(Class<?>... ptypesToInsert) {
+        return insertParameterTypes(parameterCount(), ptypesToInsert);
+    }
+
+    /**
+     * Finds or creates a method type with additional parameter types.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param num    the position (zero-based) of the inserted parameter type(s)
+     * @param ptypesToInsert zero or more new parameter types to insert into the parameter list
+     * @return the same type, except with the selected parameter(s) inserted
+     * @throws IndexOutOfBoundsException if {@code num} is negative or greater than {@code parameterCount()}
+     * @throws IllegalArgumentException if any element of {@code ptypesToInsert} is {@code void.class}
+     *                                  or if the resulting method type would have more than 255 parameter slots
+     * @throws NullPointerException if {@code ptypesToInsert} or any of its elements is null
+     */
+    public MethodType insertParameterTypes(int num, List<Class<?>> ptypesToInsert) {
+        return insertParameterTypes(num, ptypesToInsert.toArray(NO_PTYPES));
+    }
+
+    /**
+     * Finds or creates a method type with additional parameter types.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param ptypesToInsert zero or more new parameter types to insert after the end of the parameter list
+     * @return the same type, except with the selected parameter(s) appended
+     * @throws IllegalArgumentException if any element of {@code ptypesToInsert} is {@code void.class}
+     *                                  or if the resulting method type would have more than 255 parameter slots
+     * @throws NullPointerException if {@code ptypesToInsert} or any of its elements is null
+     */
+    public MethodType appendParameterTypes(List<Class<?>> ptypesToInsert) {
+        return insertParameterTypes(parameterCount(), ptypesToInsert);
+    }
+
+    /**
+     * Finds or creates a method type with some parameter types omitted.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param start  the index (zero-based) of the first parameter type to remove
+     * @param end    the index (greater than {@code start}) of the first parameter type after not to remove
+     * @return the same type, except with the selected parameter(s) removed
+     * @throws IndexOutOfBoundsException if {@code start} is negative or greater than {@code parameterCount()}
+     *                                  or if {@code end} is negative or greater than {@code parameterCount()}
+     *                                  or if {@code start} is greater than {@code end}
+     */
+    public MethodType dropParameterTypes(int start, int end) {
+        int len = ptypes.length;
+        if (!(0 <= start && start <= end && end <= len))
+            throw newIndexOutOfBoundsException("start="+start+" end="+end);
+        if (start == end)  return this;
+        Class<?>[] nptypes;
+        if (start == 0) {
+            if (end == len) {
+                // drop all parameters
+                nptypes = NO_PTYPES;
+            } else {
+                // drop initial parameter(s)
+                nptypes = Arrays.copyOfRange(ptypes, end, len);
+            }
+        } else {
+            if (end == len) {
+                // drop trailing parameter(s)
+                nptypes = Arrays.copyOfRange(ptypes, 0, start);
+            } else {
+                int tail = len - end;
+                nptypes = Arrays.copyOfRange(ptypes, 0, start + tail);
+                System.arraycopy(ptypes, end, nptypes, start, tail);
+            }
+        }
+        return makeImpl(rtype, nptypes, true);
+    }
+
+    /**
+     * Finds or creates a method type with a different return type.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * @param nrtype a return parameter type to replace the old one with
+     * @return the same type, except with the return type change
+     * @throws NullPointerException if {@code nrtype} is null
+     */
+    public MethodType changeReturnType(Class<?> nrtype) {
+        if (returnType() == nrtype)  return this;
+        return makeImpl(nrtype, ptypes, true);
+    }
+
+    /**
+     * Reports if this type contains a primitive argument or return value.
+     * The return type {@code void} counts as a primitive.
+     * @return true if any of the types are primitives
+     */
+    public boolean hasPrimitives() {
+        return form.hasPrimitives();
+    }
+
+    /**
+     * Reports if this type contains a wrapper argument or return value.
+     * Wrappers are types which box primitive values, such as {@link Integer}.
+     * The reference type {@code java.lang.Void} counts as a wrapper.
+     * @return true if any of the types are wrappers
+     */
+    public boolean hasWrappers() {
+        return unwrap() != this;
+    }
+
+    /**
+     * Erases all reference types to {@code Object}.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * All primitive types (including {@code void}) will remain unchanged.
+     * @return a version of the original type with all reference types replaced
+     */
+    public MethodType erase() {
+        return form.erasedType();
+    }
+
+    /**
+     * Converts all types, both reference and primitive, to {@code Object}.
+     * Convenience method for {@link #genericMethodType(int) genericMethodType}.
+     * The expression {@code type.wrap().erase()} produces the same value
+     * as {@code type.generic()}.
+     * @return a version of the original type with all types replaced
+     */
+    public MethodType generic() {
+        return genericMethodType(parameterCount());
+    }
+
+    /**
+     * Converts all primitive types to their corresponding wrapper types.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * All reference types (including wrapper types) will remain unchanged.
+     * A {@code void} return type is changed to the type {@code java.lang.Void}.
+     * The expression {@code type.wrap().erase()} produces the same value
+     * as {@code type.generic()}.
+     * @return a version of the original type with all primitive types replaced
+     */
+    public MethodType wrap() {
+        return hasPrimitives() ? wrapWithPrims(this) : this;
+    }
+
+    /**
+     * Converts all wrapper types to their corresponding primitive types.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * All primitive types (including {@code void}) will remain unchanged.
+     * A return type of {@code java.lang.Void} is changed to {@code void}.
+     * @return a version of the original type with all wrapper types replaced
+     */
+    public MethodType unwrap() {
+        MethodType noprims = !hasPrimitives() ? this : wrapWithPrims(this);
+        return unwrapWithNoPrims(noprims);
+    }
+
+    private static MethodType wrapWithPrims(MethodType pt) {
+        assert(pt.hasPrimitives());
+        MethodType wt = pt.wrapAlt;
+        if (wt == null) {
+            // fill in lazily
+            wt = MethodTypeForm.canonicalize(pt, MethodTypeForm.WRAP, MethodTypeForm.WRAP);
+            assert(wt != null);
+            pt.wrapAlt = wt;
+        }
+        return wt;
+    }
+
+    private static MethodType unwrapWithNoPrims(MethodType wt) {
+        assert(!wt.hasPrimitives());
+        MethodType uwt = wt.wrapAlt;
+        if (uwt == null) {
+            // fill in lazily
+            uwt = MethodTypeForm.canonicalize(wt, MethodTypeForm.UNWRAP, MethodTypeForm.UNWRAP);
+            if (uwt == null)
+                uwt = wt;    // type has no wrappers or prims at all
+            wt.wrapAlt = uwt;
+        }
+        return uwt;
+    }
+
+    /**
+     * Returns the parameter type at the specified index, within this method type.
+     * @param num the index (zero-based) of the desired parameter type
+     * @return the selected parameter type
+     * @throws IndexOutOfBoundsException if {@code num} is not a valid index into {@code parameterArray()}
+     */
+    public Class<?> parameterType(int num) {
+        return ptypes[num];
+    }
+    /**
+     * Returns the number of parameter types in this method type.
+     * @return the number of parameter types
+     */
+    public int parameterCount() {
+        return ptypes.length;
+    }
+    /**
+     * Returns the return type of this method type.
+     * @return the return type
+     */
+    public Class<?> returnType() {
+        return rtype;
+    }
+
+    /**
+     * Presents the parameter types as a list (a convenience method).
+     * The list will be immutable.
+     * @return the parameter types (as an immutable list)
+     */
+    public List<Class<?>> parameterList() {
+        return Collections.unmodifiableList(Arrays.asList(ptypes));
+    }
+
+    /**
+     * Presents the parameter types as an array (a convenience method).
+     * Changes to the array will not result in changes to the type.
+     * @return the parameter types (as a fresh copy if necessary)
+     */
+    public Class<?>[] parameterArray() {
+        return ptypes.clone();
+    }
+
+    /**
+     * Compares the specified object with this type for equality.
+     * That is, it returns <tt>true</tt> if and only if the specified object
+     * is also a method type with exactly the same parameters and return type.
+     * @param x object to compare
+     * @see Object#equals(Object)
+     */
+    @Override
+    public boolean equals(Object x) {
+        return this == x || x instanceof MethodType && equals((MethodType)x);
+    }
+
+    private boolean equals(MethodType that) {
+        return this.rtype == that.rtype
+            && Arrays.equals(this.ptypes, that.ptypes);
+    }
+
+    /**
+     * Returns the hash code value for this method type.
+     * It is defined to be the same as the hashcode of a List
+     * whose elements are the return type followed by the
+     * parameter types.
+     * @return the hash code value for this method type
+     * @see Object#hashCode()
+     * @see #equals(Object)
+     * @see List#hashCode()
+     */
+    @Override
+    public int hashCode() {
+      int hashCode = 31 + rtype.hashCode();
+      for (Class<?> ptype : ptypes)
+          hashCode = 31*hashCode + ptype.hashCode();
+      return hashCode;
+    }
+
+    /**
+     * Returns a string representation of the method type,
+     * of the form {@code "(PT0,PT1...)RT"}.
+     * The string representation of a method type is a
+     * parenthesis enclosed, comma separated list of type names,
+     * followed immediately by the return type.
+     * <p>
+     * Each type is represented by its
+     * {@link java.lang.Class#getSimpleName simple name}.
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("(");
+        for (int i = 0; i < ptypes.length; i++) {
+            if (i > 0)  sb.append(",");
+            sb.append(ptypes[i].getSimpleName());
+        }
+        sb.append(")");
+        sb.append(rtype.getSimpleName());
+        return sb.toString();
+    }
+
+    /// Queries which have to do with the bytecode architecture
+
+    /** Reports the number of JVM stack slots required to invoke a method
+     * of this type.  Note that (for historical reasons) the JVM requires
+     * a second stack slot to pass long and double arguments.
+     * So this method returns {@link #parameterCount() parameterCount} plus the
+     * number of long and double parameters (if any).
+     * <p>
+     * This method is included for the benfit of applications that must
+     * generate bytecodes that process method handles and invokedynamic.
+     * @return the number of JVM stack slots for this type's parameters
+     */
+    /*non-public*/ int parameterSlotCount() {
+        return form.parameterSlotCount();
+    }
+
+    /*non-public*/ Invokers invokers() {
+        Invokers inv = invokers;
+        if (inv != null)  return inv;
+        invokers = inv = new Invokers(this);
+        return inv;
+    }
+
+    /** Reports the number of JVM stack slots which carry all parameters including and after
+     * the given position, which must be in the range of 0 to
+     * {@code parameterCount} inclusive.  Successive parameters are
+     * more shallowly stacked, and parameters are indexed in the bytecodes
+     * according to their trailing edge.  Thus, to obtain the depth
+     * in the outgoing call stack of parameter {@code N}, obtain
+     * the {@code parameterSlotDepth} of its trailing edge
+     * at position {@code N+1}.
+     * <p>
+     * Parameters of type {@code long} and {@code double} occupy
+     * two stack slots (for historical reasons) and all others occupy one.
+     * Therefore, the number returned is the number of arguments
+     * <em>including</em> and <em>after</em> the given parameter,
+     * <em>plus</em> the number of long or double arguments
+     * at or after after the argument for the given parameter.
+     * <p>
+     * This method is included for the benfit of applications that must
+     * generate bytecodes that process method handles and invokedynamic.
+     * @param num an index (zero-based, inclusive) within the parameter types
+     * @return the index of the (shallowest) JVM stack slot transmitting the
+     *         given parameter
+     * @throws IllegalArgumentException if {@code num} is negative or greater than {@code parameterCount()}
+     */
+    /*non-public*/ int parameterSlotDepth(int num) {
+        if (num < 0 || num > ptypes.length)
+            parameterType(num);  // force a range check
+        return form.parameterToArgSlot(num-1);
+    }
+
+    /** Reports the number of JVM stack slots required to receive a return value
+     * from a method of this type.
+     * If the {@link #returnType() return type} is void, it will be zero,
+     * else if the return type is long or double, it will be two, else one.
+     * <p>
+     * This method is included for the benfit of applications that must
+     * generate bytecodes that process method handles and invokedynamic.
+     * @return the number of JVM stack slots (0, 1, or 2) for this type's return value
+     * Will be removed for PFD.
+     */
+    /*non-public*/ int returnSlotCount() {
+        return form.returnSlotCount();
+    }
+
+    /**
+     * Finds or creates an instance of a method type, given the spelling of its bytecode descriptor.
+     * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
+     * Any class or interface name embedded in the descriptor string
+     * will be resolved by calling {@link ClassLoader#loadClass(java.lang.String)}
+     * on the given loader (or if it is null, on the system class loader).
+     * <p>
+     * Note that it is possible to encounter method types which cannot be
+     * constructed by this method, because their component types are
+     * not all reachable from a common class loader.
+     * <p>
+     * This method is included for the benfit of applications that must
+     * generate bytecodes that process method handles and {@code invokedynamic}.
+     * @param descriptor a bytecode-level type descriptor string "(T...)T"
+     * @param loader the class loader in which to look up the types
+     * @return a method type matching the bytecode-level type descriptor
+     * @throws IllegalArgumentException if the string is not well-formed
+     * @throws TypeNotPresentException if a named type cannot be found
+     */
+    public static MethodType fromMethodDescriptorString(String descriptor, ClassLoader loader)
+        throws IllegalArgumentException, TypeNotPresentException
+    {
+        List<Class<?>> types = BytecodeDescriptor.parseMethod(descriptor, loader);
+        Class<?> rtype = types.remove(types.size() - 1);
+        Class<?>[] ptypes = types.toArray(NO_PTYPES);
+        return makeImpl(rtype, ptypes, true);
+    }
+
+    /**
+     * Produces a bytecode descriptor representation of the method type.
+     * <p>
+     * Note that this is not a strict inverse of {@link #fromMethodDescriptorString fromMethodDescriptorString}.
+     * Two distinct classes which share a common name but have different class loaders
+     * will appear identical when viewed within descriptor strings.
+     * <p>
+     * This method is included for the benfit of applications that must
+     * generate bytecodes that process method handles and {@code invokedynamic}.
+     * {@link #fromMethodDescriptorString(java.lang.String, java.lang.ClassLoader) fromMethodDescriptorString},
+     * because the latter requires a suitable class loader argument.
+     * @return the bytecode type descriptor representation
+     */
+    public String toMethodDescriptorString() {
+        return BytecodeDescriptor.unparse(this);
+    }
+
+    /// Serialization.
+
+    /**
+     * There are no serializable fields for {@code MethodType}.
+     */
+    private static final java.io.ObjectStreamField[] serialPersistentFields = { };
+
+    /**
+     * Save the {@code MethodType} instance to a stream.
+     *
+     * @serialData
+     * For portability, the serialized format does not refer to named fields.
+     * Instead, the return type and parameter type arrays are written directly
+     * from the {@code writeObject} method, using two calls to {@code s.writeObject}
+     * as follows:
+     * <blockquote><pre>
+s.writeObject(this.returnType());
+s.writeObject(this.parameterArray());
+     * </pre></blockquote>
+     * <p>
+     * The deserialized field values are checked as if they were
+     * provided to the factory method {@link #methodType(Class,Class[]) methodType}.
+     * For example, null values, or {@code void} parameter types,
+     * will lead to exceptions during deserialization.
+     * @param the stream to write the object to
+     */
+    private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
+        s.defaultWriteObject();  // requires serialPersistentFields to be an empty array
+        s.writeObject(returnType());
+        s.writeObject(parameterArray());
+    }
+
+    /**
+     * Reconstitute the {@code MethodType} instance from a stream (that is,
+     * deserialize it).
+     * This instance is a scratch object with bogus final fields.
+     * It provides the parameters to the factory method called by
+     * {@link #readResolve readResolve}.
+     * After that call it is discarded.
+     * @param the stream to read the object from
+     * @see #MethodType()
+     * @see #readResolve
+     * @see #writeObject
+     */
+    private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
+        s.defaultReadObject();  // requires serialPersistentFields to be an empty array
+
+        Class<?>   returnType     = (Class<?>)   s.readObject();
+        Class<?>[] parameterArray = (Class<?>[]) s.readObject();
+
+        // Probably this object will never escape, but let's check
+        // the field values now, just to be sure.
+        checkRtype(returnType);
+        checkPtypes(parameterArray);
+
+        parameterArray = parameterArray.clone();  // make sure it is unshared
+        MethodType_init(returnType, parameterArray);
+    }
+
+    /**
+     * For serialization only.
+     * Sets the final fields to null, pending {@code Unsafe.putObject}.
+     */
+    private MethodType() {
+        this.rtype = null;
+        this.ptypes = null;
+    }
+    private void MethodType_init(Class<?> rtype, Class<?>[] ptypes) {
+        // In order to communicate these values to readResolve, we must
+        // store them into the implementation-specific final fields.
+        checkRtype(rtype);
+        checkPtypes(ptypes);
+        unsafe.putObject(this, rtypeOffset, rtype);
+        unsafe.putObject(this, ptypesOffset, ptypes);
+    }
+
+    // Support for resetting final fields while deserializing
+    private static final sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
+    private static final long rtypeOffset, ptypesOffset;
+    static {
+        try {
+            rtypeOffset = unsafe.objectFieldOffset
+                (MethodType.class.getDeclaredField("rtype"));
+            ptypesOffset = unsafe.objectFieldOffset
+                (MethodType.class.getDeclaredField("ptypes"));
+        } catch (Exception ex) {
+            throw new Error(ex);
+        }
+    }
+
+    /**
+     * Resolves and initializes a {@code MethodType} object
+     * after serialization.
+     * @return the fully initialized {@code MethodType} object
+     */
+    private Object readResolve() {
+        // Do not use a trusted path for deserialization:
+        //return makeImpl(rtype, ptypes, true);
+        // Verify all operands, and make sure ptypes is unshared:
+        return methodType(rtype, ptypes);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MethodTypeForm.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,476 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.Wrapper;
+import static java.lang.invoke.MethodHandleStatics.*;
+
+/**
+ * Shared information for a group of method types, which differ
+ * only by reference types, and therefore share a common erasure
+ * and wrapping.
+ * <p>
+ * For an empirical discussion of the structure of method types,
+ * see <a href="http://groups.google.com/group/jvm-languages/browse_thread/thread/ac9308ae74da9b7e/">
+ * the thread "Avoiding Boxing" on jvm-languages</a>.
+ * There are approximately 2000 distinct erased method types in the JDK.
+ * There are a little over 10 times that number of unerased types.
+ * No more than half of these are likely to be loaded at once.
+ * @author John Rose
+ */
+class MethodTypeForm {
+    final int[] argToSlotTable, slotToArgTable;
+    final long argCounts;               // packed slot & value counts
+    final long primCounts;              // packed prim & double counts
+    final int vmslots;                  // total number of parameter slots
+    final MethodType erasedType;        // the canonical erasure
+
+    /*lazy*/ MethodType primsAsBoxes;   // replace prims by wrappers
+    /*lazy*/ MethodType primArgsAsBoxes; // wrap args only; make raw return
+    /*lazy*/ MethodType primsAsInts;    // replace prims by int/long
+    /*lazy*/ MethodType primsAsLongs;   // replace prims by long
+    /*lazy*/ MethodType primsAtEnd;     // reorder primitives to the end
+
+    // Cached adapter information:
+    /*lazy*/ ToGeneric   toGeneric;     // convert cs. with prims to w/o
+    /*lazy*/ FromGeneric fromGeneric;   // convert cs. w/o prims to with
+    /*lazy*/ SpreadGeneric[] spreadGeneric; // expand one argument to many
+    /*lazy*/ FilterGeneric filterGeneric; // convert argument(s) on the fly
+    /*lazy*/ MethodHandle genericInvoker; // hook for invokeGeneric
+
+    public MethodType erasedType() {
+        return erasedType;
+    }
+
+    protected MethodTypeForm(MethodType erasedType) {
+        this.erasedType = erasedType;
+
+        Class<?>[] ptypes = erasedType.ptypes();
+        int ptypeCount = ptypes.length;
+        int pslotCount = ptypeCount;            // temp. estimate
+        int rtypeCount = 1;                     // temp. estimate
+        int rslotCount = 1;                     // temp. estimate
+
+        int[] argToSlotTab = null, slotToArgTab = null;
+
+        // Walk the argument types, looking for primitives.
+        int pac = 0, lac = 0, prc = 0, lrc = 0;
+        Class<?> epts[] = ptypes;
+        for (int i = 0; i < epts.length; i++) {
+            Class<?> pt = epts[i];
+            if (pt != Object.class) {
+                assert(pt.isPrimitive());
+                ++pac;
+                if (hasTwoArgSlots(pt))  ++lac;
+            }
+        }
+        pslotCount += lac;                  // #slots = #args + #longs
+        Class<?> rt = erasedType.returnType();
+        if (rt != Object.class) {
+            ++prc;          // even void.class counts as a prim here
+            if (hasTwoArgSlots(rt))  ++lrc;
+            // adjust #slots, #args
+            if (rt == void.class)
+                rtypeCount = rslotCount = 0;
+            else
+                rslotCount += lrc;
+        }
+        if (lac != 0) {
+            int slot = ptypeCount + lac;
+            slotToArgTab = new int[slot+1];
+            argToSlotTab = new int[1+ptypeCount];
+            argToSlotTab[0] = slot;  // argument "-1" is past end of slots
+            for (int i = 0; i < epts.length; i++) {
+                Class<?> pt = epts[i];
+                if (hasTwoArgSlots(pt))  --slot;
+                --slot;
+                slotToArgTab[slot] = i+1; // "+1" see argSlotToParameter note
+                argToSlotTab[1+i]  = slot;
+            }
+            assert(slot == 0);  // filled the table
+        }
+        this.primCounts = pack(lrc, prc, lac, pac);
+        this.argCounts = pack(rslotCount, rtypeCount, pslotCount, ptypeCount);
+        if (slotToArgTab == null) {
+            int slot = ptypeCount; // first arg is deepest in stack
+            slotToArgTab = new int[slot+1];
+            argToSlotTab = new int[1+ptypeCount];
+            argToSlotTab[0] = slot;  // argument "-1" is past end of slots
+            for (int i = 0; i < ptypeCount; i++) {
+                --slot;
+                slotToArgTab[slot] = i+1; // "+1" see argSlotToParameter note
+                argToSlotTab[1+i]  = slot;
+            }
+        }
+        this.argToSlotTable = argToSlotTab;
+        this.slotToArgTable = slotToArgTab;
+
+        if (pslotCount >= 256)  throw newIllegalArgumentException("too many arguments");
+
+        // send a few bits down to the JVM:
+        this.vmslots = parameterSlotCount();
+
+        // short circuit some no-op canonicalizations:
+        if (!hasPrimitives()) {
+            primsAsBoxes = erasedType;
+            primArgsAsBoxes = erasedType;
+            primsAsInts  = erasedType;
+            primsAsLongs = erasedType;
+            primsAtEnd   = erasedType;
+        }
+    }
+
+    /** Turn all primitive types to corresponding wrapper types.
+     */
+    public MethodType primsAsBoxes() {
+        MethodType ct = primsAsBoxes;
+        if (ct != null)  return ct;
+        MethodType t = erasedType;
+        ct = canonicalize(erasedType, WRAP, WRAP);
+        if (ct == null)  ct = t;  // no prims to box
+        return primsAsBoxes = ct;
+    }
+
+    /** Turn all primitive argument types to corresponding wrapper types.
+     *  Subword and void return types are promoted to int.
+     */
+    public MethodType primArgsAsBoxes() {
+        MethodType ct = primArgsAsBoxes;
+        if (ct != null)  return ct;
+        MethodType t = erasedType;
+        ct = canonicalize(erasedType, RAW_RETURN, WRAP);
+        if (ct == null)  ct = t;  // no prims to box
+        return primArgsAsBoxes = ct;
+    }
+
+    /** Turn all primitive types to either int or long.
+     *  Floating point return types are not changed, because
+     *  they may require special calling sequences.
+     *  A void return value is turned to int.
+     */
+    public MethodType primsAsInts() {
+        MethodType ct = primsAsInts;
+        if (ct != null)  return ct;
+        MethodType t = erasedType;
+        ct = canonicalize(t, RAW_RETURN, INTS);
+        if (ct == null)  ct = t;  // no prims to int-ify
+        return primsAsInts = ct;
+    }
+
+    /** Turn all primitive types to either int or long.
+     *  Floating point return types are not changed, because
+     *  they may require special calling sequences.
+     *  A void return value is turned to int.
+     */
+    public MethodType primsAsLongs() {
+        MethodType ct = primsAsLongs;
+        if (ct != null)  return ct;
+        MethodType t = erasedType;
+        ct = canonicalize(t, RAW_RETURN, LONGS);
+        if (ct == null)  ct = t;  // no prims to int-ify
+        return primsAsLongs = ct;
+    }
+
+    /** Stably sort parameters into 3 buckets: ref, int, long. */
+    public MethodType primsAtEnd() {
+        MethodType ct = primsAtEnd;
+        if (ct != null)  return ct;
+        MethodType t = erasedType;
+
+        int pac = primitiveParameterCount();
+        if (pac == 0)
+            return primsAtEnd = t;
+
+        int argc = parameterCount();
+        int lac = longPrimitiveParameterCount();
+        if (pac == argc && (lac == 0 || lac == argc))
+            return primsAtEnd = t;
+
+        // known to have a mix of 2 or 3 of ref, int, long
+        int[] reorder = primsAtEndOrder(t);
+        ct = reorderParameters(t, reorder, null);
+        //System.out.println("t="+t+" / reorder="+java.util.Arrays.toString(reorder)+" => "+ct);
+        return primsAtEnd = ct;
+    }
+
+    /** Compute a new ordering of parameters so that all references
+     *  are before all ints or longs, and all ints are before all longs.
+     *  For this ordering, doubles count as longs, and all other primitive
+     *  values count as ints.
+     *  As a special case, if the parameters are already in the specified
+     *  order, this method returns a null reference, rather than an array
+     *  specifying a null permutation.
+     *  <p>
+     *  For example, the type {@code (int,boolean,int,Object,String)void}
+     *  produces the order {@code {3,4,0,1,2}}, the type
+     *  {@code (long,int,String)void} produces {@code {2,1,2}}, and
+     *  the type {@code (Object,int)Object} produces {@code null}.
+     */
+    public static int[] primsAtEndOrder(MethodType mt) {
+        MethodTypeForm form = mt.form();
+        if (form.primsAtEnd == form.erasedType)
+            // quick check shows no reordering is necessary
+            return null;
+
+        int argc = form.parameterCount();
+        int[] paramOrder = new int[argc];
+
+        // 3-way bucket sort:
+        int pac = form.primitiveParameterCount();
+        int lac = form.longPrimitiveParameterCount();
+        int rfill = 0, ifill = argc - pac, lfill = argc - lac;
+
+        Class<?>[] ptypes = mt.ptypes();
+        boolean changed = false;
+        for (int i = 0; i < ptypes.length; i++) {
+            Class<?> pt = ptypes[i];
+            int ord;
+            if (!pt.isPrimitive())             ord = rfill++;
+            else if (!hasTwoArgSlots(pt))      ord = ifill++;
+            else                               ord = lfill++;
+            if (ord != i)  changed = true;
+            assert(paramOrder[ord] == 0);
+            paramOrder[ord] = i;
+        }
+        assert(rfill == argc - pac && ifill == argc - lac && lfill == argc);
+        if (!changed) {
+            form.primsAtEnd = form.erasedType;
+            return null;
+        }
+        return paramOrder;
+    }
+
+    /** Put the existing parameters of mt into a new order, given by newParamOrder.
+     *  The third argument is logically appended to mt.parameterArray,
+     *  so that elements of newParamOrder can index either pre-existing or
+     *  new parameter types.
+     */
+    public static MethodType reorderParameters(MethodType mt, int[] newParamOrder, Class<?>[] moreParams) {
+        if (newParamOrder == null)  return mt;  // no-op reordering
+        Class<?>[] ptypes = mt.ptypes();
+        Class<?>[] ntypes = new Class<?>[newParamOrder.length];
+        int maxParam = ptypes.length + (moreParams == null ? 0 : moreParams.length);
+        boolean changed = (ntypes.length != ptypes.length);
+        for (int i = 0; i < newParamOrder.length; i++) {
+            int param = newParamOrder[i];
+            if (param != i)  changed = true;
+            Class<?> nt;
+            if (param < ptypes.length)   nt = ptypes[param];
+            else if (param == maxParam)  nt = mt.returnType();
+            else                         nt = moreParams[param - ptypes.length];
+            ntypes[i] = nt;
+        }
+        if (!changed)  return mt;
+        return MethodType.makeImpl(mt.returnType(), ntypes, true);
+    }
+
+    private static boolean hasTwoArgSlots(Class<?> type) {
+        return type == long.class || type == double.class;
+    }
+
+    private static long pack(int a, int b, int c, int d) {
+        assert(((a|b|c|d) & ~0xFFFF) == 0);
+        long hw = ((a << 16) | b), lw = ((c << 16) | d);
+        return (hw << 32) | lw;
+    }
+    private static char unpack(long packed, int word) { // word==0 => return a, ==3 => return d
+        assert(word <= 3);
+        return (char)(packed >> ((3-word) * 16));
+    }
+
+    public int parameterCount() {                      // # outgoing values
+        return unpack(argCounts, 3);
+    }
+    public int parameterSlotCount() {                  // # outgoing interpreter slots
+        return unpack(argCounts, 2);
+    }
+    public int returnCount() {                         // = 0 (V), or 1
+        return unpack(argCounts, 1);
+    }
+    public int returnSlotCount() {                     // = 0 (V), 2 (J/D), or 1
+        return unpack(argCounts, 0);
+    }
+    public int primitiveParameterCount() {
+        return unpack(primCounts, 3);
+    }
+    public int longPrimitiveParameterCount() {
+        return unpack(primCounts, 2);
+    }
+    public int primitiveReturnCount() {                // = 0 (obj), or 1
+        return unpack(primCounts, 1);
+    }
+    public int longPrimitiveReturnCount() {            // = 1 (J/D), or 0
+        return unpack(primCounts, 0);
+    }
+    public boolean hasPrimitives() {
+        return primCounts != 0;
+    }
+//    public boolean hasNonVoidPrimitives() {
+//        if (primCounts == 0)  return false;
+//        if (primitiveParameterCount() != 0)  return true;
+//        return (primitiveReturnCount() != 0 && returnCount() != 0);
+//    }
+    public boolean hasLongPrimitives() {
+        return (longPrimitiveParameterCount() | longPrimitiveReturnCount()) != 0;
+    }
+    public int parameterToArgSlot(int i) {
+        return argToSlotTable[1+i];
+    }
+    public int argSlotToParameter(int argSlot) {
+        // Note:  Empty slots are represented by zero in this table.
+        // Valid arguments slots contain incremented entries, so as to be non-zero.
+        // We return -1 the caller to mean an empty slot.
+        return slotToArgTable[argSlot] - 1;
+    }
+
+    static MethodTypeForm findForm(MethodType mt) {
+        MethodType erased = canonicalize(mt, ERASE, ERASE);
+        if (erased == null) {
+            // It is already erased.  Make a new MethodTypeForm.
+            return new MethodTypeForm(mt);
+        } else {
+            // Share the MethodTypeForm with the erased version.
+            return erased.form();
+        }
+    }
+
+    /** Codes for {@link #canonicalize(java.lang.Class, int)}.
+     * ERASE means change every reference to {@code Object}.
+     * WRAP means convert primitives (including {@code void} to their
+     * corresponding wrapper types.  UNWRAP means the reverse of WRAP.
+     * INTS means convert all non-void primitive types to int or long,
+     * according to size.  LONGS means convert all non-void primitives
+     * to long, regardless of size.  RAW_RETURN means convert a type
+     * (assumed to be a return type) to int if it is smaller than an int,
+     * or if it is void.
+     */
+    public static final int NO_CHANGE = 0, ERASE = 1, WRAP = 2, UNWRAP = 3, INTS = 4, LONGS = 5, RAW_RETURN = 6;
+
+    /** Canonicalize the types in the given method type.
+     * If any types change, intern the new type, and return it.
+     * Otherwise return null.
+     */
+    public static MethodType canonicalize(MethodType mt, int howRet, int howArgs) {
+        Class<?>[] ptypes = mt.ptypes();
+        Class<?>[] ptc = MethodTypeForm.canonicalizes(ptypes, howArgs);
+        Class<?> rtype = mt.returnType();
+        Class<?> rtc = MethodTypeForm.canonicalize(rtype, howRet);
+        if (ptc == null && rtc == null) {
+            // It is already canonical.
+            return null;
+        }
+        // Find the erased version of the method type:
+        if (rtc == null)  rtc = rtype;
+        if (ptc == null)  ptc = ptypes;
+        return MethodType.makeImpl(rtc, ptc, true);
+    }
+
+    /** Canonicalize the given return or param type.
+     *  Return null if the type is already canonicalized.
+     */
+    static Class<?> canonicalize(Class<?> t, int how) {
+        Class<?> ct;
+        if (t == Object.class) {
+            // no change, ever
+        } else if (!t.isPrimitive()) {
+            switch (how) {
+                case UNWRAP:
+                    ct = Wrapper.asPrimitiveType(t);
+                    if (ct != t)  return ct;
+                    break;
+                case RAW_RETURN:
+                case ERASE:
+                    return Object.class;
+            }
+        } else if (t == void.class) {
+            // no change, usually
+            switch (how) {
+                case RAW_RETURN:
+                    return int.class;
+                case WRAP:
+                    return Void.class;
+            }
+        } else {
+            // non-void primitive
+            switch (how) {
+                case WRAP:
+                    return Wrapper.asWrapperType(t);
+                case INTS:
+                    if (t == int.class || t == long.class)
+                        return null;  // no change
+                    if (t == double.class)
+                        return long.class;
+                    return int.class;
+                case LONGS:
+                    if (t == long.class)
+                        return null;  // no change
+                    return long.class;
+                case RAW_RETURN:
+                    if (t == int.class || t == long.class ||
+                        t == float.class || t == double.class)
+                        return null;  // no change
+                    // everything else returns as an int
+                    return int.class;
+            }
+        }
+        // no change; return null to signify
+        return null;
+    }
+
+    /** Canonicalize each param type in the given array.
+     *  Return null if all types are already canonicalized.
+     */
+    static Class<?>[] canonicalizes(Class<?>[] ts, int how) {
+        Class<?>[] cs = null;
+        for (int imax = ts.length, i = 0; i < imax; i++) {
+            Class<?> c = canonicalize(ts[i], how);
+            if (c != null) {
+                if (cs == null)
+                    cs = ts.clone();
+                cs[i] = c;
+            }
+        }
+        return cs;
+    }
+
+    /*non-public*/ void notifyGenericMethodType() {
+        if (genericInvoker != null)  return;
+        try {
+            // Trigger adapter creation.
+            genericInvoker = InvokeGeneric.genericInvokerOf(erasedType);
+        } catch (Exception ex) {
+            Error err = new InternalError("Exception while resolving invokeGeneric");
+            err.initCause(ex);
+            throw err;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "Form"+erasedType;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MutableCallSite.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * A {@code MutableCallSite} is a {@link CallSite} whose target variable
+ * behaves like an ordinary field.
+ * An {@code invokedynamic} instruction linked to a {@code MutableCallSite} delegates
+ * all calls to the site's current target.
+ * The {@linkplain CallSite#dynamicInvoker dynamic invoker} of a mutable call site
+ * also delegates each call to the site's current target.
+ * <p>
+ * Here is an example of a mutable call site which introduces a
+ * state variable into a method handle chain.
+ * <blockquote><pre>
+MutableCallSite name = new MutableCallSite(MethodType.methodType(String.class));
+MethodHandle MH_name = name.dynamicInvoker();
+MethodType MT_str2 = MethodType.methodType(String.class, String.class);
+MethodHandle MH_upcase = MethodHandles.lookup()
+    .findVirtual(String.class, "toUpperCase", MT_str2);
+MethodHandle worker1 = MethodHandles.filterReturnValue(MH_name, MH_upcase);
+name.setTarget(MethodHandles.constant(String.class, "Rocky"));
+assertEquals("ROCKY", (String) worker1.invokeExact());
+name.setTarget(MethodHandles.constant(String.class, "Fred"));
+assertEquals("FRED", (String) worker1.invokeExact());
+// (mutation can be continued indefinitely)
+ * </pre></blockquote>
+ * <p>
+ * The same call site may be used in several places at once.
+ * <blockquote><pre>
+MethodHandle MH_dear = MethodHandles.lookup()
+    .findVirtual(String.class, "concat", MT_str2).bindTo(", dear?");
+MethodHandle worker2 = MethodHandles.filterReturnValue(MH_name, MH_dear);
+assertEquals("Fred, dear?", (String) worker2.invokeExact());
+name.setTarget(MethodHandles.constant(String.class, "Wilma"));
+assertEquals("WILMA", (String) worker1.invokeExact());
+assertEquals("Wilma, dear?", (String) worker2.invokeExact());
+ * </pre></blockquote>
+ * <p>
+ * <em>Non-synchronization of target values:</em>
+ * A write to a mutable call site's target does not force other threads
+ * to become aware of the updated value.  Threads which do not perform
+ * suitable synchronization actions relative to the updated call site
+ * may cache the old target value and delay their use of the new target
+ * value indefinitely.
+ * (This is a normal consequence of the Java Memory Model as applied
+ * to object fields.)
+ * <p>
+ * The {@link #syncAll syncAll} operation provides a way to force threads
+ * to accept a new target value, even if there is no other synchronization.
+ * <p>
+ * For target values which will be frequently updated, consider using
+ * a {@linkplain VolatileCallSite volatile call site} instead.
+ * @author John Rose, JSR 292 EG
+ */
+public class MutableCallSite extends CallSite {
+    /**
+     * Creates a blank call site object with the given method type.
+     * The initial target is set to a method handle of the given type
+     * which will throw an {@link IllegalStateException} if called.
+     * <p>
+     * The type of the call site is permanently set to the given type.
+     * <p>
+     * Before this {@code CallSite} object is returned from a bootstrap method,
+     * or invoked in some other manner,
+     * it is usually provided with a more useful target method,
+     * via a call to {@link CallSite#setTarget(MethodHandle) setTarget}.
+     * @param type the method type that this call site will have
+     * @throws NullPointerException if the proposed type is null
+     */
+    public MutableCallSite(MethodType type) {
+        super(type);
+    }
+
+    /**
+     * Creates a call site object with an initial target method handle.
+     * The type of the call site is permanently set to the initial target's type.
+     * @param target the method handle that will be the initial target of the call site
+     * @throws NullPointerException if the proposed target is null
+     */
+    public MutableCallSite(MethodHandle target) {
+        super(target);
+    }
+
+    /**
+     * Returns the target method of the call site, which behaves
+     * like a normal field of the {@code MutableCallSite}.
+     * <p>
+     * The interactions of {@code getTarget} with memory are the same
+     * as of a read from an ordinary variable, such as an array element or a
+     * non-volatile, non-final field.
+     * <p>
+     * In particular, the current thread may choose to reuse the result
+     * of a previous read of the target from memory, and may fail to see
+     * a recent update to the target by another thread.
+     *
+     * @return the linkage state of this call site, a method handle which can change over time
+     * @see #setTarget
+     */
+    @Override public final MethodHandle getTarget() {
+        return target;
+    }
+
+    /**
+     * Updates the target method of this call site, as a normal variable.
+     * The type of the new target must agree with the type of the old target.
+     * <p>
+     * The interactions with memory are the same
+     * as of a write to an ordinary variable, such as an array element or a
+     * non-volatile, non-final field.
+     * <p>
+     * In particular, unrelated threads may fail to see the updated target
+     * until they perform a read from memory.
+     * Stronger guarantees can be created by putting appropriate operations
+     * into the bootstrap method and/or the target methods used
+     * at any given call site.
+     *
+     * @param newTarget the new target
+     * @throws NullPointerException if the proposed new target is null
+     * @throws WrongMethodTypeException if the proposed new target
+     *         has a method type that differs from the previous target
+     * @see #getTarget
+     */
+    @Override public void setTarget(MethodHandle newTarget) {
+        checkTargetChange(this.target, newTarget);
+        setTargetNormal(newTarget);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public final MethodHandle dynamicInvoker() {
+        return makeDynamicInvoker();
+    }
+
+    /**
+     * Performs a synchronization operation on each call site in the given array,
+     * forcing all other threads to throw away any cached values previously
+     * loaded from the target of any of the call sites.
+     * <p>
+     * This operation does not reverse any calls that have already started
+     * on an old target value.
+     * (Java supports {@linkplain java.lang.Object#wait() forward time travel} only.)
+     * <p>
+     * The overall effect is to force all future readers of each call site's target
+     * to accept the most recently stored value.
+     * ("Most recently" is reckoned relative to the {@code syncAll} itself.)
+     * Conversely, the {@code syncAll} call may block until all readers have
+     * (somehow) decached all previous versions of each call site's target.
+     * <p>
+     * To avoid race conditions, calls to {@code setTarget} and {@code syncAll}
+     * should generally be performed under some sort of mutual exclusion.
+     * Note that reader threads may observe an updated target as early
+     * as the {@code setTarget} call that install the value
+     * (and before the {@code syncAll} that confirms the value).
+     * On the other hand, reader threads may observe previous versions of
+     * the target until the {@code syncAll} call returns
+     * (and after the {@code setTarget} that attempts to convey the updated version).
+     * <p>
+     * This operation is likely to be expensive and should be used sparingly.
+     * If possible, it should be buffered for batch processing on sets of call sites.
+     * <p>
+     * If {@code sites} contains a null element,
+     * a {@code NullPointerException} will be raised.
+     * In this case, some non-null elements in the array may be
+     * processed before the method returns abnormally.
+     * Which elements these are (if any) is implementation-dependent.
+     *
+     * <h3>Java Memory Model details</h3>
+     * In terms of the Java Memory Model, this operation performs a synchronization
+     * action which is comparable in effect to the writing of a volatile variable
+     * by the current thread, and an eventual volatile read by every other thread
+     * that may access one of the affected call sites.
+     * <p>
+     * The following effects are apparent, for each individual call site {@code S}:
+     * <ul>
+     * <li>A new volatile variable {@code V} is created, and written by the current thread.
+     *     As defined by the JMM, this write is a global synchronization event.
+     * <li>As is normal with thread-local ordering of write events,
+     *     every action already performed by the current thread is
+     *     taken to happen before the volatile write to {@code V}.
+     *     (In some implementations, this means that the current thread
+     *     performs a global release operation.)
+     * <li>Specifically, the write to the current target of {@code S} is
+     *     taken to happen before the volatile write to {@code V}.
+     * <li>The volatile write to {@code V} is placed
+     *     (in an implementation specific manner)
+     *     in the global synchronization order.
+     * <li>Consider an arbitrary thread {@code T} (other than the current thread).
+     *     If {@code T} executes a synchronization action {@code A}
+     *     after the volatile write to {@code V} (in the global synchronization order),
+     *     it is therefore required to see either the current target
+     *     of {@code S}, or a later write to that target,
+     *     if it executes a read on the target of {@code S}.
+     *     (This constraint is called "synchronization-order consistency".)
+     * <li>The JMM specifically allows optimizing compilers to elide
+     *     reads or writes of variables that are known to be useless.
+     *     Such elided reads and writes have no effect on the happens-before
+     *     relation.  Regardless of this fact, the volatile {@code V}
+     *     will not be elided, even though its written value is
+     *     indeterminate and its read value is not used.
+     * </ul>
+     * Because of the last point, the implementation behaves as if a
+     * volatile read of {@code V} were performed by {@code T}
+     * immediately after its action {@code A}.  In the local ordering
+     * of actions in {@code T}, this read happens before any future
+     * read of the target of {@code S}.  It is as if the
+     * implementation arbitrarily picked a read of {@code S}'s target
+     * by {@code T}, and forced a read of {@code V} to precede it,
+     * thereby ensuring communication of the new target value.
+     * <p>
+     * As long as the constraints of the Java Memory Model are obeyed,
+     * implementations may delay the completion of a {@code syncAll}
+     * operation while other threads ({@code T} above) continue to
+     * use previous values of {@code S}'s target.
+     * However, implementations are (as always) encouraged to avoid
+     * livelock, and to eventually require all threads to take account
+     * of the updated target.
+     *
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * For performance reasons, {@code syncAll} is not a virtual method
+     * on a single call site, but rather applies to a set of call sites.
+     * Some implementations may incur a large fixed overhead cost
+     * for processing one or more synchronization operations,
+     * but a small incremental cost for each additional call site.
+     * In any case, this operation is likely to be costly, since
+     * other threads may have to be somehow interrupted
+     * in order to make them notice the updated target value.
+     * However, it may be observed that a single call to synchronize
+     * several sites has the same formal effect as many calls,
+     * each on just one of the sites.
+     *
+     * <p style="font-size:smaller;">
+     * <em>Implementation Note:</em>
+     * Simple implementations of {@code MutableCallSite} may use
+     * a volatile variable for the target of a mutable call site.
+     * In such an implementation, the {@code syncAll} method can be a no-op,
+     * and yet it will conform to the JMM behavior documented above.
+     *
+     * @param sites an array of call sites to be synchronized
+     * @throws NullPointerException if the {@code sites} array reference is null
+     *                              or the array contains a null
+     */
+    public static void syncAll(MutableCallSite[] sites) {
+        if (sites.length == 0)  return;
+        STORE_BARRIER.lazySet(0);
+        for (int i = 0; i < sites.length; i++) {
+            sites[i].getClass();  // trigger NPE on first null
+        }
+        // FIXME: NYI
+    }
+    private static final AtomicInteger STORE_BARRIER = new AtomicInteger();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/SpreadGeneric.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,678 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import sun.invoke.util.ValueConversions;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Generic spread adapter.
+ * Expands a final argument into multiple (zero or more) arguments, keeping the others the same.
+ * @author jrose
+ */
+class SpreadGeneric {
+    // type for the outgoing call
+    private final MethodType targetType;
+    // number of arguments to spread
+    private final int spreadCount;
+    // prototype adapter (clone and customize for each new target!)
+    private final Adapter adapter;
+    // entry point for adapter (Adapter mh, a...) => ...
+    private final MethodHandle entryPoint;
+
+    /** Compute and cache information common to all spreading adapters
+     *  that accept calls of the given (generic) type.
+     */
+    private SpreadGeneric(MethodType targetType, int spreadCount) {
+        assert(targetType == targetType.generic());
+        this.targetType = targetType;
+        this.spreadCount = spreadCount;
+        // the target invoker will generally need casts on reference arguments
+        MethodHandle[] ep = { null };
+        Adapter ad = findAdapter(this, ep);
+        if (ad != null) {
+            this.adapter = ad;
+            this.entryPoint = ep[0];
+            return;
+        }
+        this.adapter = buildAdapterFromBytecodes(targetType, spreadCount, ep);
+        this.entryPoint = ep[0];
+    }
+
+    /** From targetType remove the last spreadCount arguments, and instead
+     *  append a simple Object argument.
+     */
+    static MethodType preSpreadType(MethodType targetType, int spreadCount) {
+        @SuppressWarnings("unchecked")
+        ArrayList<Class<?>> params = new ArrayList(targetType.parameterList());
+        int outargs = params.size();
+        params.subList(outargs - spreadCount, outargs).clear();
+        params.add(Object.class);
+        return MethodType.methodType(targetType.returnType(), params);
+    }
+
+    MethodHandle makeInstance(MethodHandle target) {
+        MethodType type = target.type();
+        if (type != targetType) {
+            throw new UnsupportedOperationException("NYI type="+type);
+        }
+        return adapter.makeInstance(this, target);
+    }
+
+    /** Build an adapter of the given generic type, which invokes typedTarget
+     *  on the incoming arguments, after unboxing as necessary.
+     *  The return value is boxed if necessary.
+     * @param genericType  the required type of the result
+     * @param typedTarget the target
+     * @return an adapter method handle
+     */
+    public static MethodHandle make(MethodHandle target, int spreadCount) {
+        MethodType type = target.type();
+        MethodType gtype = type.generic();
+        if (type == gtype) {
+            return SpreadGeneric.of(type, spreadCount).makeInstance(target);
+        } else {
+            MethodHandle gtarget = FromGeneric.make(target);
+            assert(gtarget.type() == gtype);
+            MethodHandle gspread = SpreadGeneric.of(gtype, spreadCount).makeInstance(gtarget);
+            return ToGeneric.make(preSpreadType(type, spreadCount), gspread);
+        }
+    }
+
+    /** Return the adapter information for this type's erasure. */
+    static SpreadGeneric of(MethodType targetType, int spreadCount) {
+        if (targetType != targetType.generic())
+            throw new UnsupportedOperationException("NYI type="+targetType);
+        MethodTypeForm form = targetType.form();
+        int outcount = form.parameterCount();
+        assert(spreadCount <= outcount);
+        SpreadGeneric[] spreadGens = form.spreadGeneric;
+        if (spreadGens == null)
+            form.spreadGeneric = spreadGens = new SpreadGeneric[outcount+1];
+        SpreadGeneric spreadGen = spreadGens[spreadCount];
+        if (spreadGen == null)
+            spreadGens[spreadCount] = spreadGen = new SpreadGeneric(form.erasedType(), spreadCount);
+        return spreadGen;
+    }
+
+    public String toString() {
+        return getClass().getSimpleName()+targetType+"["+spreadCount+"]";
+    }
+
+    // This mini-api is called from an Adapter to manage the spread.
+    /** A check/coercion that happens once before any selections. */
+    protected Object check(Object av, int n) {
+        checkSpreadArgument(av, n);
+        return av;
+    }
+
+    /** The selection operator for spreading; note that it takes Object not Object[]. */
+    protected Object select(Object av, int n) {
+        return ((Object[])av)[n];
+    }
+    /*
+    protected int select_I(Object av, int n) {
+        // maybe return ((int[])select)[n]
+        throw new UnsupportedOperationException("subclass resp.");
+    }
+    protected int select_J(Object av, int n) {
+        // maybe return ((long[])select)[n]
+        throw new UnsupportedOperationException("subclass resp.");
+    }
+    // */
+
+    /* Create an adapter that handles spreading calls for the given type. */
+    static Adapter findAdapter(SpreadGeneric outer, MethodHandle[] ep) {
+        MethodType targetType = outer.targetType;
+        int spreadCount = outer.spreadCount;
+        int outargs = targetType.parameterCount();
+        int inargs = outargs - spreadCount;
+        if (inargs < 0)  return null;
+        MethodType entryType = MethodType.genericMethodType(inargs + 1); // 1 for av
+        String cname1 = "S" + outargs;
+        String[] cnames = { cname1 };
+        String iname = "invoke_S"+spreadCount;
+        // e.g., D5I2, D5, L5I2, L5; invoke_D5
+        for (String cname : cnames) {
+            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
+            if (acls == null)  continue;
+            // see if it has the required invoke method
+            MethodHandle entryPoint = null;
+            try {
+                entryPoint = IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
+            } catch (ReflectiveOperationException ex) {
+            }
+            if (entryPoint == null)  continue;
+            Constructor<? extends Adapter> ctor = null;
+            try {
+                ctor = acls.getDeclaredConstructor(SpreadGeneric.class);
+            } catch (NoSuchMethodException ex) {
+            } catch (SecurityException ex) {
+            }
+            if (ctor == null)  continue;
+            try {
+                // Produce an instance configured as a prototype.
+                Adapter ad = ctor.newInstance(outer);
+                ep[0] = entryPoint;
+                return ad;
+            } catch (IllegalArgumentException ex) {
+            } catch (InvocationTargetException wex) {
+                Throwable ex = wex.getTargetException();
+                if (ex instanceof Error)  throw (Error)ex;
+                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
+            } catch (InstantiationException ex) {
+            } catch (IllegalAccessException ex) {
+            }
+        }
+        return null;
+    }
+
+    static Adapter buildAdapterFromBytecodes(MethodType targetType,
+            int spreadCount, MethodHandle[] ep) {
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    /**
+     * This adapter takes some untyped arguments, and returns an untyped result.
+     * Internally, it applies the invoker to the target, which causes the
+     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
+     * This result is passed to convert, which is responsible for
+     * converting the raw result into a boxed object.
+     * The invoker is kept separate from the target because it can be
+     * generated once per type erasure family, and reused across adapters.
+     */
+    static abstract class Adapter extends BoundMethodHandle {
+        /*
+         * class X<<R,int M,int N>> extends Adapter {
+         *   (Object**N)=>R target;
+         *   static int S = N-M;
+         *   Object invoke(Object**M a, Object v) = target(a..., v[0]...v[S-1]);
+         * }
+         */
+        protected final SpreadGeneric outer;
+        protected final MethodHandle target;   // (any**N) => R
+
+        @Override
+        public String toString() {
+            return addTypeString(target, this);
+        }
+
+        static final MethodHandle NO_ENTRY = ValueConversions.identity();
+
+        protected boolean isPrototype() { return target == null; }
+        protected Adapter(SpreadGeneric outer) {
+            super(NO_ENTRY);
+            this.outer = outer;
+            this.target = null;
+            assert(isPrototype());
+        }
+
+        protected Adapter(SpreadGeneric outer, MethodHandle target) {
+            super(outer.entryPoint);
+            this.outer = outer;
+            this.target = target;
+        }
+
+        /** Make a copy of self, with new fields. */
+        protected abstract Adapter makeInstance(SpreadGeneric outer, MethodHandle target);
+        // { return new ThisType(outer, target); }
+
+        protected Object check(Object av, int n) {
+            return outer.check(av, n);
+        }
+        protected Object select(Object av, int n) {
+            return outer.select(av, n);
+        }
+
+        static private final String CLASS_PREFIX; // "java.lang.invoke.SpreadGeneric$"
+        static {
+            String aname = Adapter.class.getName();
+            String sname = Adapter.class.getSimpleName();
+            if (!aname.endsWith(sname))  throw new InternalError();
+            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
+        }
+        /** Find a sibing class of Adapter. */
+        static Class<? extends Adapter> findSubClass(String name) {
+            String cname = Adapter.CLASS_PREFIX + name;
+            try {
+                return Class.forName(cname).asSubclass(Adapter.class);
+            } catch (ClassNotFoundException ex) {
+                return null;
+            } catch (ClassCastException ex) {
+                return null;
+            }
+        }
+    }
+
+    /* generated classes follow this pattern:
+    static class xS2 extends Adapter {
+        protected xS2(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected xS2(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected xS2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new xS2(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av,0);
+             return target.invokeExact(a0, a1)); }
+        protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av,1);
+             return target.invokeExact(a0,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av,1);
+             return target.invokeExact(
+                super.select(av,0), super.select(av,1)); }
+    }
+    // */
+
+/*
+: SHELL; n=SpreadGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
+//{{{
+import java.util.*;
+class genclasses {
+    static String[][] TEMPLATES = { {
+        "@for@ N=0..10",
+        "    //@each-cat@",
+        "    static class @cat@ extends Adapter {",
+        "        protected @cat@(SpreadGeneric outer) { super(outer); }  // to build prototype",
+        "        protected @cat@(SpreadGeneric outer, MethodHandle t) { super(outer, t); }",
+        "        protected @cat@ makeInstance(SpreadGeneric outer, MethodHandle t) { return new @cat@(outer, t); }",
+        "        protected Object invoke_S0(@Tvav,@Object av) throws Throwable { av = super.check(av, 0);",
+        "            return target.invokeExact(@av@); }",
+        "        //@each-S@",
+        "        protected Object invoke_S@S@(@Tvav,@Object av) throws Throwable { av = super.check(av, @S@);",
+        "            return target.invokeExact(@av,@@sv@); }",
+        "        //@end-S@",
+        "    }",
+    } };
+    static final String NEWLINE_INDENT = "\n                ";
+    enum VAR {
+        cat, N, S, av, av_, Tvav_, sv;
+        public final String pattern = "@"+toString().replace('_','.')+"@";
+        public String binding = toString();
+        static void makeBindings(boolean topLevel, int outargs, int spread) {
+            int inargs = outargs - spread;
+            VAR.cat.binding = "S"+outargs;
+            VAR.N.binding = String.valueOf(outargs); // outgoing arg count
+            VAR.S.binding = String.valueOf(spread);  // spread count
+            String[] av = new String[inargs];
+            String[] Tvav = new String[inargs];
+            for (int i = 0; i < inargs; i++) {
+                av[i] = arg(i);
+                Tvav[i] = param("Object", av[i]);
+            }
+            VAR.av.binding = comma(av);
+            VAR.av_.binding = comma(av, ", ");
+            VAR.Tvav_.binding = comma(Tvav, ", ");
+            String[] sv = new String[spread];
+            for (int i = 0; i < spread; i++) {
+                String spc = "";
+                if (i % 4 == 0) spc = NEWLINE_INDENT;
+                sv[i] = spc+"super.select(av,"+i+")";
+            }
+            VAR.sv.binding = comma(sv);
+        }
+        static String arg(int i) { return "a"+i; }
+        static String param(String t, String a) { return t+" "+a; }
+        static String comma(String[] v) { return comma(v, ""); }
+        static String comma(String[] v, String sep) {
+            if (v.length == 0)  return "";
+            String res = v[0];
+            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
+            return res + sep;
+        }
+        static String transform(String string) {
+            for (VAR var : values())
+                string = string.replaceAll(var.pattern, var.binding);
+            return string;
+        }
+    }
+    static String[] stringsIn(String[] strings, int beg, int end) {
+        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
+    }
+    static String[] stringsBefore(String[] strings, int pos) {
+        return stringsIn(strings, 0, pos);
+    }
+    static String[] stringsAfter(String[] strings, int pos) {
+        return stringsIn(strings, pos, strings.length);
+    }
+    static int indexAfter(String[] strings, int pos, String tag) {
+        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
+    }
+    static int indexBefore(String[] strings, int pos, String tag) {
+        for (int i = pos, end = strings.length; ; i++) {
+            if (i == end || strings[i].endsWith(tag))  return i;
+        }
+    }
+    static int MIN_ARITY, MAX_ARITY;
+    public static void main(String... av) {
+        for (String[] template : TEMPLATES) {
+            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
+            String[] forLines = stringsBefore(template, forLinesLimit);
+            template = stringsAfter(template, forLinesLimit);
+            for (String forLine : forLines)
+                expandTemplate(forLine, template);
+        }
+    }
+    static void expandTemplate(String forLine, String[] template) {
+        String[] params = forLine.split("[^0-9]+");
+        if (params[0].length() == 0)  params = stringsAfter(params, 1);
+        System.out.println("//params="+Arrays.asList(params));
+        int pcur = 0;
+        MIN_ARITY = Integer.valueOf(params[pcur++]);
+        MAX_ARITY = Integer.valueOf(params[pcur++]);
+        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
+        for (int outargs = MIN_ARITY; outargs <= MAX_ARITY; outargs++) {
+            expandTemplate(template, true, outargs, 0);
+        }
+    }
+    static void expandTemplate(String[] template, boolean topLevel, int outargs, int spread) {
+        VAR.makeBindings(topLevel, outargs, spread);
+        for (int i = 0; i < template.length; i++) {
+            String line = template[i];
+            if (line.endsWith("@each-cat@")) {
+                // ignore
+            } else if (line.endsWith("@each-S@")) {
+                int blockEnd = indexAfter(template, i, "@end-S@");
+                String[] block = stringsIn(template, i+1, blockEnd-1);
+                for (int spread1 = spread+1; spread1 <= outargs; spread1++)
+                    expandTemplate(block, false, outargs, spread1);
+                VAR.makeBindings(topLevel, outargs, spread);
+                i = blockEnd-1; continue;
+            } else {
+                System.out.println(VAR.transform(line));
+            }
+        }
+    }
+}
+//}}} */
+//params=[0, 10]
+    static class S0 extends Adapter {
+        protected S0(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S0(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S0 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S0(outer, t); }
+        protected Object invoke_S0(Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(); }
+    }
+    static class S1 extends Adapter {
+        protected S1(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S1(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S1 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S1(outer, t); }
+        protected Object invoke_S0(Object a0, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0); }
+        protected Object invoke_S1(Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(
+                super.select(av,0)); }
+    }
+    static class S2 extends Adapter {
+        protected S2(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S2(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S2(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1); }
+        protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1)); }
+    }
+    static class S3 extends Adapter {
+        protected S3(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S3(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S3 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S3(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2); }
+        protected Object invoke_S1(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+    }
+    static class S4 extends Adapter {
+        protected S4(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S4(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S4 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S4(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+    }
+    static class S5 extends Adapter {
+        protected S5(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S5(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S5 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S5(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3, a4); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2, a3,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object a0, Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+        protected Object invoke_S5(Object av) throws Throwable { av = super.check(av, 5);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4)); }
+    }
+    static class S6 extends Adapter {
+        protected S6(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S6(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S6 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S6(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2, a3, a4,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1, a2, a3,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+        protected Object invoke_S5(Object a0, Object av) throws Throwable { av = super.check(av, 5);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4)); }
+        protected Object invoke_S6(Object av) throws Throwable { av = super.check(av, 6);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5)); }
+    }
+    static class S7 extends Adapter {
+        protected S7(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S7(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S7 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S7(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1, a2, a3, a4,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0, a1, a2, a3,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+        protected Object invoke_S5(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 5);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4)); }
+        protected Object invoke_S6(Object a0, Object av) throws Throwable { av = super.check(av, 6);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5)); }
+        protected Object invoke_S7(Object av) throws Throwable { av = super.check(av, 7);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6)); }
+    }
+    static class S8 extends Adapter {
+        protected S8(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S8(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S8 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S8(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0, a1, a2, a3, a4,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(a0, a1, a2, a3,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+        protected Object invoke_S5(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 5);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4)); }
+        protected Object invoke_S6(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 6);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5)); }
+        protected Object invoke_S7(Object a0, Object av) throws Throwable { av = super.check(av, 7);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6)); }
+        protected Object invoke_S8(Object av) throws Throwable { av = super.check(av, 8);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
+    }
+    static class S9 extends Adapter {
+        protected S9(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S9(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S9 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S9(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(a0, a1, a2, a3, a4,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+        protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 5);
+            return target.invokeExact(a0, a1, a2, a3,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4)); }
+        protected Object invoke_S6(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 6);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5)); }
+        protected Object invoke_S7(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 7);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6)); }
+        protected Object invoke_S8(Object a0, Object av) throws Throwable { av = super.check(av, 8);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
+        protected Object invoke_S9(Object av) throws Throwable { av = super.check(av, 9);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
+                super.select(av,8)); }
+    }
+    static class S10 extends Adapter {
+        protected S10(SpreadGeneric outer) { super(outer); }  // to build prototype
+        protected S10(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
+        protected S10 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S10(outer, t); }
+        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9, Object av) throws Throwable { av = super.check(av, 0);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 1);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8,
+                super.select(av,0)); }
+        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 2);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7,
+                super.select(av,0), super.select(av,1)); }
+        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 3);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6,
+                super.select(av,0), super.select(av,1), super.select(av,2)); }
+        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 4);
+            return target.invokeExact(a0, a1, a2, a3, a4, a5,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
+        protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 5);
+            return target.invokeExact(a0, a1, a2, a3, a4,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4)); }
+        protected Object invoke_S6(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 6);
+            return target.invokeExact(a0, a1, a2, a3,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5)); }
+        protected Object invoke_S7(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 7);
+            return target.invokeExact(a0, a1, a2,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6)); }
+        protected Object invoke_S8(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 8);
+            return target.invokeExact(a0, a1,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
+        protected Object invoke_S9(Object a0, Object av) throws Throwable { av = super.check(av, 9);
+            return target.invokeExact(a0,
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
+                super.select(av,8)); }
+        protected Object invoke_S10(Object av) throws Throwable { av = super.check(av, 10);
+            return target.invokeExact(
+                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
+                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
+                super.select(av,8), super.select(av,9)); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/SwitchPoint.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2010, 2011, 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 java.lang.invoke;
+
+/**
+ * <p>
+ * A {@code SwitchPoint} is an object which can publish state transitions to other threads.
+ * A switch point is initially in the <em>valid</em> state, but may at any time be
+ * changed to the <em>invalid</em> state.  Invalidation cannot be reversed.
+ * A switch point can combine a <em>guarded pair</em> of method handles into a
+ * <em>guarded delegator</em>.
+ * The guarded delegator is a method handle which delegates to one of the old method handles.
+ * The state of the switch point determines which of the two gets the delegation.
+ * <p>
+ * A single switch point may be used to control any number of method handles.
+ * (Indirectly, therefore, it can control any number of call sites.)
+ * This is done by using the single switch point as a factory for combining
+ * any number of guarded method handle pairs into guarded delegators.
+ * <p>
+ * When a guarded delegator is created from a guarded pair, the pair
+ * is wrapped in a new method handle {@code M},
+ * which is permanently associated with the switch point that created it.
+ * Each pair consists of a target {@code T} and a fallback {@code F}.
+ * While the switch point is valid, invocations to {@code M} are delegated to {@code T}.
+ * After it is invalidated, invocations are delegated to {@code F}.
+ * <p>
+ * Invalidation is global and immediate, as if the switch point contained a
+ * volatile boolean variable consulted on every call to {@code M}.
+ * The invalidation is also permanent, which means the switch point
+ * can change state only once.
+ * The switch point will always delegate to {@code F} after being invalidated.
+ * At that point {@code guardWithTest} may ignore {@code T} and return {@code F}.
+ * <p>
+ * Here is an example of a switch point in action:
+ * <blockquote><pre>
+MethodType MT_str2 = MethodType.methodType(String.class, String.class);
+MethodHandle MH_strcat = MethodHandles.lookup()
+    .findVirtual(String.class, "concat", MT_str2);
+SwitchPoint spt = new SwitchPoint();
+// the following steps may be repeated to re-use the same switch point:
+MethodHandle worker1 = strcat;
+MethodHandle worker2 = MethodHandles.permuteArguments(strcat, MT_str2, 1, 0);
+MethodHandle worker = spt.guardWithTest(worker1, worker2);
+assertEquals("method", (String) worker.invokeExact("met", "hod"));
+SwitchPoint.invalidateAll(new SwitchPoint[]{ spt });
+assertEquals("hodmet", (String) worker.invokeExact("met", "hod"));
+ * </pre></blockquote>
+ * <p style="font-size:smaller;">
+ * <em>Discussion:</em>
+ * Switch points are useful without subclassing.  They may also be subclassed.
+ * This may be useful in order to associate application-specific invalidation logic
+ * with the switch point.
+ * Notice that there is no permanent association between a switch point and
+ * the method handles it produces and consumes.
+ * The garbage collector may collect method handles produced or consumed
+ * by a switch point independently of the lifetime of the switch point itself.
+ * <p style="font-size:smaller;">
+ * <em>Implementation Note:</em>
+ * A switch point behaves as if implemented on top of {@link MutableCallSite},
+ * approximately as follows:
+ * <blockquote><pre>
+public class SwitchPoint {
+  private static final MethodHandle
+    K_true  = MethodHandles.constant(boolean.class, true),
+    K_false = MethodHandles.constant(boolean.class, false);
+  private final MutableCallSite mcs;
+  private final MethodHandle mcsInvoker;
+  public SwitchPoint() {
+    this.mcs = new MutableCallSite(K_true);
+    this.mcsInvoker = mcs.dynamicInvoker();
+  }
+  public MethodHandle guardWithTest(
+                MethodHandle target, MethodHandle fallback) {
+    // Note:  mcsInvoker is of type ()boolean.
+    // Target and fallback may take any arguments, but must have the same type.
+    return MethodHandles.guardWithTest(this.mcsInvoker, target, fallback);
+  }
+  public static void invalidateAll(SwitchPoint[] spts) {
+    List&lt;MutableCallSite&gt; mcss = new ArrayList&lt;&gt;();
+    for (SwitchPoint spt : spts)  mcss.add(spt.mcs);
+    for (MutableCallSite mcs : mcss)  mcs.setTarget(K_false);
+    MutableCallSite.syncAll(mcss.toArray(new MutableCallSite[0]));
+  }
+}
+ * </pre></blockquote>
+ * @author Remi Forax, JSR 292 EG
+ */
+public class SwitchPoint {
+    private static final MethodHandle
+        K_true  = MethodHandles.constant(boolean.class, true),
+        K_false = MethodHandles.constant(boolean.class, false);
+
+    private final MutableCallSite mcs;
+    private final MethodHandle mcsInvoker;
+
+    /**
+     * Creates a new switch point.
+     */
+    public SwitchPoint() {
+        this.mcs = new MutableCallSite(K_true);
+        this.mcsInvoker = mcs.dynamicInvoker();
+    }
+
+    /**
+     * Returns a method handle which always delegates either to the target or the fallback.
+     * The method handle will delegate to the target exactly as long as the switch point is valid.
+     * After that, it will permanently delegate to the fallback.
+     * <p>
+     * The target and fallback must be of exactly the same method type,
+     * and the resulting combined method handle will also be of this type.
+     *
+     * @param target the method handle selected by the switch point as long as it is valid
+     * @param fallback the method handle selected by the switch point after it is invalidated
+     * @return a combined method handle which always calls either the target or fallback
+     * @throws NullPointerException if either argument is null
+     * @see MethodHandles#guardWithTest
+     */
+    public MethodHandle guardWithTest(MethodHandle target, MethodHandle fallback) {
+        if (mcs.getTarget() == K_false)
+            return fallback;  // already invalid
+        return MethodHandles.guardWithTest(mcsInvoker, target, fallback);
+    }
+
+    /**
+     * Sets all of the given switch points into the invalid state.
+     * After this call executes, no thread will observe any of the
+     * switch points to be in a valid state.
+     * <p>
+     * This operation is likely to be expensive and should be used sparingly.
+     * If possible, it should be buffered for batch processing on sets of switch points.
+     * <p>
+     * If {@code switchPoints} contains a null element,
+     * a {@code NullPointerException} will be raised.
+     * In this case, some non-null elements in the array may be
+     * processed before the method returns abnormally.
+     * Which elements these are (if any) is implementation-dependent.
+     *
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * For performance reasons, {@code invalidateAll} is not a virtual method
+     * on a single switch point, but rather applies to a set of switch points.
+     * Some implementations may incur a large fixed overhead cost
+     * for processing one or more invalidation operations,
+     * but a small incremental cost for each additional invalidation.
+     * In any case, this operation is likely to be costly, since
+     * other threads may have to be somehow interrupted
+     * in order to make them notice the updated switch point state.
+     * However, it may be observed that a single call to invalidate
+     * several switch points has the same formal effect as many calls,
+     * each on just one of the switch points.
+     *
+     * <p style="font-size:smaller;">
+     * <em>Implementation Note:</em>
+     * Simple implementations of {@code SwitchPoint} may use
+     * a private {@link MutableCallSite} to publish the state of a switch point.
+     * In such an implementation, the {@code invalidateAll} method can
+     * simply change the call site's target, and issue one call to
+     * {@linkplain MutableCallSite#syncAll synchronize} all the
+     * private call sites.
+     *
+     * @param switchPoints an array of call sites to be synchronized
+     * @throws NullPointerException if the {@code switchPoints} array reference is null
+     *                              or the array contains a null
+     */
+    public static void invalidateAll(SwitchPoint[] switchPoints) {
+        if (switchPoints.length == 0)  return;
+        MutableCallSite[] sites = new MutableCallSite[switchPoints.length];
+        for (int i = 0; i < switchPoints.length; i++) {
+            SwitchPoint spt = switchPoints[i];
+            if (spt == null)  break;  // MSC.syncAll will trigger a NPE
+            sites[i] = spt.mcs;
+            spt.mcs.setTarget(K_false);
+        }
+        MutableCallSite.syncAll(sites);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/ToGeneric.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,1062 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import sun.invoke.util.ValueConversions;
+import sun.invoke.util.Wrapper;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+
+/**
+ * Adapters which mediate between incoming calls which are not generic
+ * and outgoing calls which are.  Any call can be represented generically
+ * boxing up its arguments, and (on return) unboxing the return value.
+ * <p>
+ * A call is "generic" (in MethodHandle terms) if its MethodType features
+ * only Object arguments.  A non-generic call therefore features
+ * primitives and/or reference types other than Object.
+ * An adapter has types for its incoming and outgoing calls.
+ * The incoming call type is simply determined by the adapter's type
+ * (the MethodType it presents to callers).  The outgoing call type
+ * is determined by the adapter's target (a MethodHandle that the adapter
+ * either binds internally or else takes as a leading argument).
+ * (To stretch the term, adapter-like method handles may have multiple
+ * targets or be polymorphic across multiple call types.)
+ * @author jrose
+ */
+class ToGeneric {
+    // type for the incoming call (may be erased)
+    private final MethodType entryType;
+    // incoming type with primitives moved to the end and turned to int/long
+    private final MethodType rawEntryType;
+    // adapter for the erased type
+    private final Adapter adapter;
+    // entry point for adapter (Adapter mh, a...) => ...
+    private final MethodHandle entryPoint;
+    // permutation of arguments for primsAtEndType
+    private final int[] primsAtEndOrder;
+    // optional final argument list conversions (at least, invokes the target)
+    private final MethodHandle invoker;
+    // conversion which unboxes a primitive return value
+    private final MethodHandle returnConversion;
+
+    /** Compute and cache information common to all generifying (boxing) adapters
+     *  that implement members of the erasure-family of the given erased type.
+     */
+    private ToGeneric(MethodType entryType) {
+        assert(entryType.erase() == entryType); // for now
+        // incoming call will first "forget" all reference types except Object
+        this.entryType = entryType;
+        MethodHandle invoker0 = entryType.generic().invokers().exactInvoker();
+        MethodType rawEntryTypeInit;
+        Adapter ad = findAdapter(rawEntryTypeInit = entryType);
+        if (ad != null) {
+            // Immediate hit to exactly the adapter we want,
+            // with no monkeying around with primitive types.
+            this.returnConversion = computeReturnConversion(entryType, rawEntryTypeInit, false);
+            this.rawEntryType = rawEntryTypeInit;
+            this.adapter = ad;
+            this.entryPoint = ad.prototypeEntryPoint();
+            this.primsAtEndOrder = null;
+            this.invoker = invoker0;
+            return;
+        }
+
+        // next, it will reorder primitives after references
+        MethodType primsAtEnd = entryType.form().primsAtEnd();
+        // at the same time, it will "forget" all primitive types except int/long
+        this.primsAtEndOrder = MethodTypeForm.primsAtEndOrder(entryType);
+        if (primsAtEndOrder != null) {
+            // reordering is required; build on top of a simpler ToGeneric
+            ToGeneric va2 = ToGeneric.of(primsAtEnd);
+            this.adapter = va2.adapter;
+            if (true) throw new UnsupportedOperationException("NYI: primitive parameters must follow references; entryType = "+entryType);
+            this.entryPoint = MethodHandleImpl.convertArguments(
+                    va2.entryPoint, primsAtEnd, entryType, primsAtEndOrder);
+            // example: for entryType of (int,Object,Object), the reordered
+            // type is (Object,Object,int) and the order is {1,2,0},
+            // and putPAE is (mh,int0,obj1,obj2) => mh.invokeExact(obj1,obj2,int0)
+            return;
+        }
+
+        // after any needed argument reordering, it will reinterpret
+        // primitive arguments according to their "raw" types int/long
+        MethodType intsAtEnd = primsAtEnd.form().primsAsInts();
+        ad = findAdapter(rawEntryTypeInit = intsAtEnd);
+        MethodHandle rawEntryPoint;
+        if (ad != null) {
+            rawEntryPoint = ad.prototypeEntryPoint();
+        } else {
+            // Perhaps the adapter is available only for longs.
+            // If so, we can use it, but there will have to be a little
+            // more stack motion on each call.
+            MethodType longsAtEnd = primsAtEnd.form().primsAsLongs();
+            ad = findAdapter(rawEntryTypeInit = longsAtEnd);
+            if (ad != null) {
+                MethodType eptWithLongs = longsAtEnd.insertParameterTypes(0, ad.getClass());
+                MethodType eptWithInts  =  intsAtEnd.insertParameterTypes(0, ad.getClass());
+                rawEntryPoint = ad.prototypeEntryPoint();
+                MethodType midType = eptWithLongs;  // will change longs to ints
+                for (int i = 0, nargs = midType.parameterCount(); i < nargs; i++) {
+                    if (midType.parameterType(i) != eptWithInts.parameterType(i)) {
+                        assert(midType.parameterType(i) == long.class);
+                        assert(eptWithInts.parameterType(i) == int.class);
+                        MethodType nextType = midType.changeParameterType(i, int.class);
+                        rawEntryPoint = MethodHandleImpl.convertArguments(
+                                rawEntryPoint, nextType, midType, null);
+                        midType = nextType;
+                    }
+                }
+                assert(midType == eptWithInts);
+            } else {
+                // If there is no statically compiled adapter,
+                // build one by means of dynamic bytecode generation.
+                ad = buildAdapterFromBytecodes(rawEntryTypeInit = intsAtEnd);
+                rawEntryPoint = ad.prototypeEntryPoint();
+            }
+        }
+        MethodType tepType = entryType.insertParameterTypes(0, ad.getClass());
+        this.entryPoint =
+            AdapterMethodHandle.makeRetypeRaw(tepType, rawEntryPoint);
+        if (this.entryPoint == null)
+            throw new UnsupportedOperationException("cannot retype to "+entryType
+                    +" from "+rawEntryPoint.type().dropParameterTypes(0, 1));
+        this.returnConversion = computeReturnConversion(entryType, rawEntryTypeInit, false);
+        this.rawEntryType = rawEntryTypeInit;
+        this.adapter = ad;
+        this.invoker = makeRawArgumentFilter(invoker0, rawEntryTypeInit, entryType);
+    }
+
+    /** A generic argument list will be created by a call of type 'raw'.
+     *  The values need to be reboxed for to match 'cooked'.
+     *  Do this on the fly.
+     */
+    // TO DO: Use a generic argument converter in a different file
+    static MethodHandle makeRawArgumentFilter(MethodHandle invoker,
+            MethodType raw, MethodType cooked) {
+        MethodHandle filteredInvoker = null;
+        for (int i = 0, nargs = raw.parameterCount(); i < nargs; i++) {
+            Class<?> src = raw.parameterType(i);
+            Class<?> dst = cooked.parameterType(i);
+            if (src == dst)  continue;
+            assert(src.isPrimitive() && dst.isPrimitive());
+            if (filteredInvoker == null) {
+                filteredInvoker =
+                        AdapterMethodHandle.makeCheckCast(
+                            invoker.type().generic(), invoker, 0, MethodHandle.class);
+                if (filteredInvoker == null)  throw new UnsupportedOperationException("NYI");
+            }
+            MethodHandle reboxer = ValueConversions.rebox(dst, false);
+            filteredInvoker = FilterGeneric.makeArgumentFilter(1+i, reboxer, filteredInvoker);
+            if (filteredInvoker == null)  throw new InternalError();
+        }
+        if (filteredInvoker == null)  return invoker;
+        return AdapterMethodHandle.makeRetypeOnly(invoker.type(), filteredInvoker);
+    }
+
+    /**
+     * Caller will be expecting a result from a call to {@code type},
+     * while the internal adapter entry point is rawEntryType.
+     * Also, the internal target method will be returning a boxed value,
+     * as an untyped object.
+     * <p>
+     * Produce a value converter which will be typed to convert from
+     * {@code Object} to the return value of {@code rawEntryType}, and will
+     * in fact ensure that the value is compatible with the return type of
+     * {@code type}.
+     */
+    private static MethodHandle computeReturnConversion(
+            MethodType type, MethodType rawEntryType, boolean mustCast) {
+        Class<?> tret = type.returnType();
+        Class<?> rret = rawEntryType.returnType();
+        if (mustCast || !tret.isPrimitive()) {
+            assert(!tret.isPrimitive());
+            assert(!rret.isPrimitive());
+            if (rret == Object.class && !mustCast)
+                return null;
+            return ValueConversions.cast(tret, false);
+        } else if (tret == rret) {
+            return ValueConversions.unbox(tret, false);
+        } else {
+            assert(rret.isPrimitive());
+            assert(tret == double.class ? rret == long.class : rret == int.class);
+            return ValueConversions.unboxRaw(tret, false);
+        }
+    }
+
+    Adapter makeInstance(MethodType type, MethodHandle genericTarget) {
+        genericTarget.getClass();  // check for NPE
+        MethodHandle convert = returnConversion;
+        if (primsAtEndOrder != null)
+            // reorder arguments passed to genericTarget, if primsAtEndOrder
+            throw new UnsupportedOperationException("NYI");
+        if (type == entryType) {
+            if (convert == null)  convert = ValueConversions.identity();
+            return adapter.makeInstance(entryPoint, invoker, convert, genericTarget);
+        }
+        // my erased-type is not exactly the same as the desired type
+        assert(type.erase() == entryType);  // else we are busted
+        if (convert == null)
+            convert = computeReturnConversion(type, rawEntryType, true);
+        // retype erased reference arguments (the cast makes it safe to do this)
+        MethodType tepType = type.insertParameterTypes(0, adapter.getClass());
+        MethodHandle typedEntryPoint =
+            AdapterMethodHandle.makeRetypeRaw(tepType, entryPoint);
+        return adapter.makeInstance(typedEntryPoint, invoker, convert, genericTarget);
+    }
+
+    /** Build an adapter of the given type, which invokes genericTarget
+     *  on the incoming arguments, after boxing as necessary.
+     *  The return value is unboxed if necessary.
+     * @param type  the required type of the
+     * @param genericTarget the target, which must accept and return only Object values
+     * @return an adapter method handle
+     */
+    public static MethodHandle make(MethodType type, MethodHandle genericTarget) {
+        MethodType gtype = genericTarget.type();
+        if (type.generic() != gtype)
+            throw newIllegalArgumentException("type must be generic");
+        if (type == gtype)  return genericTarget;
+        return ToGeneric.of(type).makeInstance(type, genericTarget);
+    }
+
+    /** Return the adapter information for this type's erasure. */
+    static ToGeneric of(MethodType type) {
+        MethodTypeForm form = type.form();
+        ToGeneric toGen = form.toGeneric;
+        if (toGen == null)
+            form.toGeneric = toGen = new ToGeneric(form.erasedType());
+        return toGen;
+    }
+
+    public String toString() {
+        return "ToGeneric"+entryType
+                +(primsAtEndOrder!=null?"[reorder]":"");
+    }
+
+    /* Create an adapter for the given incoming call type. */
+    static Adapter findAdapter(MethodType entryPointType) {
+        MethodTypeForm form = entryPointType.form();
+        Class<?> rtype = entryPointType.returnType();
+        int argc = form.parameterCount();
+        int lac = form.longPrimitiveParameterCount();
+        int iac = form.primitiveParameterCount() - lac;
+        String intsAndLongs = (iac > 0 ? "I"+iac : "")+(lac > 0 ? "J"+lac : "");
+        String rawReturn = String.valueOf(Wrapper.forPrimitiveType(rtype).basicTypeChar());
+        String iname0 = "invoke_"+rawReturn;
+        String iname1 = "invoke";
+        String[] inames = { iname0, iname1 };
+        String cname0 = rawReturn + argc;
+        String cname1 = "A"       + argc;
+        String[] cnames = { cname1, cname1+intsAndLongs, cname0, cname0+intsAndLongs };
+        // e.g., D5I2, D5, L5I2, L5
+        for (String cname : cnames) {
+            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
+            if (acls == null)  continue;
+            // see if it has the required invoke method
+            for (String iname : inames) {
+                MethodHandle entryPoint = null;
+                try {
+                    entryPoint = IMPL_LOOKUP.
+                                    findSpecial(acls, iname, entryPointType, acls);
+                } catch (ReflectiveOperationException ex) {
+                }
+                if (entryPoint == null)  continue;
+                Constructor<? extends Adapter> ctor = null;
+                try {
+                    // Prototype builder:
+                    ctor = acls.getDeclaredConstructor(MethodHandle.class);
+                } catch (NoSuchMethodException ex) {
+                } catch (SecurityException ex) {
+                }
+                if (ctor == null)  continue;
+                try {
+                    return ctor.newInstance(entryPoint);
+                } catch (IllegalArgumentException ex) {
+                } catch (InvocationTargetException wex) {
+                    Throwable ex = wex.getTargetException();
+                    if (ex instanceof Error)  throw (Error)ex;
+                    if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
+                } catch (InstantiationException ex) {
+                } catch (IllegalAccessException ex) {
+                }
+            }
+        }
+        return null;
+    }
+
+    static Adapter buildAdapterFromBytecodes(MethodType entryPointType) {
+        throw new UnsupportedOperationException("NYI");
+    }
+
+    /**
+     * The invoke method takes some particular but unconstrained spread
+     * of raw argument types, and returns a raw return type (in L/I/J/F/D).
+     * Internally, it converts the incoming arguments uniformly into objects.
+     * This series of objects is then passed to the {@code target} method,
+     * which returns a result object.  This result is finally converted,
+     * via another method handle {@code convert}, which is responsible for
+     * converting the object result into the raw return value.
+     */
+    static abstract class Adapter extends BoundMethodHandle {
+        /*
+         * class X<<R,A...>> extends Adapter {
+         *   Object...=>Object target;
+         *   Object=>R convert;
+         *   R invoke(A... a...) = convert(invoker(target, a...)))
+         * }
+         */
+        protected final MethodHandle invoker;  // (MH, Object...) -> Object
+        protected final MethodHandle target;   // Object... -> Object
+        protected final MethodHandle convert;  // Object -> R
+
+        @Override
+        public String toString() {
+            return target == null ? "prototype:"+convert : addTypeString(target, this);
+        }
+
+        protected boolean isPrototype() { return target == null; }
+        /* Prototype constructor. */
+        protected Adapter(MethodHandle entryPoint) {
+            super(entryPoint);
+            this.invoker = null;
+            this.convert = entryPoint;
+            this.target = null;
+            assert(isPrototype());
+        }
+        protected MethodHandle prototypeEntryPoint() {
+            if (!isPrototype())  throw new InternalError();
+            return convert;
+        }
+
+        protected Adapter(MethodHandle entryPoint, MethodHandle invoker, MethodHandle convert, MethodHandle target) {
+            super(entryPoint);
+            this.invoker = invoker;
+            this.convert = convert;
+            this.target = target;
+        }
+
+        /** Make a copy of self, with new fields. */
+        protected abstract Adapter makeInstance(MethodHandle entryPoint,
+                MethodHandle invoker, MethodHandle convert, MethodHandle target);
+        // { return new ThisType(entryPoint, convert, target); }
+
+        // Code to run when the arguments (<= 4) have all been boxed.
+        protected Object target()               throws Throwable { return invoker.invokeExact(target); }
+        protected Object target(Object a0)      throws Throwable { return invoker.invokeExact(target, a0); }
+        protected Object target(Object a0, Object a1)
+                                                throws Throwable { return invoker.invokeExact(target, a0, a1); }
+        protected Object target(Object a0, Object a1, Object a2)
+                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3)
+                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3); }
+        /*
+        protected Object target_0(Object... av) throws Throwable { return invoker.invokeExact(target, av); }
+        protected Object target_1(Object a0, Object... av)
+                                                throws Throwable { return invoker.invokeExact(target, a0, (Object)av); }
+        protected Object target_2(Object a0, Object a1, Object... av)
+                                                throws Throwable { return invoker.invokeExact(target, a0, a1, (Object)av); }
+        protected Object target_3(Object a0, Object a1, Object a2, Object... av)
+                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2, (Object)av); }
+        protected Object target_4(Object a0, Object a1, Object a2, Object a3, Object... av)
+                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, (Object)av); }
+        // */
+        // (For more than 4 arguments, generate the code in the adapter itself.)
+
+        // Code to run when the generic target has finished and produced a value.
+        protected Object return_L(Object res) throws Throwable { return (Object)convert.invokeExact(res); }
+        protected int    return_I(Object res) throws Throwable { return (int)   convert.invokeExact(res); }
+        protected long   return_J(Object res) throws Throwable { return (long)  convert.invokeExact(res); }
+        protected float  return_F(Object res) throws Throwable { return (float) convert.invokeExact(res); }
+        protected double return_D(Object res) throws Throwable { return (double)convert.invokeExact(res); }
+
+        static private final String CLASS_PREFIX; // "java.lang.invoke.ToGeneric$"
+        static {
+            String aname = Adapter.class.getName();
+            String sname = Adapter.class.getSimpleName();
+            if (!aname.endsWith(sname))  throw new InternalError();
+            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
+        }
+        /** Find a sibing class of Adapter. */
+        static Class<? extends Adapter> findSubClass(String name) {
+            String cname = Adapter.CLASS_PREFIX + name;
+            try {
+                return Class.forName(cname).asSubclass(Adapter.class);
+            } catch (ClassNotFoundException ex) {
+                return null;
+            } catch (ClassCastException ex) {
+                return null;
+            }
+        }
+    }
+
+    /* generated classes follow this pattern:
+    static class A1 extends Adapter {
+        protected A1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A1(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A1 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A1(e, i, c, t); }
+        protected Object target(Object a0)   throws Throwable { return invoker.invokeExact(target, a0); }
+        protected Object targetA1(Object a0) throws Throwable { return target(a0); }
+        protected Object targetA1(int    a0) throws Throwable { return target(a0); }
+        protected Object targetA1(long   a0) throws Throwable { return target(a0); }
+        protected Object invoke_L(Object a0) throws Throwable { return return_L(targetA1(a0)); }
+        protected int    invoke_I(Object a0) throws Throwable { return return_I(targetA1(a0)); }
+        protected long   invoke_J(Object a0) throws Throwable { return return_J(targetA1(a0)); }
+        protected float  invoke_F(Object a0) throws Throwable { return return_F(targetA1(a0)); }
+        protected double invoke_D(Object a0) throws Throwable { return return_D(targetA1(a0)); }
+        protected Object invoke_L(int    a0) throws Throwable { return return_L(targetA1(a0)); }
+        protected int    invoke_I(int    a0) throws Throwable { return return_I(targetA1(a0)); }
+        protected long   invoke_J(int    a0) throws Throwable { return return_J(targetA1(a0)); }
+        protected float  invoke_F(int    a0) throws Throwable { return return_F(targetA1(a0)); }
+        protected double invoke_D(int    a0) throws Throwable { return return_D(targetA1(a0)); }
+        protected Object invoke_L(long   a0) throws Throwable { return return_L(targetA1(a0)); }
+        protected int    invoke_I(long   a0) throws Throwable { return return_I(targetA1(a0)); }
+        protected long   invoke_J(long   a0) throws Throwable { return return_J(targetA1(a0)); }
+        protected float  invoke_F(long   a0) throws Throwable { return return_F(targetA1(a0)); }
+        protected double invoke_D(long   a0) throws Throwable { return return_D(targetA1(a0)); }
+    }
+    // */
+
+/*
+: SHELL; n=ToGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
+//{{{
+import java.util.*;
+class genclasses {
+    static String[] TYPES = { "Object", "int   ", "long  ", "float ", "double" };
+    static String[] TCHARS = { "L",     "I",      "J",      "F",      "D",     "A" };
+    static String[][] TEMPLATES = { {
+        "@for@ arity=0..3   rcat<=4 nrefs<=99 nints<=99 nlongs<=99",
+        "@for@ arity=4..4   rcat<=4 nrefs<=99 nints<=99 nlongs<=99",
+        "@for@ arity=5..5   rcat<=2 nrefs<=99 nints<=99 nlongs<=99",
+        "@for@ arity=6..10  rcat<=2 nrefs<=99 nints=0   nlongs<=99",
+        "    //@each-cat@",
+        "    static class @cat@ extends Adapter {",
+        "        protected @cat@(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype",
+        "        protected @cat@(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }",
+        "        protected @cat@ makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new @cat@(e, i, c, t); }",
+        "        protected Object target(@Ovav@)   throws Throwable { return invoker.invokeExact(target@comma@@av@); }",
+        "        //@each-Tv@",
+        "        protected Object target@cat@(@Tvav@) throws Throwable { return target(@av@); }",
+        "        //@end-Tv@",
+        "        //@each-Tv@",
+        "        //@each-R@",
+        "        protected @R@ invoke_@Rc@(@Tvav@) throws Throwable { return return_@Rc@(target@cat@(@av@)); }",
+        "        //@end-R@",
+        "        //@end-Tv@",
+        "    }",
+    } };
+    enum VAR {
+        cat, R, Rc, Tv, av, comma, Tvav, Ovav;
+        public final String pattern = "@"+toString().replace('_','.')+"@";
+        public String binding;
+        static void makeBindings(boolean topLevel, int rcat, int nrefs, int nints, int nlongs) {
+            int nargs = nrefs + nints + nlongs;
+            if (topLevel)
+                VAR.cat.binding = catstr(ALL_RETURN_TYPES ? TYPES.length : rcat, nrefs, nints, nlongs);
+            VAR.R.binding = TYPES[rcat];
+            VAR.Rc.binding = TCHARS[rcat];
+            String[] Tv = new String[nargs];
+            String[] av = new String[nargs];
+            String[] Tvav = new String[nargs];
+            String[] Ovav = new String[nargs];
+            for (int i = 0; i < nargs; i++) {
+                int tcat = (i < nrefs) ? 0 : (i < nrefs + nints) ? 1 : 2;
+                Tv[i] = TYPES[tcat];
+                av[i] = arg(i);
+                Tvav[i] = param(Tv[i], av[i]);
+                Ovav[i] = param("Object", av[i]);
+            }
+            VAR.Tv.binding = comma(Tv);
+            VAR.av.binding = comma(av);
+            VAR.comma.binding = (av.length == 0 ? "" : ", ");
+            VAR.Tvav.binding = comma(Tvav);
+            VAR.Ovav.binding = comma(Ovav);
+        }
+        static String arg(int i) { return "a"+i; }
+        static String param(String t, String a) { return t+" "+a; }
+        static String comma(String[] v) { return comma("", v); }
+        static String comma(String sep, String[] v) {
+            if (v.length == 0)  return "";
+            String res = sep+v[0];
+            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
+            return res;
+        }
+        static String transform(String string) {
+            for (VAR var : values())
+                string = string.replaceAll(var.pattern, var.binding);
+            return string;
+        }
+    }
+    static String[] stringsIn(String[] strings, int beg, int end) {
+        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
+    }
+    static String[] stringsBefore(String[] strings, int pos) {
+        return stringsIn(strings, 0, pos);
+    }
+    static String[] stringsAfter(String[] strings, int pos) {
+        return stringsIn(strings, pos, strings.length);
+    }
+    static int indexAfter(String[] strings, int pos, String tag) {
+        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
+    }
+    static int indexBefore(String[] strings, int pos, String tag) {
+        for (int i = pos, end = strings.length; ; i++) {
+            if (i == end || strings[i].endsWith(tag))  return i;
+        }
+    }
+    static int MIN_ARITY, MAX_ARITY, MAX_RCAT, MAX_REFS, MAX_INTS, MAX_LONGS;
+    static boolean ALL_ARG_TYPES, ALL_RETURN_TYPES;
+    static HashSet<String> done = new HashSet<String>();
+    public static void main(String... av) {
+        for (String[] template : TEMPLATES) {
+            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
+            String[] forLines = stringsBefore(template, forLinesLimit);
+            template = stringsAfter(template, forLinesLimit);
+            for (String forLine : forLines)
+                expandTemplate(forLine, template);
+        }
+    }
+    static void expandTemplate(String forLine, String[] template) {
+        String[] params = forLine.split("[^0-9]+");
+        if (params[0].length() == 0)  params = stringsAfter(params, 1);
+        System.out.println("//params="+Arrays.asList(params));
+        int pcur = 0;
+        MIN_ARITY = Integer.valueOf(params[pcur++]);
+        MAX_ARITY = Integer.valueOf(params[pcur++]);
+        MAX_RCAT  = Integer.valueOf(params[pcur++]);
+        MAX_REFS  = Integer.valueOf(params[pcur++]);
+        MAX_INTS  = Integer.valueOf(params[pcur++]);
+        MAX_LONGS = Integer.valueOf(params[pcur++]);
+        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
+        if (MAX_RCAT >= TYPES.length)  MAX_RCAT = TYPES.length - 1;
+        ALL_ARG_TYPES = (indexBefore(template, 0, "@each-Tv@") < template.length);
+        ALL_RETURN_TYPES = (indexBefore(template, 0, "@each-R@") < template.length);
+        for (int nargs = MIN_ARITY; nargs <= MAX_ARITY; nargs++) {
+            for (int rcat = 0; rcat <= MAX_RCAT; rcat++) {
+                expandTemplate(template, true, rcat, nargs, 0, 0);
+                if (ALL_ARG_TYPES)  break;
+                expandTemplateForPrims(template, true, rcat, nargs, 1, 1);
+                if (ALL_RETURN_TYPES)  break;
+            }
+        }
+    }
+    static String catstr(int rcat, int nrefs, int nints, int nlongs) {
+        int nargs = nrefs + nints + nlongs;
+        String cat = TCHARS[rcat] + nargs;
+        if (!ALL_ARG_TYPES)  cat += (nints==0?"":"I"+nints)+(nlongs==0?"":"J"+nlongs);
+        return cat;
+    }
+    static void expandTemplateForPrims(String[] template, boolean topLevel, int rcat, int nargs, int minints, int minlongs) {
+        for (int isLong = 0; isLong <= 1; isLong++) {
+            for (int nprims = 1; nprims <= nargs; nprims++) {
+                int nrefs = nargs - nprims;
+                int nints = ((1-isLong) * nprims);
+                int nlongs = (isLong * nprims);
+                expandTemplate(template, topLevel, rcat, nrefs, nints, nlongs);
+            }
+        }
+    }
+    static void expandTemplate(String[] template, boolean topLevel,
+                               int rcat, int nrefs, int nints, int nlongs) {
+        int nargs = nrefs + nints + nlongs;
+        if (nrefs > MAX_REFS || nints > MAX_INTS || nlongs > MAX_LONGS)  return;
+        VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
+        if (topLevel && !done.add(VAR.cat.binding)) {
+            System.out.println("    //repeat "+VAR.cat.binding);
+            return;
+        }
+        for (int i = 0; i < template.length; i++) {
+            String line = template[i];
+            if (line.endsWith("@each-cat@")) {
+                // ignore
+            } else if (line.endsWith("@each-R@")) {
+                int blockEnd = indexAfter(template, i, "@end-R@");
+                String[] block = stringsIn(template, i+1, blockEnd-1);
+                for (int rcat1 = rcat; rcat1 <= MAX_RCAT; rcat1++)
+                    expandTemplate(block, false, rcat1, nrefs, nints, nlongs);
+                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
+                i = blockEnd-1; continue;
+            } else if (line.endsWith("@each-Tv@")) {
+                int blockEnd = indexAfter(template, i, "@end-Tv@");
+                String[] block = stringsIn(template, i+1, blockEnd-1);
+                expandTemplate(block, false, rcat, nrefs, nints, nlongs);
+                expandTemplateForPrims(block, false, rcat, nargs, nints+1, nlongs+1);
+                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
+                i = blockEnd-1; continue;
+            } else {
+                System.out.println(VAR.transform(line));
+            }
+        }
+    }
+}
+//}}} */
+//params=[0, 3, 4, 99, 99, 99]
+    static class A0 extends Adapter {
+        protected A0(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A0(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A0 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A0(e, i, c, t); }
+        protected Object target()   throws Throwable { return invoker.invokeExact(target); }
+        protected Object targetA0() throws Throwable { return target(); }
+        protected Object invoke_L() throws Throwable { return return_L(targetA0()); }
+        protected int    invoke_I() throws Throwable { return return_I(targetA0()); }
+        protected long   invoke_J() throws Throwable { return return_J(targetA0()); }
+        protected float  invoke_F() throws Throwable { return return_F(targetA0()); }
+        protected double invoke_D() throws Throwable { return return_D(targetA0()); }
+    }
+    static class A1 extends Adapter {
+        protected A1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A1(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A1 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A1(e, i, c, t); }
+        protected Object target(Object a0)   throws Throwable { return invoker.invokeExact(target, a0); }
+        protected Object targetA1(Object a0) throws Throwable { return target(a0); }
+        protected Object targetA1(int    a0) throws Throwable { return target(a0); }
+        protected Object targetA1(long   a0) throws Throwable { return target(a0); }
+        protected Object invoke_L(Object a0) throws Throwable { return return_L(targetA1(a0)); }
+        protected int    invoke_I(Object a0) throws Throwable { return return_I(targetA1(a0)); }
+        protected long   invoke_J(Object a0) throws Throwable { return return_J(targetA1(a0)); }
+        protected float  invoke_F(Object a0) throws Throwable { return return_F(targetA1(a0)); }
+        protected double invoke_D(Object a0) throws Throwable { return return_D(targetA1(a0)); }
+        protected Object invoke_L(int    a0) throws Throwable { return return_L(targetA1(a0)); }
+        protected int    invoke_I(int    a0) throws Throwable { return return_I(targetA1(a0)); }
+        protected long   invoke_J(int    a0) throws Throwable { return return_J(targetA1(a0)); }
+        protected float  invoke_F(int    a0) throws Throwable { return return_F(targetA1(a0)); }
+        protected double invoke_D(int    a0) throws Throwable { return return_D(targetA1(a0)); }
+        protected Object invoke_L(long   a0) throws Throwable { return return_L(targetA1(a0)); }
+        protected int    invoke_I(long   a0) throws Throwable { return return_I(targetA1(a0)); }
+        protected long   invoke_J(long   a0) throws Throwable { return return_J(targetA1(a0)); }
+        protected float  invoke_F(long   a0) throws Throwable { return return_F(targetA1(a0)); }
+        protected double invoke_D(long   a0) throws Throwable { return return_D(targetA1(a0)); }
+    }
+    static class A2 extends Adapter {
+        protected A2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A2(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A2 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A2(e, i, c, t); }
+        protected Object target(Object a0, Object a1)   throws Throwable { return invoker.invokeExact(target, a0, a1); }
+        protected Object targetA2(Object a0, Object a1) throws Throwable { return target(a0, a1); }
+        protected Object targetA2(Object a0, int    a1) throws Throwable { return target(a0, a1); }
+        protected Object targetA2(int    a0, int    a1) throws Throwable { return target(a0, a1); }
+        protected Object targetA2(Object a0, long   a1) throws Throwable { return target(a0, a1); }
+        protected Object targetA2(long   a0, long   a1) throws Throwable { return target(a0, a1); }
+        protected Object invoke_L(Object a0, Object a1) throws Throwable { return return_L(targetA2(a0, a1)); }
+        protected int    invoke_I(Object a0, Object a1) throws Throwable { return return_I(targetA2(a0, a1)); }
+        protected long   invoke_J(Object a0, Object a1) throws Throwable { return return_J(targetA2(a0, a1)); }
+        protected float  invoke_F(Object a0, Object a1) throws Throwable { return return_F(targetA2(a0, a1)); }
+        protected double invoke_D(Object a0, Object a1) throws Throwable { return return_D(targetA2(a0, a1)); }
+        protected Object invoke_L(Object a0, int    a1) throws Throwable { return return_L(targetA2(a0, a1)); }
+        protected int    invoke_I(Object a0, int    a1) throws Throwable { return return_I(targetA2(a0, a1)); }
+        protected long   invoke_J(Object a0, int    a1) throws Throwable { return return_J(targetA2(a0, a1)); }
+        protected float  invoke_F(Object a0, int    a1) throws Throwable { return return_F(targetA2(a0, a1)); }
+        protected double invoke_D(Object a0, int    a1) throws Throwable { return return_D(targetA2(a0, a1)); }
+        protected Object invoke_L(int    a0, int    a1) throws Throwable { return return_L(targetA2(a0, a1)); }
+        protected int    invoke_I(int    a0, int    a1) throws Throwable { return return_I(targetA2(a0, a1)); }
+        protected long   invoke_J(int    a0, int    a1) throws Throwable { return return_J(targetA2(a0, a1)); }
+        protected float  invoke_F(int    a0, int    a1) throws Throwable { return return_F(targetA2(a0, a1)); }
+        protected double invoke_D(int    a0, int    a1) throws Throwable { return return_D(targetA2(a0, a1)); }
+        protected Object invoke_L(Object a0, long   a1) throws Throwable { return return_L(targetA2(a0, a1)); }
+        protected int    invoke_I(Object a0, long   a1) throws Throwable { return return_I(targetA2(a0, a1)); }
+        protected long   invoke_J(Object a0, long   a1) throws Throwable { return return_J(targetA2(a0, a1)); }
+        protected float  invoke_F(Object a0, long   a1) throws Throwable { return return_F(targetA2(a0, a1)); }
+        protected double invoke_D(Object a0, long   a1) throws Throwable { return return_D(targetA2(a0, a1)); }
+        protected Object invoke_L(long   a0, long   a1) throws Throwable { return return_L(targetA2(a0, a1)); }
+        protected int    invoke_I(long   a0, long   a1) throws Throwable { return return_I(targetA2(a0, a1)); }
+        protected long   invoke_J(long   a0, long   a1) throws Throwable { return return_J(targetA2(a0, a1)); }
+        protected float  invoke_F(long   a0, long   a1) throws Throwable { return return_F(targetA2(a0, a1)); }
+        protected double invoke_D(long   a0, long   a1) throws Throwable { return return_D(targetA2(a0, a1)); }
+    }
+    static class A3 extends Adapter {
+        protected A3(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A3(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A3 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A3(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2); }
+        protected Object targetA3(Object a0, Object a1, Object a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object targetA3(Object a0, Object a1, int    a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object targetA3(Object a0, int    a1, int    a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object targetA3(int    a0, int    a1, int    a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object targetA3(Object a0, Object a1, long   a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object targetA3(Object a0, long   a1, long   a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object targetA3(long   a0, long   a1, long   a2) throws Throwable { return target(a0, a1, a2); }
+        protected Object invoke_L(Object a0, Object a1, Object a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(Object a0, Object a1, Object a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(Object a0, Object a1, Object a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+        protected Object invoke_L(Object a0, Object a1, int    a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(Object a0, Object a1, int    a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(Object a0, Object a1, int    a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(Object a0, Object a1, int    a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(Object a0, Object a1, int    a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+        protected Object invoke_L(Object a0, int    a1, int    a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(Object a0, int    a1, int    a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(Object a0, int    a1, int    a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(Object a0, int    a1, int    a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(Object a0, int    a1, int    a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+        protected Object invoke_L(int    a0, int    a1, int    a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(int    a0, int    a1, int    a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(int    a0, int    a1, int    a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(int    a0, int    a1, int    a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(int    a0, int    a1, int    a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(Object a0, Object a1, long   a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(Object a0, Object a1, long   a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(Object a0, long   a1, long   a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(Object a0, long   a1, long   a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
+        protected float  invoke_F(long   a0, long   a1, long   a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
+        protected double invoke_D(long   a0, long   a1, long   a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
+    }
+//params=[4, 4, 4, 99, 99, 99]
+    static class A4 extends Adapter {
+        protected A4(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A4(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A4 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A4(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, Object a1, Object a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, Object a1, int    a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, int    a1, int    a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(int    a0, int    a1, int    a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, Object a1, Object a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, Object a1, long   a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(Object a0, long   a1, long   a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object targetA4(long   a0, long   a1, long   a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
+        protected float  invoke_F(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_F(targetA4(a0, a1, a2, a3)); }
+        protected double invoke_D(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_D(targetA4(a0, a1, a2, a3)); }
+    }
+//params=[5, 5, 2, 99, 99, 99]
+    static class A5 extends Adapter {
+        protected A5(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A5(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A5 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A5(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object targetA5(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
+    }
+//params=[6, 10, 2, 99, 0, 99]
+    static class A6 extends Adapter {
+        protected A6(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A6(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A6 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A6(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object targetA6(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
+    }
+    static class A7 extends Adapter {
+        protected A7(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A7(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A7 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A7(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object targetA7(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
+    }
+    static class A8 extends Adapter {
+        protected A8(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A8(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A8 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A8(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object targetA8(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
+    }
+    static class A9 extends Adapter {
+        protected A9(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A9(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A9 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A9(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object targetA9(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
+    }
+    static class A10 extends Adapter {
+        protected A10(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
+        protected A10(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
+        protected A10 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A10(e, i, c, t); }
+        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object targetA10(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/VolatileCallSite.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2010, 2011, 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 java.lang.invoke;
+
+/**
+ * A {@code VolatileCallSite} is a {@link CallSite} whose target acts like a volatile variable.
+ * An {@code invokedynamic} instruction linked to a {@code VolatileCallSite} sees updates
+ * to its call site target immediately, even if the update occurs in another thread.
+ * There may be a performance penalty for such tight coupling between threads.
+ * <p>
+ * Unlike {@code MutableCallSite}, there is no
+ * {@linkplain MutableCallSite#syncAll syncAll operation} on volatile
+ * call sites, since every write to a volatile variable is implicitly
+ * synchronized with reader threads.
+ * <p>
+ * In other respects, a {@code VolatileCallSite} is interchangeable
+ * with {@code MutableCallSite}.
+ * @see MutableCallSite
+ * @author John Rose, JSR 292 EG
+ */
+public class VolatileCallSite extends CallSite {
+    /**
+     * Creates a call site with a volatile binding to its target.
+     * The initial target is set to a method handle
+     * of the given type which will throw an {@code IllegalStateException} if called.
+     * @param type the method type that this call site will have
+     * @throws NullPointerException if the proposed type is null
+     */
+    public VolatileCallSite(MethodType type) {
+        super(type);
+    }
+
+    /**
+     * Creates a call site with a volatile binding to its target.
+     * The target is set to the given value.
+     * @param target the method handle that will be the initial target of the call site
+     * @throws NullPointerException if the proposed target is null
+     */
+    public VolatileCallSite(MethodHandle target) {
+        super(target);
+    }
+
+    /**
+     * Returns the target method of the call site, which behaves
+     * like a {@code volatile} field of the {@code VolatileCallSite}.
+     * <p>
+     * The interactions of {@code getTarget} with memory are the same
+     * as of a read from a {@code volatile} field.
+     * <p>
+     * In particular, the current thread is required to issue a fresh
+     * read of the target from memory, and must not fail to see
+     * a recent update to the target by another thread.
+     *
+     * @return the linkage state of this call site, a method handle which can change over time
+     * @see #setTarget
+     */
+    @Override public final MethodHandle getTarget() {
+        return getTargetVolatile();
+    }
+
+    /**
+     * Updates the target method of this call site, as a volatile variable.
+     * The type of the new target must agree with the type of the old target.
+     * <p>
+     * The interactions with memory are the same as of a write to a volatile field.
+     * In particular, any threads is guaranteed to see the updated target
+     * the next time it calls {@code getTarget}.
+     * @param newTarget the new target
+     * @throws NullPointerException if the proposed new target is null
+     * @throws WrongMethodTypeException if the proposed new target
+     *         has a method type that differs from the previous target
+     * @see #getTarget
+     */
+    @Override public void setTarget(MethodHandle newTarget) {
+        checkTargetChange(getTargetVolatile(), newTarget);
+        setTargetVolatile(newTarget);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public final MethodHandle dynamicInvoker() {
+        return makeDynamicInvoker();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/WrongMethodTypeException.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2008, 2011, 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 java.lang.invoke;
+
+/**
+ * Thrown to indicate that code has attempted to call a method handle
+ * via the wrong method type.  As with the bytecode representation of
+ * normal Java method calls, method handle calls are strongly typed
+ * to a specific type descriptor associated with a call site.
+ * <p>
+ * This exception may also be thrown when two method handles are
+ * composed, and the system detects that their types cannot be
+ * matched up correctly.  This amounts to an early evaluation
+ * of the type mismatch, at method handle construction time,
+ * instead of when the mismatched method handle is called.
+ *
+ * @author John Rose, JSR 292 EG
+ * @since 1.7
+ */
+public class WrongMethodTypeException extends RuntimeException {
+    private static final long serialVersionUID = 292L;
+
+    /**
+     * Constructs a {@code WrongMethodTypeException} with no detail message.
+     */
+    public WrongMethodTypeException() {
+        super();
+    }
+
+    /**
+     * Constructs a {@code WrongMethodTypeException} with the specified
+     * detail message.
+     *
+     * @param s the detail message.
+     */
+    public WrongMethodTypeException(String s) {
+        super(s);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/package-info.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,466 @@
+/*
+ * Copyright (c) 2008, 2011, 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.
+ */
+
+/**
+ * The {@code java.lang.invoke} package contains dynamic language support provided directly by
+ * the Java core class libraries and virtual machine.
+ *
+ * <p>
+ * Certain types in this package have special relations to dynamic
+ * language support in the virtual machine:
+ * <ul>
+ * <li>The class {@link java.lang.invoke.MethodHandle MethodHandle} contains
+ * <a href="MethodHandle.html#sigpoly">signature polymorphic methods</a>
+ * which can be linked regardless of their type descriptor.
+ * Normally, method linkage requires exact matching of type descriptors.
+ * </li>
+ *
+ * <li>The JVM bytecode format supports immediate constants of
+ * the classes {@link java.lang.invoke.MethodHandle MethodHandle} and {@link java.lang.invoke.MethodType MethodType}.
+ * </li>
+ * </ul>
+ *
+ * <h2><a name="jvm_mods"></a>Corresponding JVM bytecode format changes</h2>
+ * <em>The following low-level information is presented here as a preview of
+ * changes being made to the Java Virtual Machine specification for JSR 292.
+ * This information will be incorporated in a future version of the JVM specification.</em>
+ *
+ * <h3><a name="indyinsn"></a>{@code invokedynamic} instruction format</h3>
+ * In bytecode, an {@code invokedynamic} instruction is formatted as five bytes.
+ * The first byte is the opcode 186 (hexadecimal {@code BA}).
+ * The next two bytes are a constant pool index (in the same format as for the other {@code invoke} instructions).
+ * The final two bytes are reserved for future use and required to be zero.
+ * The constant pool reference of an {@code invokedynamic} instruction is to a entry
+ * with tag {@code CONSTANT_InvokeDynamic} (decimal 18).  See below for its format.
+ * The entry specifies the following information:
+ * <ul>
+ * <li>a bootstrap method (a {@link java.lang.invoke.MethodHandle MethodHandle} constant)</li>
+ * <li>the dynamic invocation name (a UTF8 string)</li>
+ * <li>the argument and return types of the call (encoded as a type descriptor in a UTF8 string)</li>
+ * <li>optionally, a sequence of additional <em>static arguments</em> to the bootstrap method ({@code ldc}-type constants)</li>
+ * </ul>
+ * <p>
+ * Each instance of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
+ * Multiple instances of an {@code invokedynamic} instruction can share a single
+ * {@code CONSTANT_InvokeDynamic} entry.
+ * In any case, distinct call sites always have distinct linkage state.
+ * <p>
+ * A dynamic call site is originally in an unlinked state.  In this state, there is
+ * no target method for the call site to invoke.
+ * A dynamic call site is linked by means of a bootstrap method,
+ * as <a href="#bsm">described below</a>.
+ *
+ * <h3><a name="indycon"></a>constant pool entries for {@code invokedynamic} instructions</h3>
+ * If a constant pool entry has the tag {@code CONSTANT_InvokeDynamic} (decimal 18),
+ * it must contain exactly four more bytes after the tag.
+ * These bytes are interpreted as two 16-bit indexes, in the usual {@code u2} format.
+ * The first pair of bytes after the tag must be an index into a side table called the
+ * <em>bootstrap method table</em>, which is stored in the {@code BootstrapMethods}
+ * attribute as <a href="#bsmattr">described below</a>.
+ * The second pair of bytes must be an index to a {@code CONSTANT_NameAndType}.
+ * <p>
+ * The first index specifies a bootstrap method used by the associated dynamic call sites.
+ * The second index specifies the method name, argument types, and return type of the dynamic call site.
+ * The structure of such an entry is therefore analogous to a {@code CONSTANT_Methodref},
+ * except that the bootstrap method specifier reference replaces
+ * the {@code CONSTANT_Class} reference of a {@code CONSTANT_Methodref} entry.
+ *
+ * <h3><a name="mtcon"></a>constant pool entries for {@linkplain java.lang.invoke.MethodType method types}</h3>
+ * If a constant pool entry has the tag {@code CONSTANT_MethodType} (decimal 16),
+ * it must contain exactly two more bytes, which must be an index to a {@code CONSTANT_Utf8}
+ * entry which represents a method type descriptor.
+ * <p>
+ * The JVM will ensure that on first
+ * execution of an {@code ldc} instruction for this entry, a {@link java.lang.invoke.MethodType MethodType}
+ * will be created which represents the type descriptor.
+ * Any classes mentioned in the {@code MethodType} will be loaded if necessary,
+ * but not initialized.
+ * Access checking and error reporting is performed exactly as it is for
+ * references by {@code ldc} instructions to {@code CONSTANT_Class} constants.
+ *
+ * <h3><a name="mhcon"></a>constant pool entries for {@linkplain java.lang.invoke.MethodHandle method handles}</h3>
+ * If a constant pool entry has the tag {@code CONSTANT_MethodHandle} (decimal 15),
+ * it must contain exactly three more bytes.  The first byte after the tag is a subtag
+ * value which must be in the range 1 through 9, and the last two must be an index to a
+ * {@code CONSTANT_Fieldref}, {@code CONSTANT_Methodref}, or
+ * {@code CONSTANT_InterfaceMethodref} entry which represents a field or method
+ * for which a method handle is to be created.
+ * Furthermore, the subtag value and the type of the constant index value
+ * must agree according to the table below.
+ * <p>
+ * The JVM will ensure that on first execution of an {@code ldc} instruction
+ * for this entry, a {@link java.lang.invoke.MethodHandle MethodHandle} will be created which represents
+ * the field or method reference, according to the specific mode implied by the subtag.
+ * <p>
+ * As with {@code CONSTANT_Class} and {@code CONSTANT_MethodType} constants,
+ * the {@code Class} or {@code MethodType} object which reifies the field or method's
+ * type is created.  Any classes mentioned in this reification will be loaded if necessary,
+ * but not initialized, and access checking and error reporting performed as usual.
+ * <p>
+ * Unlike the reflective {@code Lookup} API, there are no security manager calls made
+ * when these constants are resolved.
+ * <p>
+ * The method handle itself will have a type and behavior determined by the subtag as follows:
+ * <code>
+ * <table border=1 cellpadding=5 summary="CONSTANT_MethodHandle subtypes">
+ * <tr><th>N</th><th>subtag name</th><th>member</th><th>MH type</th><th>bytecode behavior</th><th>lookup expression</th></tr>
+ * <tr><td>1</td><td>REF_getField</td><td>C.f:T</td><td>(C)T</td><td>getfield C.f:T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findGetter findGetter(C.class,"f",T.class)}</td></tr>
+ * <tr><td>2</td><td>REF_getStatic</td><td>C.f:T</td><td>(&nbsp;)T</td><td>getstatic C.f:T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStaticGetter findStaticGetter(C.class,"f",T.class)}</td></tr>
+ * <tr><td>3</td><td>REF_putField</td><td>C.f:T</td><td>(C,T)void</td><td>putfield C.f:T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findSetter findSetter(C.class,"f",T.class)}</td></tr>
+ * <tr><td>4</td><td>REF_putStatic</td><td>C.f:T</td><td>(T)void</td><td>putstatic C.f:T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStaticSetter findStaticSetter(C.class,"f",T.class)}</td></tr>
+ * <tr><td>5</td><td>REF_invokeVirtual</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokevirtual C.m(A*)T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findVirtual findVirtual(C.class,"m",MT)}</td></tr>
+ * <tr><td>6</td><td>REF_invokeStatic</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokestatic C.m(A*)T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStatic findStatic(C.class,"m",MT)}</td></tr>
+ * <tr><td>7</td><td>REF_invokeSpecial</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokespecial C.m(A*)T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findSpecial findSpecial(C.class,"m",MT,this.class)}</td></tr>
+ * <tr><td>8</td><td>REF_newInvokeSpecial</td><td>C.&lt;init&gt;(A*)void</td><td>(A*)C</td><td>new C; dup; invokespecial C.&lt;init&gt;(A*)void</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findConstructor findConstructor(C.class,MT)}</td></tr>
+ * <tr><td>9</td><td>REF_invokeInterface</td><td>C.m(A*)T</td><td>(C,A*)T</td><td>invokeinterface C.m(A*)T</td>
+ *               <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findVirtual findVirtual(C.class,"m",MT)}</td></tr>
+ * </table>
+ * </code>
+ * Here, the type {@code C} is taken from the {@code CONSTANT_Class} reference associated
+ * with the {@code CONSTANT_NameAndType} descriptor.
+ * The field name {@code f} or method name {@code m} is taken from the {@code CONSTANT_NameAndType}
+ * as is the result type {@code T} and (in the case of a method or constructor) the argument type sequence
+ * {@code A*}.
+ * <p>
+ * Each method handle constant has an equivalent instruction sequence called its <em>bytecode behavior</em>.
+ * In general, creating a method handle constant can be done in exactly the same circumstances that
+ * the JVM would successfully resolve the symbolic references in the bytecode behavior.
+ * Also, the type of a method handle constant is such that a valid {@code invokeExact} call
+ * on the method handle has exactly the same JVM stack effects as the <em>bytecode behavior</em>.
+ * Finally, calling a method handle constant on a valid set of arguments has exactly the same effect
+ * and returns the same result (if any) as the corresponding <em>bytecode behavior</em>.
+ * <p>
+ * Each method handle constant also has an equivalent reflective <em>lookup expression</em>,
+ * which is a query to a method in {@link java.lang.invoke.MethodHandles.Lookup}.
+ * In the example lookup method expression given in the table above, the name {@code MT}
+ * stands for a {@code MethodType} built from {@code T} and the sequence of argument types {@code A*}.
+ * (Note that the type {@code C} is not prepended to the query type {@code MT} even if the member is non-static.)
+ * In the case of {@code findSpecial}, the name {@code this.class} refers to the class containing
+ * the bytecodes.
+ * <p>
+ * The special name {@code <clinit>} is not allowed.
+ * The special name {@code <init>} is not allowed except for subtag 8 as shown.
+ * <p>
+ * The JVM verifier and linker apply the same access checks and restrictions for these references as for the hypothetical
+ * bytecode instructions specified in the last column of the table.
+ * A method handle constant will successfully resolve to a method handle if the symbolic references
+ * of the corresponding bytecode instruction(s) would also resolve successfully.
+ * Otherwise, an attempt to resolve the constant will throw equivalent linkage errors.
+ * In particular, method handles to
+ * private and protected members can be created in exactly those classes for which the corresponding
+ * normal accesses are legal.
+ * <p>
+ * A constant may refer to a method or constructor with the {@code varargs}
+ * bit (hexadecimal {@code 0x0080}) set in its modifier bitmask.
+ * The method handle constant produced for such a method behaves as if
+ * it were created by {@link java.lang.invoke.MethodHandle#asVarargsCollector asVarargsCollector}.
+ * In other words, the constant method handle will exhibit variable arity,
+ * when invoked via {@code invokeGeneric}.
+ * On the other hand, its behavior with respect to {@code invokeExact} will be the same
+ * as if the {@code varargs} bit were not set.
+ * <p>
+ * Although the {@code CONSTANT_MethodHandle} and {@code CONSTANT_MethodType} constant types
+ * resolve class names, they do not force class initialization.
+ * Method handle constants for subtags {@code REF_getStatic}, {@code REF_putStatic}, and {@code REF_invokeStatic}
+ * may force class initialization on their first invocation, just like the corresponding bytecodes.
+ * <p>
+ * The rules of section 5.4.3 of the
+ * <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ConstantPool.doc.html#73492">JVM Specification</a>
+ * apply to the resolution of {@code CONSTANT_MethodType}, {@code CONSTANT_MethodHandle},
+ * and {@code CONSTANT_InvokeDynamic} constants,
+ * by the execution of {@code invokedynamic} and {@code ldc} instructions.
+ * (Roughly speaking, this means that every use of a constant pool entry
+ * must lead to the same outcome.
+ * If the resolution succeeds, the same object reference is produced
+ * by every subsequent execution of the same instruction.
+ * If the resolution of the constant causes an error to occur,
+ * the same error will be re-thrown on every subsequent attempt
+ * to use this particular constant.)
+ * <p>
+ * Constants created by the resolution of these constant pool types are not necessarily
+ * interned.  Except for {@code CONSTANT_Class} and {@code CONSTANT_String} entries,
+ * two distinct constant pool entries might not resolve to the same reference
+ * even if they contain the same symbolic reference.
+ *
+ * <h2><a name="bsm"></a>Bootstrap Methods</h2>
+ * Before the JVM can execute a dynamic call site (an {@code invokedynamic} instruction),
+ * the call site must first be <em>linked</em>.
+ * Linking is accomplished by calling a <em>bootstrap method</em>
+ * which is given the static information content of the call site,
+ * and which must produce a {@link java.lang.invoke.MethodHandle method handle}
+ * that gives the behavior of the call site.
+ * <p>
+ * Each {@code invokedynamic} instruction statically specifies its own
+ * bootstrap method as a constant pool reference.
+ * The constant pool reference also specifies the call site's name and type descriptor,
+ * just like {@code invokevirtual} and the other invoke instructions.
+ * <p>
+ * Linking starts with resolving the constant pool entry for the
+ * bootstrap method, and resolving a {@link java.lang.invoke.MethodType MethodType} object for
+ * the type descriptor of the dynamic call site.
+ * This resolution process may trigger class loading.
+ * It may therefore throw an error if a class fails to load.
+ * This error becomes the abnormal termination of the dynamic
+ * call site execution.
+ * Linkage does not trigger class initialization.
+ * <p>
+ * Next, the bootstrap method call is started, with at least four values being stacked:
+ * <ul>
+ * <li>a {@code MethodHandle}, the resolved bootstrap method itself </li>
+ * <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em> in which dynamic call site occurs </li>
+ * <li>a {@code String}, the method name mentioned in the call site </li>
+ * <li>a {@code MethodType}, the resolved type descriptor of the call </li>
+ * <li>optionally, one or more <a href="#args">additional static arguments</a> </li>
+ * </ul>
+ * The method handle is then applied to the other values as if by
+ * {@link java.lang.invoke.MethodHandle#invokeGeneric invokeGeneric}.
+ * The returned result must be a {@link java.lang.invoke.CallSite CallSite} (or a subclass).
+ * The type of the call site's target must be exactly equal to the type
+ * derived from the dynamic call site's type descriptor and passed to
+ * the bootstrap method.
+ * The call site then becomes permanently linked to the dynamic call site.
+ * <p>
+ * As long as each bootstrap method can be correctly invoked
+ * by <code>invokeGeneric</code>, its detailed type is arbitrary.
+ * For example, the first argument could be {@code Object}
+ * instead of {@code MethodHandles.Lookup}, and the return type
+ * could also be {@code Object} instead of {@code CallSite}.
+ * (Note that the types and number of the stacked arguments limit
+ * the legal kinds of bootstrap methods to appropriately typed
+ * static methods and constructors of {@code CallSite} subclasses.)
+ * <p>
+ * After resolution, the linkage process may fail in a variety of ways.
+ * All failures are reported by a {@link java.lang.BootstrapMethodError BootstrapMethodError},
+ * which is thrown as the abnormal termination of the dynamic call
+ * site execution.
+ * The following circumstances will cause this:
+ * <ul>
+ * <li>the index to the bootstrap method specifier is out of range </li>
+ * <li>the bootstrap method cannot be resolved </li>
+ * <li>the {@code MethodType} to pass to the bootstrap method cannot be resolved </li>
+ * <li>a static argument to the bootstrap method cannot be resolved
+ *     (i.e., a {@code CONSTANT_Class}, {@code CONSTANT_MethodType},
+ *     or {@code CONSTANT_MethodHandle} argument cannot be linked) </li>
+ * <li>the bootstrap method has the wrong arity,
+ *     causing {@code invokeGeneric} to throw {@code WrongMethodTypeException} </li>
+ * <li>the bootstrap method has a wrong argument or return type </li>
+ * <li>the bootstrap method invocation completes abnormally </li>
+ * <li>the result from the bootstrap invocation is not a reference to
+ *     an object of type {@link java.lang.invoke.CallSite CallSite} </li>
+ * <li>the target of the {@code CallSite} does not have a target of
+ *     the expected {@code MethodType} </li>
+ * </ul>
+ *
+ * <h3><a name="linktime"></a>timing of linkage</h3>
+ * A dynamic call site is linked just before its first execution.
+ * The bootstrap method call implementing the linkage occurs within
+ * a thread that is attempting a first execution.
+ * <p>
+ * If there are several such threads, the bootstrap method may be
+ * invoked in several threads concurrently.
+ * Therefore, bootstrap methods which access global application
+ * data must take the usual precautions against race conditions.
+ * In any case, every {@code invokedynamic} instruction is either
+ * unlinked or linked to a unique {@code CallSite} object.
+ * <p>
+ * In an application which requires dynamic call sites with individually
+ * mutable behaviors, their bootstrap methods should produce distinct
+ * {@link java.lang.invoke.CallSite CallSite} objects, one for each linkage request.
+ * Alternatively, an application can link a single {@code CallSite} object
+ * to several {@code invokedynamic} instructions, in which case
+ * a change to the target method will become visible at each of
+ * the instructions.
+ * <p>
+ * If several threads simultaneously execute a bootstrap method for a single dynamic
+ * call site, the JVM must choose one {@code CallSite} object and install it visibly to
+ * all threads.  Any other bootstrap method calls are allowed to complete, but their
+ * results are ignored, and their dynamic call site invocations proceed with the originally
+ * chosen target object.
+ *
+ * <p style="font-size:smaller;">
+ * <em>Discussion:</em>
+ * These rules do not enable the JVM to duplicate dynamic call sites,
+ * or to issue &ldquo;causeless&rdquo; bootstrap method calls.
+ * Every dynamic call site transitions at most once from unlinked to linked,
+ * just before its first invocation.
+ * There is no way to undo the effect of a completed bootstrap method call.
+ *
+ * <h3><a name="bsmattr">the {@code BootstrapMethods} attribute </h3>
+ * Each {@code CONSTANT_InvokeDynamic} entry contains an index which references
+ * a bootstrap method specifier; all such specifiers are contained in a separate array.
+ * This array is defined by a class attribute named {@code BootstrapMethods}.
+ * The body of this attribute consists of a sequence of byte pairs, all interpreted as
+ * as 16-bit counts or constant pool indexes, in the {@code u2} format.
+ * The attribute body starts with a count of bootstrap method specifiers,
+ * which is immediately followed by the sequence of specifiers.
+ * <p>
+ * Each bootstrap method specifier contains an index to a
+ * {@code CONSTANT_MethodHandle} constant, which is the bootstrap
+ * method itself.
+ * This is followed by a count, and then a sequence (perhaps empty) of
+ * indexes to <a href="#args">additional static arguments</a>
+ * for the bootstrap method.
+ * <p>
+ * During class loading, the verifier must check the structure of the
+ * {@code BootstrapMethods} attribute.  In particular, each constant
+ * pool index must be of the correct type.  A bootstrap method index
+ * must refer to a {@code CONSTANT_MethodHandle} (tag 15).
+ * Every other index must refer to a valid operand of an
+ * {@code ldc_w} or {@code ldc2_w} instruction (tag 3..8 or 15..16).
+ *
+ * <h3><a name="args">static arguments to the bootstrap method</h3>
+ * An {@code invokedynamic} instruction specifies at least three arguments
+ * to pass to its bootstrap method:
+ * The caller class (expressed as a {@link java.lang.invoke.MethodHandles.Lookup Lookup object},
+ * the name (extracted from the {@code CONSTANT_NameAndType} entry),
+ * and the type (also extracted from the {@code CONSTANT_NameAndType} entry).
+ * The {@code invokedynamic} instruction may specify additional metadata values
+ * to pass to its bootstrap method.
+ * Collectively, these values are called <em>static arguments</em> to the
+ * {@code invokedynamic} instruction, because they are used once at link
+ * time to determine the instruction's behavior on subsequent sets of
+ * <em>dynamic arguments</em>.
+ * <p>
+ * Static arguments are used to communicate application-specific meta-data
+ * to the bootstrap method.
+ * Drawn from the constant pool, they may include references to classes, method handles,
+ * strings, or numeric data that may be relevant to the task of linking that particular call site.
+ * <p>
+ * Static arguments are specified constant pool indexes stored in the {@code BootstrapMethods} attribute.
+ * Before the bootstrap method is invoked, each index is used to compute an {@code Object}
+ * reference to the indexed value in the constant pool.
+ * The valid constant pool entries are listed in this table:
+ * <code>
+ * <table border=1 cellpadding=5 summary="Static argument types">
+ * <tr><th>entry type</th><th>argument type</th><th>argument value</th></tr>
+ * <tr><td>CONSTANT_String</td><td><code>java.lang.String</code></td><td>the indexed string literal</td></tr>
+ * <tr><td>CONSTANT_Class</td><td><code>java.lang.Class</code></td><td>the indexed class, resolved</td></tr>
+ * <tr><td>CONSTANT_Integer</td><td><code>java.lang.Integer</code></td><td>the indexed int value</td></tr>
+ * <tr><td>CONSTANT_Long</td><td><code>java.lang.Long</code></td><td>the indexed long value</td></tr>
+ * <tr><td>CONSTANT_Float</td><td><code>java.lang.Float</code></td><td>the indexed float value</td></tr>
+ * <tr><td>CONSTANT_Double</td><td><code>java.lang.Double</code></td><td>the indexed double value</td></tr>
+ * <tr><td>CONSTANT_MethodHandle</td><td><code>java.lang.invoke.MethodHandle</code></td><td>the indexed method handle constant</td></tr>
+ * <tr><td>CONSTANT_MethodType</td><td><code>java.lang.invoke.MethodType</code></td><td>the indexed method type constant</td></tr>
+ * </table>
+ * </code>
+ * <p>
+ * If a given {@code invokedynamic} instruction specifies no static arguments,
+ * the instruction's bootstrap method will be invoked on three arguments,
+ * conveying the instruction's caller class, name, and method type.
+ * If the {@code invokedynamic} instruction specifies one or more static arguments,
+ * those values will be passed as additional arguments to the method handle.
+ * (Note that because there is a limit of 255 arguments to any method,
+ * at most 252 extra arguments can be supplied.)
+ * The bootstrap method will be invoked as if by either {@code invokeGeneric}
+ * or {@code invokeWithArguments}.  (There is no way to tell the difference.)
+ * <p>
+ * The normal argument conversion rules for {@code invokeGeneric} apply to all stacked arguments.
+ * For example, if a pushed value is a primitive type, it may be converted to a reference by boxing conversion.
+ * If the bootstrap method is a variable arity method (its modifier bit {@code 0x0080} is set),
+ * then some or all of the arguments specified here may be collected into a trailing array parameter.
+ * (This is not a special rule, but rather a useful consequence of the interaction
+ * between {@code CONSTANT_MethodHandle} constants, the modifier bit for variable arity methods,
+ * and the {@code java.lang.invoke.MethodHandle#asVarargsCollector asVarargsCollector} transformation.)
+ * <p>
+ * Given these rules, here are examples of legal bootstrap method declarations,
+ * given various numbers {@code N} of extra arguments.
+ * The first rows (marked {@code *}) will work for any number of extra arguments.
+ * <code>
+ * <table border=1 cellpadding=5 summary="Static argument types">
+ * <tr><th>N</th><th>sample bootstrap method</th></tr>
+ * <tr><td>*</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
+ * <tr><td>*</td><td><code>CallSite bootstrap(Object... args)</code></td></tr>
+ * <tr><td>*</td><td><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
+ * <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
+ * <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
+ * <tr><td>1</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
+ * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
+ * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
+ * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
+ * </table>
+ * </code>
+ * The last example assumes that the extra arguments are of type
+ * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.
+ * The second-to-last example assumes that all extra arguments are of type
+ * {@code CONSTANT_String}.
+ * The other examples work with all types of extra arguments.
+ * <p>
+ * As noted above, the actual method type of the bootstrap method can vary.
+ * For example, the fourth argument could be {@code MethodHandle},
+ * if that is the type of the corresponding constant in
+ * the {@code CONSTANT_InvokeDynamic} entry.
+ * In that case, the {@code invokeGeneric} call will pass the extra method handle
+ * constant as an {@code Object}, but the type matching machinery of {@code invokeGeneric}
+ * will cast the reference back to {@code MethodHandle} before invoking the bootstrap method.
+ * (If a string constant were passed instead, by badly generated code, that cast would then fail,
+ * resulting in a {@code BootstrapMethodError}.)
+ * <p>
+ * Extra bootstrap method arguments are intended to allow language implementors
+ * to safely and compactly encode metadata.
+ * In principle, the name and extra arguments are redundant,
+ * since each call site could be given its own unique bootstrap method.
+ * Such a practice is likely to produce large class files and constant pools.
+ *
+ * <h2><a name="structs"></a>Structure Summary</h2>
+ * <blockquote><pre>// summary of constant and attribute structures
+struct CONSTANT_MethodHandle_info {
+  u1 tag = 15;
+  u1 reference_kind;       // 1..8 (one of REF_invokeVirtual, etc.)
+  u2 reference_index;      // index to CONSTANT_Fieldref or *Methodref
+}
+struct CONSTANT_MethodType_info {
+  u1 tag = 16;
+  u2 descriptor_index;    // index to CONSTANT_Utf8, as in NameAndType
+}
+struct CONSTANT_InvokeDynamic_info {
+  u1 tag = 18;
+  u2 bootstrap_method_attr_index;  // index into BootstrapMethods_attr
+  u2 name_and_type_index;          // index to CONSTANT_NameAndType, as in Methodref
+}
+struct BootstrapMethods_attr {
+ u2 name;  // CONSTANT_Utf8 = "BootstrapMethods"
+ u4 size;
+ u2 bootstrap_method_count;
+ struct bootstrap_method_specifier {
+   u2 bootstrap_method_ref;  // index to CONSTANT_MethodHandle
+   u2 bootstrap_argument_count;
+   u2 bootstrap_arguments[bootstrap_argument_count];  // constant pool indexes
+ } bootstrap_methods[bootstrap_method_count];
+}
+ * </pre></blockquote>
+ *
+ * @author John Rose, JSR 292 EG
+ * @since 1.7
+ */
+
+package java.lang.invoke;
--- a/src/share/classes/java/net/HttpURLConnection.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/net/HttpURLConnection.java	Wed Apr 20 04:38:36 2011 +0100
@@ -400,7 +400,8 @@
      * @exception ProtocolException if the method cannot be reset or if
      *              the requested method isn't valid for HTTP.
      * @exception SecurityException if a security manager is set and the
-     *              "allowHttpTrace" NetPermission is not granted.
+     *              method is "TRACE", but the "allowHttpTrace"
+     *              NetPermission is not granted.
      * @see #getRequestMethod()
      */
     public void setRequestMethod(String method) throws ProtocolException {
--- a/src/share/classes/java/net/NetPermission.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/net/NetPermission.java	Wed Apr 20 04:38:36 2011 +0100
@@ -73,6 +73,13 @@
  *   </tr>
  *
  * <tr>
+ *  <td>getNetworkInformation</td>
+ *  <td>The ability to retrieve all information about local network interfaces.</td>
+ *  <td>Malicious code can read information about network hardware such as
+ *  MAC addresses, which could be used to construct local IPv6 addresses.</td>
+ * </tr>
+ *
+ * <tr>
  *   <td>getProxySelector</td>
  *   <td>The ability to get the proxy selector used to make decisions
  *   on which proxies to use when making network connections.</td>
--- a/src/share/classes/java/net/URI.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/net/URI.java	Wed Apr 20 04:38:36 2011 +0100
@@ -991,7 +991,7 @@
      *   authority and path are taken from the given URI. </p></li>
      *
      *   <li><p> Otherwise the new URI's authority component is copied from
-     *   this URI, and its path is computed as follows: </p></li>
+     *   this URI, and its path is computed as follows: </p>
      *
      *   <ol type=a>
      *
@@ -1005,7 +1005,7 @@
      *     path and then normalizing the result as if by invoking the {@link
      *     #normalize() normalize} method. </p></li>
      *
-     *   </ol>
+     *   </ol></li>
      *
      * </ol>
      *
@@ -1511,7 +1511,7 @@
      *   fragments. </p></li>
      *
      *   <li><p> Two hierarchical URIs with identical schemes are ordered
-     *   according to the ordering of their authority components: </p></li>
+     *   according to the ordering of their authority components: </p>
      *
      *   <ul type=disc>
      *
@@ -1526,7 +1526,7 @@
      *     the URIs are ordered according to the ordering of their authority
      *     components. </p></li>
      *
-     *   </ul>
+     *   </ul></li>
      *
      *   <li><p> Finally, two hierarchical URIs with identical schemes and
      *   authority components are ordered according to the ordering of their
@@ -1829,21 +1829,23 @@
         } else if (authority != null) {
             sb.append("//");
             if (authority.startsWith("[")) {
+                // authority should (but may not) contain an embedded IPv6 address
                 int end = authority.indexOf("]");
-                if (end != -1 && authority.indexOf(":")!=-1) {
-                    String doquote, dontquote;
+                String doquote = authority, dontquote = "";
+                if (end != -1 && authority.indexOf(":") != -1) {
+                    // the authority contains an IPv6 address
                     if (end == authority.length()) {
                         dontquote = authority;
                         doquote = "";
                     } else {
-                        dontquote = authority.substring(0,end+1);
-                        doquote = authority.substring(end+1);
+                        dontquote = authority.substring(0 , end + 1);
+                        doquote = authority.substring(end + 1);
                     }
-                    sb.append (dontquote);
-                    sb.append(quote(doquote,
+                }
+                sb.append(dontquote);
+                sb.append(quote(doquote,
                             L_REG_NAME | L_SERVER,
                             H_REG_NAME | H_SERVER));
-                }
             } else {
                 sb.append(quote(authority,
                             L_REG_NAME | L_SERVER,
--- a/src/share/classes/java/net/URLConnection.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/net/URLConnection.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2011, 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
@@ -1422,7 +1422,7 @@
         if (!is.markSupported())
             return null;
 
-        is.mark(12);
+        is.mark(16);
         int c1 = is.read();
         int c2 = is.read();
         int c3 = is.read();
@@ -1434,6 +1434,11 @@
         int c9 = is.read();
         int c10 = is.read();
         int c11 = is.read();
+        int c12 = is.read();
+        int c13 = is.read();
+        int c14 = is.read();
+        int c15 = is.read();
+        int c16 = is.read();
         is.reset();
 
         if (c1 == 0xCA && c2 == 0xFE && c3 == 0xBA && c4 == 0xBE) {
@@ -1461,6 +1466,13 @@
             }
         }
 
+        // big and little (identical) endian UTF-8 encodings, with BOM
+        if (c1 == 0xef &&  c2 == 0xbb &&  c3 == 0xbf) {
+            if (c4 == '<' &&  c5 == '?' &&  c6 == 'x') {
+                return "application/xml";
+            }
+        }
+
         // big and little endian UTF-16 encodings, with byte order mark
         if (c1 == 0xfe && c2 == 0xff) {
             if (c3 == 0 && c4 == '<' && c5 == 0 && c6 == '?' &&
@@ -1476,6 +1488,23 @@
             }
         }
 
+        // big and little endian UTF-32 encodings, with BOM
+        if (c1 == 0x00 &&  c2 == 0x00 &&  c3 == 0xfe &&  c4 == 0xff) {
+            if (c5  == 0 && c6  == 0 && c7  == 0 && c8  == '<' &&
+                c9  == 0 && c10 == 0 && c11 == 0 && c12 == '?' &&
+                c13 == 0 && c14 == 0 && c15 == 0 && c16 == 'x') {
+                return "application/xml";
+            }
+        }
+
+        if (c1 == 0xff &&  c2 == 0xfe &&  c3 == 0x00 &&  c4 == 0x00) {
+            if (c5  == '<' && c6  == 0 && c7  == 0 && c8  == 0 &&
+                c9  == '?' && c10 == 0 && c11 == 0 && c12 == 0 &&
+                c13 == 'x' && c14 == 0 && c15 == 0 && c16 == 0) {
+                return "application/xml";
+            }
+        }
+
         if (c1 == 'G' && c2 == 'I' && c3 == 'F' && c4 == '8') {
             return "image/gif";
         }
--- a/src/share/classes/java/net/package.html	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/net/package.html	Wed Apr 20 04:38:36 2011 +0100
@@ -31,18 +31,18 @@
 
 <p> The java.net package can be roughly divided in two sections:</p>
 <ul>
-    <li> <p><i>A Low Level API</i>, which deals with the following abstractions:</p></li>
+    <li> <p><i>A Low Level API</i>, which deals with the following abstractions:</p>
     <ul>
       <li><p><i>Addresses</i>, which are networking identifiers, like IP addresses.</p></li>
       <li><p><i>Sockets</i>, which are basic bidirectional data communication mechanisms.</p></li>
       <li><p><i>Interfaces</i>, which describe network interfaces. </p></li>
-    </ul>
-    <li> <p><i>A High Level API</i>, which deals with the following abstractions:</p></li>
+    </ul></li>
+    <li> <p><i>A High Level API</i>, which deals with the following abstractions:</p>
     <ul>
       <li><p><i>URIs</i>, which represent Universal Resource Identifiers.</p></li>
       <li><p><i>URLs</i>, which represent Universal Resource Locators.</p></li>
       <li><p><i>Connections</i>, which represents connections to the resource pointed to by <i>URLs</i>.</p></li>
-      </ul>
+      </ul></li>
 </ul>
 <h2>Addresses</h2>
 <p>Addresses are used throughout the java.net APIs as either host identifiers, or socket endpoint identifiers.</p>
--- a/src/share/classes/java/nio/channels/AsynchronousFileChannel.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/channels/AsynchronousFileChannel.java	Wed Apr 20 04:38:36 2011 +0100
@@ -48,12 +48,12 @@
  *
  * <p> An asynchronous file channel does not have a <i>current position</i>
  * within the file. Instead, the file position is specified to each read and
- * write methd that initiate asynchronous operations. A {@link CompletionHandler}
+ * write method that initiates asynchronous operations. A {@link CompletionHandler}
  * is specified as a parameter and is invoked to consume the result of the I/O
  * operation. This class also defines read and write methods that initiate
  * asynchronous operations, returning a {@link Future} to represent the pending
  * result of the operation. The {@code Future} may be used to check if the
- * operation has completed, to wait for its completion.
+ * operation has completed, wait for its completion, and retrieve the result.
  *
  * <p> In addition to read and write operations, this class defines the
  * following operations: </p>
@@ -73,13 +73,13 @@
  * which tasks are submitted to handle I/O events and dispatch to completion
  * handlers that consume the results of I/O operations on the channel. The
  * completion handler for an I/O operation initiated on a channel is guaranteed
- * to be invoked by one threads in the thread pool (This ensures that the
+ * to be invoked by one of the threads in the thread pool (This ensures that the
  * completion handler is run by a thread with the expected <em>identity</em>).
  * Where an I/O operation completes immediately, and the initiating thread is
  * itself a thread in the thread pool, then the completion handler may be invoked
  * directly by the initiating thread. When an {@code AsynchronousFileChannel} is
  * created without specifying a thread pool then the channel is associated with
- * a system-dependent and default thread pool that may be shared with other
+ * a system-dependent default thread pool that may be shared with other
  * channels. The default thread pool is configured by the system properties
  * defined by the {@link AsynchronousChannelGroup} class.
  *
--- a/src/share/classes/java/nio/channels/SocketChannel.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/channels/SocketChannel.java	Wed Apr 20 04:38:36 2011 +0100
@@ -182,10 +182,13 @@
         SocketChannel sc = open();
         try {
             sc.connect(remote);
-        } finally {
-            if (!sc.isConnected()) {
-                try { sc.close(); } catch (IOException x) { }
+        } catch (Throwable x) {
+            try {
+                sc.close();
+            } catch (Throwable suppressed) {
+                x.addSuppressed(suppressed);
             }
+            throw x;
         }
         assert sc.isConnected();
         return sc;
--- a/src/share/classes/java/nio/file/CopyMoveHelper.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/file/CopyMoveHelper.java	Wed Apr 20 04:38:36 2011 +0100
@@ -135,11 +135,13 @@
                 view.setTimes(attrs.lastModifiedTime(),
                               attrs.lastAccessTime(),
                               attrs.creationTime());
-            } catch (IOException x) {
+            } catch (Throwable x) {
                 // rollback
                 try {
                     Files.delete(target);
-                } catch (IOException ignore) { }
+                } catch (Throwable suppressed) {
+                    x.addSuppressed(suppressed);
+                }
                 throw x;
             }
         }
--- a/src/share/classes/java/nio/file/Files.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/file/Files.java	Wed Apr 20 04:38:36 2011 +0100
@@ -129,17 +129,18 @@
      * <pre>
      *     Path path = ...
      *
-     *     // replace an existing file or create the file if it doesn't initially exist
+     *     // truncate and overwrite an existing file, or create the file if
+     *     // it doesn't initially exist
      *     OutputStream out = Files.newOutputStream(path);
      *
      *     // append to an existing file, fail if the file does not exist
      *     out = Files.newOutputStream(path, APPEND);
      *
      *     // append to an existing file, create file if it doesn't initially exist
-     *     out = Files.newOutputStream(CREATE, APPEND);
+     *     out = Files.newOutputStream(path, CREATE, APPEND);
      *
      *     // always create new file, failing if it already exists
-     *     out = Files.newOutputStream(CREATE_NEW);
+     *     out = Files.newOutputStream(path, CREATE_NEW);
      * </pre>
      *
      * @param   path
@@ -793,7 +794,8 @@
                                       FileAttribute<?>... attrs)
         throws IOException
     {
-        return TempFileHelper.createTempFile(dir, prefix, suffix, attrs);
+        return TempFileHelper.createTempFile(Objects.requireNonNull(dir),
+                                             prefix, suffix, attrs);
     }
 
     /**
@@ -890,13 +892,14 @@
                                            FileAttribute<?>... attrs)
         throws IOException
     {
-        return TempFileHelper.createTempDirectory(dir, prefix, attrs);
+        return TempFileHelper.createTempDirectory(Objects.requireNonNull(dir),
+                                                  prefix, attrs);
     }
 
     /**
      * Creates a new directory in the default temporary-file directory, using
-     * the given prefix and suffix to generate its name. The resulting {@code
-     * Path} is associated with the default {@code FileSystem}.
+     * the given prefix to generate its name. The resulting {@code Path} is
+     * associated with the default {@code FileSystem}.
      *
      * <p> This method works in exactly the manner specified by {@link
      * #createTempDirectory(Path,String,FileAttribute[])} method for the case
@@ -1709,10 +1712,10 @@
      * @return  the {@code path} parameter
      *
      * @throws  UnsupportedOperationException
-     *          if the attribute view is not available or it does not support
-     *          updating the attribute
+     *          if the attribute view is not available
      * @throws  IllegalArgumentException
-     *          if the attribute value is of the correct type but has an
+     *          if the attribute name is not specified, or is not recognized, or
+     *          the attribute value is of the correct type but has an
      *          inappropriate value
      * @throws  ClassCastException
      *          if the attribute value is not of the expected type or is a
@@ -1773,9 +1776,12 @@
      * @param   options
      *          options indicating how symbolic links are handled
      *
-     * @return  the attribute value or {@code null} if the attribute view
-     *          is not available or it does not support reading the attribute
+     * @return  the attribute value
      *
+     * @throws  UnsupportedOperationException
+     *          if the attribute view is not available
+     * @throws  IllegalArgumentException
+     *          if the attribute name is not specified or is not recognized
      * @throws  IOException
      *          if an I/O error occurs
      * @throws  SecurityException
@@ -1791,8 +1797,9 @@
     {
         // only one attribute should be read
         if (attribute.indexOf('*') >= 0 || attribute.indexOf(',') >= 0)
-            return null;
+            throw new IllegalArgumentException(attribute);
         Map<String,Object> map = readAttributes(path, attribute, options);
+        assert map.size() == 1;
         String name;
         int pos = attribute.indexOf(':');
         if (pos == -1) {
@@ -1865,9 +1872,14 @@
      * @param   options
      *          options indicating how symbolic links are handled
      *
-     * @return  a map of the attributes returned; may be empty. The map's keys
-     *          are the attribute names, its values are the attribute values
+     * @return  a map of the attributes returned; The map's keys are the
+     *          attribute names, its values are the attribute values
      *
+     * @throws  UnsupportedOperationException
+     *          if the attribute view is not available
+     * @throws  IllegalArgumentException
+     *          if no attributes are specified or an unrecognized attributes is
+     *          specified
      * @throws  IOException
      *          if an I/O error occurs
      * @throws  SecurityException
@@ -2583,7 +2595,7 @@
      * walkFileTree(start, EnumSet.noneOf(FileVisitOption.class), Integer.MAX_VALUE, visitor)
      * </pre></blockquote>
      * In other words, it does not follow symbolic links, and visits all levels
-     * of the file level.
+     * of the file tree.
      *
      * @param   start
      *          the starting file
@@ -3005,7 +3017,7 @@
      * or after some bytes have been written to the file.
      *
      * <p> <b>Usage example</b>: By default the method creates a new file or
-     * overrides an existing file. Suppose you instead want to append bytes
+     * overwrites an existing file. Suppose you instead want to append bytes
      * to an existing file:
      * <pre>
      *     Path path = ...
--- a/src/share/classes/java/nio/file/Path.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/file/Path.java	Wed Apr 20 04:38:36 2011 +0100
@@ -228,6 +228,9 @@
      * not have a root component and the given path has a root component then
      * this path does not start with the given path.
      *
+     * <p> If the given path is associated with a different {@code FileSystem}
+     * to this path then {@code false} is returned.
+     *
      * @param   other
      *          the given path
      *
@@ -270,6 +273,9 @@
      * does not have a root component and the given path has a root component
      * then this path does not end with the given path.
      *
+     * <p> If the given path is associated with a different {@code FileSystem}
+     * to this path then {@code false} is returned.
+     *
      * @param   other
      *          the given path
      *
@@ -283,7 +289,10 @@
      * the given path string, in exactly the manner specified by the {@link
      * #endsWith(Path) endsWith(Path)} method. On UNIX for example, the path
      * "{@code foo/bar}" ends with "{@code foo/bar}" and "{@code bar}". It does
-     * not end with "{@code r}" or "{@code /bar}".
+     * not end with "{@code r}" or "{@code /bar}". Note that trailing separators
+     * are not taken into account, and so invoking this method on the {@code
+     * Path}"{@code foo/bar}" with the {@code String} "{@code bar/}" returns
+     * {@code true}.
      *
      * @param   other
      *          the given path string
@@ -724,12 +733,18 @@
      * provider, platform specific. This method does not access the file system
      * and neither file is required to exist.
      *
+     * <p> This method may not be used to compare paths that are associated
+     * with different file system providers.
+     *
      * @param   other  the path compared to this path.
      *
      * @return  zero if the argument is {@link #equals equal} to this path, a
      *          value less than zero if this path is lexicographically less than
      *          the argument, or a value greater than zero if this path is
      *          lexicographically greater than the argument
+     *
+     * @throws  ClassCastException
+     *          if the paths are associated with different providers
      */
     @Override
     int compareTo(Path other);
@@ -738,7 +753,7 @@
      * Tests this path for equality with the given object.
      *
      * <p> If the given object is not a Path, or is a Path associated with a
-     * different provider, then this method immediately returns {@code false}.
+     * different {@code FileSystem}, then this method returns {@code false}.
      *
      * <p> Whether or not two path are equal depends on the file system
      * implementation. In some cases the paths are compared without regard
--- a/src/share/classes/java/nio/file/WatchKey.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/file/WatchKey.java	Wed Apr 20 04:38:36 2011 +0100
@@ -146,5 +146,5 @@
      *
      * @return the object for which this watch key was created
      */
-    //T watchable();
+    Watchable watchable();
 }
--- a/src/share/classes/java/nio/file/attribute/FileTime.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/file/attribute/FileTime.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,12 +216,14 @@
      * "2009-02-13T23:31:30Z"}, and {@code FileTime.fromMillis(1234567890123L).toString()}
      * yields {@code "2009-02-13T23:31:30.123Z"}.
      *
-     * <p> A {@code FileTime} is primarly intended to represent the value of a
+     * <p> A {@code FileTime} is primarily intended to represent the value of a
      * file's time stamp. Where used to represent <i>extreme values</i>, where
      * the year is less than "{@code 0001}" or greater than "{@code 9999}" then
-     * the year may be expanded to more than four digits and may be
-     * negative-signed. If more than four digits then leading zeros are not
-     * present. The year before "{@code 0001}" is "{@code -0001}".
+     * this method deviates from ISO 8601 in the same manner as the
+     * <a href="http://www.w3.org/TR/xmlschema-2/#deviantformats">XML Schema
+     * language</a>. That is, the year may be expanded to more than four digits
+     * and may be negative-signed. If more than four digits then leading zeros
+     * are not present. The year before "{@code 0001}" is "{@code -0001}".
      *
      * @return  the string representation of this file time
      */
--- a/src/share/classes/java/nio/file/spi/FileSystemProvider.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/nio/file/spi/FileSystemProvider.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1037,6 +1037,11 @@
      * @return  a map of the attributes returned; may be empty. The map's keys
      *          are the attribute names, its values are the attribute values
      *
+     * @throws  UnsupportedOperationException
+     *          if the attribute view is not available
+     * @throws  IllegalArgumentException
+     *          if no attributes are specified or an unrecognized attributes is
+     *          specified
      * @throws  IOException
      *          If an I/O error occurs
      * @throws  SecurityException
@@ -1064,10 +1069,10 @@
      *          options indicating how symbolic links are handled
      *
      * @throws  UnsupportedOperationException
-     *          if the attribute view is not available or it does not support
-     *          updating the attribute
+     *          if the attribute view is not available
      * @throws  IllegalArgumentException
-     *          if the attribute value is of the correct type but has an
+     *          if the attribute name is not specified, or is not recognized, or
+     *          the attribute value is of the correct type but has an
      *          inappropriate value
      * @throws  ClassCastException
      *          If the attribute value is not of the expected type or is a
--- a/src/share/classes/java/security/CodeSigner.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/security/CodeSigner.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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,10 +26,7 @@
 package java.security;
 
 import java.io.*;
-import java.security.cert.CRL;
 import java.security.cert.CertPath;
-import sun.misc.JavaSecurityCodeSignerAccess;
-import sun.misc.SharedSecrets;
 
 /**
  * This class encapsulates information about a code signer.
@@ -167,44 +164,6 @@
         return sb.toString();
     }
 
-    // A private attribute attached to this CodeSigner object. Can be accessed
-    // through SharedSecrets.getJavaSecurityCodeSignerAccess().[g|s]etCRLs
-    //
-    // Currently called in SignatureFileVerifier.getSigners
-    private transient CRL[] crls;
-
-    /**
-     * Sets the CRLs attached
-     * @param crls, null to clear
-     */
-    void setCRLs(CRL[] crls) {
-        this.crls = crls;
-    }
-
-    /**
-     * Returns the CRLs attached
-     * @return the crls, initially null
-     */
-    CRL[] getCRLs() {
-        return crls;
-    }
-
-    // Set up JavaSecurityCodeSignerAccess in SharedSecrets
-    static {
-        SharedSecrets.setJavaSecurityCodeSignerAccess(
-                new JavaSecurityCodeSignerAccess() {
-            @Override
-            public void setCRLs(CodeSigner signer, CRL[] crls) {
-                signer.setCRLs(crls);
-            }
-
-            @Override
-            public CRL[] getCRLs(CodeSigner signer) {
-                return signer.getCRLs();
-            }
-        });
-    }
-
     // Explicitly reset hash code value to -1
     private void readObject(ObjectInputStream ois)
         throws IOException, ClassNotFoundException {
--- a/src/share/classes/java/security/CodeSource.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/security/CodeSource.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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
@@ -578,7 +578,7 @@
 
         // Deserialize array of code signers (if any)
         try {
-            this.signers = (CodeSigner[])ois.readObject();
+            this.signers = ((CodeSigner[])ois.readObject()).clone();
         } catch (IOException ioe) {
             // no signers present
         }
--- a/src/share/classes/java/security/Timestamp.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/security/Timestamp.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -157,7 +157,8 @@
     // Explicitly reset hash code value to -1
     private void readObject(ObjectInputStream ois)
         throws IOException, ClassNotFoundException {
-     ois.defaultReadObject();
-     myhash = -1;
+        ois.defaultReadObject();
+        myhash = -1;
+        timestamp = new Date(timestamp.getTime());
     }
 }
--- a/src/share/classes/java/sql/DriverManager.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/sql/DriverManager.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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,10 +26,10 @@
 package java.sql;
 
 import java.util.Iterator;
-import java.sql.Driver;
 import java.util.ServiceLoader;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 
 /**
@@ -79,6 +79,27 @@
 public class DriverManager {
 
 
+    // List of registered JDBC drivers
+    private final static CopyOnWriteArrayList<Driver> registeredDrivers = new CopyOnWriteArrayList<Driver>();
+    private static volatile int loginTimeout = 0;
+    private static volatile java.io.PrintWriter logWriter = null;
+    private static volatile java.io.PrintStream logStream = null;
+    // Used in println() to synchronize logWriter
+    private final static  Object logSync = new Object();
+
+    /* Prevent the DriverManager class from being instantiated. */
+    private DriverManager(){}
+
+
+    /**
+     * Load the initial JDBC drivers by checking the System property
+     * jdbc.properties and then use the {@code ServiceLoader} mechanism
+     */
+    static {
+        loadInitialDrivers();
+        println("JDBC DriverManager initialized");
+    }
+
     /**
      * The <code>SQLPermission</code> constant that allows the
      * setting of the logging stream.
@@ -235,44 +256,33 @@
      */
     public static Driver getDriver(String url)
         throws SQLException {
-        java.util.Vector drivers = null;
 
         println("DriverManager.getDriver(\"" + url + "\")");
 
-        if (!initialized) {
-            initialize();
-        }
-
-        synchronized (DriverManager.class){
-            // use the read copy of the drivers vector
-            drivers = readDrivers;
-        }
-
         // Gets the classloader of the code that called this method, may
         // be null.
         ClassLoader callerCL = DriverManager.getCallerClassLoader();
 
-        // Walk through the loaded drivers attempting to locate someone
+        // Walk through the loaded registeredDrivers attempting to locate someone
         // who understands the given URL.
-        for (int i = 0; i < drivers.size(); i++) {
-            DriverInfo di = (DriverInfo)drivers.elementAt(i);
+        for (Driver aDriver : registeredDrivers) {
             // If the caller does not have permission to load the driver then
             // skip it.
-            if ( getCallerClass(callerCL, di.driverClassName ) !=
-                 di.driverClass ) {
-                println("    skipping: " + di);
-                continue;
+            if(isDriverAllowed(aDriver, callerCL)) {
+                try {
+                    if(aDriver.acceptsURL(url)) {
+                        // Success!
+                        println("getDriver returning " + aDriver.getClass().getName());
+                    return (aDriver);
+                    }
+
+                } catch(SQLException sqe) {
+                    // Drop through and try the next driver.
+                }
+            } else {
+                println("    skipping: " + aDriver.getClass().getName());
             }
-            try {
-                println("    trying " + di);
-                if (di.driver.acceptsURL(url)) {
-                    // Success!
-                    println("getDriver returning " + di);
-                    return (di.driver);
-                }
-            } catch (SQLException ex) {
-                // Drop through and try the next driver.
-            }
+
         }
 
         println("getDriver: no suitable driver");
@@ -292,23 +302,16 @@
      */
     public static synchronized void registerDriver(java.sql.Driver driver)
         throws SQLException {
-        if (!initialized) {
-            initialize();
+
+        /* Register the driver if it has not already been added to our list */
+        if(driver != null) {
+            registeredDrivers.addIfAbsent(driver);
+        } else {
+            // This is for compatibility with the original DriverManager
+            throw new NullPointerException();
         }
 
-        DriverInfo di = new DriverInfo();
-
-        di.driver = driver;
-        di.driverClass = driver.getClass();
-        di.driverClassName = di.driverClass.getName();
-
-        // Not Required -- drivers.addElement(di);
-
-        writeDrivers.addElement(di);
-        println("registerDriver: " + di);
-
-        /* update the read copy of drivers vector */
-        readDrivers = (java.util.Vector) writeDrivers.clone();
+        println("registerDriver: " + driver);
 
     }
 
@@ -321,37 +324,26 @@
      */
     public static synchronized void deregisterDriver(Driver driver)
         throws SQLException {
+        if (driver == null) {
+            return;
+        }
+
         // Gets the classloader of the code that called this method,
         // may be null.
         ClassLoader callerCL = DriverManager.getCallerClassLoader();
         println("DriverManager.deregisterDriver: " + driver);
 
-        // Walk through the loaded drivers.
-        int i;
-        DriverInfo di = null;
-        for (i = 0; i < writeDrivers.size(); i++) {
-            di = (DriverInfo)writeDrivers.elementAt(i);
-            if (di.driver == driver) {
-                break;
+        if(registeredDrivers.contains(driver)) {
+            if (isDriverAllowed(driver, callerCL)) {
+                 registeredDrivers.remove(driver);
+            } else {
+                // If the caller does not have permission to load the driver then
+                // throw a SecurityException.
+                throw new SecurityException();
             }
-        }
-        // If we can't find the driver just return.
-        if (i >= writeDrivers.size()) {
+        } else {
             println("    couldn't find driver to unload");
-            return;
         }
-
-        // If the caller does not have permission to load the driver then
-        // throw a security exception.
-        if (getCallerClass(callerCL, di.driverClassName ) != di.driverClass ) {
-            throw new SecurityException();
-        }
-
-        // Remove the driver.  Other entries in drivers get shuffled down.
-        writeDrivers.removeElementAt(i);
-
-        /* update the read copy of drivers vector */
-        readDrivers = (java.util.Vector) writeDrivers.clone();
     }
 
     /**
@@ -364,34 +356,22 @@
      * @return the list of JDBC Drivers loaded by the caller's class loader
      */
     public static java.util.Enumeration<Driver> getDrivers() {
-        java.util.Vector<Driver> result = new java.util.Vector<>();
-        java.util.Vector drivers = null;
-
-        if (!initialized) {
-            initialize();
-        }
-
-        synchronized (DriverManager.class){
-            // use the readcopy of drivers
-            drivers  = readDrivers;
-       }
+        java.util.Vector<Driver> result = new java.util.Vector<Driver>();
 
         // Gets the classloader of the code that called this method, may
         // be null.
         ClassLoader callerCL = DriverManager.getCallerClassLoader();
 
-        // Walk through the loaded drivers.
-        for (int i = 0; i < drivers.size(); i++) {
-            DriverInfo di = (DriverInfo)drivers.elementAt(i);
+        // Walk through the loaded registeredDrivers.
+        for(Driver aDriver : registeredDrivers) {
             // If the caller does not have permission to load the driver then
             // skip it.
-            if ( getCallerClass(callerCL, di.driverClassName ) != di.driverClass ) {
-                println("    skipping: " + di);
-                continue;
+            if(isDriverAllowed(aDriver, callerCL)) {
+                result.addElement(aDriver);
+            } else {
+                println("    skipping: " + aDriver.getClass().getName());
             }
-            result.addElement(di.driver);
         }
-
         return (result.elements());
     }
 
@@ -481,21 +461,22 @@
 
     //------------------------------------------------------------------------
 
-    // Returns the class object that would be created if the code calling the
-    // driver manager had loaded the driver class, or null if the class
-    // is inaccessible.
-    private static Class getCallerClass(ClassLoader callerClassLoader,
-                                        String driverClassName) {
-        Class callerC = null;
+    // Indicates whether the class object that would be created if the code calling
+    // DriverManager is accessible.
+    private static boolean isDriverAllowed(Driver driver, ClassLoader classLoader) {
+        boolean result = false;
+        if(driver != null) {
+            Class<?> aClass = null;
+            try {
+                aClass =  Class.forName(driver.getClass().getName(), true, classLoader);
+            } catch (Exception ex) {
+                result = false;
+            }
 
-        try {
-            callerC = Class.forName(driverClassName, true, callerClassLoader);
-        }
-        catch (Exception ex) {
-            callerC = null;           // being very careful
+             result = ( aClass == driver.getClass() ) ? true : false;
         }
 
-        return callerC;
+        return result;
     }
 
     private static void loadInitialDrivers() {
@@ -544,26 +525,17 @@
         });
 
         println("DriverManager.initialize: jdbc.drivers = " + drivers);
-        if (drivers == null) {
+
+        if (drivers == null || drivers.equals("")) {
             return;
         }
-        while (drivers.length() != 0) {
-            int x = drivers.indexOf(':');
-            String driver;
-            if (x < 0) {
-                driver = drivers;
-                drivers = "";
-            } else {
-                driver = drivers.substring(0, x);
-                drivers = drivers.substring(x+1);
-            }
-            if (driver.length() == 0) {
-                continue;
-            }
+        String[] driversList = drivers.split(":");
+        println("number of Drivers:" + driversList.length);
+        for (String aDriver : driversList) {
             try {
-                println("DriverManager.Initialize: loading " + driver);
-                Class.forName(driver, true,
-                              ClassLoader.getSystemClassLoader());
+                println("DriverManager.Initialize: loading " + aDriver);
+                Class.forName(aDriver, true,
+                        ClassLoader.getSystemClassLoader());
             } catch (Exception ex) {
                 println("DriverManager.Initialize: load failed: " + ex);
             }
@@ -574,7 +546,6 @@
     //  Worker method called by the public getConnection() methods.
     private static Connection getConnection(
         String url, java.util.Properties info, ClassLoader callerCL) throws SQLException {
-        java.util.Vector drivers = null;
         /*
          * When callerCl is null, we should check the application's
          * (which is invoking this class indirectly)
@@ -594,40 +565,32 @@
 
         println("DriverManager.getConnection(\"" + url + "\")");
 
-        if (!initialized) {
-            initialize();
-        }
-
-        synchronized (DriverManager.class){
-            // use the readcopy of drivers
-            drivers = readDrivers;
-        }
-
-        // Walk through the loaded drivers attempting to make a connection.
+        // Walk through the loaded registeredDrivers attempting to make a connection.
         // Remember the first exception that gets raised so we can reraise it.
         SQLException reason = null;
-        for (int i = 0; i < drivers.size(); i++) {
-            DriverInfo di = (DriverInfo)drivers.elementAt(i);
 
+        for(Driver aDriver : registeredDrivers) {
             // If the caller does not have permission to load the driver then
             // skip it.
-            if ( getCallerClass(callerCL, di.driverClassName ) != di.driverClass ) {
-                println("    skipping: " + di);
-                continue;
+            if(isDriverAllowed(aDriver, callerCL)) {
+                try {
+                    println("    trying " + aDriver.getClass().getName());
+                    Connection con = aDriver.connect(url, info);
+                    if (con != null) {
+                        // Success!
+                        println("getConnection returning " + aDriver.getClass().getName());
+                        return (con);
+                    }
+                } catch (SQLException ex) {
+                    if (reason == null) {
+                        reason = ex;
+                    }
+                }
+
+            } else {
+                println("    skipping: " + aDriver.getClass().getName());
             }
-            try {
-                println("    trying " + di);
-                Connection result = di.driver.connect(url, info);
-                if (result != null) {
-                    // Success!
-                    println("getConnection returning " + di);
-                    return (result);
-                }
-            } catch (SQLException ex) {
-                if (reason == null) {
-                    reason = ex;
-                }
-            }
+
         }
 
         // if we got here nobody could connect.
@@ -640,45 +603,7 @@
         throw new SQLException("No suitable driver found for "+ url, "08001");
     }
 
-
-    // Class initialization.
-    static void initialize() {
-        if (initialized) {
-            return;
-        }
-        initialized = true;
-        loadInitialDrivers();
-        println("JDBC DriverManager initialized");
-    }
-
-    /* Prevent the DriverManager class from being instantiated. */
-    private DriverManager(){}
-
-    /* write copy of the drivers vector */
-    private static java.util.Vector writeDrivers = new java.util.Vector();
-
-    /* write copy of the drivers vector */
-    private static java.util.Vector readDrivers = new java.util.Vector();
-
-    private static int loginTimeout = 0;
-    private static java.io.PrintWriter logWriter = null;
-    private static java.io.PrintStream logStream = null;
-    private static boolean initialized = false;
-
-    private static Object logSync = new Object();
-
     /* Returns the caller's class loader, or null if none */
     private static native ClassLoader getCallerClassLoader();
 
 }
-
-// DriverInfo is a package-private support class.
-class DriverInfo {
-    Driver         driver;
-    Class          driverClass;
-    String         driverClassName;
-
-    public String toString() {
-        return ("driver[className=" + driverClassName + "," + driver + "]");
-    }
-}
--- a/src/share/classes/java/text/SimpleDateFormat.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/text/SimpleDateFormat.java	Wed Apr 20 04:38:36 2011 +0100
@@ -504,8 +504,8 @@
     /**
      * Cache to hold the DateTimePatterns of a Locale.
      */
-    private static final ConcurrentMap<String, String[]> cachedLocaleData
-        = new ConcurrentHashMap<String, String[]>(3);
+    private static final ConcurrentMap<Locale, String[]> cachedLocaleData
+        = new ConcurrentHashMap<Locale, String[]>(3);
 
     /**
      * Cache NumberFormat instances with Locale key.
@@ -619,8 +619,7 @@
         initializeCalendar(loc);
 
         /* try the cache first */
-        String key = getKey();
-        String[] dateTimePatterns = cachedLocaleData.get(key);
+        String[] dateTimePatterns = cachedLocaleData.get(loc);
         if (dateTimePatterns == null) { /* cache miss */
             ResourceBundle r = LocaleData.getDateFormatData(loc);
             if (!isGregorianCalendar()) {
@@ -633,7 +632,7 @@
                 dateTimePatterns = r.getStringArray("DateTimePatterns");
             }
             /* update cache */
-            cachedLocaleData.putIfAbsent(key, dateTimePatterns);
+            cachedLocaleData.putIfAbsent(loc, dateTimePatterns);
         }
         formatData = DateFormatSymbols.getInstanceRef(loc);
         if ((timeStyle >= 0) && (dateStyle >= 0)) {
@@ -684,13 +683,6 @@
         }
     }
 
-    private String getKey() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getCalendarName()).append('.');
-        sb.append(locale.getLanguage()).append('_').append(locale.getCountry()).append('_').append(locale.getVariant());
-        return sb.toString();
-    }
-
     /**
      * Returns the compiled form of the given pattern. The syntax of
      * the compiled pattern is:
--- a/src/share/classes/java/util/Calendar.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/Calendar.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -554,7 +554,7 @@
 
     /**
      * Field number for <code>get</code> and <code>set</code> indicating the
-     * daylight savings offset in milliseconds.
+     * daylight saving offset in milliseconds.
      * <p>
      * This field reflects the correct daylight saving offset value of
      * the time zone of this <code>Calendar</code> if the
--- a/src/share/classes/java/util/Currency.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/Currency.java	Wed Apr 20 04:38:36 2011 +0100
@@ -233,7 +233,9 @@
                                              "currency.properties");
                     if (propFile.exists()) {
                         Properties props = new Properties();
-                        props.load(new FileReader(propFile));
+                        try (FileReader fr = new FileReader(propFile)) {
+                            props.load(fr);
+                        }
                         Set<String> keys = props.stringPropertyNames();
                         Pattern propertiesPattern =
                             Pattern.compile("([A-Z]{3})\\s*,\\s*(\\d{3})\\s*,\\s*([0-3])");
--- a/src/share/classes/java/util/Formatter.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/Formatter.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1401,10 +1401,9 @@
  *     <p> The number of digits in the result for the fractional part of
  *     <i>m</i> or <i>a</i> is equal to the precision.  If the precision is not
  *     specified then the default value is {@code 6}.  If the precision is
- *     less than the number of digits which would appear after the decimal
- *     point in the string returned by {@link Float#toString(float)} or {@link
- *     Double#toString(double)} respectively, then the value will be rounded
- *     using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
+ *     less than the number of digits to the right of the decimal point then
+ *     the value will be rounded using the
+ *     {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
  *     algorithm}.  Otherwise, zeros may be appended to reach the precision.
  *     For a canonical representation of the value, use {@link
  *     BigDecimal#toString()}.
@@ -1463,12 +1462,11 @@
  *     more decimal digits representing the fractional part of <i>m</i>.
  *
  *     <p> The number of digits in the result for the fractional part of
- *     <i>m</i> or <i>a</i> is equal to the precision.  If the precision is not
+ *     <i>m</i> or <i>a</i> is equal to the precision. If the precision is not
  *     specified then the default value is {@code 6}.  If the precision is
- *     less than the number of digits which would appear after the decimal
- *     point in the string returned by {@link Float#toString(float)} or {@link
- *     Double#toString(double)} respectively, then the value will be rounded
- *     using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
+ *     less than the number of digits to the right of the decimal point
+ *     then the value will be rounded using the
+ *     {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
  *     algorithm}.  Otherwise, zeros may be appended to reach the precision.
  *     For a canonical representation of the value, use {@link
  *     BigDecimal#toString()}.
@@ -3585,7 +3583,7 @@
                 int scale = value.scale();
 
                 if (scale > prec) {
-                    // more "scale" digits than the requested "precision
+                    // more "scale" digits than the requested "precision"
                     int compPrec = value.precision();
                     if (compPrec <= scale) {
                         // case of 0.xxxxxx
--- a/src/share/classes/java/util/GregorianCalendar.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/GregorianCalendar.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -260,7 +260,7 @@
  * // create a Pacific Standard Time time zone
  * SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
  *
- * // set up rules for daylight savings time
+ * // set up rules for Daylight Saving Time
  * pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
  * pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
  *
--- a/src/share/classes/java/util/Hashtable.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/Hashtable.java	Wed Apr 20 04:38:36 2011 +0100
@@ -845,24 +845,36 @@
      *             for each key-value mapping represented by the Hashtable
      *             The key-value mappings are emitted in no particular order.
      */
-    private synchronized void writeObject(java.io.ObjectOutputStream s)
-        throws IOException
-    {
-        // Write out the length, threshold, loadfactor
-        s.defaultWriteObject();
+    private void writeObject(java.io.ObjectOutputStream s)
+            throws IOException {
+        Entry<Object, Object> entryStack = null;
+
+        synchronized (this) {
+            // Write out the length, threshold, loadfactor
+            s.defaultWriteObject();
+
+            // Write out length, count of elements
+            s.writeInt(table.length);
+            s.writeInt(count);
 
-        // Write out length, count of elements and then the key/value objects
-        s.writeInt(table.length);
-        s.writeInt(count);
-        for (int index = table.length-1; index >= 0; index--) {
-            Entry entry = table[index];
+            // Stack copies of the entries in the table
+            for (int index = 0; index < table.length; index++) {
+                Entry entry = table[index];
 
-            while (entry != null) {
-                s.writeObject(entry.key);
-                s.writeObject(entry.value);
-                entry = entry.next;
+                while (entry != null) {
+                    entryStack =
+                        new Entry<>(0, entry.key, entry.value, entryStack);
+                    entry = entry.next;
+                }
             }
         }
+
+        // Write out the key/value objects from the stacked entries
+        while (entryStack != null) {
+            s.writeObject(entryStack.key);
+            s.writeObject(entryStack.value);
+            entryStack = entryStack.next;
+        }
     }
 
     /**
--- a/src/share/classes/java/util/JumboEnumSet.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/JumboEnumSet.java	Wed Apr 20 04:38:36 2011 +0100
@@ -34,6 +34,8 @@
  * @serial exclude
  */
 class JumboEnumSet<E extends Enum<E>> extends EnumSet<E> {
+    private static final long serialVersionUID = 334349849919042784L;
+
     /**
      * Bit vector representation of this set.  The ith bit of the jth
      * element of this array represents the  presence of universe[64*j +i]
@@ -138,8 +140,11 @@
         public void remove() {
             if (lastReturned == 0)
                 throw new IllegalStateException();
-            elements[lastReturnedIndex] -= lastReturned;
-            size--;
+            final long oldElements = elements[lastReturnedIndex];
+            elements[lastReturnedIndex] &= ~lastReturned;
+            if (oldElements != elements[lastReturnedIndex]) {
+                size--;
+            }
             lastReturned = 0;
         }
     }
--- a/src/share/classes/java/util/Locale.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/Locale.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1168,7 +1168,7 @@
         boolean e = (_extensions.getID().length() != 0);
 
         StringBuilder result = new StringBuilder(_baseLocale.getLanguage());
-        if (r || (l && v)) {
+        if (r || (l && (v || s || e))) {
             result.append('_')
                 .append(_baseLocale.getRegion()); // This may just append '_'
         }
--- a/src/share/classes/java/util/RegularEnumSet.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/RegularEnumSet.java	Wed Apr 20 04:38:36 2011 +0100
@@ -34,6 +34,7 @@
  * @serial exclude
  */
 class RegularEnumSet<E extends Enum<E>> extends EnumSet<E> {
+    private static final long serialVersionUID = 3411599620347842686L;
     /**
      * Bit vector representation of this set.  The 2^k bit indicates the
      * presence of universe[k] in this set.
@@ -106,7 +107,7 @@
         public void remove() {
             if (lastReturned == 0)
                 throw new IllegalStateException();
-            elements -= lastReturned;
+            elements &= ~lastReturned;
             lastReturned = 0;
         }
     }
--- a/src/share/classes/java/util/SimpleTimeZone.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/SimpleTimeZone.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -825,10 +825,7 @@
      * @since 1.2
      */
     public int getDSTSavings() {
-        if (useDaylight) {
-            return dstSavings;
-        }
-        return 0;
+        return useDaylight ? dstSavings : 0;
     }
 
     /**
@@ -842,6 +839,20 @@
     }
 
     /**
+     * Returns {@code true} if this {@code SimpleTimeZone} observes
+     * Daylight Saving Time. This method is equivalent to {@link
+     * #useDaylightTime()}.
+     *
+     * @return {@code true} if this {@code SimpleTimeZone} observes
+     * Daylight Saving Time; {@code false} otherwise.
+     * @since 1.7
+     */
+    @Override
+    public boolean observesDaylightTime() {
+        return useDaylightTime();
+    }
+
+    /**
      * Queries if the given date is in daylight saving time.
      * @return true if daylight saving time is in effective at the
      * given date; false otherwise.
--- a/src/share/classes/java/util/TimeZone.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/TimeZone.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -339,8 +339,9 @@
     /**
      * Returns a name in the specified {@code style} of this {@code TimeZone}
      * suitable for presentation to the user in the default locale. If the
-     * specified {@code daylight} is {@code true}, a daylight saving time name
-     * is returned. Otherwise, a standard time name is returned.
+     * specified {@code daylight} is {@code true}, a Daylight Saving Time name
+     * is returned (even if this {@code TimeZone} doesn't observe Daylight Saving
+     * Time). Otherwise, a Standard Time name is returned.
      *
      * <p>This method is equivalent to:
      * <pre><blockquote>
@@ -348,7 +349,8 @@
      *                Locale.getDefault({@link Locale.Category#DISPLAY}))
      * </blockquote></pre>
      *
-     * @param daylight if {@code true}, return the daylight saving time name.
+     * @param daylight {@code true} specifying a Daylight Saving Time name, or
+     *                 {@code false} specifying a Standard Time name
      * @param style either {@link #LONG} or {@link #SHORT}
      * @return the human-readable name of this time zone in the default locale.
      * @exception IllegalArgumentException if {@code style} is invalid.
@@ -356,6 +358,7 @@
      * @see #getDisplayName(boolean, int, Locale)
      * @see Locale#getDefault(Locale.Category)
      * @see Locale.Category
+     * @see java.text.DateFormatSymbols#getZoneStrings()
      */
     public final String getDisplayName(boolean daylight, int style) {
         return getDisplayName(daylight, style,
@@ -365,8 +368,9 @@
     /**
      * Returns a name in the specified {@code style} of this {@code TimeZone}
      * suitable for presentation to the user in the specified {@code
-     * locale}. If the specified {@code daylight} is {@code true}, a daylight
-     * saving time name is returned. Otherwise, a standard time name is
+     * locale}. If the specified {@code daylight} is {@code true}, a Daylight
+     * Saving Time name is returned (even if this {@code TimeZone} doesn't
+     * observe Daylight Saving Time). Otherwise, a Standard Time name is
      * returned.
      *
      * <p>When looking up a time zone name, the {@linkplain
@@ -379,13 +383,15 @@
      * found, the name is returned. Otherwise, a string in the
      * <a href="#NormalizedCustomID">normalized custom ID format</a> is returned.
      *
-     * @param daylight if {@code true}, return the daylight saving time name.
+     * @param daylight {@code true} specifying a Daylight Saving Time name, or
+     *                 {@code false} specifying a Standard Time name
      * @param style either {@link #LONG} or {@link #SHORT}
-     * @param locale the locale in which to supply the display name.
+     * @param locale   the locale in which to supply the display name.
      * @return the human-readable name of this time zone in the given locale.
      * @exception IllegalArgumentException if {@code style} is invalid.
      * @exception NullPointerException if {@code locale} is {@code null}.
      * @since 1.2
+     * @see java.text.DateFormatSymbols#getZoneStrings()
      */
     public String getDisplayName(boolean daylight, int style, Locale locale) {
         if (style != SHORT && style != LONG) {
@@ -455,17 +461,28 @@
     /**
      * Returns the amount of time to be added to local standard time
      * to get local wall clock time.
-     * <p>
-     * The default implementation always returns 3600000 milliseconds
-     * (i.e., one hour) if this time zone observes Daylight Saving
-     * Time. Otherwise, 0 (zero) is returned.
-     * <p>
-     * If an underlying TimeZone implementation subclass supports
-     * historical Daylight Saving Time changes, this method returns
-     * the known latest daylight saving value.
+     *
+     * <p>The default implementation returns 3600000 milliseconds
+     * (i.e., one hour) if a call to {@link #useDaylightTime()}
+     * returns {@code true}. Otherwise, 0 (zero) is returned.
+     *
+     * <p>If an underlying {@code TimeZone} implementation subclass
+     * supports historical and future Daylight Saving Time schedule
+     * changes, this method returns the amount of saving time of the
+     * last known Daylight Saving Time rule that can be a future
+     * prediction.
+     *
+     * <p>If the amount of saving time at any given time stamp is
+     * required, construct a {@link Calendar} with this {@code
+     * TimeZone} and the time stamp, and call {@link Calendar#get(int)
+     * Calendar.get}{@code (}{@link Calendar#DST_OFFSET}{@code )}.
      *
      * @return the amount of saving time in milliseconds
      * @since 1.4
+     * @see #inDaylightTime(Date)
+     * @see #getOffset(long)
+     * @see #getOffset(int,int,int,int,int,int)
+     * @see Calendar#ZONE_OFFSET
      */
     public int getDSTSavings() {
         if (useDaylightTime()) {
@@ -475,24 +492,51 @@
     }
 
     /**
-     * Queries if this time zone uses daylight savings time.
-     * <p>
-     * If an underlying <code>TimeZone</code> implementation subclass
-     * supports historical Daylight Saving Time schedule changes, the
-     * method refers to the latest Daylight Saving Time schedule
-     * information.
+     * Queries if this {@code TimeZone} uses Daylight Saving Time.
      *
-     * @return true if this time zone uses daylight savings time,
-     * false, otherwise.
+     * <p>If an underlying {@code TimeZone} implementation subclass
+     * supports historical and future Daylight Saving Time schedule
+     * changes, this method refers to the last known Daylight Saving Time
+     * rule that can be a future prediction and may not be the same as
+     * the current rule. Consider calling {@link #observesDaylightTime()}
+     * if the current rule should also be taken into account.
+     *
+     * @return {@code true} if this {@code TimeZone} uses Daylight Saving Time,
+     *         {@code false}, otherwise.
+     * @see #inDaylightTime(Date)
+     * @see Calendar#DST_OFFSET
      */
     public abstract boolean useDaylightTime();
 
     /**
-     * Queries if the given date is in daylight savings time in
+     * Returns {@code true} if this {@code TimeZone} is currently in
+     * Daylight Saving Time, or if a transition from Standard Time to
+     * Daylight Saving Time occurs at any future time.
+     *
+     * <p>The default implementation returns {@code true} if
+     * {@code useDaylightTime()} or {@code inDaylightTime(new Date())}
+     * returns {@code true}.
+     *
+     * @return {@code true} if this {@code TimeZone} is currently in
+     * Daylight Saving Time, or if a transition from Standard Time to
+     * Daylight Saving Time occurs at any future time; {@code false}
+     * otherwise.
+     * @since 1.7
+     * @see #useDaylightTime()
+     * @see #inDaylightTime(Date)
+     * @see Calendar#DST_OFFSET
+     */
+    public boolean observesDaylightTime() {
+        return useDaylightTime() || inDaylightTime(new Date());
+    }
+
+    /**
+     * Queries if the given {@code date} is in Daylight Saving Time in
      * this time zone.
+     *
      * @param date the given Date.
-     * @return true if the given date is in daylight savings time,
-     * false, otherwise.
+     * @return {@code true} if the given date is in Daylight Saving Time,
+     *         {@code false}, otherwise.
      */
     abstract public boolean inDaylightTime(Date date);
 
@@ -528,7 +572,7 @@
      * @param rawOffset the given time zone GMT offset in milliseconds.
      * @return an array of IDs, where the time zone for that ID has
      * the specified GMT offset. For example, "America/Phoenix" and "America/Denver"
-     * both have GMT-07:00, but differ in daylight savings behavior.
+     * both have GMT-07:00, but differ in daylight saving behavior.
      * @see #getRawOffset()
      */
     public static synchronized String[] getAvailableIDs(int rawOffset) {
--- a/src/share/classes/java/util/TreeMap.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/TreeMap.java	Wed Apr 20 04:38:36 2011 +0100
@@ -528,11 +528,8 @@
     public V put(K key, V value) {
         Entry<K,V> t = root;
         if (t == null) {
-            // TBD:
-            // 5045147: (coll) Adding null to an empty TreeSet should
-            // throw NullPointerException
-            //
-            // compare(key, key); // type check
+            compare(key, key); // type (and possibly null) check
+
             root = new Entry<>(key, value, null);
             size = 1;
             modCount++;
--- a/src/share/classes/java/util/UUID.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/UUID.java	Wed Apr 20 04:38:36 2011 +0100
@@ -26,8 +26,6 @@
 package java.util;
 
 import java.security.*;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 
 /**
  * A class that represents an immutable universally unique identifier (UUID).
@@ -91,36 +89,6 @@
     private final long leastSigBits;
 
     /*
-     * The version number associated with this UUID. Computed on demand.
-     */
-    private transient int version = -1;
-
-    /*
-     * The variant number associated with this UUID. Computed on demand.
-     */
-    private transient int variant = -1;
-
-    /*
-     * The timestamp associated with this UUID. Computed on demand.
-     */
-    private transient volatile long timestamp = -1;
-
-    /*
-     * The clock sequence associated with this UUID. Computed on demand.
-     */
-    private transient int sequence = -1;
-
-    /*
-     * The node number associated with this UUID. Computed on demand.
-     */
-    private transient long node = -1;
-
-    /*
-     * The hashcode of this UUID. Computed on demand.
-     */
-    private transient int hashCode = -1;
-
-    /*
      * The random number generator used by this class to create random
      * based UUIDs.
      */
@@ -134,7 +102,7 @@
     private UUID(byte[] data) {
         long msb = 0;
         long lsb = 0;
-        assert data.length == 16;
+        assert data.length == 16 : "data must be 16 bytes in length";
         for (int i=0; i<8; i++)
             msb = (msb << 8) | (data[i] & 0xff);
         for (int i=8; i<16; i++)
@@ -276,11 +244,8 @@
      * @return  The version number of this {@code UUID}
      */
     public int version() {
-        if (version < 0) {
-            // Version is bits masked by 0x000000000000F000 in MS long
-            version = (int)((mostSigBits >> 12) & 0x0f);
-        }
-        return version;
+        // Version is bits masked by 0x000000000000F000 in MS long
+        return (int)((mostSigBits >> 12) & 0x0f);
     }
 
     /**
@@ -298,17 +263,13 @@
      * @return  The variant number of this {@code UUID}
      */
     public int variant() {
-        if (variant < 0) {
-            // This field is composed of a varying number of bits
-            if ((leastSigBits >>> 63) == 0) {
-                variant = 0;
-            } else if ((leastSigBits >>> 62) == 2) {
-                variant = 2;
-            } else {
-                variant = (int)(leastSigBits >>> 61);
-            }
-        }
-        return variant;
+        // This field is composed of a varying number of bits.
+        // 0    -    -    Reserved for NCS backward compatibility
+        // 1    0    -    The Leach-Salz variant (used by this class)
+        // 1    1    0    Reserved, Microsoft backward compatibility
+        // 1    1    1    Reserved for future definition.
+        return (int) ((leastSigBits >>> (64 - (leastSigBits >>> 62)))
+                      & (leastSigBits >> 63));
     }
 
     /**
@@ -330,14 +291,10 @@
         if (version() != 1) {
             throw new UnsupportedOperationException("Not a time-based UUID");
         }
-        long result = timestamp;
-        if (result < 0) {
-            result = (mostSigBits & 0x0000000000000FFFL) << 48;
-            result |= ((mostSigBits >> 16) & 0xFFFFL) << 32;
-            result |= mostSigBits >>> 32;
-            timestamp = result;
-        }
-        return result;
+
+        return (mostSigBits & 0x0FFFL) << 48
+             | ((mostSigBits >> 16) & 0x0FFFFL) << 32
+             | mostSigBits >>> 32;
     }
 
     /**
@@ -360,10 +317,8 @@
         if (version() != 1) {
             throw new UnsupportedOperationException("Not a time-based UUID");
         }
-        if (sequence < 0) {
-            sequence = (int)((leastSigBits & 0x3FFF000000000000L) >>> 48);
-        }
-        return sequence;
+
+        return (int)((leastSigBits & 0x3FFF000000000000L) >>> 48);
     }
 
     /**
@@ -386,10 +341,8 @@
         if (version() != 1) {
             throw new UnsupportedOperationException("Not a time-based UUID");
         }
-        if (node < 0) {
-            node = leastSigBits & 0x0000FFFFFFFFFFFFL;
-        }
-        return node;
+
+        return leastSigBits & 0x0000FFFFFFFFFFFFL;
     }
 
     // Object Inherited Methods
@@ -438,13 +391,8 @@
      * @return  A hash code value for this {@code UUID}
      */
     public int hashCode() {
-        if (hashCode == -1) {
-            hashCode = (int)((mostSigBits >> 32) ^
-                             mostSigBits ^
-                             (leastSigBits >> 32) ^
-                             leastSigBits);
-        }
-        return hashCode;
+        long hilo = mostSigBits ^ leastSigBits;
+        return ((int)(hilo >> 32)) ^ (int) hilo;
     }
 
     /**
@@ -460,9 +408,7 @@
      *          otherwise
      */
     public boolean equals(Object obj) {
-        if (!(obj instanceof UUID))
-            return false;
-        if (((UUID)obj).variant() != this.variant())
+        if ((null == obj) || (obj.getClass() != UUID.class))
             return false;
         UUID id = (UUID)obj;
         return (mostSigBits == id.mostSigBits &&
@@ -494,23 +440,4 @@
                   (this.leastSigBits > val.leastSigBits ? 1 :
                    0))));
     }
-
-    /**
-     * Reconstitute the {@code UUID} instance from a stream (that is,
-     * deserialize it).  This is necessary to set the transient fields to their
-     * correct uninitialized value so they will be recomputed on demand.
-     */
-    private void readObject(java.io.ObjectInputStream in)
-        throws java.io.IOException, ClassNotFoundException {
-
-        in.defaultReadObject();
-
-        // Set "cached computation" fields to their initial values
-        version = -1;
-        variant = -1;
-        timestamp = -1;
-        sequence = -1;
-        node = -1;
-        hashCode = -1;
-    }
 }
--- a/src/share/classes/java/util/Vector.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/Vector.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1050,13 +1050,21 @@
 
     /**
      * Save the state of the {@code Vector} instance to a stream (that
-     * is, serialize it).  This method is present merely for synchronization.
-     * It just calls the default writeObject method.
+     * is, serialize it).
+     * This method performs synchronization to ensure the consistency
+     * of the serialized data.
      */
-    private synchronized void writeObject(java.io.ObjectOutputStream s)
-        throws java.io.IOException
-    {
-        s.defaultWriteObject();
+    private void writeObject(java.io.ObjectOutputStream s)
+            throws java.io.IOException {
+        final java.io.ObjectOutputStream.PutField fields = s.putFields();
+        final Object[] data;
+        synchronized (this) {
+            fields.put("capacityIncrement", capacityIncrement);
+            fields.put("elementCount", elementCount);
+            data = elementData.clone();
+        }
+        fields.put("elementData", data);
+        s.writeFields();
     }
 
     /**
--- a/src/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Wed Apr 20 04:38:36 2011 +0100
@@ -272,13 +272,6 @@
 
     private static final Node<Object> PREV_TERMINATOR, NEXT_TERMINATOR;
 
-    static {
-        PREV_TERMINATOR = new Node<Object>(null);
-        PREV_TERMINATOR.next = PREV_TERMINATOR;
-        NEXT_TERMINATOR = new Node<Object>(null);
-        NEXT_TERMINATOR.prev = NEXT_TERMINATOR;
-    }
-
     @SuppressWarnings("unchecked")
     Node<E> prevTerminator() {
         return (Node<E>) PREV_TERMINATOR;
@@ -294,6 +287,9 @@
         volatile E item;
         volatile Node<E> next;
 
+        Node() {  // default constructor for NEXT_TERMINATOR, PREV_TERMINATOR
+        }
+
         /**
          * Constructs a new node.  Uses relaxed write because item can
          * only be seen after publication via casNext or casPrev.
@@ -324,14 +320,25 @@
 
         // Unsafe mechanics
 
-        private static final sun.misc.Unsafe UNSAFE =
-            sun.misc.Unsafe.getUnsafe();
-        private static final long prevOffset =
-            objectFieldOffset(UNSAFE, "prev", Node.class);
-        private static final long itemOffset =
-            objectFieldOffset(UNSAFE, "item", Node.class);
-        private static final long nextOffset =
-            objectFieldOffset(UNSAFE, "next", Node.class);
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long prevOffset;
+        private static final long itemOffset;
+        private static final long nextOffset;
+
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = Node.class;
+                prevOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("prev"));
+                itemOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("item"));
+                nextOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("next"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /**
@@ -1422,14 +1429,6 @@
         initHeadTail(h, t);
     }
 
-    // Unsafe mechanics
-
-    private static final sun.misc.Unsafe UNSAFE =
-        sun.misc.Unsafe.getUnsafe();
-    private static final long headOffset =
-        objectFieldOffset(UNSAFE, "head", ConcurrentLinkedDeque.class);
-    private static final long tailOffset =
-        objectFieldOffset(UNSAFE, "tail", ConcurrentLinkedDeque.class);
 
     private boolean casHead(Node<E> cmp, Node<E> val) {
         return UNSAFE.compareAndSwapObject(this, headOffset, cmp, val);
@@ -1439,15 +1438,25 @@
         return UNSAFE.compareAndSwapObject(this, tailOffset, cmp, val);
     }
 
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
+    // Unsafe mechanics
+
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long headOffset;
+    private static final long tailOffset;
+    static {
+        PREV_TERMINATOR = new Node<Object>();
+        PREV_TERMINATOR.next = PREV_TERMINATOR;
+        NEXT_TERMINATOR = new Node<Object>();
+        NEXT_TERMINATOR.prev = NEXT_TERMINATOR;
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = ConcurrentLinkedDeque.class;
+            headOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("head"));
+            tailOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("tail"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
 }
--- a/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Wed Apr 20 04:38:36 2011 +0100
@@ -194,12 +194,22 @@
 
         // Unsafe mechanics
 
-        private static final sun.misc.Unsafe UNSAFE =
-            sun.misc.Unsafe.getUnsafe();
-        private static final long nextOffset =
-            objectFieldOffset(UNSAFE, "next", Node.class);
-        private static final long itemOffset =
-            objectFieldOffset(UNSAFE, "item", Node.class);
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long itemOffset;
+        private static final long nextOffset;
+
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = Node.class;
+                itemOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("item"));
+                nextOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("next"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /**
@@ -790,14 +800,6 @@
             throw new NullPointerException();
     }
 
-    // Unsafe mechanics
-
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long headOffset =
-        objectFieldOffset(UNSAFE, "head", ConcurrentLinkedQueue.class);
-    private static final long tailOffset =
-        objectFieldOffset(UNSAFE, "tail", ConcurrentLinkedQueue.class);
-
     private boolean casTail(Node<E> cmp, Node<E> val) {
         return UNSAFE.compareAndSwapObject(this, tailOffset, cmp, val);
     }
@@ -806,15 +808,21 @@
         return UNSAFE.compareAndSwapObject(this, headOffset, cmp, val);
     }
 
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
+    // Unsafe mechanics
+
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long headOffset;
+    private static final long tailOffset;
+    static {
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = ConcurrentLinkedQueue.class;
+            headOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("head"));
+            tailOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("tail"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
 }
--- a/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Wed Apr 20 04:38:36 2011 +0100
@@ -44,8 +44,8 @@
  * creation time, depending on which constructor is used.
  *
  * <p>This class implements a concurrent variant of <a
- * href="http://www.cs.umd.edu/~pugh/">SkipLists</a> providing
- * expected average <i>log(n)</i> time cost for the
+ * href="http://en.wikipedia.org/wiki/Skip_list" target="_top">SkipLists</a>
+ * providing expected average <i>log(n)</i> time cost for the
  * <tt>containsKey</tt>, <tt>get</tt>, <tt>put</tt> and
  * <tt>remove</tt> operations and their variants.  Insertion, removal,
  * update, and access operations safely execute concurrently by
@@ -507,13 +507,24 @@
             return new AbstractMap.SimpleImmutableEntry<K,V>(key, v);
         }
 
-        // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-        private static final long valueOffset =
-            objectFieldOffset(UNSAFE, "value", Node.class);
-        private static final long nextOffset =
-            objectFieldOffset(UNSAFE, "next", Node.class);
+        // UNSAFE mechanics
+
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long valueOffset;
+        private static final long nextOffset;
 
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = Node.class;
+                valueOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("value"));
+                nextOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("next"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /* ---------------- Indexing -------------- */
@@ -580,10 +591,18 @@
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-        private static final long rightOffset =
-            objectFieldOffset(UNSAFE, "right", Index.class);
-
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long rightOffset;
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = Index.class;
+                rightOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("right"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /* ---------------- Head nodes -------------- */
@@ -3082,20 +3101,16 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long headOffset =
-        objectFieldOffset(UNSAFE, "head", ConcurrentSkipListMap.class);
-
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long headOffset;
+    static {
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = ConcurrentSkipListMap.class;
+            headOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("head"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
-
 }
--- a/src/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Wed Apr 20 04:38:36 2011 +0100
@@ -470,16 +470,20 @@
     }
 
     // Support for resetting map in clone
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
+    private void setMap(ConcurrentNavigableMap<E,Object> map) {
+        UNSAFE.putObjectVolatile(this, mapOffset, map);
+    }
+
+    private static final sun.misc.Unsafe UNSAFE;
     private static final long mapOffset;
     static {
         try {
-            mapOffset = unsafe.objectFieldOffset
-                (ConcurrentSkipListSet.class.getDeclaredField("m"));
-        } catch (Exception ex) { throw new Error(ex); }
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = ConcurrentSkipListSet.class;
+            mapOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("m"));
+        } catch (Exception e) {
+            throw new Error(e);
+        }
     }
-    private void setMap(ConcurrentNavigableMap<E,Object> map) {
-        unsafe.putObjectVolatile(this, mapOffset, map);
-    }
-
 }
--- a/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1318,16 +1318,19 @@
     }
 
     // Support for resetting lock while deserializing
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
+    private void resetLock() {
+        UNSAFE.putObjectVolatile(this, lockOffset, new ReentrantLock());
+    }
+    private static final sun.misc.Unsafe UNSAFE;
     private static final long lockOffset;
     static {
         try {
-            lockOffset = unsafe.objectFieldOffset
-                (CopyOnWriteArrayList.class.getDeclaredField("lock"));
-            } catch (Exception ex) { throw new Error(ex); }
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = CopyOnWriteArrayList.class;
+            lockOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("lock"));
+        } catch (Exception e) {
+            throw new Error(e);
+        }
     }
-    private void resetLock() {
-        unsafe.putObjectVolatile(this, lockOffset, new ReentrantLock());
-    }
-
 }
--- a/src/share/classes/java/util/concurrent/Exchanger.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/Exchanger.java	Wed Apr 20 04:38:36 2011 +0100
@@ -164,8 +164,8 @@
      * races between two threads or thread pre-emptions occurring
      * between reading and CASing.  Also, very transient peak
      * contention can be much higher than the average sustainable
-     * levels.  The max limit is decreased on average 50% of the times
-     * that a non-slot-zero wait elapses without being fulfilled.
+     * levels.  An attempt to decrease the max limit is usually made
+     * when a non-slot-zero wait elapses without being fulfilled.
      * Threads experiencing elapsed waits move closer to zero, so
      * eventually find existing (or future) threads even if the table
      * has been shrunk due to inactivity.  The chosen mechanics and
--- a/src/share/classes/java/util/concurrent/ForkJoinPool.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ForkJoinPool.java	Wed Apr 20 04:38:36 2011 +0100
@@ -40,6 +40,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.Random;
 import java.util.concurrent.AbstractExecutorService;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
@@ -51,6 +52,7 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.LockSupport;
 import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.Condition;
 
 /**
  * An {@link ExecutorService} for running {@link ForkJoinTask}s.
@@ -158,239 +160,208 @@
      * set of worker threads: Submissions from non-FJ threads enter
      * into a submission queue. Workers take these tasks and typically
      * split them into subtasks that may be stolen by other workers.
-     * The main work-stealing mechanics implemented in class
-     * ForkJoinWorkerThread give first priority to processing tasks
-     * from their own queues (LIFO or FIFO, depending on mode), then
-     * to randomized FIFO steals of tasks in other worker queues, and
-     * lastly to new submissions. These mechanics do not consider
-     * affinities, loads, cache localities, etc, so rarely provide the
-     * best possible performance on a given machine, but portably
-     * provide good throughput by averaging over these factors.
-     * (Further, even if we did try to use such information, we do not
-     * usually have a basis for exploiting it. For example, some sets
-     * of tasks profit from cache affinities, but others are harmed by
-     * cache pollution effects.)
+     * Preference rules give first priority to processing tasks from
+     * their own queues (LIFO or FIFO, depending on mode), then to
+     * randomized FIFO steals of tasks in other worker queues, and
+     * lastly to new submissions.
+     *
+     * The main throughput advantages of work-stealing stem from
+     * decentralized control -- workers mostly take tasks from
+     * themselves or each other. We cannot negate this in the
+     * implementation of other management responsibilities. The main
+     * tactic for avoiding bottlenecks is packing nearly all
+     * essentially atomic control state into a single 64bit volatile
+     * variable ("ctl"). This variable is read on the order of 10-100
+     * times as often as it is modified (always via CAS). (There is
+     * some additional control state, for example variable "shutdown"
+     * for which we can cope with uncoordinated updates.)  This
+     * streamlines synchronization and control at the expense of messy
+     * constructions needed to repack status bits upon updates.
+     * Updates tend not to contend with each other except during
+     * bursts while submitted tasks begin or end.  In some cases when
+     * they do contend, threads can instead do something else
+     * (usually, scan for tasks) until contention subsides.
+     *
+     * To enable packing, we restrict maximum parallelism to (1<<15)-1
+     * (which is far in excess of normal operating range) to allow
+     * ids, counts, and their negations (used for thresholding) to fit
+     * into 16bit fields.
+     *
+     * Recording Workers.  Workers are recorded in the "workers" array
+     * that is created upon pool construction and expanded if (rarely)
+     * necessary.  This is an array as opposed to some other data
+     * structure to support index-based random steals by workers.
+     * Updates to the array recording new workers and unrecording
+     * terminated ones are protected from each other by a seqLock
+     * (scanGuard) but the array is otherwise concurrently readable,
+     * and accessed directly by workers. To simplify index-based
+     * operations, the array size is always a power of two, and all
+     * readers must tolerate null slots. To avoid flailing during
+     * start-up, the array is presized to hold twice #parallelism
+     * workers (which is unlikely to need further resizing during
+     * execution). But to avoid dealing with so many null slots,
+     * variable scanGuard includes a mask for the nearest power of two
+     * that contains all current workers.  All worker thread creation
+     * is on-demand, triggered by task submissions, replacement of
+     * terminated workers, and/or compensation for blocked
+     * workers. However, all other support code is set up to work with
+     * other policies.  To ensure that we do not hold on to worker
+     * references that would prevent GC, ALL accesses to workers are
+     * via indices into the workers array (which is one source of some
+     * of the messy code constructions here). In essence, the workers
+     * array serves as a weak reference mechanism. Thus for example
+     * the wait queue field of ctl stores worker indices, not worker
+     * references.  Access to the workers in associated methods (for
+     * example signalWork) must both index-check and null-check the
+     * IDs. All such accesses ignore bad IDs by returning out early
+     * from what they are doing, since this can only be associated
+     * with termination, in which case it is OK to give up.
      *
-     * Beyond work-stealing support and essential bookkeeping, the
-     * main responsibility of this framework is to take actions when
-     * one worker is waiting to join a task stolen (or always held by)
-     * another.  Because we are multiplexing many tasks on to a pool
-     * of workers, we can't just let them block (as in Thread.join).
-     * We also cannot just reassign the joiner's run-time stack with
-     * another and replace it later, which would be a form of
-     * "continuation", that even if possible is not necessarily a good
-     * idea. Given that the creation costs of most threads on most
-     * systems mainly surrounds setting up runtime stacks, thread
-     * creation and switching is usually not much more expensive than
-     * stack creation and switching, and is more flexible). Instead we
+     * All uses of the workers array, as well as queue arrays, check
+     * that the array is non-null (even if previously non-null). This
+     * allows nulling during termination, which is currently not
+     * necessary, but remains an option for resource-revocation-based
+     * shutdown schemes.
+     *
+     * Wait Queuing. Unlike HPC work-stealing frameworks, we cannot
+     * let workers spin indefinitely scanning for tasks when none can
+     * be found immediately, and we cannot start/resume workers unless
+     * there appear to be tasks available.  On the other hand, we must
+     * quickly prod them into action when new tasks are submitted or
+     * generated.  We park/unpark workers after placing in an event
+     * wait queue when they cannot find work. This "queue" is actually
+     * a simple Treiber stack, headed by the "id" field of ctl, plus a
+     * 15bit counter value to both wake up waiters (by advancing their
+     * count) and avoid ABA effects. Successors are held in worker
+     * field "nextWait".  Queuing deals with several intrinsic races,
+     * mainly that a task-producing thread can miss seeing (and
+     * signalling) another thread that gave up looking for work but
+     * has not yet entered the wait queue. We solve this by requiring
+     * a full sweep of all workers both before (in scan()) and after
+     * (in tryAwaitWork()) a newly waiting worker is added to the wait
+     * queue. During a rescan, the worker might release some other
+     * queued worker rather than itself, which has the same net
+     * effect. Because enqueued workers may actually be rescanning
+     * rather than waiting, we set and clear the "parked" field of
+     * ForkJoinWorkerThread to reduce unnecessary calls to unpark.
+     * (Use of the parked field requires a secondary recheck to avoid
+     * missed signals.)
+     *
+     * Signalling.  We create or wake up workers only when there
+     * appears to be at least one task they might be able to find and
+     * execute.  When a submission is added or another worker adds a
+     * task to a queue that previously had two or fewer tasks, they
+     * signal waiting workers (or trigger creation of new ones if
+     * fewer than the given parallelism level -- see signalWork).
+     * These primary signals are buttressed by signals during rescans
+     * as well as those performed when a worker steals a task and
+     * notices that there are more tasks too; together these cover the
+     * signals needed in cases when more than two tasks are pushed
+     * but untaken.
+     *
+     * Trimming workers. To release resources after periods of lack of
+     * use, a worker starting to wait when the pool is quiescent will
+     * time out and terminate if the pool has remained quiescent for
+     * SHRINK_RATE nanosecs. This will slowly propagate, eventually
+     * terminating all workers after long periods of non-use.
+     *
+     * Submissions. External submissions are maintained in an
+     * array-based queue that is structured identically to
+     * ForkJoinWorkerThread queues except for the use of
+     * submissionLock in method addSubmission. Unlike the case for
+     * worker queues, multiple external threads can add new
+     * submissions, so adding requires a lock.
+     *
+     * Compensation. Beyond work-stealing support and lifecycle
+     * control, the main responsibility of this framework is to take
+     * actions when one worker is waiting to join a task stolen (or
+     * always held by) another.  Because we are multiplexing many
+     * tasks on to a pool of workers, we can't just let them block (as
+     * in Thread.join).  We also cannot just reassign the joiner's
+     * run-time stack with another and replace it later, which would
+     * be a form of "continuation", that even if possible is not
+     * necessarily a good idea since we sometimes need both an
+     * unblocked task and its continuation to progress. Instead we
      * combine two tactics:
      *
      *   Helping: Arranging for the joiner to execute some task that it
      *      would be running if the steal had not occurred.  Method
-     *      ForkJoinWorkerThread.helpJoinTask tracks joining->stealing
+     *      ForkJoinWorkerThread.joinTask tracks joining->stealing
      *      links to try to find such a task.
      *
      *   Compensating: Unless there are already enough live threads,
-     *      method helpMaintainParallelism() may create or
-     *      re-activate a spare thread to compensate for blocked
-     *      joiners until they unblock.
-     *
-     * It is impossible to keep exactly the target (parallelism)
-     * number of threads running at any given time.  Determining
-     * existence of conservatively safe helping targets, the
-     * availability of already-created spares, and the apparent need
-     * to create new spares are all racy and require heuristic
-     * guidance, so we rely on multiple retries of each.  Compensation
-     * occurs in slow-motion. It is triggered only upon timeouts of
-     * Object.wait used for joins. This reduces poor decisions that
-     * would otherwise be made when threads are waiting for others
-     * that are stalled because of unrelated activities such as
-     * garbage collection.
+     *      method tryPreBlock() may create or re-activate a spare
+     *      thread to compensate for blocked joiners until they
+     *      unblock.
      *
      * The ManagedBlocker extension API can't use helping so relies
      * only on compensation in method awaitBlocker.
      *
-     * The main throughput advantages of work-stealing stem from
-     * decentralized control -- workers mostly steal tasks from each
-     * other. We do not want to negate this by creating bottlenecks
-     * implementing other management responsibilities. So we use a
-     * collection of techniques that avoid, reduce, or cope well with
-     * contention. These entail several instances of bit-packing into
-     * CASable fields to maintain only the minimally required
-     * atomicity. To enable such packing, we restrict maximum
-     * parallelism to (1<<15)-1 (enabling twice this (to accommodate
-     * unbalanced increments and decrements) to fit into a 16 bit
-     * field, which is far in excess of normal operating range.  Even
-     * though updates to some of these bookkeeping fields do sometimes
-     * contend with each other, they don't normally cache-contend with
-     * updates to others enough to warrant memory padding or
-     * isolation. So they are all held as fields of ForkJoinPool
-     * objects.  The main capabilities are as follows:
-     *
-     * 1. Creating and removing workers. Workers are recorded in the
-     * "workers" array. This is an array as opposed to some other data
-     * structure to support index-based random steals by workers.
-     * Updates to the array recording new workers and unrecording
-     * terminated ones are protected from each other by a lock
-     * (workerLock) but the array is otherwise concurrently readable,
-     * and accessed directly by workers. To simplify index-based
-     * operations, the array size is always a power of two, and all
-     * readers must tolerate null slots. Currently, all worker thread
-     * creation is on-demand, triggered by task submissions,
-     * replacement of terminated workers, and/or compensation for
-     * blocked workers. However, all other support code is set up to
-     * work with other policies.
-     *
-     * To ensure that we do not hold on to worker references that
-     * would prevent GC, ALL accesses to workers are via indices into
-     * the workers array (which is one source of some of the unusual
-     * code constructions here). In essence, the workers array serves
-     * as a WeakReference mechanism. Thus for example the event queue
-     * stores worker indices, not worker references. Access to the
-     * workers in associated methods (for example releaseEventWaiters)
-     * must both index-check and null-check the IDs. All such accesses
-     * ignore bad IDs by returning out early from what they are doing,
-     * since this can only be associated with shutdown, in which case
-     * it is OK to give up. On termination, we just clobber these
-     * data structures without trying to use them.
-     *
-     * 2. Bookkeeping for dynamically adding and removing workers. We
-     * aim to approximately maintain the given level of parallelism.
-     * When some workers are known to be blocked (on joins or via
-     * ManagedBlocker), we may create or resume others to take their
-     * place until they unblock (see below). Implementing this
-     * requires counts of the number of "running" threads (i.e., those
-     * that are neither blocked nor artificially suspended) as well as
-     * the total number.  These two values are packed into one field,
-     * "workerCounts" because we need accurate snapshots when deciding
-     * to create, resume or suspend.  Note however that the
-     * correspondence of these counts to reality is not guaranteed. In
-     * particular updates for unblocked threads may lag until they
-     * actually wake up.
-     *
-     * 3. Maintaining global run state. The run state of the pool
-     * consists of a runLevel (SHUTDOWN, TERMINATING, etc) similar to
-     * those in other Executor implementations, as well as a count of
-     * "active" workers -- those that are, or soon will be, or
-     * recently were executing tasks. The runLevel and active count
-     * are packed together in order to correctly trigger shutdown and
-     * termination. Without care, active counts can be subject to very
-     * high contention.  We substantially reduce this contention by
-     * relaxing update rules.  A worker must claim active status
-     * prospectively, by activating if it sees that a submitted or
-     * stealable task exists (it may find after activating that the
-     * task no longer exists). It stays active while processing this
-     * task (if it exists) and any other local subtasks it produces,
-     * until it cannot find any other tasks. It then tries
-     * inactivating (see method preStep), but upon update contention
-     * instead scans for more tasks, later retrying inactivation if it
-     * doesn't find any.
+     * It is impossible to keep exactly the target parallelism number
+     * of threads running at any given time.  Determining the
+     * existence of conservatively safe helping targets, the
+     * availability of already-created spares, and the apparent need
+     * to create new spares are all racy and require heuristic
+     * guidance, so we rely on multiple retries of each.  Currently,
+     * in keeping with on-demand signalling policy, we compensate only
+     * if blocking would leave less than one active (non-waiting,
+     * non-blocked) worker. Additionally, to avoid some false alarms
+     * due to GC, lagging counters, system activity, etc, compensated
+     * blocking for joins is only attempted after rechecks stabilize
+     * (retries are interspersed with Thread.yield, for good
+     * citizenship).  The variable blockedCount, incremented before
+     * blocking and decremented after, is sometimes needed to
+     * distinguish cases of waiting for work vs blocking on joins or
+     * other managed sync. Both cases are equivalent for most pool
+     * control, so we can update non-atomically. (Additionally,
+     * contention on blockedCount alleviates some contention on ctl).
      *
-     * 4. Managing idle workers waiting for tasks. We cannot let
-     * workers spin indefinitely scanning for tasks when none are
-     * available. On the other hand, we must quickly prod them into
-     * action when new tasks are submitted or generated.  We
-     * park/unpark these idle workers using an event-count scheme.
-     * Field eventCount is incremented upon events that may enable
-     * workers that previously could not find a task to now find one:
-     * Submission of a new task to the pool, or another worker pushing
-     * a task onto a previously empty queue.  (We also use this
-     * mechanism for configuration and termination actions that
-     * require wakeups of idle workers).  Each worker maintains its
-     * last known event count, and blocks when a scan for work did not
-     * find a task AND its lastEventCount matches the current
-     * eventCount. Waiting idle workers are recorded in a variant of
-     * Treiber stack headed by field eventWaiters which, when nonzero,
-     * encodes the thread index and count awaited for by the worker
-     * thread most recently calling eventSync. This thread in turn has
-     * a record (field nextEventWaiter) for the next waiting worker.
-     * In addition to allowing simpler decisions about need for
-     * wakeup, the event count bits in eventWaiters serve the role of
-     * tags to avoid ABA errors in Treiber stacks. Upon any wakeup,
-     * released threads also try to release at most two others.  The
-     * net effect is a tree-like diffusion of signals, where released
-     * threads (and possibly others) help with unparks.  To further
-     * reduce contention effects a bit, failed CASes to increment
-     * field eventCount are tolerated without retries in signalWork.
-     * Conceptually they are merged into the same event, which is OK
-     * when their only purpose is to enable workers to scan for work.
+     * Shutdown and Termination. A call to shutdownNow atomically sets
+     * the ctl stop bit and then (non-atomically) sets each workers
+     * "terminate" status, cancels all unprocessed tasks, and wakes up
+     * all waiting workers.  Detecting whether termination should
+     * commence after a non-abrupt shutdown() call requires more work
+     * and bookkeeping. We need consensus about quiesence (i.e., that
+     * there is no more work) which is reflected in active counts so
+     * long as there are no current blockers, as well as possible
+     * re-evaluations during independent changes in blocking or
+     * quiescing workers.
      *
-     * 5. Managing suspension of extra workers. When a worker notices
-     * (usually upon timeout of a wait()) that there are too few
-     * running threads, we may create a new thread to maintain
-     * parallelism level, or at least avoid starvation. Usually, extra
-     * threads are needed for only very short periods, yet join
-     * dependencies are such that we sometimes need them in
-     * bursts. Rather than create new threads each time this happens,
-     * we suspend no-longer-needed extra ones as "spares". For most
-     * purposes, we don't distinguish "extra" spare threads from
-     * normal "core" threads: On each call to preStep (the only point
-     * at which we can do this) a worker checks to see if there are
-     * now too many running workers, and if so, suspends itself.
-     * Method helpMaintainParallelism looks for suspended threads to
-     * resume before considering creating a new replacement. The
-     * spares themselves are encoded on another variant of a Treiber
-     * Stack, headed at field "spareWaiters".  Note that the use of
-     * spares is intrinsically racy.  One thread may become a spare at
-     * about the same time as another is needlessly being created. We
-     * counteract this and related slop in part by requiring resumed
-     * spares to immediately recheck (in preStep) to see whether they
-     * should re-suspend.
-     *
-     * 6. Killing off unneeded workers. A timeout mechanism is used to
-     * shed unused workers: The oldest (first) event queue waiter uses
-     * a timed rather than hard wait. When this wait times out without
-     * a normal wakeup, it tries to shutdown any one (for convenience
-     * the newest) other spare or event waiter via
-     * tryShutdownUnusedWorker. This eventually reduces the number of
-     * worker threads to a minimum of one after a long enough period
-     * without use.
-     *
-     * 7. Deciding when to create new workers. The main dynamic
-     * control in this class is deciding when to create extra threads
-     * in method helpMaintainParallelism. We would like to keep
-     * exactly #parallelism threads running, which is an impossible
-     * task. We always need to create one when the number of running
-     * threads would become zero and all workers are busy. Beyond
-     * this, we must rely on heuristics that work well in the
-     * presence of transient phenomena such as GC stalls, dynamic
-     * compilation, and wake-up lags. These transients are extremely
-     * common -- we are normally trying to fully saturate the CPUs on
-     * a machine, so almost any activity other than running tasks
-     * impedes accuracy. Our main defense is to allow parallelism to
-     * lapse for a while during joins, and use a timeout to see if,
-     * after the resulting settling, there is still a need for
-     * additional workers.  This also better copes with the fact that
-     * some of the methods in this class tend to never become compiled
-     * (but are interpreted), so some components of the entire set of
-     * controls might execute 100 times faster than others. And
-     * similarly for cases where the apparent lack of work is just due
-     * to GC stalls and other transient system activity.
-     *
-     * Beware that there is a lot of representation-level coupling
+     * Style notes: There is a lot of representation-level coupling
      * among classes ForkJoinPool, ForkJoinWorkerThread, and
-     * ForkJoinTask.  For example, direct access to "workers" array by
+     * ForkJoinTask.  Most fields of ForkJoinWorkerThread maintain
+     * data structures managed by ForkJoinPool, so are directly
+     * accessed.  Conversely we allow access to "workers" array by
      * workers, and direct access to ForkJoinTask.status by both
      * ForkJoinPool and ForkJoinWorkerThread.  There is little point
      * trying to reduce this, since any associated future changes in
      * representations will need to be accompanied by algorithmic
-     * changes anyway.
+     * changes anyway. All together, these low-level implementation
+     * choices produce as much as a factor of 4 performance
+     * improvement compared to naive implementations, and enable the
+     * processing of billions of tasks per second, at the expense of
+     * some ugliness.
      *
-     * Style notes: There are lots of inline assignments (of form
-     * "while ((local = field) != 0)") which are usually the simplest
-     * way to ensure the required read orderings (which are sometimes
-     * critical). Also several occurrences of the unusual "do {}
-     * while (!cas...)" which is the simplest way to force an update of
-     * a CAS'ed variable. There are also other coding oddities that
-     * help some methods perform reasonably even when interpreted (not
-     * compiled), at the expense of some messy constructions that
-     * reduce byte code counts.
+     * Methods signalWork() and scan() are the main bottlenecks so are
+     * especially heavily micro-optimized/mangled.  There are lots of
+     * inline assignments (of form "while ((local = field) != 0)")
+     * which are usually the simplest way to ensure the required read
+     * orderings (which are sometimes critical). This leads to a
+     * "C"-like style of listing declarations of these locals at the
+     * heads of methods or blocks.  There are several occurrences of
+     * the unusual "do {} while (!cas...)"  which is the simplest way
+     * to force an update of a CAS'ed variable. There are also other
+     * coding oddities that help some methods perform reasonably even
+     * when interpreted (not compiled).
      *
-     * The order of declarations in this file is: (1) statics (2)
-     * fields (along with constants used when unpacking some of them)
-     * (3) internal control methods (4) callbacks and other support
-     * for ForkJoinTask and ForkJoinWorkerThread classes, (5) exported
-     * methods (plus a few little helpers).
+     * The order of declarations in this file is: (1) declarations of
+     * statics (2) fields (along with constants used when unpacking
+     * some of them), listed in an order that tends to reduce
+     * contention among them a bit under most JVMs.  (3) internal
+     * control methods (4) callbacks and other support for
+     * ForkJoinTask and ForkJoinWorkerThread classes, (5) exported
+     * methods (plus a few little helpers). (6) static block
+     * initializing all statics in a minimally dependent order.
      */
 
     /**
@@ -425,15 +396,13 @@
      * overridden in ForkJoinPool constructors.
      */
     public static final ForkJoinWorkerThreadFactory
-        defaultForkJoinWorkerThreadFactory =
-        new DefaultForkJoinWorkerThreadFactory();
+        defaultForkJoinWorkerThreadFactory;
 
     /**
      * Permission required for callers of methods that may start or
      * kill threads.
      */
-    private static final RuntimePermission modifyThreadPermission =
-        new RuntimePermission("modifyThread");
+    private static final RuntimePermission modifyThreadPermission;
 
     /**
      * If there is a security manager, makes sure caller has
@@ -448,63 +417,59 @@
     /**
      * Generator for assigning sequence numbers as pool names.
      */
-    private static final AtomicInteger poolNumberGenerator =
-        new AtomicInteger();
+    private static final AtomicInteger poolNumberGenerator;
 
     /**
-     * The time to block in a join (see awaitJoin) before checking if
-     * a new worker should be (re)started to maintain parallelism
-     * level. The value should be short enough to maintain global
-     * responsiveness and progress but long enough to avoid
-     * counterproductive firings during GC stalls or unrelated system
-     * activity, and to not bog down systems with continual re-firings
-     * on GCs or legitimately long waits.
+     * Generator for initial random seeds for worker victim
+     * selection. This is used only to create initial seeds. Random
+     * steals use a cheaper xorshift generator per steal attempt. We
+     * don't expect much contention on seedGenerator, so just use a
+     * plain Random.
      */
-    private static final long JOIN_TIMEOUT_MILLIS = 250L; // 4 per second
+    static final Random workerSeedGenerator;
 
     /**
-     * The wakeup interval (in nanoseconds) for the oldest worker
-     * waiting for an event to invoke tryShutdownUnusedWorker to
-     * shrink the number of workers.  The exact value does not matter
-     * too much. It must be short enough to release resources during
-     * sustained periods of idleness, but not so short that threads
-     * are continually re-created.
+     * Array holding all worker threads in the pool.  Initialized upon
+     * construction. Array size must be a power of two.  Updates and
+     * replacements are protected by scanGuard, but the array is
+     * always kept in a consistent enough state to be randomly
+     * accessed without locking by workers performing work-stealing,
+     * as well as other traversal-based methods in this class, so long
+     * as reads memory-acquire by first reading ctl. All readers must
+     * tolerate that some array slots may be null.
      */
-    private static final long SHRINK_RATE_NANOS =
-        30L * 1000L * 1000L * 1000L; // 2 per minute
+    ForkJoinWorkerThread[] workers;
 
     /**
-     * Absolute bound for parallelism level. Twice this number plus
-     * one (i.e., 0xfff) must fit into a 16bit field to enable
-     * word-packing for some counts and indices.
+     * Initial size for submission queue array. Must be a power of
+     * two.  In many applications, these always stay small so we use a
+     * small initial cap.
      */
-    private static final int MAX_WORKERS   = 0x7fff;
+    private static final int INITIAL_QUEUE_CAPACITY = 8;
+
+    /**
+     * Maximum size for submission queue array. Must be a power of two
+     * less than or equal to 1 << (31 - width of array entry) to
+     * ensure lack of index wraparound, but is capped at a lower
+     * value to help users trap runaway computations.
+     */
+    private static final int MAXIMUM_QUEUE_CAPACITY = 1 << 24; // 16M
 
     /**
-     * Array holding all worker threads in the pool.  Array size must
-     * be a power of two.  Updates and replacements are protected by
-     * workerLock, but the array is always kept in a consistent enough
-     * state to be randomly accessed without locking by workers
-     * performing work-stealing, as well as other traversal-based
-     * methods in this class. All readers must tolerate that some
-     * array slots may be null.
+     * Array serving as submission queue. Initialized upon construction.
      */
-    volatile ForkJoinWorkerThread[] workers;
+    private ForkJoinTask<?>[] submissionQueue;
 
     /**
-     * Queue for external submissions.
+     * Lock protecting submissions array for addSubmission
      */
-    private final LinkedTransferQueue<ForkJoinTask<?>> submissionQueue;
+    private final ReentrantLock submissionLock;
 
     /**
-     * Lock protecting updates to workers array.
+     * Condition for awaitTermination, using submissionLock for
+     * convenience.
      */
-    private final ReentrantLock workerLock;
-
-    /**
-     * Latch released upon termination.
-     */
-    private final Phaser termination;
+    private final Condition termination;
 
     /**
      * Creation factory for worker threads.
@@ -512,227 +477,719 @@
     private final ForkJoinWorkerThreadFactory factory;
 
     /**
+     * The uncaught exception handler used when any worker abruptly
+     * terminates.
+     */
+    final Thread.UncaughtExceptionHandler ueh;
+
+    /**
+     * Prefix for assigning names to worker threads
+     */
+    private final String workerNamePrefix;
+
+    /**
      * Sum of per-thread steal counts, updated only when threads are
      * idle or terminating.
      */
     private volatile long stealCount;
 
     /**
-     * Encoded record of top of Treiber stack of threads waiting for
-     * events. The top 32 bits contain the count being waited for. The
-     * bottom 16 bits contains one plus the pool index of waiting
-     * worker thread. (Bits 16-31 are unused.)
+     * Main pool control -- a long packed with:
+     * AC: Number of active running workers minus target parallelism (16 bits)
+     * TC: Number of total workers minus target parallelism (16bits)
+     * ST: true if pool is terminating (1 bit)
+     * EC: the wait count of top waiting thread (15 bits)
+     * ID: ~poolIndex of top of Treiber stack of waiting threads (16 bits)
+     *
+     * When convenient, we can extract the upper 32 bits of counts and
+     * the lower 32 bits of queue state, u = (int)(ctl >>> 32) and e =
+     * (int)ctl.  The ec field is never accessed alone, but always
+     * together with id and st. The offsets of counts by the target
+     * parallelism and the positionings of fields makes it possible to
+     * perform the most common checks via sign tests of fields: When
+     * ac is negative, there are not enough active workers, when tc is
+     * negative, there are not enough total workers, when id is
+     * negative, there is at least one waiting worker, and when e is
+     * negative, the pool is terminating.  To deal with these possibly
+     * negative fields, we use casts in and out of "short" and/or
+     * signed shifts to maintain signedness.
      */
-    private volatile long eventWaiters;
-
-    private static final int EVENT_COUNT_SHIFT = 32;
-    private static final int WAITER_ID_MASK    = (1 << 16) - 1;
-
-    /**
-     * A counter for events that may wake up worker threads:
-     *   - Submission of a new task to the pool
-     *   - A worker pushing a task on an empty queue
-     *   - termination
-     */
-    private volatile int eventCount;
-
-    /**
-     * Encoded record of top of Treiber stack of spare threads waiting
-     * for resumption. The top 16 bits contain an arbitrary count to
-     * avoid ABA effects. The bottom 16bits contains one plus the pool
-     * index of waiting worker thread.
-     */
-    private volatile int spareWaiters;
-
-    private static final int SPARE_COUNT_SHIFT = 16;
-    private static final int SPARE_ID_MASK     = (1 << 16) - 1;
+    volatile long ctl;
 
-    /**
-     * Lifecycle control. The low word contains the number of workers
-     * that are (probably) executing tasks. This value is atomically
-     * incremented before a worker gets a task to run, and decremented
-     * when a worker has no tasks and cannot find any.  Bits 16-18
-     * contain runLevel value. When all are zero, the pool is
-     * running. Level transitions are monotonic (running -> shutdown
-     * -> terminating -> terminated) so each transition adds a bit.
-     * These are bundled together to ensure consistent read for
-     * termination checks (i.e., that runLevel is at least SHUTDOWN
-     * and active threads is zero).
-     *
-     * Notes: Most direct CASes are dependent on these bitfield
-     * positions.  Also, this field is non-private to enable direct
-     * performance-sensitive CASes in ForkJoinWorkerThread.
-     */
-    volatile int runState;
+    // bit positions/shifts for fields
+    private static final int  AC_SHIFT   = 48;
+    private static final int  TC_SHIFT   = 32;
+    private static final int  ST_SHIFT   = 31;
+    private static final int  EC_SHIFT   = 16;
+
+    // bounds
+    private static final int  MAX_ID     = 0x7fff;  // max poolIndex
+    private static final int  SMASK      = 0xffff;  // mask short bits
+    private static final int  SHORT_SIGN = 1 << 15;
+    private static final int  INT_SIGN   = 1 << 31;
 
-    // Note: The order among run level values matters.
-    private static final int RUNLEVEL_SHIFT     = 16;
-    private static final int SHUTDOWN           = 1 << RUNLEVEL_SHIFT;
-    private static final int TERMINATING        = 1 << (RUNLEVEL_SHIFT + 1);
-    private static final int TERMINATED         = 1 << (RUNLEVEL_SHIFT + 2);
-    private static final int ACTIVE_COUNT_MASK  = (1 << RUNLEVEL_SHIFT) - 1;
+    // masks
+    private static final long STOP_BIT   = 0x0001L << ST_SHIFT;
+    private static final long AC_MASK    = ((long)SMASK) << AC_SHIFT;
+    private static final long TC_MASK    = ((long)SMASK) << TC_SHIFT;
+
+    // units for incrementing and decrementing
+    private static final long TC_UNIT    = 1L << TC_SHIFT;
+    private static final long AC_UNIT    = 1L << AC_SHIFT;
 
-    /**
-     * Holds number of total (i.e., created and not yet terminated)
-     * and running (i.e., not blocked on joins or other managed sync)
-     * threads, packed together to ensure consistent snapshot when
-     * making decisions about creating and suspending spare
-     * threads. Updated only by CAS. Note that adding a new worker
-     * requires incrementing both counts, since workers start off in
-     * running state.
-     */
-    private volatile int workerCounts;
+    // masks and units for dealing with u = (int)(ctl >>> 32)
+    private static final int  UAC_SHIFT  = AC_SHIFT - 32;
+    private static final int  UTC_SHIFT  = TC_SHIFT - 32;
+    private static final int  UAC_MASK   = SMASK << UAC_SHIFT;
+    private static final int  UTC_MASK   = SMASK << UTC_SHIFT;
+    private static final int  UAC_UNIT   = 1 << UAC_SHIFT;
+    private static final int  UTC_UNIT   = 1 << UTC_SHIFT;
 
-    private static final int TOTAL_COUNT_SHIFT  = 16;
-    private static final int RUNNING_COUNT_MASK = (1 << TOTAL_COUNT_SHIFT) - 1;
-    private static final int ONE_RUNNING        = 1;
-    private static final int ONE_TOTAL          = 1 << TOTAL_COUNT_SHIFT;
+    // masks and units for dealing with e = (int)ctl
+    private static final int  E_MASK     = 0x7fffffff; // no STOP_BIT
+    private static final int  EC_UNIT    = 1 << EC_SHIFT;
 
     /**
      * The target parallelism level.
-     * Accessed directly by ForkJoinWorkerThreads.
      */
     final int parallelism;
 
     /**
+     * Index (mod submission queue length) of next element to take
+     * from submission queue. Usage is identical to that for
+     * per-worker queues -- see ForkJoinWorkerThread internal
+     * documentation.
+     */
+    volatile int queueBase;
+
+    /**
+     * Index (mod submission queue length) of next element to add
+     * in submission queue. Usage is identical to that for
+     * per-worker queues -- see ForkJoinWorkerThread internal
+     * documentation.
+     */
+    int queueTop;
+
+    /**
+     * True when shutdown() has been called.
+     */
+    volatile boolean shutdown;
+
+    /**
      * True if use local fifo, not default lifo, for local polling
      * Read by, and replicated by ForkJoinWorkerThreads
      */
     final boolean locallyFifo;
 
     /**
-     * The uncaught exception handler used when any worker abruptly
-     * terminates.
+     * The number of threads in ForkJoinWorkerThreads.helpQuiescePool.
+     * When non-zero, suppresses automatic shutdown when active
+     * counts become zero.
+     */
+    volatile int quiescerCount;
+
+    /**
+     * The number of threads blocked in join.
+     */
+    volatile int blockedCount;
+
+    /**
+     * Counter for worker Thread names (unrelated to their poolIndex)
+     */
+    private volatile int nextWorkerNumber;
+
+    /**
+     * The index for the next created worker. Accessed under scanGuard.
      */
-    private final Thread.UncaughtExceptionHandler ueh;
+    private int nextWorkerIndex;
+
+    /**
+     * SeqLock and index masking for updates to workers array.  Locked
+     * when SG_UNIT is set. Unlocking clears bit by adding
+     * SG_UNIT. Staleness of read-only operations can be checked by
+     * comparing scanGuard to value before the reads. The low 16 bits
+     * (i.e, anding with SMASK) hold (the smallest power of two
+     * covering all worker indices, minus one, and is used to avoid
+     * dealing with large numbers of null slots when the workers array
+     * is overallocated.
+     */
+    volatile int scanGuard;
+
+    private static final int SG_UNIT = 1 << 16;
+
+    /**
+     * The wakeup interval (in nanoseconds) for a worker waiting for a
+     * task when the pool is quiescent to instead try to shrink the
+     * number of workers.  The exact value does not matter too
+     * much. It must be short enough to release resources during
+     * sustained periods of idleness, but not so short that threads
+     * are continually re-created.
+     */
+    private static final long SHRINK_RATE =
+        4L * 1000L * 1000L * 1000L; // 4 seconds
 
     /**
-     * Pool number, just for assigning useful names to worker threads
+     * Top-level loop for worker threads: On each step: if the
+     * previous step swept through all queues and found no tasks, or
+     * there are excess threads, then possibly blocks. Otherwise,
+     * scans for and, if found, executes a task. Returns when pool
+     * and/or worker terminate.
+     *
+     * @param w the worker
      */
-    private final int poolNumber;
+    final void work(ForkJoinWorkerThread w) {
+        boolean swept = false;                // true on empty scans
+        long c;
+        while (!w.terminate && (int)(c = ctl) >= 0) {
+            int a;                            // active count
+            if (!swept && (a = (int)(c >> AC_SHIFT)) <= 0)
+                swept = scan(w, a);
+            else if (tryAwaitWork(w, c))
+                swept = false;
+        }
+    }
 
-    // Utilities for CASing fields. Note that most of these
-    // are usually manually inlined by callers
+    // Signalling
 
     /**
-     * Increments running count part of workerCounts.
+     * Wakes up or creates a worker.
      */
-    final void incrementRunningCount() {
-        int c;
-        do {} while (!UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                               c = workerCounts,
-                                               c + ONE_RUNNING));
+    final void signalWork() {
+        /*
+         * The while condition is true if: (there is are too few total
+         * workers OR there is at least one waiter) AND (there are too
+         * few active workers OR the pool is terminating).  The value
+         * of e distinguishes the remaining cases: zero (no waiters)
+         * for create, negative if terminating (in which case do
+         * nothing), else release a waiter. The secondary checks for
+         * release (non-null array etc) can fail if the pool begins
+         * terminating after the test, and don't impose any added cost
+         * because JVMs must perform null and bounds checks anyway.
+         */
+        long c; int e, u;
+        while ((((e = (int)(c = ctl)) | (u = (int)(c >>> 32))) &
+                (INT_SIGN|SHORT_SIGN)) == (INT_SIGN|SHORT_SIGN) && e >= 0) {
+            if (e > 0) {                         // release a waiting worker
+                int i; ForkJoinWorkerThread w; ForkJoinWorkerThread[] ws;
+                if ((ws = workers) == null ||
+                    (i = ~e & SMASK) >= ws.length ||
+                    (w = ws[i]) == null)
+                    break;
+                long nc = (((long)(w.nextWait & E_MASK)) |
+                           ((long)(u + UAC_UNIT) << 32));
+                if (w.eventCount == e &&
+                    UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc)) {
+                    w.eventCount = (e + EC_UNIT) & E_MASK;
+                    if (w.parked)
+                        UNSAFE.unpark(w);
+                    break;
+                }
+            }
+            else if (UNSAFE.compareAndSwapLong
+                     (this, ctlOffset, c,
+                      (long)(((u + UTC_UNIT) & UTC_MASK) |
+                             ((u + UAC_UNIT) & UAC_MASK)) << 32)) {
+                addWorker();
+                break;
+            }
+        }
     }
 
     /**
-     * Tries to increment running count part of workerCounts.
+     * Variant of signalWork to help release waiters on rescans.
+     * Tries once to release a waiter if active count < 0.
+     *
+     * @return false if failed due to contention, else true
+     */
+    private boolean tryReleaseWaiter() {
+        long c; int e, i; ForkJoinWorkerThread w; ForkJoinWorkerThread[] ws;
+        if ((e = (int)(c = ctl)) > 0 &&
+            (int)(c >> AC_SHIFT) < 0 &&
+            (ws = workers) != null &&
+            (i = ~e & SMASK) < ws.length &&
+            (w = ws[i]) != null) {
+            long nc = ((long)(w.nextWait & E_MASK) |
+                       ((c + AC_UNIT) & (AC_MASK|TC_MASK)));
+            if (w.eventCount != e ||
+                !UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc))
+                return false;
+            w.eventCount = (e + EC_UNIT) & E_MASK;
+            if (w.parked)
+                UNSAFE.unpark(w);
+        }
+        return true;
+    }
+
+    // Scanning for tasks
+
+    /**
+     * Scans for and, if found, executes one task. Scans start at a
+     * random index of workers array, and randomly select the first
+     * (2*#workers)-1 probes, and then, if all empty, resort to 2
+     * circular sweeps, which is necessary to check quiescence. and
+     * taking a submission only if no stealable tasks were found.  The
+     * steal code inside the loop is a specialized form of
+     * ForkJoinWorkerThread.deqTask, followed bookkeeping to support
+     * helpJoinTask and signal propagation. The code for submission
+     * queues is almost identical. On each steal, the worker completes
+     * not only the task, but also all local tasks that this task may
+     * have generated. On detecting staleness or contention when
+     * trying to take a task, this method returns without finishing
+     * sweep, which allows global state rechecks before retry.
+     *
+     * @param w the worker
+     * @param a the number of active workers
+     * @return true if swept all queues without finding a task
      */
-    final boolean tryIncrementRunningCount() {
-        int c;
-        return UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                        c = workerCounts,
-                                        c + ONE_RUNNING);
+    private boolean scan(ForkJoinWorkerThread w, int a) {
+        int g = scanGuard; // mask 0 avoids useless scans if only one active
+        int m = (parallelism == 1 - a && blockedCount == 0) ? 0 : g & SMASK;
+        ForkJoinWorkerThread[] ws = workers;
+        if (ws == null || ws.length <= m)         // staleness check
+            return false;
+        for (int r = w.seed, k = r, j = -(m + m); j <= m + m; ++j) {
+            ForkJoinTask<?> t; ForkJoinTask<?>[] q; int b, i;
+            ForkJoinWorkerThread v = ws[k & m];
+            if (v != null && (b = v.queueBase) != v.queueTop &&
+                (q = v.queue) != null && (i = (q.length - 1) & b) >= 0) {
+                long u = (i << ASHIFT) + ABASE;
+                if ((t = q[i]) != null && v.queueBase == b &&
+                    UNSAFE.compareAndSwapObject(q, u, t, null)) {
+                    int d = (v.queueBase = b + 1) - v.queueTop;
+                    v.stealHint = w.poolIndex;
+                    if (d != 0)
+                        signalWork();             // propagate if nonempty
+                    w.execTask(t);
+                }
+                r ^= r << 13; r ^= r >>> 17; w.seed = r ^ (r << 5);
+                return false;                     // store next seed
+            }
+            else if (j < 0) {                     // xorshift
+                r ^= r << 13; r ^= r >>> 17; k = r ^= r << 5;
+            }
+            else
+                ++k;
+        }
+        if (scanGuard != g)                       // staleness check
+            return false;
+        else {                                    // try to take submission
+            ForkJoinTask<?> t; ForkJoinTask<?>[] q; int b, i;
+            if ((b = queueBase) != queueTop &&
+                (q = submissionQueue) != null &&
+                (i = (q.length - 1) & b) >= 0) {
+                long u = (i << ASHIFT) + ABASE;
+                if ((t = q[i]) != null && queueBase == b &&
+                    UNSAFE.compareAndSwapObject(q, u, t, null)) {
+                    queueBase = b + 1;
+                    w.execTask(t);
+                }
+                return false;
+            }
+            return true;                         // all queues empty
+        }
     }
 
     /**
-     * Tries to decrement running count unless already zero.
-     */
-    final boolean tryDecrementRunningCount() {
-        int wc = workerCounts;
-        if ((wc & RUNNING_COUNT_MASK) == 0)
-            return false;
-        return UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                        wc, wc - ONE_RUNNING);
-    }
-
-    /**
-     * Forces decrement of encoded workerCounts, awaiting nonzero if
-     * (rarely) necessary when other count updates lag.
+     * Tries to enqueue worker w in wait queue and await change in
+     * worker's eventCount.  If the pool is quiescent, possibly
+     * terminates worker upon exit.  Otherwise, before blocking,
+     * rescans queues to avoid missed signals.  Upon finding work,
+     * releases at least one worker (which may be the current
+     * worker). Rescans restart upon detected staleness or failure to
+     * release due to contention. Note the unusual conventions about
+     * Thread.interrupt here and elsewhere: Because interrupts are
+     * used solely to alert threads to check termination, which is
+     * checked here anyway, we clear status (using Thread.interrupted)
+     * before any call to park, so that park does not immediately
+     * return due to status being set via some other unrelated call to
+     * interrupt in user code.
      *
-     * @param dr -- either zero or ONE_RUNNING
-     * @param dt -- either zero or ONE_TOTAL
+     * @param w the calling worker
+     * @param c the ctl value on entry
+     * @return true if waited or another thread was released upon enq
      */
-    private void decrementWorkerCounts(int dr, int dt) {
-        for (;;) {
-            int wc = workerCounts;
-            if ((wc & RUNNING_COUNT_MASK)  - dr < 0 ||
-                (wc >>> TOTAL_COUNT_SHIFT) - dt < 0) {
-                if ((runState & TERMINATED) != 0)
-                    return; // lagging termination on a backout
-                Thread.yield();
+    private boolean tryAwaitWork(ForkJoinWorkerThread w, long c) {
+        int v = w.eventCount;
+        w.nextWait = (int)c;                      // w's successor record
+        long nc = (long)(v & E_MASK) | ((c - AC_UNIT) & (AC_MASK|TC_MASK));
+        if (ctl != c || !UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc)) {
+            long d = ctl; // return true if lost to a deq, to force scan
+            return (int)d != (int)c && ((d - c) & AC_MASK) >= 0L;
+        }
+        for (int sc = w.stealCount; sc != 0;) {   // accumulate stealCount
+            long s = stealCount;
+            if (UNSAFE.compareAndSwapLong(this, stealCountOffset, s, s + sc))
+                sc = w.stealCount = 0;
+            else if (w.eventCount != v)
+                return true;                      // update next time
+        }
+        if (parallelism + (int)(nc >> AC_SHIFT) == 0 &&
+            blockedCount == 0 && quiescerCount == 0)
+            idleAwaitWork(w, nc, c, v);           // quiescent
+        for (boolean rescanned = false;;) {
+            if (w.eventCount != v)
+                return true;
+            if (!rescanned) {
+                int g = scanGuard, m = g & SMASK;
+                ForkJoinWorkerThread[] ws = workers;
+                if (ws != null && m < ws.length) {
+                    rescanned = true;
+                    for (int i = 0; i <= m; ++i) {
+                        ForkJoinWorkerThread u = ws[i];
+                        if (u != null) {
+                            if (u.queueBase != u.queueTop &&
+                                !tryReleaseWaiter())
+                                rescanned = false; // contended
+                            if (w.eventCount != v)
+                                return true;
+                        }
+                    }
+                }
+                if (scanGuard != g ||              // stale
+                    (queueBase != queueTop && !tryReleaseWaiter()))
+                    rescanned = false;
+                if (!rescanned)
+                    Thread.yield();                // reduce contention
+                else
+                    Thread.interrupted();          // clear before park
             }
-            if (UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                         wc, wc - (dr + dt)))
-                return;
+            else {
+                w.parked = true;                   // must recheck
+                if (w.eventCount != v) {
+                    w.parked = false;
+                    return true;
+                }
+                LockSupport.park(this);
+                rescanned = w.parked = false;
+            }
         }
     }
 
     /**
-     * Tries decrementing active count; fails on contention.
-     * Called when workers cannot find tasks to run.
+     * If inactivating worker w has caused pool to become
+     * quiescent, check for pool termination, and wait for event
+     * for up to SHRINK_RATE nanosecs (rescans are unnecessary in
+     * this case because quiescence reflects consensus about lack
+     * of work). On timeout, if ctl has not changed, terminate the
+     * worker. Upon its termination (see deregisterWorker), it may
+     * wake up another worker to possibly repeat this process.
+     *
+     * @param w the calling worker
+     * @param currentCtl the ctl value after enqueuing w
+     * @param prevCtl the ctl value if w terminated
+     * @param v the eventCount w awaits change
      */
-    final boolean tryDecrementActiveCount() {
-        int c;
-        return UNSAFE.compareAndSwapInt(this, runStateOffset,
-                                        c = runState, c - 1);
+    private void idleAwaitWork(ForkJoinWorkerThread w, long currentCtl,
+                               long prevCtl, int v) {
+        if (w.eventCount == v) {
+            if (shutdown)
+                tryTerminate(false);
+            ForkJoinTask.helpExpungeStaleExceptions(); // help clean weak refs
+            while (ctl == currentCtl) {
+                long startTime = System.nanoTime();
+                w.parked = true;
+                if (w.eventCount == v)             // must recheck
+                    LockSupport.parkNanos(this, SHRINK_RATE);
+                w.parked = false;
+                if (w.eventCount != v)
+                    break;
+                else if (System.nanoTime() - startTime < SHRINK_RATE)
+                    Thread.interrupted();          // spurious wakeup
+                else if (UNSAFE.compareAndSwapLong(this, ctlOffset,
+                                                   currentCtl, prevCtl)) {
+                    w.terminate = true;            // restore previous
+                    w.eventCount = ((int)currentCtl + EC_UNIT) & E_MASK;
+                    break;
+                }
+            }
+        }
     }
 
+    // Submissions
+
     /**
-     * Advances to at least the given level. Returns true if not
-     * already in at least the given level.
+     * Enqueues the given task in the submissionQueue.  Same idea as
+     * ForkJoinWorkerThread.pushTask except for use of submissionLock.
+     *
+     * @param t the task
      */
-    private boolean advanceRunLevel(int level) {
-        for (;;) {
-            int s = runState;
-            if ((s & level) != 0)
-                return false;
-            if (UNSAFE.compareAndSwapInt(this, runStateOffset, s, s | level))
-                return true;
+    private void addSubmission(ForkJoinTask<?> t) {
+        final ReentrantLock lock = this.submissionLock;
+        lock.lock();
+        try {
+            ForkJoinTask<?>[] q; int s, m;
+            if ((q = submissionQueue) != null) {    // ignore if queue removed
+                long u = (((s = queueTop) & (m = q.length-1)) << ASHIFT)+ABASE;
+                UNSAFE.putOrderedObject(q, u, t);
+                queueTop = s + 1;
+                if (s - queueBase == m)
+                    growSubmissionQueue();
+            }
+        } finally {
+            lock.unlock();
+        }
+        signalWork();
+    }
+
+    //  (pollSubmission is defined below with exported methods)
+
+    /**
+     * Creates or doubles submissionQueue array.
+     * Basically identical to ForkJoinWorkerThread version.
+     */
+    private void growSubmissionQueue() {
+        ForkJoinTask<?>[] oldQ = submissionQueue;
+        int size = oldQ != null ? oldQ.length << 1 : INITIAL_QUEUE_CAPACITY;
+        if (size > MAXIMUM_QUEUE_CAPACITY)
+            throw new RejectedExecutionException("Queue capacity exceeded");
+        if (size < INITIAL_QUEUE_CAPACITY)
+            size = INITIAL_QUEUE_CAPACITY;
+        ForkJoinTask<?>[] q = submissionQueue = new ForkJoinTask<?>[size];
+        int mask = size - 1;
+        int top = queueTop;
+        int oldMask;
+        if (oldQ != null && (oldMask = oldQ.length - 1) >= 0) {
+            for (int b = queueBase; b != top; ++b) {
+                long u = ((b & oldMask) << ASHIFT) + ABASE;
+                Object x = UNSAFE.getObjectVolatile(oldQ, u);
+                if (x != null && UNSAFE.compareAndSwapObject(oldQ, u, x, null))
+                    UNSAFE.putObjectVolatile
+                        (q, ((b & mask) << ASHIFT) + ABASE, x);
+            }
         }
     }
 
-    // workers array maintenance
+    // Blocking support
 
     /**
-     * Records and returns a workers array index for new worker.
+     * Tries to increment blockedCount, decrement active count
+     * (sometimes implicitly) and possibly release or create a
+     * compensating worker in preparation for blocking. Fails
+     * on contention or termination.
+     *
+     * @return true if the caller can block, else should recheck and retry
      */
-    private int recordWorker(ForkJoinWorkerThread w) {
-        // Try using slot totalCount-1. If not available, scan and/or resize
-        int k = (workerCounts >>> TOTAL_COUNT_SHIFT) - 1;
-        final ReentrantLock lock = this.workerLock;
-        lock.lock();
-        try {
-            ForkJoinWorkerThread[] ws = workers;
-            int n = ws.length;
-            if (k < 0 || k >= n || ws[k] != null) {
-                for (k = 0; k < n && ws[k] != null; ++k)
-                    ;
-                if (k == n)
-                    ws = workers = Arrays.copyOf(ws, n << 1);
+    private boolean tryPreBlock() {
+        int b = blockedCount;
+        if (UNSAFE.compareAndSwapInt(this, blockedCountOffset, b, b + 1)) {
+            int pc = parallelism;
+            do {
+                ForkJoinWorkerThread[] ws; ForkJoinWorkerThread w;
+                int e, ac, tc, rc, i;
+                long c = ctl;
+                int u = (int)(c >>> 32);
+                if ((e = (int)c) < 0) {
+                                                 // skip -- terminating
+                }
+                else if ((ac = (u >> UAC_SHIFT)) <= 0 && e != 0 &&
+                         (ws = workers) != null &&
+                         (i = ~e & SMASK) < ws.length &&
+                         (w = ws[i]) != null) {
+                    long nc = ((long)(w.nextWait & E_MASK) |
+                               (c & (AC_MASK|TC_MASK)));
+                    if (w.eventCount == e &&
+                        UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc)) {
+                        w.eventCount = (e + EC_UNIT) & E_MASK;
+                        if (w.parked)
+                            UNSAFE.unpark(w);
+                        return true;             // release an idle worker
+                    }
+                }
+                else if ((tc = (short)(u >>> UTC_SHIFT)) >= 0 && ac + pc > 1) {
+                    long nc = ((c - AC_UNIT) & AC_MASK) | (c & ~AC_MASK);
+                    if (UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc))
+                        return true;             // no compensation needed
+                }
+                else if (tc + pc < MAX_ID) {
+                    long nc = ((c + TC_UNIT) & TC_MASK) | (c & ~TC_MASK);
+                    if (UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc)) {
+                        addWorker();
+                        return true;            // create a replacement
+                    }
+                }
+                // try to back out on any failure and let caller retry
+            } while (!UNSAFE.compareAndSwapInt(this, blockedCountOffset,
+                                               b = blockedCount, b - 1));
+        }
+        return false;
+    }
+
+    /**
+     * Decrements blockedCount and increments active count
+     */
+    private void postBlock() {
+        long c;
+        do {} while (!UNSAFE.compareAndSwapLong(this, ctlOffset,  // no mask
+                                                c = ctl, c + AC_UNIT));
+        int b;
+        do {} while(!UNSAFE.compareAndSwapInt(this, blockedCountOffset,
+                                              b = blockedCount, b - 1));
+    }
+
+    /**
+     * Possibly blocks waiting for the given task to complete, or
+     * cancels the task if terminating.  Fails to wait if contended.
+     *
+     * @param joinMe the task
+     */
+    final void tryAwaitJoin(ForkJoinTask<?> joinMe) {
+        int s;
+        Thread.interrupted(); // clear interrupts before checking termination
+        if (joinMe.status >= 0) {
+            if (tryPreBlock()) {
+                joinMe.tryAwaitDone(0L);
+                postBlock();
             }
-            ws[k] = w;
-            int c = eventCount; // advance event count to ensure visibility
-            UNSAFE.compareAndSwapInt(this, eventCountOffset, c, c+1);
-        } finally {
-            lock.unlock();
+            else if ((ctl & STOP_BIT) != 0L)
+                joinMe.cancelIgnoringExceptions();
         }
-        return k;
     }
 
     /**
-     * Nulls out record of worker in workers array.
+     * Possibly blocks the given worker waiting for joinMe to
+     * complete or timeout
+     *
+     * @param joinMe the task
+     * @param millis the wait time for underlying Object.wait
+     */
+    final void timedAwaitJoin(ForkJoinTask<?> joinMe, long nanos) {
+        while (joinMe.status >= 0) {
+            Thread.interrupted();
+            if ((ctl & STOP_BIT) != 0L) {
+                joinMe.cancelIgnoringExceptions();
+                break;
+            }
+            if (tryPreBlock()) {
+                long last = System.nanoTime();
+                while (joinMe.status >= 0) {
+                    long millis = TimeUnit.NANOSECONDS.toMillis(nanos);
+                    if (millis <= 0)
+                        break;
+                    joinMe.tryAwaitDone(millis);
+                    if (joinMe.status < 0)
+                        break;
+                    if ((ctl & STOP_BIT) != 0L) {
+                        joinMe.cancelIgnoringExceptions();
+                        break;
+                    }
+                    long now = System.nanoTime();
+                    nanos -= now - last;
+                    last = now;
+                }
+                postBlock();
+                break;
+            }
+        }
+    }
+
+    /**
+     * If necessary, compensates for blocker, and blocks
+     */
+    private void awaitBlocker(ManagedBlocker blocker)
+        throws InterruptedException {
+        while (!blocker.isReleasable()) {
+            if (tryPreBlock()) {
+                try {
+                    do {} while (!blocker.isReleasable() && !blocker.block());
+                } finally {
+                    postBlock();
+                }
+                break;
+            }
+        }
+    }
+
+    // Creating, registering and deregistring workers
+
+    /**
+     * Tries to create and start a worker; minimally rolls back counts
+     * on failure.
      */
-    private void forgetWorker(ForkJoinWorkerThread w) {
-        int idx = w.poolIndex;
-        // Locking helps method recordWorker avoid unnecessary expansion
-        final ReentrantLock lock = this.workerLock;
-        lock.lock();
+    private void addWorker() {
+        Throwable ex = null;
+        ForkJoinWorkerThread t = null;
         try {
-            ForkJoinWorkerThread[] ws = workers;
-            if (idx >= 0 && idx < ws.length && ws[idx] == w) // verify
-                ws[idx] = null;
-        } finally {
-            lock.unlock();
+            t = factory.newThread(this);
+        } catch (Throwable e) {
+            ex = e;
+        }
+        if (t == null) {  // null or exceptional factory return
+            long c;       // adjust counts
+            do {} while (!UNSAFE.compareAndSwapLong
+                         (this, ctlOffset, c = ctl,
+                          (((c - AC_UNIT) & AC_MASK) |
+                           ((c - TC_UNIT) & TC_MASK) |
+                           (c & ~(AC_MASK|TC_MASK)))));
+            // Propagate exception if originating from an external caller
+            if (!tryTerminate(false) && ex != null &&
+                !(Thread.currentThread() instanceof ForkJoinWorkerThread))
+                UNSAFE.throwException(ex);
+        }
+        else
+            t.start();
+    }
+
+    /**
+     * Callback from ForkJoinWorkerThread constructor to assign a
+     * public name
+     */
+    final String nextWorkerName() {
+        for (int n;;) {
+            if (UNSAFE.compareAndSwapInt(this, nextWorkerNumberOffset,
+                                         n = nextWorkerNumber, ++n))
+                return workerNamePrefix + n;
+        }
+    }
+
+    /**
+     * Callback from ForkJoinWorkerThread constructor to
+     * determine its poolIndex and record in workers array.
+     *
+     * @param w the worker
+     * @return the worker's pool index
+     */
+    final int registerWorker(ForkJoinWorkerThread w) {
+        /*
+         * In the typical case, a new worker acquires the lock, uses
+         * next available index and returns quickly.  Since we should
+         * not block callers (ultimately from signalWork or
+         * tryPreBlock) waiting for the lock needed to do this, we
+         * instead help release other workers while waiting for the
+         * lock.
+         */
+        for (int g;;) {
+            ForkJoinWorkerThread[] ws;
+            if (((g = scanGuard) & SG_UNIT) == 0 &&
+                UNSAFE.compareAndSwapInt(this, scanGuardOffset,
+                                         g, g | SG_UNIT)) {
+                int k = nextWorkerIndex;
+                try {
+                    if ((ws = workers) != null) { // ignore on shutdown
+                        int n = ws.length;
+                        if (k < 0 || k >= n || ws[k] != null) {
+                            for (k = 0; k < n && ws[k] != null; ++k)
+                                ;
+                            if (k == n)
+                                ws = workers = Arrays.copyOf(ws, n << 1);
+                        }
+                        ws[k] = w;
+                        nextWorkerIndex = k + 1;
+                        int m = g & SMASK;
+                        g = k >= m? ((m << 1) + 1) & SMASK : g + (SG_UNIT<<1);
+                    }
+                } finally {
+                    scanGuard = g;
+                }
+                return k;
+            }
+            else if ((ws = workers) != null) { // help release others
+                for (ForkJoinWorkerThread u : ws) {
+                    if (u != null && u.queueBase != u.queueTop) {
+                        if (tryReleaseWaiter())
+                            break;
+                    }
+                }
+            }
         }
     }
 
@@ -743,415 +1200,46 @@
      *
      * @param w the worker
      */
-    final void workerTerminated(ForkJoinWorkerThread w) {
-        forgetWorker(w);
-        decrementWorkerCounts(w.isTrimmed() ? 0 : ONE_RUNNING, ONE_TOTAL);
-        while (w.stealCount != 0) // collect final count
-            tryAccumulateStealCount(w);
-        tryTerminate(false);
-    }
-
-    // Waiting for and signalling events
-
-    /**
-     * Releases workers blocked on a count not equal to current count.
-     * Normally called after precheck that eventWaiters isn't zero to
-     * avoid wasted array checks. Gives up upon a change in count or
-     * upon releasing four workers, letting others take over.
-     */
-    private void releaseEventWaiters() {
-        ForkJoinWorkerThread[] ws = workers;
-        int n = ws.length;
-        long h = eventWaiters;
-        int ec = eventCount;
-        int releases = 4;
-        ForkJoinWorkerThread w; int id;
-        while ((id = (((int)h) & WAITER_ID_MASK) - 1) >= 0 &&
-               (int)(h >>> EVENT_COUNT_SHIFT) != ec &&
-               id < n && (w = ws[id]) != null) {
-            if (UNSAFE.compareAndSwapLong(this, eventWaitersOffset,
-                                          h,  w.nextWaiter)) {
-                LockSupport.unpark(w);
-                if (--releases == 0)
-                    break;
-            }
-            if (eventCount != ec)
-                break;
-            h = eventWaiters;
-        }
-    }
-
-    /**
-     * Tries to advance eventCount and releases waiters. Called only
-     * from workers.
-     */
-    final void signalWork() {
-        int c; // try to increment event count -- CAS failure OK
-        UNSAFE.compareAndSwapInt(this, eventCountOffset, c = eventCount, c+1);
-        if (eventWaiters != 0L)
-            releaseEventWaiters();
-    }
-
-    /**
-     * Adds the given worker to event queue and blocks until
-     * terminating or event count advances from the given value
-     *
-     * @param w the calling worker thread
-     * @param ec the count
-     */
-    private void eventSync(ForkJoinWorkerThread w, int ec) {
-        long nh = (((long)ec) << EVENT_COUNT_SHIFT) | ((long)(w.poolIndex+1));
-        long h;
-        while ((runState < SHUTDOWN || !tryTerminate(false)) &&
-               (((int)(h = eventWaiters) & WAITER_ID_MASK) == 0 ||
-                (int)(h >>> EVENT_COUNT_SHIFT) == ec) &&
-               eventCount == ec) {
-            if (UNSAFE.compareAndSwapLong(this, eventWaitersOffset,
-                                          w.nextWaiter = h, nh)) {
-                awaitEvent(w, ec);
-                break;
+    final void deregisterWorker(ForkJoinWorkerThread w, Throwable ex) {
+        int idx = w.poolIndex;
+        int sc = w.stealCount;
+        int steps = 0;
+        // Remove from array, adjust worker counts and collect steal count.
+        // We can intermix failed removes or adjusts with steal updates
+        do {
+            long s, c;
+            int g;
+            if (steps == 0 && ((g = scanGuard) & SG_UNIT) == 0 &&
+                UNSAFE.compareAndSwapInt(this, scanGuardOffset,
+                                         g, g |= SG_UNIT)) {
+                ForkJoinWorkerThread[] ws = workers;
+                if (ws != null && idx >= 0 &&
+                    idx < ws.length && ws[idx] == w)
+                    ws[idx] = null;    // verify
+                nextWorkerIndex = idx;
+                scanGuard = g + SG_UNIT;
+                steps = 1;
             }
-        }
-    }
-
-    /**
-     * Blocks the given worker (that has already been entered as an
-     * event waiter) until terminating or event count advances from
-     * the given value. The oldest (first) waiter uses a timed wait to
-     * occasionally one-by-one shrink the number of workers (to a
-     * minimum of one) if the pool has not been used for extended
-     * periods.
-     *
-     * @param w the calling worker thread
-     * @param ec the count
-     */
-    private void awaitEvent(ForkJoinWorkerThread w, int ec) {
-        while (eventCount == ec) {
-            if (tryAccumulateStealCount(w)) { // transfer while idle
-                boolean untimed = (w.nextWaiter != 0L ||
-                                   (workerCounts & RUNNING_COUNT_MASK) <= 1);
-                long startTime = untimed ? 0 : System.nanoTime();
-                Thread.interrupted();         // clear/ignore interrupt
-                if (w.isTerminating() || eventCount != ec)
-                    break;                    // recheck after clear
-                if (untimed)
-                    LockSupport.park(w);
-                else {
-                    LockSupport.parkNanos(w, SHRINK_RATE_NANOS);
-                    if (eventCount != ec || w.isTerminating())
-                        break;
-                    if (System.nanoTime() - startTime >= SHRINK_RATE_NANOS)
-                        tryShutdownUnusedWorker(ec);
-                }
-            }
-        }
-    }
-
-    // Maintaining parallelism
-
-    /**
-     * Pushes worker onto the spare stack.
-     */
-    final void pushSpare(ForkJoinWorkerThread w) {
-        int ns = (++w.spareCount << SPARE_COUNT_SHIFT) | (w.poolIndex + 1);
-        do {} while (!UNSAFE.compareAndSwapInt(this, spareWaitersOffset,
-                                               w.nextSpare = spareWaiters,ns));
-    }
-
-    /**
-     * Tries (once) to resume a spare if the number of running
-     * threads is less than target.
-     */
-    private void tryResumeSpare() {
-        int sw, id;
-        ForkJoinWorkerThread[] ws = workers;
-        int n = ws.length;
-        ForkJoinWorkerThread w;
-        if ((sw = spareWaiters) != 0 &&
-            (id = (sw & SPARE_ID_MASK) - 1) >= 0 &&
-            id < n && (w = ws[id]) != null &&
-            (runState >= TERMINATING ||
-             (workerCounts & RUNNING_COUNT_MASK) < parallelism) &&
-            spareWaiters == sw &&
-            UNSAFE.compareAndSwapInt(this, spareWaitersOffset,
-                                     sw, w.nextSpare)) {
-            int c; // increment running count before resume
-            do {} while (!UNSAFE.compareAndSwapInt
-                         (this, workerCountsOffset,
-                          c = workerCounts, c + ONE_RUNNING));
-            if (w.tryUnsuspend())
-                LockSupport.unpark(w);
-            else   // back out if w was shutdown
-                decrementWorkerCounts(ONE_RUNNING, 0);
+            if (steps == 1 &&
+                UNSAFE.compareAndSwapLong(this, ctlOffset, c = ctl,
+                                          (((c - AC_UNIT) & AC_MASK) |
+                                           ((c - TC_UNIT) & TC_MASK) |
+                                           (c & ~(AC_MASK|TC_MASK)))))
+                steps = 2;
+            if (sc != 0 &&
+                UNSAFE.compareAndSwapLong(this, stealCountOffset,
+                                          s = stealCount, s + sc))
+                sc = 0;
+        } while (steps != 2 || sc != 0);
+        if (!tryTerminate(false)) {
+            if (ex != null)   // possibly replace if died abnormally
+                signalWork();
+            else
+                tryReleaseWaiter();
         }
     }
 
-    /**
-     * Tries to increase the number of running workers if below target
-     * parallelism: If a spare exists tries to resume it via
-     * tryResumeSpare.  Otherwise, if not enough total workers or all
-     * existing workers are busy, adds a new worker. In all cases also
-     * helps wake up releasable workers waiting for work.
-     */
-    private void helpMaintainParallelism() {
-        int pc = parallelism;
-        int wc, rs, tc;
-        while (((wc = workerCounts) & RUNNING_COUNT_MASK) < pc &&
-               (rs = runState) < TERMINATING) {
-            if (spareWaiters != 0)
-                tryResumeSpare();
-            else if ((tc = wc >>> TOTAL_COUNT_SHIFT) >= MAX_WORKERS ||
-                     (tc >= pc && (rs & ACTIVE_COUNT_MASK) != tc))
-                break;   // enough total
-            else if (runState == rs && workerCounts == wc &&
-                     UNSAFE.compareAndSwapInt(this, workerCountsOffset, wc,
-                                              wc + (ONE_RUNNING|ONE_TOTAL))) {
-                ForkJoinWorkerThread w = null;
-                Throwable fail = null;
-                try {
-                    w = factory.newThread(this);
-                } catch (Throwable ex) {
-                    fail = ex;
-                }
-                if (w == null) { // null or exceptional factory return
-                    decrementWorkerCounts(ONE_RUNNING, ONE_TOTAL);
-                    tryTerminate(false); // handle failure during shutdown
-                    // If originating from an external caller,
-                    // propagate exception, else ignore
-                    if (fail != null && runState < TERMINATING &&
-                        !(Thread.currentThread() instanceof
-                          ForkJoinWorkerThread))
-                        UNSAFE.throwException(fail);
-                    break;
-                }
-                w.start(recordWorker(w), ueh);
-                if ((workerCounts >>> TOTAL_COUNT_SHIFT) >= pc)
-                    break; // add at most one unless total below target
-            }
-        }
-        if (eventWaiters != 0L)
-            releaseEventWaiters();
-    }
-
-    /**
-     * Callback from the oldest waiter in awaitEvent waking up after a
-     * period of non-use. If all workers are idle, tries (once) to
-     * shutdown an event waiter or a spare, if one exists. Note that
-     * we don't need CAS or locks here because the method is called
-     * only from one thread occasionally waking (and even misfires are
-     * OK). Note that until the shutdown worker fully terminates,
-     * workerCounts will overestimate total count, which is tolerable.
-     *
-     * @param ec the event count waited on by caller (to abort
-     * attempt if count has since changed).
-     */
-    private void tryShutdownUnusedWorker(int ec) {
-        if (runState == 0 && eventCount == ec) { // only trigger if all idle
-            ForkJoinWorkerThread[] ws = workers;
-            int n = ws.length;
-            ForkJoinWorkerThread w = null;
-            boolean shutdown = false;
-            int sw;
-            long h;
-            if ((sw = spareWaiters) != 0) { // prefer killing spares
-                int id = (sw & SPARE_ID_MASK) - 1;
-                if (id >= 0 && id < n && (w = ws[id]) != null &&
-                    UNSAFE.compareAndSwapInt(this, spareWaitersOffset,
-                                             sw, w.nextSpare))
-                    shutdown = true;
-            }
-            else if ((h = eventWaiters) != 0L) {
-                long nh;
-                int id = (((int)h) & WAITER_ID_MASK) - 1;
-                if (id >= 0 && id < n && (w = ws[id]) != null &&
-                    (nh = w.nextWaiter) != 0L && // keep at least one worker
-                    UNSAFE.compareAndSwapLong(this, eventWaitersOffset, h, nh))
-                    shutdown = true;
-            }
-            if (w != null && shutdown) {
-                w.shutdown();
-                LockSupport.unpark(w);
-            }
-        }
-        releaseEventWaiters(); // in case of interference
-    }
-
-    /**
-     * Callback from workers invoked upon each top-level action (i.e.,
-     * stealing a task or taking a submission and running it).
-     * Performs one or more of the following:
-     *
-     * 1. If the worker is active and either did not run a task
-     *    or there are too many workers, try to set its active status
-     *    to inactive and update activeCount. On contention, we may
-     *    try again in this or a subsequent call.
-     *
-     * 2. If not enough total workers, help create some.
-     *
-     * 3. If there are too many running workers, suspend this worker
-     *    (first forcing inactive if necessary).  If it is not needed,
-     *    it may be shutdown while suspended (via
-     *    tryShutdownUnusedWorker).  Otherwise, upon resume it
-     *    rechecks running thread count and need for event sync.
-     *
-     * 4. If worker did not run a task, await the next task event via
-     *    eventSync if necessary (first forcing inactivation), upon
-     *    which the worker may be shutdown via
-     *    tryShutdownUnusedWorker.  Otherwise, help release any
-     *    existing event waiters that are now releasable,
-     *
-     * @param w the worker
-     * @param ran true if worker ran a task since last call to this method
-     */
-    final void preStep(ForkJoinWorkerThread w, boolean ran) {
-        int wec = w.lastEventCount;
-        boolean active = w.active;
-        boolean inactivate = false;
-        int pc = parallelism;
-        while (w.runState == 0) {
-            int rs = runState;
-            if (rs >= TERMINATING) {           // propagate shutdown
-                w.shutdown();
-                break;
-            }
-            if ((inactivate || (active && (rs & ACTIVE_COUNT_MASK) >= pc)) &&
-                UNSAFE.compareAndSwapInt(this, runStateOffset, rs, --rs)) {
-                inactivate = active = w.active = false;
-                if (rs == SHUTDOWN) {          // all inactive and shut down
-                    tryTerminate(false);
-                    continue;
-                }
-            }
-            int wc = workerCounts;             // try to suspend as spare
-            if ((wc & RUNNING_COUNT_MASK) > pc) {
-                if (!(inactivate |= active) && // must inactivate to suspend
-                    workerCounts == wc &&
-                    UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                             wc, wc - ONE_RUNNING))
-                    w.suspendAsSpare();
-            }
-            else if ((wc >>> TOTAL_COUNT_SHIFT) < pc)
-                helpMaintainParallelism();     // not enough workers
-            else if (ran)
-                break;
-            else {
-                long h = eventWaiters;
-                int ec = eventCount;
-                if (h != 0L && (int)(h >>> EVENT_COUNT_SHIFT) != ec)
-                    releaseEventWaiters();     // release others before waiting
-                else if (ec != wec) {
-                    w.lastEventCount = ec;     // no need to wait
-                    break;
-                }
-                else if (!(inactivate |= active))
-                    eventSync(w, wec);         // must inactivate before sync
-            }
-        }
-    }
-
-    /**
-     * Helps and/or blocks awaiting join of the given task.
-     * See above for explanation.
-     *
-     * @param joinMe the task to join
-     * @param worker the current worker thread
-     * @param timed true if wait should time out
-     * @param nanos timeout value if timed
-     */
-    final void awaitJoin(ForkJoinTask<?> joinMe, ForkJoinWorkerThread worker,
-                         boolean timed, long nanos) {
-        long startTime = timed ? System.nanoTime() : 0L;
-        int retries = 2 + (parallelism >> 2); // #helpJoins before blocking
-        boolean running = true;               // false when count decremented
-        while (joinMe.status >= 0) {
-            if (runState >= TERMINATING) {
-                joinMe.cancelIgnoringExceptions();
-                break;
-            }
-            running = worker.helpJoinTask(joinMe, running);
-            if (joinMe.status < 0)
-                break;
-            if (retries > 0) {
-                --retries;
-                continue;
-            }
-            int wc = workerCounts;
-            if ((wc & RUNNING_COUNT_MASK) != 0) {
-                if (running) {
-                    if (!UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                                  wc, wc - ONE_RUNNING))
-                        continue;
-                    running = false;
-                }
-                long h = eventWaiters;
-                if (h != 0L && (int)(h >>> EVENT_COUNT_SHIFT) != eventCount)
-                    releaseEventWaiters();
-                if ((workerCounts & RUNNING_COUNT_MASK) != 0) {
-                    long ms; int ns;
-                    if (!timed) {
-                        ms = JOIN_TIMEOUT_MILLIS;
-                        ns = 0;
-                    }
-                    else { // at most JOIN_TIMEOUT_MILLIS per wait
-                        long nt = nanos - (System.nanoTime() - startTime);
-                        if (nt <= 0L)
-                            break;
-                        ms = nt / 1000000;
-                        if (ms > JOIN_TIMEOUT_MILLIS) {
-                            ms = JOIN_TIMEOUT_MILLIS;
-                            ns = 0;
-                        }
-                        else
-                            ns = (int) (nt % 1000000);
-                    }
-                    joinMe.internalAwaitDone(ms, ns);
-                }
-                if (joinMe.status < 0)
-                    break;
-            }
-            helpMaintainParallelism();
-        }
-        if (!running) {
-            int c;
-            do {} while (!UNSAFE.compareAndSwapInt
-                         (this, workerCountsOffset,
-                          c = workerCounts, c + ONE_RUNNING));
-        }
-    }
-
-    /**
-     * Same idea as awaitJoin, but no helping, retries, or timeouts.
-     */
-    final void awaitBlocker(ManagedBlocker blocker)
-        throws InterruptedException {
-        while (!blocker.isReleasable()) {
-            int wc = workerCounts;
-            if ((wc & RUNNING_COUNT_MASK) == 0)
-                helpMaintainParallelism();
-            else if (UNSAFE.compareAndSwapInt(this, workerCountsOffset,
-                                              wc, wc - ONE_RUNNING)) {
-                try {
-                    while (!blocker.isReleasable()) {
-                        long h = eventWaiters;
-                        if (h != 0L &&
-                            (int)(h >>> EVENT_COUNT_SHIFT) != eventCount)
-                            releaseEventWaiters();
-                        else if ((workerCounts & RUNNING_COUNT_MASK) == 0 &&
-                                 runState < TERMINATING)
-                            helpMaintainParallelism();
-                        else if (blocker.block())
-                            break;
-                    }
-                } finally {
-                    int c;
-                    do {} while (!UNSAFE.compareAndSwapInt
-                                 (this, workerCountsOffset,
-                                  c = workerCounts, c + ONE_RUNNING));
-                }
-                break;
-            }
-        }
-    }
+    // Shutdown and termination
 
     /**
      * Possibly initiates and/or completes termination.
@@ -1161,97 +1249,132 @@
      * @return true if now terminating or terminated
      */
     private boolean tryTerminate(boolean now) {
-        if (now)
-            advanceRunLevel(SHUTDOWN); // ensure at least SHUTDOWN
-        else if (runState < SHUTDOWN ||
-                 !submissionQueue.isEmpty() ||
-                 (runState & ACTIVE_COUNT_MASK) != 0)
-            return false;
-
-        if (advanceRunLevel(TERMINATING))
-            startTerminating();
-
-        // Finish now if all threads terminated; else in some subsequent call
-        if ((workerCounts >>> TOTAL_COUNT_SHIFT) == 0) {
-            advanceRunLevel(TERMINATED);
-            termination.forceTermination();
+        long c;
+        while (((c = ctl) & STOP_BIT) == 0) {
+            if (!now) {
+                if ((int)(c >> AC_SHIFT) != -parallelism)
+                    return false;
+                if (!shutdown || blockedCount != 0 || quiescerCount != 0 ||
+                    queueBase != queueTop) {
+                    if (ctl == c) // staleness check
+                        return false;
+                    continue;
+                }
+            }
+            if (UNSAFE.compareAndSwapLong(this, ctlOffset, c, c | STOP_BIT))
+                startTerminating();
+        }
+        if ((short)(c >>> TC_SHIFT) == -parallelism) { // signal when 0 workers
+            final ReentrantLock lock = this.submissionLock;
+            lock.lock();
+            try {
+                termination.signalAll();
+            } finally {
+                lock.unlock();
+            }
         }
         return true;
     }
 
     /**
-     * Actions on transition to TERMINATING
-     *
-     * Runs up to four passes through workers: (0) shutting down each
-     * (without waking up if parked) to quickly spread notifications
-     * without unnecessary bouncing around event queues etc (1) wake
-     * up and help cancel tasks (2) interrupt (3) mop up races with
-     * interrupted workers
+     * Runs up to three passes through workers: (0) Setting
+     * termination status for each worker, followed by wakeups up to
+     * queued workers; (1) helping cancel tasks; (2) interrupting
+     * lagging threads (likely in external tasks, but possibly also
+     * blocked in joins).  Each pass repeats previous steps because of
+     * potential lagging thread creation.
      */
     private void startTerminating() {
         cancelSubmissions();
-        for (int passes = 0; passes < 4 && workerCounts != 0; ++passes) {
-            int c; // advance event count
-            UNSAFE.compareAndSwapInt(this, eventCountOffset,
-                                     c = eventCount, c+1);
-            eventWaiters = 0L; // clobber lists
-            spareWaiters = 0;
-            for (ForkJoinWorkerThread w : workers) {
-                if (w != null) {
-                    w.shutdown();
-                    if (passes > 0 && !w.isTerminated()) {
-                        w.cancelTasks();
-                        LockSupport.unpark(w);
-                        if (passes > 1 && !w.isInterrupted()) {
-                            try {
-                                w.interrupt();
-                            } catch (SecurityException ignore) {
+        for (int pass = 0; pass < 3; ++pass) {
+            ForkJoinWorkerThread[] ws = workers;
+            if (ws != null) {
+                for (ForkJoinWorkerThread w : ws) {
+                    if (w != null) {
+                        w.terminate = true;
+                        if (pass > 0) {
+                            w.cancelTasks();
+                            if (pass > 1 && !w.isInterrupted()) {
+                                try {
+                                    w.interrupt();
+                                } catch (SecurityException ignore) {
+                                }
                             }
                         }
                     }
                 }
+                terminateWaiters();
+            }
+        }
+    }
+
+    /**
+     * Polls and cancels all submissions. Called only during termination.
+     */
+    private void cancelSubmissions() {
+        while (queueBase != queueTop) {
+            ForkJoinTask<?> task = pollSubmission();
+            if (task != null) {
+                try {
+                    task.cancel(false);
+                } catch (Throwable ignore) {
+                }
             }
         }
     }
 
     /**
-     * Clears out and cancels submissions, ignoring exceptions.
+     * Tries to set the termination status of waiting workers, and
+     * then wakes them up (after which they will terminate).
      */
-    private void cancelSubmissions() {
-        ForkJoinTask<?> task;
-        while ((task = submissionQueue.poll()) != null) {
-            try {
-                task.cancel(false);
-            } catch (Throwable ignore) {
+    private void terminateWaiters() {
+        ForkJoinWorkerThread[] ws = workers;
+        if (ws != null) {
+            ForkJoinWorkerThread w; long c; int i, e;
+            int n = ws.length;
+            while ((i = ~(e = (int)(c = ctl)) & SMASK) < n &&
+                   (w = ws[i]) != null && w.eventCount == (e & E_MASK)) {
+                if (UNSAFE.compareAndSwapLong(this, ctlOffset, c,
+                                              (long)(w.nextWait & E_MASK) |
+                                              ((c + AC_UNIT) & AC_MASK) |
+                                              (c & (TC_MASK|STOP_BIT)))) {
+                    w.terminate = true;
+                    w.eventCount = e + EC_UNIT;
+                    if (w.parked)
+                        UNSAFE.unpark(w);
+                }
             }
         }
     }
 
-    // misc support for ForkJoinWorkerThread
+    // misc ForkJoinWorkerThread support
 
     /**
-     * Returns pool number.
+     * Increment or decrement quiescerCount. Needed only to prevent
+     * triggering shutdown if a worker is transiently inactive while
+     * checking quiescence.
+     *
+     * @param delta 1 for increment, -1 for decrement
      */
-    final int getPoolNumber() {
-        return poolNumber;
+    final void addQuiescerCount(int delta) {
+        int c;
+        do {} while(!UNSAFE.compareAndSwapInt(this, quiescerCountOffset,
+                                              c = quiescerCount, c + delta));
     }
 
     /**
-     * Tries to accumulate steal count from a worker, clearing
-     * the worker's value if successful.
+     * Directly increment or decrement active count without
+     * queuing. This method is used to transiently assert inactivation
+     * while checking quiescence.
      *
-     * @return true if worker steal count now zero
+     * @param delta 1 for increment, -1 for decrement
      */
-    final boolean tryAccumulateStealCount(ForkJoinWorkerThread w) {
-        int sc = w.stealCount;
-        long c = stealCount;
-        // CAS even if zero, for fence effects
-        if (UNSAFE.compareAndSwapLong(this, stealCountOffset, c, c + sc)) {
-            if (sc != 0)
-                w.stealCount = 0;
-            return true;
-        }
-        return sc == 0;
+    final void addActiveCount(int delta) {
+        long d = delta < 0 ? -AC_UNIT : AC_UNIT;
+        long c;
+        do {} while (!UNSAFE.compareAndSwapLong(this, ctlOffset, c = ctl,
+                                                ((c + d) & AC_MASK) |
+                                                (c & ~AC_MASK)));
     }
 
     /**
@@ -1259,16 +1382,17 @@
      * active thread.
      */
     final int idlePerActive() {
-        int pc = parallelism; // use parallelism, not rc
-        int ac = runState;    // no mask -- artificially boosts during shutdown
-        // Use exact results for small values, saturate past 4
-        return ((pc <= ac) ? 0 :
-                (pc >>> 1 <= ac) ? 1 :
-                (pc >>> 2 <= ac) ? 3 :
-                pc >>> 3);
+        // Approximate at powers of two for small values, saturate past 4
+        int p = parallelism;
+        int a = p + (int)(ctl >> AC_SHIFT);
+        return (a > (p >>>= 1) ? 0 :
+                a > (p >>>= 1) ? 1 :
+                a > (p >>>= 1) ? 2 :
+                a > (p >>>= 1) ? 4 :
+                8);
     }
 
-    // Public and protected methods
+    // Exported methods
 
     // Constructors
 
@@ -1337,49 +1461,42 @@
         checkPermission();
         if (factory == null)
             throw new NullPointerException();
-        if (parallelism <= 0 || parallelism > MAX_WORKERS)
+        if (parallelism <= 0 || parallelism > MAX_ID)
             throw new IllegalArgumentException();
         this.parallelism = parallelism;
         this.factory = factory;
         this.ueh = handler;
         this.locallyFifo = asyncMode;
-        int arraySize = initialArraySizeFor(parallelism);
-        this.workers = new ForkJoinWorkerThread[arraySize];
-        this.submissionQueue = new LinkedTransferQueue<ForkJoinTask<?>>();
-        this.workerLock = new ReentrantLock();
-        this.termination = new Phaser(1);
-        this.poolNumber = poolNumberGenerator.incrementAndGet();
-    }
-
-    /**
-     * Returns initial power of two size for workers array.
-     * @param pc the initial parallelism level
-     */
-    private static int initialArraySizeFor(int pc) {
-        // If possible, initially allocate enough space for one spare
-        int size = pc < MAX_WORKERS ? pc + 1 : MAX_WORKERS;
-        // See Hackers Delight, sec 3.2. We know MAX_WORKERS < (1 >>> 16)
-        size |= size >>> 1;
-        size |= size >>> 2;
-        size |= size >>> 4;
-        size |= size >>> 8;
-        return size + 1;
+        long np = (long)(-parallelism); // offset ctl counts
+        this.ctl = ((np << AC_SHIFT) & AC_MASK) | ((np << TC_SHIFT) & TC_MASK);
+        this.submissionQueue = new ForkJoinTask<?>[INITIAL_QUEUE_CAPACITY];
+        // initialize workers array with room for 2*parallelism if possible
+        int n = parallelism << 1;
+        if (n >= MAX_ID)
+            n = MAX_ID;
+        else { // See Hackers Delight, sec 3.2, where n < (1 << 16)
+            n |= n >>> 1; n |= n >>> 2; n |= n >>> 4; n |= n >>> 8;
+        }
+        workers = new ForkJoinWorkerThread[n + 1];
+        this.submissionLock = new ReentrantLock();
+        this.termination = submissionLock.newCondition();
+        StringBuilder sb = new StringBuilder("ForkJoinPool-");
+        sb.append(poolNumberGenerator.incrementAndGet());
+        sb.append("-worker-");
+        this.workerNamePrefix = sb.toString();
     }
 
     // Execution methods
 
     /**
-     * Submits task and creates, starts, or resumes some workers if necessary
-     */
-    private <T> void doSubmit(ForkJoinTask<T> task) {
-        submissionQueue.offer(task);
-        int c; // try to increment event count -- CAS failure OK
-        UNSAFE.compareAndSwapInt(this, eventCountOffset, c = eventCount, c+1);
-        helpMaintainParallelism();
-    }
-
-    /**
      * Performs the given task, returning its result upon completion.
+     * If the computation encounters an unchecked Exception or Error,
+     * it is rethrown as the outcome of this invocation.  Rethrown
+     * exceptions behave in the same way as regular exceptions, but,
+     * when possible, contain stack traces (as displayed for example
+     * using {@code ex.printStackTrace()}) of both the current thread
+     * as well as the thread actually encountering the exception;
+     * minimally only the latter.
      *
      * @param task the task
      * @return the task's result
@@ -1388,16 +1505,16 @@
      *         scheduled for execution
      */
     public <T> T invoke(ForkJoinTask<T> task) {
+        Thread t = Thread.currentThread();
         if (task == null)
             throw new NullPointerException();
-        if (runState >= SHUTDOWN)
+        if (shutdown)
             throw new RejectedExecutionException();
-        Thread t = Thread.currentThread();
         if ((t instanceof ForkJoinWorkerThread) &&
             ((ForkJoinWorkerThread)t).pool == this)
             return task.invoke();  // bypass submit if in same pool
         else {
-            doSubmit(task);
+            addSubmission(task);
             return task.join();
         }
     }
@@ -1407,14 +1524,15 @@
      * computation in the current pool, else submits as external task.
      */
     private <T> void forkOrSubmit(ForkJoinTask<T> task) {
-        if (runState >= SHUTDOWN)
+        ForkJoinWorkerThread w;
+        Thread t = Thread.currentThread();
+        if (shutdown)
             throw new RejectedExecutionException();
-        Thread t = Thread.currentThread();
         if ((t instanceof ForkJoinWorkerThread) &&
-            ((ForkJoinWorkerThread)t).pool == this)
-            task.fork();
+            (w = (ForkJoinWorkerThread)t).pool == this)
+            w.pushTask(task);
         else
-            doSubmit(task);
+            addSubmission(task);
     }
 
     /**
@@ -1571,7 +1689,7 @@
      * @return the number of worker threads
      */
     public int getPoolSize() {
-        return workerCounts >>> TOTAL_COUNT_SHIFT;
+        return parallelism + (short)(ctl >>> TC_SHIFT);
     }
 
     /**
@@ -1593,7 +1711,8 @@
      * @return the number of worker threads
      */
     public int getRunningThreadCount() {
-        return workerCounts & RUNNING_COUNT_MASK;
+        int r = parallelism + (int)(ctl >> AC_SHIFT);
+        return r <= 0? 0 : r; // suppress momentarily negative values
     }
 
     /**
@@ -1604,7 +1723,8 @@
      * @return the number of active threads
      */
     public int getActiveThreadCount() {
-        return runState & ACTIVE_COUNT_MASK;
+        int r = parallelism + (int)(ctl >> AC_SHIFT) + blockedCount;
+        return r <= 0? 0 : r; // suppress momentarily negative values
     }
 
     /**
@@ -1619,7 +1739,7 @@
      * @return {@code true} if all threads are currently idle
      */
     public boolean isQuiescent() {
-        return (runState & ACTIVE_COUNT_MASK) == 0;
+        return parallelism + (int)(ctl >> AC_SHIFT) + blockedCount == 0;
     }
 
     /**
@@ -1649,21 +1769,25 @@
      */
     public long getQueuedTaskCount() {
         long count = 0;
-        for (ForkJoinWorkerThread w : workers)
-            if (w != null)
-                count += w.getQueueSize();
+        ForkJoinWorkerThread[] ws;
+        if ((short)(ctl >>> TC_SHIFT) > -parallelism &&
+            (ws = workers) != null) {
+            for (ForkJoinWorkerThread w : ws)
+                if (w != null)
+                    count -= w.queueBase - w.queueTop; // must read base first
+        }
         return count;
     }
 
     /**
      * Returns an estimate of the number of tasks submitted to this
-     * pool that have not yet begun executing.  This method takes time
-     * proportional to the number of submissions.
+     * pool that have not yet begun executing.  This method may take
+     * time proportional to the number of submissions.
      *
      * @return the number of queued submissions
      */
     public int getQueuedSubmissionCount() {
-        return submissionQueue.size();
+        return -queueBase + queueTop;
     }
 
     /**
@@ -1673,7 +1797,7 @@
      * @return {@code true} if there are any queued submissions
      */
     public boolean hasQueuedSubmissions() {
-        return !submissionQueue.isEmpty();
+        return queueBase != queueTop;
     }
 
     /**
@@ -1684,7 +1808,19 @@
      * @return the next submission, or {@code null} if none
      */
     protected ForkJoinTask<?> pollSubmission() {
-        return submissionQueue.poll();
+        ForkJoinTask<?> t; ForkJoinTask<?>[] q; int b, i;
+        while ((b = queueBase) != queueTop &&
+               (q = submissionQueue) != null &&
+               (i = (q.length - 1) & b) >= 0) {
+            long u = (i << ASHIFT) + ABASE;
+            if ((t = q[i]) != null &&
+                queueBase == b &&
+                UNSAFE.compareAndSwapObject(q, u, t, null)) {
+                queueBase = b + 1;
+                return t;
+            }
+        }
+        return null;
     }
 
     /**
@@ -1705,10 +1841,21 @@
      * @return the number of elements transferred
      */
     protected int drainTasksTo(Collection<? super ForkJoinTask<?>> c) {
-        int count = submissionQueue.drainTo(c);
-        for (ForkJoinWorkerThread w : workers)
-            if (w != null)
-                count += w.drainTasksTo(c);
+        int count = 0;
+        while (queueBase != queueTop) {
+            ForkJoinTask<?> t = pollSubmission();
+            if (t != null) {
+                c.add(t);
+                ++count;
+            }
+        }
+        ForkJoinWorkerThread[] ws;
+        if ((short)(ctl >>> TC_SHIFT) > -parallelism &&
+            (ws = workers) != null) {
+            for (ForkJoinWorkerThread w : ws)
+                if (w != null)
+                    count += w.drainTasksTo(c);
+        }
         return count;
     }
 
@@ -1723,14 +1870,20 @@
         long st = getStealCount();
         long qt = getQueuedTaskCount();
         long qs = getQueuedSubmissionCount();
-        int wc = workerCounts;
-        int tc = wc >>> TOTAL_COUNT_SHIFT;
-        int rc = wc & RUNNING_COUNT_MASK;
         int pc = parallelism;
-        int rs = runState;
-        int ac = rs & ACTIVE_COUNT_MASK;
+        long c = ctl;
+        int tc = pc + (short)(c >>> TC_SHIFT);
+        int rc = pc + (int)(c >> AC_SHIFT);
+        if (rc < 0) // ignore transient negative
+            rc = 0;
+        int ac = rc + blockedCount;
+        String level;
+        if ((c & STOP_BIT) != 0)
+            level = (tc == 0)? "Terminated" : "Terminating";
+        else
+            level = shutdown? "Shutting down" : "Running";
         return super.toString() +
-            "[" + runLevelToString(rs) +
+            "[" + level +
             ", parallelism = " + pc +
             ", size = " + tc +
             ", active = " + ac +
@@ -1741,13 +1894,6 @@
             "]";
     }
 
-    private static String runLevelToString(int s) {
-        return ((s & TERMINATED) != 0 ? "Terminated" :
-                ((s & TERMINATING) != 0 ? "Terminating" :
-                 ((s & SHUTDOWN) != 0 ? "Shutting down" :
-                  "Running")));
-    }
-
     /**
      * Initiates an orderly shutdown in which previously submitted
      * tasks are executed, but no new tasks will be accepted.
@@ -1762,7 +1908,7 @@
      */
     public void shutdown() {
         checkPermission();
-        advanceRunLevel(SHUTDOWN);
+        shutdown = true;
         tryTerminate(false);
     }
 
@@ -1784,6 +1930,7 @@
      */
     public List<Runnable> shutdownNow() {
         checkPermission();
+        shutdown = true;
         tryTerminate(true);
         return Collections.emptyList();
     }
@@ -1794,7 +1941,9 @@
      * @return {@code true} if all tasks have completed following shut down
      */
     public boolean isTerminated() {
-        return runState >= TERMINATED;
+        long c = ctl;
+        return ((c & STOP_BIT) != 0L &&
+                (short)(c >>> TC_SHIFT) == -parallelism);
     }
 
     /**
@@ -1811,14 +1960,16 @@
      * @return {@code true} if terminating but not yet terminated
      */
     public boolean isTerminating() {
-        return (runState & (TERMINATING|TERMINATED)) == TERMINATING;
+        long c = ctl;
+        return ((c & STOP_BIT) != 0L &&
+                (short)(c >>> TC_SHIFT) != -parallelism);
     }
 
     /**
      * Returns true if terminating or terminated. Used by ForkJoinWorkerThread.
      */
     final boolean isAtLeastTerminating() {
-        return runState >= TERMINATING;
+        return (ctl & STOP_BIT) != 0L;
     }
 
     /**
@@ -1827,7 +1978,7 @@
      * @return {@code true} if this pool has been shut down
      */
     public boolean isShutdown() {
-        return runState >= SHUTDOWN;
+        return shutdown;
     }
 
     /**
@@ -1843,12 +1994,20 @@
      */
     public boolean awaitTermination(long timeout, TimeUnit unit)
         throws InterruptedException {
+        long nanos = unit.toNanos(timeout);
+        final ReentrantLock lock = this.submissionLock;
+        lock.lock();
         try {
-            termination.awaitAdvanceInterruptibly(0, timeout, unit);
-        } catch (TimeoutException ex) {
-            return false;
+            for (;;) {
+                if (isTerminated())
+                    return true;
+                if (nanos <= 0)
+                    return false;
+                nanos = termination.awaitNanos(nanos);
+            }
+        } finally {
+            lock.unlock();
         }
-        return true;
     }
 
     /**
@@ -1859,13 +2018,15 @@
      * {@code isReleasable} must return {@code true} if blocking is
      * not necessary. Method {@code block} blocks the current thread
      * if necessary (perhaps internally invoking {@code isReleasable}
-     * before actually blocking). The unusual methods in this API
-     * accommodate synchronizers that may, but don't usually, block
-     * for long periods. Similarly, they allow more efficient internal
-     * handling of cases in which additional workers may be, but
-     * usually are not, needed to ensure sufficient parallelism.
-     * Toward this end, implementations of method {@code isReleasable}
-     * must be amenable to repeated invocation.
+     * before actually blocking). These actions are performed by any
+     * thread invoking {@link ForkJoinPool#managedBlock}.  The
+     * unusual methods in this API accommodate synchronizers that may,
+     * but don't usually, block for long periods. Similarly, they
+     * allow more efficient internal handling of cases in which
+     * additional workers may be, but usually are not, needed to
+     * ensure sufficient parallelism.  Toward this end,
+     * implementations of method {@code isReleasable} must be amenable
+     * to repeated invocation.
      *
      * <p>For example, here is a ManagedBlocker based on a
      * ReentrantLock:
@@ -1967,29 +2128,47 @@
     }
 
     // Unsafe mechanics
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long ctlOffset;
+    private static final long stealCountOffset;
+    private static final long blockedCountOffset;
+    private static final long quiescerCountOffset;
+    private static final long scanGuardOffset;
+    private static final long nextWorkerNumberOffset;
+    private static final long ABASE;
+    private static final int ASHIFT;
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long workerCountsOffset =
-        objectFieldOffset("workerCounts", ForkJoinPool.class);
-    private static final long runStateOffset =
-        objectFieldOffset("runState", ForkJoinPool.class);
-    private static final long eventCountOffset =
-        objectFieldOffset("eventCount", ForkJoinPool.class);
-    private static final long eventWaitersOffset =
-        objectFieldOffset("eventWaiters", ForkJoinPool.class);
-    private static final long stealCountOffset =
-        objectFieldOffset("stealCount", ForkJoinPool.class);
-    private static final long spareWaitersOffset =
-        objectFieldOffset("spareWaiters", ForkJoinPool.class);
+    static {
+        poolNumberGenerator = new AtomicInteger();
+        workerSeedGenerator = new Random();
+        modifyThreadPermission = new RuntimePermission("modifyThread");
+        defaultForkJoinWorkerThreadFactory =
+            new DefaultForkJoinWorkerThreadFactory();
+        int s;
+        try {
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = ForkJoinPool.class;
+            ctlOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("ctl"));
+            stealCountOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("stealCount"));
+            blockedCountOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("blockedCount"));
+            quiescerCountOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("quiescerCount"));
+            scanGuardOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("scanGuard"));
+            nextWorkerNumberOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("nextWorkerNumber"));
+            Class a = ForkJoinTask[].class;
+            ABASE = UNSAFE.arrayBaseOffset(a);
+            s = UNSAFE.arrayIndexScale(a);
+        } catch (Exception e) {
+            throw new Error(e);
+        }
+        if ((s & (s-1)) != 0)
+            throw new Error("data type scale not a power of two");
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(s);
+    }
 
-    private static long objectFieldOffset(String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
-    }
 }
--- a/src/share/classes/java/util/concurrent/ForkJoinTask.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ForkJoinTask.java	Wed Apr 20 04:38:36 2011 +0100
@@ -41,7 +41,8 @@
 import java.util.List;
 import java.util.RandomAccess;
 import java.util.Map;
-import java.util.WeakHashMap;
+import java.lang.ref.WeakReference;
+import java.lang.ref.ReferenceQueue;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CancellationException;
 import java.util.concurrent.ExecutionException;
@@ -52,6 +53,8 @@
 import java.util.concurrent.RunnableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
+import java.util.concurrent.locks.ReentrantLock;
+import java.lang.reflect.Constructor;
 
 /**
  * Abstract base class for tasks that run within a {@link ForkJoinPool}.
@@ -95,7 +98,11 @@
  * rethrown to callers attempting to join them. These exceptions may
  * additionally include {@link RejectedExecutionException} stemming
  * from internal resource exhaustion, such as failure to allocate
- * internal task queues.
+ * internal task queues. Rethrown exceptions behave in the same way as
+ * regular exceptions, but, when possible, contain stack traces (as
+ * displayed for example using {@code ex.printStackTrace()}) of both
+ * the thread that initiated the computation as well as the thread
+ * actually encountering the exception; minimally only the latter.
  *
  * <p>The primary method for awaiting completion and extracting
  * results of a task is {@link #join}, but there are several variants:
@@ -192,8 +199,7 @@
      * status maintenance (2) execution and awaiting completion (3)
      * user-level methods that additionally report results. This is
      * sometimes hard to see because this file orders exported methods
-     * in a way that flows well in javadocs. In particular, most
-     * join mechanics are in method quietlyJoin, below.
+     * in a way that flows well in javadocs.
      */
 
     /*
@@ -215,91 +221,67 @@
 
     /** The run status of this task */
     volatile int status; // accessed directly by pool and workers
-
     private static final int NORMAL      = -1;
     private static final int CANCELLED   = -2;
     private static final int EXCEPTIONAL = -3;
     private static final int SIGNAL      =  1;
 
     /**
-     * Table of exceptions thrown by tasks, to enable reporting by
-     * callers. Because exceptions are rare, we don't directly keep
-     * them with task objects, but instead use a weak ref table.  Note
-     * that cancellation exceptions don't appear in the table, but are
-     * instead recorded as status values.
-     * TODO: Use ConcurrentReferenceHashMap
-     */
-    static final Map<ForkJoinTask<?>, Throwable> exceptionMap =
-        Collections.synchronizedMap
-        (new WeakHashMap<ForkJoinTask<?>, Throwable>());
-
-    // Maintaining completion status
-
-    /**
      * Marks completion and wakes up threads waiting to join this task,
      * also clearing signal request bits.
      *
      * @param completion one of NORMAL, CANCELLED, EXCEPTIONAL
+     * @return completion status on exit
      */
-    private void setCompletion(int completion) {
-        int s;
-        while ((s = status) >= 0) {
+    private int setCompletion(int completion) {
+        for (int s;;) {
+            if ((s = status) < 0)
+                return s;
             if (UNSAFE.compareAndSwapInt(this, statusOffset, s, completion)) {
                 if (s != 0)
                     synchronized (this) { notifyAll(); }
-                break;
+                return completion;
             }
         }
     }
 
     /**
-     * Records exception and sets exceptional completion.
+     * Tries to block a worker thread until completed or timed out.
+     * Uses Object.wait time argument conventions.
+     * May fail on contention or interrupt.
      *
-     * @return status on exit
+     * @param millis if > 0, wait time.
      */
-    private void setExceptionalCompletion(Throwable rex) {
-        exceptionMap.put(this, rex);
-        setCompletion(EXCEPTIONAL);
-    }
-
-    /**
-     * Blocks a worker thread until completed or timed out.  Called
-     * only by pool.
-     */
-    final void internalAwaitDone(long millis, int nanos) {
-        int s = status;
-        if ((s == 0 &&
-             UNSAFE.compareAndSwapInt(this, statusOffset, 0, SIGNAL)) ||
-            s > 0)  {
-            try {     // the odd construction reduces lock bias effects
+    final void tryAwaitDone(long millis) {
+        int s;
+        try {
+            if (((s = status) > 0 ||
+                 (s == 0 &&
+                  UNSAFE.compareAndSwapInt(this, statusOffset, 0, SIGNAL))) &&
+                status > 0) {
                 synchronized (this) {
                     if (status > 0)
-                        wait(millis, nanos);
-                    else
-                        notifyAll();
+                        wait(millis);
                 }
-            } catch (InterruptedException ie) {
-                cancelIfTerminating();
             }
+        } catch (InterruptedException ie) {
+            // caller must check termination
         }
     }
 
     /**
      * Blocks a non-worker-thread until completion.
+     * @return status upon completion
      */
-    private void externalAwaitDone() {
-        if (status >= 0) {
+    private int externalAwaitDone() {
+        int s;
+        if ((s = status) >= 0) {
             boolean interrupted = false;
             synchronized (this) {
-                for (;;) {
-                    int s = status;
+                while ((s = status) >= 0) {
                     if (s == 0)
                         UNSAFE.compareAndSwapInt(this, statusOffset,
                                                  0, SIGNAL);
-                    else if (s < 0) {
-                        notifyAll();
-                        break;
-                    }
                     else {
                         try {
                             wait();
@@ -312,53 +294,308 @@
             if (interrupted)
                 Thread.currentThread().interrupt();
         }
+        return s;
     }
 
     /**
      * Blocks a non-worker-thread until completion or interruption or timeout.
      */
-    private void externalInterruptibleAwaitDone(boolean timed, long nanos)
+    private int externalInterruptibleAwaitDone(long millis)
         throws InterruptedException {
+        int s;
         if (Thread.interrupted())
             throw new InterruptedException();
-        if (status >= 0) {
-            long startTime = timed ? System.nanoTime() : 0L;
+        if ((s = status) >= 0) {
             synchronized (this) {
-                for (;;) {
-                    long nt;
-                    int s = status;
+                while ((s = status) >= 0) {
                     if (s == 0)
                         UNSAFE.compareAndSwapInt(this, statusOffset,
                                                  0, SIGNAL);
-                    else if (s < 0) {
-                        notifyAll();
+                    else {
+                        wait(millis);
+                        if (millis > 0L)
+                            break;
+                    }
+                }
+            }
+        }
+        return s;
+    }
+
+    /**
+     * Primary execution method for stolen tasks. Unless done, calls
+     * exec and records status if completed, but doesn't wait for
+     * completion otherwise.
+     */
+    final void doExec() {
+        if (status >= 0) {
+            boolean completed;
+            try {
+                completed = exec();
+            } catch (Throwable rex) {
+                setExceptionalCompletion(rex);
+                return;
+            }
+            if (completed)
+                setCompletion(NORMAL); // must be outside try block
+        }
+    }
+
+    /**
+     * Primary mechanics for join, get, quietlyJoin.
+     * @return status upon completion
+     */
+    private int doJoin() {
+        Thread t; ForkJoinWorkerThread w; int s; boolean completed;
+        if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) {
+            if ((s = status) < 0)
+                return s;
+            if ((w = (ForkJoinWorkerThread)t).unpushTask(this)) {
+                try {
+                    completed = exec();
+                } catch (Throwable rex) {
+                    return setExceptionalCompletion(rex);
+                }
+                if (completed)
+                    return setCompletion(NORMAL);
+            }
+            return w.joinTask(this);
+        }
+        else
+            return externalAwaitDone();
+    }
+
+    /**
+     * Primary mechanics for invoke, quietlyInvoke.
+     * @return status upon completion
+     */
+    private int doInvoke() {
+        int s; boolean completed;
+        if ((s = status) < 0)
+            return s;
+        try {
+            completed = exec();
+        } catch (Throwable rex) {
+            return setExceptionalCompletion(rex);
+        }
+        if (completed)
+            return setCompletion(NORMAL);
+        else
+            return doJoin();
+    }
+
+    // Exception table support
+
+    /**
+     * Table of exceptions thrown by tasks, to enable reporting by
+     * callers. Because exceptions are rare, we don't directly keep
+     * them with task objects, but instead use a weak ref table.  Note
+     * that cancellation exceptions don't appear in the table, but are
+     * instead recorded as status values.
+     *
+     * Note: These statics are initialized below in static block.
+     */
+    private static final ExceptionNode[] exceptionTable;
+    private static final ReentrantLock exceptionTableLock;
+    private static final ReferenceQueue<Object> exceptionTableRefQueue;
+
+    /**
+     * Fixed capacity for exceptionTable.
+     */
+    private static final int EXCEPTION_MAP_CAPACITY = 32;
+
+    /**
+     * Key-value nodes for exception table.  The chained hash table
+     * uses identity comparisons, full locking, and weak references
+     * for keys. The table has a fixed capacity because it only
+     * maintains task exceptions long enough for joiners to access
+     * them, so should never become very large for sustained
+     * periods. However, since we do not know when the last joiner
+     * completes, we must use weak references and expunge them. We do
+     * so on each operation (hence full locking). Also, some thread in
+     * any ForkJoinPool will call helpExpungeStaleExceptions when its
+     * pool becomes isQuiescent.
+     */
+    static final class ExceptionNode extends WeakReference<ForkJoinTask<?>>{
+        final Throwable ex;
+        ExceptionNode next;
+        final long thrower;  // use id not ref to avoid weak cycles
+        ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next) {
+            super(task, exceptionTableRefQueue);
+            this.ex = ex;
+            this.next = next;
+            this.thrower = Thread.currentThread().getId();
+        }
+    }
+
+    /**
+     * Records exception and sets exceptional completion.
+     *
+     * @return status on exit
+     */
+    private int setExceptionalCompletion(Throwable ex) {
+        int h = System.identityHashCode(this);
+        final ReentrantLock lock = exceptionTableLock;
+        lock.lock();
+        try {
+            expungeStaleExceptions();
+            ExceptionNode[] t = exceptionTable;
+            int i = h & (t.length - 1);
+            for (ExceptionNode e = t[i]; ; e = e.next) {
+                if (e == null) {
+                    t[i] = new ExceptionNode(this, ex, t[i]);
+                    break;
+                }
+                if (e.get() == this) // already present
+                    break;
+            }
+        } finally {
+            lock.unlock();
+        }
+        return setCompletion(EXCEPTIONAL);
+    }
+
+    /**
+     * Removes exception node and clears status
+     */
+    private void clearExceptionalCompletion() {
+        int h = System.identityHashCode(this);
+        final ReentrantLock lock = exceptionTableLock;
+        lock.lock();
+        try {
+            ExceptionNode[] t = exceptionTable;
+            int i = h & (t.length - 1);
+            ExceptionNode e = t[i];
+            ExceptionNode pred = null;
+            while (e != null) {
+                ExceptionNode next = e.next;
+                if (e.get() == this) {
+                    if (pred == null)
+                        t[i] = next;
+                    else
+                        pred.next = next;
+                    break;
+                }
+                pred = e;
+                e = next;
+            }
+            expungeStaleExceptions();
+            status = 0;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * Returns a rethrowable exception for the given task, if
+     * available. To provide accurate stack traces, if the exception
+     * was not thrown by the current thread, we try to create a new
+     * exception of the same type as the one thrown, but with the
+     * recorded exception as its cause. If there is no such
+     * constructor, we instead try to use a no-arg constructor,
+     * followed by initCause, to the same effect. If none of these
+     * apply, or any fail due to other exceptions, we return the
+     * recorded exception, which is still correct, although it may
+     * contain a misleading stack trace.
+     *
+     * @return the exception, or null if none
+     */
+    private Throwable getThrowableException() {
+        if (status != EXCEPTIONAL)
+            return null;
+        int h = System.identityHashCode(this);
+        ExceptionNode e;
+        final ReentrantLock lock = exceptionTableLock;
+        lock.lock();
+        try {
+            expungeStaleExceptions();
+            ExceptionNode[] t = exceptionTable;
+            e = t[h & (t.length - 1)];
+            while (e != null && e.get() != this)
+                e = e.next;
+        } finally {
+            lock.unlock();
+        }
+        Throwable ex;
+        if (e == null || (ex = e.ex) == null)
+            return null;
+        if (e.thrower != Thread.currentThread().getId()) {
+            Class ec = ex.getClass();
+            try {
+                Constructor<?> noArgCtor = null;
+                Constructor<?>[] cs = ec.getConstructors();// public ctors only
+                for (int i = 0; i < cs.length; ++i) {
+                    Constructor<?> c = cs[i];
+                    Class<?>[] ps = c.getParameterTypes();
+                    if (ps.length == 0)
+                        noArgCtor = c;
+                    else if (ps.length == 1 && ps[0] == Throwable.class)
+                        return (Throwable)(c.newInstance(ex));
+                }
+                if (noArgCtor != null) {
+                    Throwable wx = (Throwable)(noArgCtor.newInstance());
+                    wx.initCause(ex);
+                    return wx;
+                }
+            } catch (Exception ignore) {
+            }
+        }
+        return ex;
+    }
+
+    /**
+     * Poll stale refs and remove them. Call only while holding lock.
+     */
+    private static void expungeStaleExceptions() {
+        for (Object x; (x = exceptionTableRefQueue.poll()) != null;) {
+            if (x instanceof ExceptionNode) {
+                ForkJoinTask<?> key = ((ExceptionNode)x).get();
+                ExceptionNode[] t = exceptionTable;
+                int i = System.identityHashCode(key) & (t.length - 1);
+                ExceptionNode e = t[i];
+                ExceptionNode pred = null;
+                while (e != null) {
+                    ExceptionNode next = e.next;
+                    if (e == x) {
+                        if (pred == null)
+                            t[i] = next;
+                        else
+                            pred.next = next;
                         break;
                     }
-                    else if (!timed)
-                        wait();
-                    else if ((nt = nanos - (System.nanoTime()-startTime)) > 0L)
-                        wait(nt / 1000000, (int)(nt % 1000000));
-                    else
-                        break;
+                    pred = e;
+                    e = next;
                 }
             }
         }
     }
 
     /**
-     * Unless done, calls exec and records status if completed, but
-     * doesn't wait for completion otherwise. Primary execution method
-     * for ForkJoinWorkerThread.
+     * If lock is available, poll stale refs and remove them.
+     * Called from ForkJoinPool when pools become quiescent.
      */
-    final void quietlyExec() {
-        try {
-            if (status < 0 || !exec())
-                return;
-        } catch (Throwable rex) {
-            setExceptionalCompletion(rex);
-            return;
+    static final void helpExpungeStaleExceptions() {
+        final ReentrantLock lock = exceptionTableLock;
+        if (lock.tryLock()) {
+            try {
+                expungeStaleExceptions();
+            } finally {
+                lock.unlock();
+            }
         }
-        setCompletion(NORMAL); // must be outside try block
+    }
+
+    /**
+     * Report the result of invoke or join; called only upon
+     * non-normal return of internal versions.
+     */
+    private V reportResult() {
+        int s; Throwable ex;
+        if ((s = status) == CANCELLED)
+            throw new CancellationException();
+        if (s == EXCEPTIONAL && (ex = getThrowableException()) != null)
+            UNSAFE.throwException(ex);
+        return getRawResult();
     }
 
     // public methods
@@ -399,11 +636,10 @@
      * @return the computed result
      */
     public final V join() {
-        quietlyJoin();
-        Throwable ex;
-        if (status < NORMAL && (ex = getException()) != null)
-            UNSAFE.throwException(ex);
-        return getRawResult();
+        if (doJoin() != NORMAL)
+            return reportResult();
+        else
+            return getRawResult();
     }
 
     /**
@@ -415,11 +651,10 @@
      * @return the computed result
      */
     public final V invoke() {
-        quietlyInvoke();
-        Throwable ex;
-        if (status < NORMAL && (ex = getException()) != null)
-            UNSAFE.throwException(ex);
-        return getRawResult();
+        if (doInvoke() != NORMAL)
+            return reportResult();
+        else
+            return getRawResult();
     }
 
     /**
@@ -483,22 +718,16 @@
             }
             else if (i != 0)
                 t.fork();
-            else {
-                t.quietlyInvoke();
-                if (ex == null && t.status < NORMAL)
-                    ex = t.getException();
-            }
+            else if (t.doInvoke() < NORMAL && ex == null)
+                ex = t.getException();
         }
         for (int i = 1; i <= last; ++i) {
             ForkJoinTask<?> t = tasks[i];
             if (t != null) {
                 if (ex != null)
                     t.cancel(false);
-                else {
-                    t.quietlyJoin();
-                    if (ex == null && t.status < NORMAL)
-                        ex = t.getException();
-                }
+                else if (t.doJoin() < NORMAL && ex == null)
+                    ex = t.getException();
             }
         }
         if (ex != null)
@@ -546,22 +775,16 @@
             }
             else if (i != 0)
                 t.fork();
-            else {
-                t.quietlyInvoke();
-                if (ex == null && t.status < NORMAL)
-                    ex = t.getException();
-            }
+            else if (t.doInvoke() < NORMAL && ex == null)
+                ex = t.getException();
         }
         for (int i = 1; i <= last; ++i) {
             ForkJoinTask<?> t = ts.get(i);
             if (t != null) {
                 if (ex != null)
                     t.cancel(false);
-                else {
-                    t.quietlyJoin();
-                    if (ex == null && t.status < NORMAL)
-                        ex = t.getException();
-                }
+                else if (t.doJoin() < NORMAL && ex == null)
+                    ex = t.getException();
             }
         }
         if (ex != null)
@@ -597,8 +820,7 @@
      * @return {@code true} if this task is now cancelled
      */
     public boolean cancel(boolean mayInterruptIfRunning) {
-        setCompletion(CANCELLED);
-        return status == CANCELLED;
+        return setCompletion(CANCELLED) == CANCELLED;
     }
 
     /**
@@ -614,21 +836,6 @@
         }
     }
 
-    /**
-     * Cancels if current thread is a terminating worker thread,
-     * ignoring any exceptions thrown by cancel.
-     */
-    final void cancelIfTerminating() {
-        Thread t = Thread.currentThread();
-        if ((t instanceof ForkJoinWorkerThread) &&
-            ((ForkJoinWorkerThread) t).isTerminating()) {
-            try {
-                cancel(false);
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
     public final boolean isDone() {
         return status < 0;
     }
@@ -668,7 +875,7 @@
         int s = status;
         return ((s >= NORMAL)    ? null :
                 (s == CANCELLED) ? new CancellationException() :
-                exceptionMap.get(this));
+                getThrowableException());
     }
 
     /**
@@ -726,19 +933,13 @@
      * member of a ForkJoinPool and was interrupted while waiting
      */
     public final V get() throws InterruptedException, ExecutionException {
-        Thread t = Thread.currentThread();
-        if (t instanceof ForkJoinWorkerThread)
-            quietlyJoin();
-        else
-            externalInterruptibleAwaitDone(false, 0L);
-        int s = status;
-        if (s != NORMAL) {
-            Throwable ex;
-            if (s == CANCELLED)
-                throw new CancellationException();
-            if (s == EXCEPTIONAL && (ex = exceptionMap.get(this)) != null)
-                throw new ExecutionException(ex);
-        }
+        int s = (Thread.currentThread() instanceof ForkJoinWorkerThread) ?
+            doJoin() : externalInterruptibleAwaitDone(0L);
+        Throwable ex;
+        if (s == CANCELLED)
+            throw new CancellationException();
+        if (s == EXCEPTIONAL && (ex = getThrowableException()) != null)
+            throw new ExecutionException(ex);
         return getRawResult();
     }
 
@@ -758,20 +959,39 @@
      */
     public final V get(long timeout, TimeUnit unit)
         throws InterruptedException, ExecutionException, TimeoutException {
-        long nanos = unit.toNanos(timeout);
         Thread t = Thread.currentThread();
-        if (t instanceof ForkJoinWorkerThread)
-            ((ForkJoinWorkerThread)t).joinTask(this, true, nanos);
-        else
-            externalInterruptibleAwaitDone(true, nanos);
+        if (t instanceof ForkJoinWorkerThread) {
+            ForkJoinWorkerThread w = (ForkJoinWorkerThread) t;
+            long nanos = unit.toNanos(timeout);
+            if (status >= 0) {
+                boolean completed = false;
+                if (w.unpushTask(this)) {
+                    try {
+                        completed = exec();
+                    } catch (Throwable rex) {
+                        setExceptionalCompletion(rex);
+                    }
+                }
+                if (completed)
+                    setCompletion(NORMAL);
+                else if (status >= 0 && nanos > 0)
+                    w.pool.timedAwaitJoin(this, nanos);
+            }
+        }
+        else {
+            long millis = unit.toMillis(timeout);
+            if (millis > 0)
+                externalInterruptibleAwaitDone(millis);
+        }
         int s = status;
         if (s != NORMAL) {
             Throwable ex;
             if (s == CANCELLED)
                 throw new CancellationException();
-            if (s == EXCEPTIONAL && (ex = exceptionMap.get(this)) != null)
+            if (s != EXCEPTIONAL)
+                throw new TimeoutException();
+            if ((ex = getThrowableException()) != null)
                 throw new ExecutionException(ex);
-            throw new TimeoutException();
         }
         return getRawResult();
     }
@@ -783,28 +1003,7 @@
      * known to have aborted.
      */
     public final void quietlyJoin() {
-        Thread t;
-        if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) {
-            ForkJoinWorkerThread w = (ForkJoinWorkerThread) t;
-            if (status >= 0) {
-                if (w.unpushTask(this)) {
-                    boolean completed;
-                    try {
-                        completed = exec();
-                    } catch (Throwable rex) {
-                        setExceptionalCompletion(rex);
-                        return;
-                    }
-                    if (completed) {
-                        setCompletion(NORMAL);
-                        return;
-                    }
-                }
-                w.joinTask(this, false, 0L);
-            }
-        }
-        else
-            externalAwaitDone();
+        doJoin();
     }
 
     /**
@@ -813,19 +1012,7 @@
      * exception.
      */
     public final void quietlyInvoke() {
-        if (status >= 0) {
-            boolean completed;
-            try {
-                completed = exec();
-            } catch (Throwable rex) {
-                setExceptionalCompletion(rex);
-                return;
-            }
-            if (completed)
-                setCompletion(NORMAL);
-            else
-                quietlyJoin();
-        }
+        doInvoke();
     }
 
     /**
@@ -864,8 +1051,9 @@
      */
     public void reinitialize() {
         if (status == EXCEPTIONAL)
-            exceptionMap.remove(this);
-        status = 0;
+            clearExceptionalCompletion();
+        else
+            status = 0;
     }
 
     /**
@@ -1176,23 +1364,23 @@
         s.defaultReadObject();
         Object ex = s.readObject();
         if (ex != null)
-            setExceptionalCompletion((Throwable) ex);
+            setExceptionalCompletion((Throwable)ex);
     }
 
     // Unsafe mechanics
-
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long statusOffset =
-        objectFieldOffset("status", ForkJoinTask.class);
-
-    private static long objectFieldOffset(String field, Class<?> klazz) {
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long statusOffset;
+    static {
+        exceptionTableLock = new ReentrantLock();
+        exceptionTableRefQueue = new ReferenceQueue<Object>();
+        exceptionTable = new ExceptionNode[EXCEPTION_MAP_CAPACITY];
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            statusOffset = UNSAFE.objectFieldOffset
+                (ForkJoinTask.class.getDeclaredField("status"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
+
 }
--- a/src/share/classes/java/util/concurrent/ForkJoinWorkerThread.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/ForkJoinWorkerThread.java	Wed Apr 20 04:38:36 2011 +0100
@@ -35,9 +35,7 @@
 
 package java.util.concurrent;
 
-import java.util.Random;
 import java.util.Collection;
-import java.util.concurrent.locks.LockSupport;
 import java.util.concurrent.RejectedExecutionException;
 
 /**
@@ -84,33 +82,38 @@
      * a footprint as possible even in programs generating huge
      * numbers of tasks. To accomplish this, we shift the CAS
      * arbitrating pop vs deq (steal) from being on the indices
-     * ("base" and "sp") to the slots themselves (mainly via method
-     * "casSlotNull()"). So, both a successful pop and deq mainly
-     * entail a CAS of a slot from non-null to null.  Because we rely
-     * on CASes of references, we do not need tag bits on base or sp.
-     * They are simple ints as used in any circular array-based queue
-     * (see for example ArrayDeque).  Updates to the indices must
-     * still be ordered in a way that guarantees that sp == base means
-     * the queue is empty, but otherwise may err on the side of
-     * possibly making the queue appear nonempty when a push, pop, or
-     * deq have not fully committed. Note that this means that the deq
-     * operation, considered individually, is not wait-free. One thief
-     * cannot successfully continue until another in-progress one (or,
-     * if previously empty, a push) completes.  However, in the
+     * ("queueBase" and "queueTop") to the slots themselves (mainly
+     * via method "casSlotNull()"). So, both a successful pop and deq
+     * mainly entail a CAS of a slot from non-null to null.  Because
+     * we rely on CASes of references, we do not need tag bits on
+     * queueBase or queueTop.  They are simple ints as used in any
+     * circular array-based queue (see for example ArrayDeque).
+     * Updates to the indices must still be ordered in a way that
+     * guarantees that queueTop == queueBase means the queue is empty,
+     * but otherwise may err on the side of possibly making the queue
+     * appear nonempty when a push, pop, or deq have not fully
+     * committed. Note that this means that the deq operation,
+     * considered individually, is not wait-free. One thief cannot
+     * successfully continue until another in-progress one (or, if
+     * previously empty, a push) completes.  However, in the
      * aggregate, we ensure at least probabilistic non-blockingness.
      * If an attempted steal fails, a thief always chooses a different
      * random victim target to try next. So, in order for one thief to
      * progress, it suffices for any in-progress deq or new push on
-     * any empty queue to complete. One reason this works well here is
-     * that apparently-nonempty often means soon-to-be-stealable,
-     * which gives threads a chance to set activation status if
-     * necessary before stealing.
+     * any empty queue to complete.
      *
      * This approach also enables support for "async mode" where local
      * task processing is in FIFO, not LIFO order; simply by using a
      * version of deq rather than pop when locallyFifo is true (as set
      * by the ForkJoinPool).  This allows use in message-passing
-     * frameworks in which tasks are never joined.
+     * frameworks in which tasks are never joined.  However neither
+     * mode considers affinities, loads, cache localities, etc, so
+     * rarely provide the best possible performance on a given
+     * machine, but portably provide good throughput by averaging over
+     * these factors.  (Further, even if we did try to use such
+     * information, we do not usually have a basis for exploiting
+     * it. For example, some sets of tasks profit from cache
+     * affinities, but others are harmed by cache pollution effects.)
      *
      * When a worker would otherwise be blocked waiting to join a
      * task, it first tries a form of linear helping: Each worker
@@ -137,29 +140,26 @@
      * miss links in the chain during long-lived tasks, GC stalls etc
      * (which is OK since blocking in such cases is usually a good
      * idea).  (4) We bound the number of attempts to find work (see
-     * MAX_HELP_DEPTH) and fall back to suspending the worker and if
-     * necessary replacing it with a spare (see
-     * ForkJoinPool.awaitJoin).
+     * MAX_HELP) and fall back to suspending the worker and if
+     * necessary replacing it with another.
      *
      * Efficient implementation of these algorithms currently relies
      * on an uncomfortable amount of "Unsafe" mechanics. To maintain
-     * correct orderings, reads and writes of variable base require
-     * volatile ordering.  Variable sp does not require volatile
-     * writes but still needs store-ordering, which we accomplish by
-     * pre-incrementing sp before filling the slot with an ordered
-     * store.  (Pre-incrementing also enables backouts used in
-     * joinTask.)  Because they are protected by volatile base reads,
-     * reads of the queue array and its slots by other threads do not
-     * need volatile load semantics, but writes (in push) require
-     * store order and CASes (in pop and deq) require (volatile) CAS
-     * semantics.  (Michael, Saraswat, and Vechev's algorithm has
-     * similar properties, but without support for nulling slots.)
-     * Since these combinations aren't supported using ordinary
-     * volatiles, the only way to accomplish these efficiently is to
-     * use direct Unsafe calls. (Using external AtomicIntegers and
-     * AtomicReferenceArrays for the indices and array is
-     * significantly slower because of memory locality and indirection
-     * effects.)
+     * correct orderings, reads and writes of variable queueBase
+     * require volatile ordering.  Variable queueTop need not be
+     * volatile because non-local reads always follow those of
+     * queueBase.  Similarly, because they are protected by volatile
+     * queueBase reads, reads of the queue array and its slots by
+     * other threads do not need volatile load semantics, but writes
+     * (in push) require store order and CASes (in pop and deq)
+     * require (volatile) CAS semantics.  (Michael, Saraswat, and
+     * Vechev's algorithm has similar properties, but without support
+     * for nulling slots.)  Since these combinations aren't supported
+     * using ordinary volatiles, the only way to accomplish these
+     * efficiently is to use direct Unsafe calls. (Using external
+     * AtomicIntegers and AtomicReferenceArrays for the indices and
+     * array is significantly slower because of memory locality and
+     * indirection effects.)
      *
      * Further, performance on most platforms is very sensitive to
      * placement and sizing of the (resizable) queue array.  Even
@@ -167,30 +167,13 @@
      * initial size must be large enough to counteract cache
      * contention effects across multiple queues (especially in the
      * presence of GC cardmarking). Also, to improve thread-locality,
-     * queues are initialized after starting.  All together, these
-     * low-level implementation choices produce as much as a factor of
-     * 4 performance improvement compared to naive implementations,
-     * and enable the processing of billions of tasks per second,
-     * sometimes at the expense of ugliness.
+     * queues are initialized after starting.
      */
 
     /**
-     * Generator for initial random seeds for random victim
-     * selection. This is used only to create initial seeds. Random
-     * steals use a cheaper xorshift generator per steal attempt. We
-     * expect only rare contention on seedGenerator, so just use a
-     * plain Random.
+     * Mask for pool indices encoded as shorts
      */
-    private static final Random seedGenerator = new Random();
-
-    /**
-     * The maximum stolen->joining link depth allowed in helpJoinTask.
-     * Depths for legitimate chains are unbounded, but we use a fixed
-     * constant to avoid (otherwise unchecked) cycles and bound
-     * staleness of traversal parameters at the expense of sometimes
-     * blocking when we could be helping.
-     */
-    private static final int MAX_HELP_DEPTH = 8;
+    private static final int  SMASK  = 0xffff;
 
     /**
      * Capacity of work-stealing queue array upon initialization.
@@ -200,12 +183,19 @@
     private static final int INITIAL_QUEUE_CAPACITY = 1 << 13;
 
     /**
-     * Maximum work-stealing queue array size.  Must be less than or
-     * equal to 1 << (31 - width of array entry) to ensure lack of
-     * index wraparound. The value is set in the static block
-     * at the end of this file after obtaining width.
+     * Maximum size for queue array. Must be a power of two
+     * less than or equal to 1 << (31 - width of array entry) to
+     * ensure lack of index wraparound, but is capped at a lower
+     * value to help users trap runaway computations.
      */
-    private static final int MAXIMUM_QUEUE_CAPACITY;
+    private static final int MAXIMUM_QUEUE_CAPACITY = 1 << 24; // 16M
+
+    /**
+     * The work-stealing queue array. Size must be a power of two.
+     * Initialized when started (as oposed to when constructed), to
+     * improve memory locality.
+     */
+    ForkJoinTask<?>[] queue;
 
     /**
      * The pool this thread works in. Accessed directly by ForkJoinTask.
@@ -213,25 +203,19 @@
     final ForkJoinPool pool;
 
     /**
-     * The work-stealing queue array. Size must be a power of two.
-     * Initialized in onStart, to improve memory locality.
+     * Index (mod queue.length) of next queue slot to push to or pop
+     * from. It is written only by owner thread, and accessed by other
+     * threads only after reading (volatile) queueBase.  Both queueTop
+     * and queueBase are allowed to wrap around on overflow, but
+     * (queueTop - queueBase) still estimates size.
      */
-    private ForkJoinTask<?>[] queue;
+    int queueTop;
 
     /**
      * Index (mod queue.length) of least valid queue slot, which is
      * always the next position to steal from if nonempty.
      */
-    private volatile int base;
-
-    /**
-     * Index (mod queue.length) of next queue slot to push to or pop
-     * from. It is written only by owner thread, and accessed by other
-     * threads only after reading (volatile) base.  Both sp and base
-     * are allowed to wrap around on overflow, but (sp - base) still
-     * estimates size.
-     */
-    private int sp;
+    volatile int queueBase;
 
     /**
      * The index of most recent stealer, used as a hint to avoid
@@ -240,92 +224,68 @@
      * of them (usually the most current). Declared non-volatile,
      * relying on other prevailing sync to keep reasonably current.
      */
-    private int stealHint;
-
-    /**
-     * Run state of this worker. In addition to the usual run levels,
-     * tracks if this worker is suspended as a spare, and if it was
-     * killed (trimmed) while suspended. However, "active" status is
-     * maintained separately and modified only in conjunction with
-     * CASes of the pool's runState (which are currently sadly
-     * manually inlined for performance.)  Accessed directly by pool
-     * to simplify checks for normal (zero) status.
-     */
-    volatile int runState;
-
-    private static final int TERMINATING = 0x01;
-    private static final int TERMINATED  = 0x02;
-    private static final int SUSPENDED   = 0x04; // inactive spare
-    private static final int TRIMMED     = 0x08; // killed while suspended
-
-    /**
-     * Number of steals. Directly accessed (and reset) by
-     * pool.tryAccumulateStealCount when idle.
-     */
-    int stealCount;
-
-    /**
-     * Seed for random number generator for choosing steal victims.
-     * Uses Marsaglia xorshift. Must be initialized as nonzero.
-     */
-    private int seed;
-
-    /**
-     * Activity status. When true, this worker is considered active.
-     * Accessed directly by pool.  Must be false upon construction.
-     */
-    boolean active;
-
-    /**
-     * True if use local fifo, not default lifo, for local polling.
-     * Shadows value from ForkJoinPool.
-     */
-    private final boolean locallyFifo;
+    int stealHint;
 
     /**
      * Index of this worker in pool array. Set once by pool before
      * running, and accessed directly by pool to locate this worker in
      * its workers array.
      */
-    int poolIndex;
+    final int poolIndex;
+
+    /**
+     * Encoded record for pool task waits. Usages are always
+     * surrounded by volatile reads/writes
+     */
+    int nextWait;
 
     /**
-     * The last pool event waited for. Accessed only by pool in
-     * callback methods invoked within this thread.
+     * Complement of poolIndex, offset by count of entries of task
+     * waits. Accessed by ForkJoinPool to manage event waiters.
      */
-    int lastEventCount;
+    volatile int eventCount;
+
+    /**
+     * Seed for random number generator for choosing steal victims.
+     * Uses Marsaglia xorshift. Must be initialized as nonzero.
+     */
+    int seed;
 
     /**
-     * Encoded index and event count of next event waiter. Accessed
-     * only by ForkJoinPool for managing event waiters.
+     * Number of steals. Directly accessed (and reset) by pool when
+     * idle.
      */
-    volatile long nextWaiter;
+    int stealCount;
+
+    /**
+     * True if this worker should or did terminate
+     */
+    volatile boolean terminate;
 
     /**
-     * Number of times this thread suspended as spare. Accessed only
-     * by pool.
+     * Set to true before LockSupport.park; false on return
      */
-    int spareCount;
+    volatile boolean parked;
 
     /**
-     * Encoded index and count of next spare waiter. Accessed only
-     * by ForkJoinPool for managing spares.
+     * True if use local fifo, not default lifo, for local polling.
+     * Shadows value from ForkJoinPool.
      */
-    volatile int nextSpare;
+    final boolean locallyFifo;
+
+    /**
+     * The task most recently stolen from another worker (or
+     * submission queue).  All uses are surrounded by enough volatile
+     * reads/writes to maintain as non-volatile.
+     */
+    ForkJoinTask<?> currentSteal;
 
     /**
      * The task currently being joined, set only when actively trying
-     * to help other stealers in helpJoinTask. Written only by this
-     * thread, but read by others.
+     * to help other stealers in helpJoinTask. All uses are surrounded
+     * by enough volatile reads/writes to maintain as non-volatile.
      */
-    private volatile ForkJoinTask<?> currentJoin;
-
-    /**
-     * The task most recently stolen from another worker (or
-     * submission queue).  Written only by this thread, but read by
-     * others.
-     */
-    private volatile ForkJoinTask<?> currentSteal;
+    ForkJoinTask<?> currentJoin;
 
     /**
      * Creates a ForkJoinWorkerThread operating in the given pool.
@@ -334,24 +294,19 @@
      * @throws NullPointerException if pool is null
      */
     protected ForkJoinWorkerThread(ForkJoinPool pool) {
+        super(pool.nextWorkerName());
         this.pool = pool;
-        this.locallyFifo = pool.locallyFifo;
+        int k = pool.registerWorker(this);
+        poolIndex = k;
+        eventCount = ~k & SMASK; // clear wait count
+        locallyFifo = pool.locallyFifo;
+        Thread.UncaughtExceptionHandler ueh = pool.ueh;
+        if (ueh != null)
+            setUncaughtExceptionHandler(ueh);
         setDaemon(true);
-        // To avoid exposing construction details to subclasses,
-        // remaining initialization is in start() and onStart()
     }
 
-    /**
-     * Performs additional initialization and starts this thread.
-     */
-    final void start(int poolIndex, UncaughtExceptionHandler ueh) {
-        this.poolIndex = poolIndex;
-        if (ueh != null)
-            setUncaughtExceptionHandler(ueh);
-        start();
-    }
-
-    // Public/protected methods
+    // Public methods
 
     /**
      * Returns the pool hosting this thread.
@@ -375,6 +330,25 @@
         return poolIndex;
     }
 
+    // Randomization
+
+    /**
+     * Computes next value for random victim probes and backoffs.
+     * Scans don't require a very high quality generator, but also not
+     * a crummy one.  Marsaglia xor-shift is cheap and works well
+     * enough.  Note: This is manually inlined in FJP.scan() to avoid
+     * writes inside busy loops.
+     */
+    private int nextSeed() {
+        int r = seed;
+        r ^= r << 13;
+        r ^= r >>> 17;
+        r ^= r << 5;
+        return seed = r;
+    }
+
+    // Run State management
+
     /**
      * Initializes internal state after construction but before
      * processing any tasks. If you override this method, you must
@@ -385,15 +359,9 @@
      * processing tasks.
      */
     protected void onStart() {
-        int rs = seedGenerator.nextInt();
-        seed = (rs == 0) ? 1 : rs; // seed must be nonzero
-
-        // Allocate name string and arrays in this thread
-        String pid = Integer.toString(pool.getPoolNumber());
-        String wid = Integer.toString(poolIndex);
-        setName("ForkJoinPool-" + pid + "-worker-" + wid);
-
         queue = new ForkJoinTask<?>[INITIAL_QUEUE_CAPACITY];
+        int r = pool.workerSeedGenerator.nextInt();
+        seed = (r == 0)? 1 : r; //  must be nonzero
     }
 
     /**
@@ -406,16 +374,9 @@
      */
     protected void onTermination(Throwable exception) {
         try {
-            ForkJoinPool p = pool;
-            if (active) {
-                int a; // inline p.tryDecrementActiveCount
-                active = false;
-                do {} while (!UNSAFE.compareAndSwapInt
-                             (p, poolRunStateOffset, a = p.runState, a - 1));
-            }
+            terminate = true;
             cancelTasks();
-            setTerminated();
-            p.workerTerminated(this);
+            pool.deregisterWorker(this, exception);
         } catch (Throwable ex) {        // Shouldn't ever happen
             if (exception == null)      // but if so, at least rethrown
                 exception = ex;
@@ -434,7 +395,7 @@
         Throwable exception = null;
         try {
             onStart();
-            mainLoop();
+            pool.work(this);
         } catch (Throwable ex) {
             exception = ex;
         } finally {
@@ -442,81 +403,6 @@
         }
     }
 
-    // helpers for run()
-
-    /**
-     * Finds and executes tasks, and checks status while running.
-     */
-    private void mainLoop() {
-        boolean ran = false; // true if ran a task on last step
-        ForkJoinPool p = pool;
-        for (;;) {
-            p.preStep(this, ran);
-            if (runState != 0)
-                break;
-            ran = tryExecSteal() || tryExecSubmission();
-        }
-    }
-
-    /**
-     * Tries to steal a task and execute it.
-     *
-     * @return true if ran a task
-     */
-    private boolean tryExecSteal() {
-        ForkJoinTask<?> t;
-        if ((t = scan()) != null) {
-            t.quietlyExec();
-            UNSAFE.putOrderedObject(this, currentStealOffset, null);
-            if (sp != base)
-                execLocalTasks();
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * If a submission exists, try to activate and run it.
-     *
-     * @return true if ran a task
-     */
-    private boolean tryExecSubmission() {
-        ForkJoinPool p = pool;
-        // This loop is needed in case attempt to activate fails, in
-        // which case we only retry if there still appears to be a
-        // submission.
-        while (p.hasQueuedSubmissions()) {
-            ForkJoinTask<?> t; int a;
-            if (active || // inline p.tryIncrementActiveCount
-                (active = UNSAFE.compareAndSwapInt(p, poolRunStateOffset,
-                                                   a = p.runState, a + 1))) {
-                if ((t = p.pollSubmission()) != null) {
-                    UNSAFE.putOrderedObject(this, currentStealOffset, t);
-                    t.quietlyExec();
-                    UNSAFE.putOrderedObject(this, currentStealOffset, null);
-                    if (sp != base)
-                        execLocalTasks();
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Runs local tasks until queue is empty or shut down.  Call only
-     * while active.
-     */
-    private void execLocalTasks() {
-        while (runState == 0) {
-            ForkJoinTask<?> t = locallyFifo ? locallyDeqTask() : popTask();
-            if (t != null)
-                t.quietlyExec();
-            else if (sp == base)
-                break;
-        }
-    }
-
     /*
      * Intrinsics-based atomic writes for queue slots. These are
      * basically the same as methods in AtomicReferenceArray, but
@@ -528,10 +414,20 @@
      * because they are protected by other volatile reads and are
      * confirmed by CASes.
      *
-     * Most uses don't actually call these methods, but instead contain
-     * inlined forms that enable more predictable optimization.  We
-     * don't define the version of write used in pushTask at all, but
-     * instead inline there a store-fenced array slot write.
+     * Most uses don't actually call these methods, but instead
+     * contain inlined forms that enable more predictable
+     * optimization.  We don't define the version of write used in
+     * pushTask at all, but instead inline there a store-fenced array
+     * slot write.
+     *
+     * Also in most methods, as a performance (not correctness) issue,
+     * we'd like to encourage compilers not to arbitrarily postpone
+     * setting queueTop after writing slot.  Currently there is no
+     * intrinsic for arranging this, but using Unsafe putOrderedInt
+     * may be a preferable strategy on some compilers even though its
+     * main effect is a pre-, not post- fence. To simplify possible
+     * changes, the option is left in comments next to the associated
+     * assignments.
      */
 
     /**
@@ -540,7 +436,7 @@
      */
     private static final boolean casSlotNull(ForkJoinTask<?>[] q, int i,
                                              ForkJoinTask<?> t) {
-        return UNSAFE.compareAndSwapObject(q, (i << qShift) + qBase, t, null);
+        return UNSAFE.compareAndSwapObject(q, (i << ASHIFT) + ABASE, t, null);
     }
 
     /**
@@ -550,7 +446,7 @@
      */
     private static final void writeSlot(ForkJoinTask<?>[] q, int i,
                                         ForkJoinTask<?> t) {
-        UNSAFE.putObjectVolatile(q, (i << qShift) + qBase, t);
+        UNSAFE.putObjectVolatile(q, (i << ASHIFT) + ABASE, t);
     }
 
     // queue methods
@@ -561,14 +457,43 @@
      * @param t the task. Caller must ensure non-null.
      */
     final void pushTask(ForkJoinTask<?> t) {
-        ForkJoinTask<?>[] q = queue;
-        int mask = q.length - 1; // implicit assert q != null
-        int s = sp++;            // ok to increment sp before slot write
-        UNSAFE.putOrderedObject(q, ((s & mask) << qShift) + qBase, t);
-        if ((s -= base) == 0)
-            pool.signalWork();   // was empty
-        else if (s == mask)
-            growQueue();         // is full
+        ForkJoinTask<?>[] q; int s, m;
+        if ((q = queue) != null) {    // ignore if queue removed
+            long u = (((s = queueTop) & (m = q.length - 1)) << ASHIFT) + ABASE;
+            UNSAFE.putOrderedObject(q, u, t);
+            queueTop = s + 1;         // or use putOrderedInt
+            if ((s -= queueBase) <= 2)
+                pool.signalWork();
+            else if (s == m)
+                growQueue();
+        }
+    }
+
+    /**
+     * Creates or doubles queue array.  Transfers elements by
+     * emulating steals (deqs) from old array and placing, oldest
+     * first, into new array.
+     */
+    private void growQueue() {
+        ForkJoinTask<?>[] oldQ = queue;
+        int size = oldQ != null ? oldQ.length << 1 : INITIAL_QUEUE_CAPACITY;
+        if (size > MAXIMUM_QUEUE_CAPACITY)
+            throw new RejectedExecutionException("Queue capacity exceeded");
+        if (size < INITIAL_QUEUE_CAPACITY)
+            size = INITIAL_QUEUE_CAPACITY;
+        ForkJoinTask<?>[] q = queue = new ForkJoinTask<?>[size];
+        int mask = size - 1;
+        int top = queueTop;
+        int oldMask;
+        if (oldQ != null && (oldMask = oldQ.length - 1) >= 0) {
+            for (int b = queueBase; b != top; ++b) {
+                long u = ((b & oldMask) << ASHIFT) + ABASE;
+                Object x = UNSAFE.getObjectVolatile(oldQ, u);
+                if (x != null && UNSAFE.compareAndSwapObject(oldQ, u, x, null))
+                    UNSAFE.putObjectVolatile
+                        (q, ((b & mask) << ASHIFT) + ABASE, x);
+            }
+        }
     }
 
     /**
@@ -579,35 +504,34 @@
      * @return a task, or null if none or contended
      */
     final ForkJoinTask<?> deqTask() {
-        ForkJoinTask<?> t;
-        ForkJoinTask<?>[] q;
-        int b, i;
-        if (sp != (b = base) &&
+        ForkJoinTask<?> t; ForkJoinTask<?>[] q; int b, i;
+        if (queueTop != (b = queueBase) &&
             (q = queue) != null && // must read q after b
-            (t = q[i = (q.length - 1) & b]) != null && base == b &&
-            UNSAFE.compareAndSwapObject(q, (i << qShift) + qBase, t, null)) {
-            base = b + 1;
+            (i = (q.length - 1) & b) >= 0 &&
+            (t = q[i]) != null && queueBase == b &&
+            UNSAFE.compareAndSwapObject(q, (i << ASHIFT) + ABASE, t, null)) {
+            queueBase = b + 1;
             return t;
         }
         return null;
     }
 
     /**
-     * Tries to take a task from the base of own queue. Assumes active
-     * status.  Called only by this thread.
+     * Tries to take a task from the base of own queue.  Called only
+     * by this thread.
      *
      * @return a task, or null if none
      */
     final ForkJoinTask<?> locallyDeqTask() {
+        ForkJoinTask<?> t; int m, b, i;
         ForkJoinTask<?>[] q = queue;
-        if (q != null) {
-            ForkJoinTask<?> t;
-            int b, i;
-            while (sp != (b = base)) {
-                if ((t = q[i = (q.length - 1) & b]) != null && base == b &&
-                    UNSAFE.compareAndSwapObject(q, (i << qShift) + qBase,
+        if (q != null && (m = q.length - 1) >= 0) {
+            while (queueTop != (b = queueBase)) {
+                if ((t = q[i = m & b]) != null &&
+                    queueBase == b &&
+                    UNSAFE.compareAndSwapObject(q, (i << ASHIFT) + ABASE,
                                                 t, null)) {
-                    base = b + 1;
+                    queueBase = b + 1;
                     return t;
                 }
             }
@@ -616,35 +540,21 @@
     }
 
     /**
-     * Returns a popped task, or null if empty. Assumes active status.
+     * Returns a popped task, or null if empty.
      * Called only by this thread.
      */
     private ForkJoinTask<?> popTask() {
+        int m;
         ForkJoinTask<?>[] q = queue;
-        if (q != null) {
-            int s;
-            while ((s = sp) != base) {
-                int i = (q.length - 1) & --s;
-                long u = (i << qShift) + qBase; // raw offset
+        if (q != null && (m = q.length - 1) >= 0) {
+            for (int s; (s = queueTop) != queueBase;) {
+                int i = m & --s;
+                long u = (i << ASHIFT) + ABASE; // raw offset
                 ForkJoinTask<?> t = q[i];
                 if (t == null)   // lost to stealer
                     break;
                 if (UNSAFE.compareAndSwapObject(q, u, t, null)) {
-                    /*
-                     * Note: here and in related methods, as a
-                     * performance (not correctness) issue, we'd like
-                     * to encourage compiler not to arbitrarily
-                     * postpone setting sp after successful CAS.
-                     * Currently there is no intrinsic for arranging
-                     * this, but using Unsafe putOrderedInt may be a
-                     * preferable strategy on some compilers even
-                     * though its main effect is a pre-, not post-
-                     * fence. To simplify possible changes, the option
-                     * is left in comments next to the associated
-                     * assignments.
-                     */
-                    sp = s; // putOrderedInt may encourage more timely write
-                    // UNSAFE.putOrderedInt(this, spOffset, s);
+                    queueTop = s; // or putOrderedInt
                     return t;
                 }
             }
@@ -654,18 +564,17 @@
 
     /**
      * Specialized version of popTask to pop only if topmost element
-     * is the given task. Called only by this thread while active.
+     * is the given task. Called only by this thread.
      *
      * @param t the task. Caller must ensure non-null.
      */
     final boolean unpushTask(ForkJoinTask<?> t) {
+        ForkJoinTask<?>[] q;
         int s;
-        ForkJoinTask<?>[] q = queue;
-        if ((s = sp) != base && q != null &&
+        if ((q = queue) != null && (s = queueTop) != queueBase &&
             UNSAFE.compareAndSwapObject
-            (q, (((q.length - 1) & --s) << qShift) + qBase, t, null)) {
-            sp = s; // putOrderedInt may encourage more timely write
-            // UNSAFE.putOrderedInt(this, spOffset, s);
+            (q, (((q.length - 1) & --s) << ASHIFT) + ABASE, t, null)) {
+            queueTop = s; // or putOrderedInt
             return true;
         }
         return false;
@@ -675,222 +584,30 @@
      * Returns next task, or null if empty or contended.
      */
     final ForkJoinTask<?> peekTask() {
+        int m;
         ForkJoinTask<?>[] q = queue;
-        if (q == null)
+        if (q == null || (m = q.length - 1) < 0)
             return null;
-        int mask = q.length - 1;
-        int i = locallyFifo ? base : (sp - 1);
-        return q[i & mask];
+        int i = locallyFifo ? queueBase : (queueTop - 1);
+        return q[i & m];
     }
 
-    /**
-     * Doubles queue array size. Transfers elements by emulating
-     * steals (deqs) from old array and placing, oldest first, into
-     * new array.
-     */
-    private void growQueue() {
-        ForkJoinTask<?>[] oldQ = queue;
-        int oldSize = oldQ.length;
-        int newSize = oldSize << 1;
-        if (newSize > MAXIMUM_QUEUE_CAPACITY)
-            throw new RejectedExecutionException("Queue capacity exceeded");
-        ForkJoinTask<?>[] newQ = queue = new ForkJoinTask<?>[newSize];
-
-        int b = base;
-        int bf = b + oldSize;
-        int oldMask = oldSize - 1;
-        int newMask = newSize - 1;
-        do {
-            int oldIndex = b & oldMask;
-            ForkJoinTask<?> t = oldQ[oldIndex];
-            if (t != null && !casSlotNull(oldQ, oldIndex, t))
-                t = null;
-            writeSlot(newQ, b & newMask, t);
-        } while (++b != bf);
-        pool.signalWork();
-    }
-
-    /**
-     * Computes next value for random victim probe in scan().  Scans
-     * don't require a very high quality generator, but also not a
-     * crummy one.  Marsaglia xor-shift is cheap and works well enough.
-     * Note: This is manually inlined in scan().
-     */
-    private static final int xorShift(int r) {
-        r ^= r << 13;
-        r ^= r >>> 17;
-        return r ^ (r << 5);
-    }
+    // Support methods for ForkJoinPool
 
     /**
-     * Tries to steal a task from another worker. Starts at a random
-     * index of workers array, and probes workers until finding one
-     * with non-empty queue or finding that all are empty.  It
-     * randomly selects the first n probes. If these are empty, it
-     * resorts to a circular sweep, which is necessary to accurately
-     * set active status. (The circular sweep uses steps of
-     * approximately half the array size plus 1, to avoid bias
-     * stemming from leftmost packing of the array in ForkJoinPool.)
-     *
-     * This method must be both fast and quiet -- usually avoiding
-     * memory accesses that could disrupt cache sharing etc other than
-     * those needed to check for and take tasks (or to activate if not
-     * already active). This accounts for, among other things,
-     * updating random seed in place without storing it until exit.
-     *
-     * @return a task, or null if none found
+     * Runs the given task, plus any local tasks until queue is empty
      */
-    private ForkJoinTask<?> scan() {
-        ForkJoinPool p = pool;
-        ForkJoinWorkerThread[] ws;        // worker array
-        int n;                            // upper bound of #workers
-        if ((ws = p.workers) != null && (n = ws.length) > 1) {
-            boolean canSteal = active;    // shadow active status
-            int r = seed;                 // extract seed once
-            int mask = n - 1;
-            int j = -n;                   // loop counter
-            int k = r;                    // worker index, random if j < 0
-            for (;;) {
-                ForkJoinWorkerThread v = ws[k & mask];
-                r ^= r << 13; r ^= r >>> 17; r ^= r << 5; // inline xorshift
-                ForkJoinTask<?>[] q; ForkJoinTask<?> t; int b, a;
-                if (v != null && (b = v.base) != v.sp &&
-                    (q = v.queue) != null) {
-                    int i = (q.length - 1) & b;
-                    long u = (i << qShift) + qBase; // raw offset
-                    int pid = poolIndex;
-                    if ((t = q[i]) != null) {
-                        if (!canSteal &&  // inline p.tryIncrementActiveCount
-                            UNSAFE.compareAndSwapInt(p, poolRunStateOffset,
-                                                     a = p.runState, a + 1))
-                            canSteal = active = true;
-                        if (canSteal && v.base == b++ &&
-                            UNSAFE.compareAndSwapObject(q, u, t, null)) {
-                            v.base = b;
-                            v.stealHint = pid;
-                            UNSAFE.putOrderedObject(this,
-                                                    currentStealOffset, t);
-                            seed = r;
-                            ++stealCount;
-                            return t;
-                        }
-                    }
-                    j = -n;
-                    k = r;                // restart on contention
-                }
-                else if (++j <= 0)
-                    k = r;
-                else if (j <= n)
-                    k += (n >>> 1) | 1;
-                else
-                    break;
-            }
-        }
-        return null;
-    }
-
-    // Run State management
-
-    // status check methods used mainly by ForkJoinPool
-    final boolean isRunning()    { return runState == 0; }
-    final boolean isTerminated() { return (runState & TERMINATED) != 0; }
-    final boolean isSuspended()  { return (runState & SUSPENDED) != 0; }
-    final boolean isTrimmed()    { return (runState & TRIMMED) != 0; }
-
-    final boolean isTerminating() {
-        if ((runState & TERMINATING) != 0)
-            return true;
-        if (pool.isAtLeastTerminating()) { // propagate pool state
-            shutdown();
-            return true;
+    final void execTask(ForkJoinTask<?> t) {
+        currentSteal = t;
+        for (;;) {
+            if (t != null)
+                t.doExec();
+            if (queueTop == queueBase)
+                break;
+            t = locallyFifo ? locallyDeqTask() : popTask();
         }
-        return false;
-    }
-
-    /**
-     * Sets state to TERMINATING. Does NOT unpark or interrupt
-     * to wake up if currently blocked. Callers must do so if desired.
-     */
-    final void shutdown() {
-        for (;;) {
-            int s = runState;
-            if ((s & (TERMINATING|TERMINATED)) != 0)
-                break;
-            if ((s & SUSPENDED) != 0) { // kill and wakeup if suspended
-                if (UNSAFE.compareAndSwapInt(this, runStateOffset, s,
-                                             (s & ~SUSPENDED) |
-                                             (TRIMMED|TERMINATING)))
-                    break;
-            }
-            else if (UNSAFE.compareAndSwapInt(this, runStateOffset, s,
-                                              s | TERMINATING))
-                break;
-        }
-    }
-
-    /**
-     * Sets state to TERMINATED. Called only by onTermination().
-     */
-    private void setTerminated() {
-        int s;
-        do {} while (!UNSAFE.compareAndSwapInt(this, runStateOffset,
-                                               s = runState,
-                                               s | (TERMINATING|TERMINATED)));
-    }
-
-    /**
-     * If suspended, tries to set status to unsuspended.
-     * Does NOT wake up if blocked.
-     *
-     * @return true if successful
-     */
-    final boolean tryUnsuspend() {
-        int s;
-        while (((s = runState) & SUSPENDED) != 0) {
-            if (UNSAFE.compareAndSwapInt(this, runStateOffset, s,
-                                         s & ~SUSPENDED))
-                return true;
-        }
-        return false;
-    }
-
-    /**
-     * Sets suspended status and blocks as spare until resumed
-     * or shutdown.
-     */
-    final void suspendAsSpare() {
-        for (;;) {                  // set suspended unless terminating
-            int s = runState;
-            if ((s & TERMINATING) != 0) { // must kill
-                if (UNSAFE.compareAndSwapInt(this, runStateOffset, s,
-                                             s | (TRIMMED | TERMINATING)))
-                    return;
-            }
-            else if (UNSAFE.compareAndSwapInt(this, runStateOffset, s,
-                                              s | SUSPENDED))
-                break;
-        }
-        ForkJoinPool p = pool;
-        p.pushSpare(this);
-        while ((runState & SUSPENDED) != 0) {
-            if (p.tryAccumulateStealCount(this)) {
-                interrupted();          // clear/ignore interrupts
-                if ((runState & SUSPENDED) == 0)
-                    break;
-                LockSupport.park(this);
-            }
-        }
-    }
-
-    // Misc support methods for ForkJoinPool
-
-    /**
-     * Returns an estimate of the number of tasks in the queue.  Also
-     * used by ForkJoinTask.
-     */
-    final int getQueueSize() {
-        int n; // external calls must read base first
-        return (n = -base + sp) <= 0 ? 0 : n;
+        ++stealCount;
+        currentSteal = null;
     }
 
     /**
@@ -899,17 +616,12 @@
      */
     final void cancelTasks() {
         ForkJoinTask<?> cj = currentJoin; // try to cancel ongoing tasks
-        if (cj != null && cj.status >= 0) {
+        if (cj != null && cj.status >= 0)
             cj.cancelIgnoringExceptions();
-            try {
-                this.interrupt(); // awaken wait
-            } catch (SecurityException ignore) {
-            }
-        }
         ForkJoinTask<?> cs = currentSteal;
         if (cs != null && cs.status >= 0)
             cs.cancelIgnoringExceptions();
-        while (base != sp) {
+        while (queueBase != queueTop) {
             ForkJoinTask<?> t = deqTask();
             if (t != null)
                 t.cancelIgnoringExceptions();
@@ -923,7 +635,7 @@
      */
     final int drainTasksTo(Collection<? super ForkJoinTask<?>> c) {
         int n = 0;
-        while (base != sp) {
+        while (queueBase != queueTop) {
             ForkJoinTask<?> t = deqTask();
             if (t != null) {
                 c.add(t);
@@ -936,20 +648,19 @@
     // Support methods for ForkJoinTask
 
     /**
+     * Returns an estimate of the number of tasks in the queue.
+     */
+    final int getQueueSize() {
+        return queueTop - queueBase;
+    }
+
+    /**
      * Gets and removes a local task.
      *
      * @return a task, if available
      */
     final ForkJoinTask<?> pollLocalTask() {
-        ForkJoinPool p = pool;
-        while (sp != base) {
-            int a; // inline p.tryIncrementActiveCount
-            if (active ||
-                (active = UNSAFE.compareAndSwapInt(p, poolRunStateOffset,
-                                                   a = p.runState, a + 1)))
-                return locallyFifo ? locallyDeqTask() : popTask();
-        }
-        return null;
+        return locallyFifo ? locallyDeqTask() : popTask();
     }
 
     /**
@@ -958,172 +669,205 @@
      * @return a task, if available
      */
     final ForkJoinTask<?> pollTask() {
+        ForkJoinWorkerThread[] ws;
         ForkJoinTask<?> t = pollLocalTask();
-        if (t == null) {
-            t = scan();
-            // cannot retain/track/help steal
-            UNSAFE.putOrderedObject(this, currentStealOffset, null);
+        if (t != null || (ws = pool.workers) == null)
+            return t;
+        int n = ws.length; // cheap version of FJP.scan
+        int steps = n << 1;
+        int r = nextSeed();
+        int i = 0;
+        while (i < steps) {
+            ForkJoinWorkerThread w = ws[(i++ + r) & (n - 1)];
+            if (w != null && w.queueBase != w.queueTop && w.queue != null) {
+                if ((t = w.deqTask()) != null)
+                    return t;
+                i = 0;
+            }
         }
-        return t;
+        return null;
     }
 
     /**
-     * Possibly runs some tasks and/or blocks, until task is done.
+     * The maximum stolen->joining link depth allowed in helpJoinTask,
+     * as well as the maximum number of retries (allowing on average
+     * one staleness retry per level) per attempt to instead try
+     * compensation.  Depths for legitimate chains are unbounded, but
+     * we use a fixed constant to avoid (otherwise unchecked) cycles
+     * and bound staleness of traversal parameters at the expense of
+     * sometimes blocking when we could be helping.
+     */
+    private static final int MAX_HELP = 16;
+
+    /**
+     * Possibly runs some tasks and/or blocks, until joinMe is done.
      *
      * @param joinMe the task to join
-     * @param timed true if use timed wait
-     * @param nanos wait time if timed
+     * @return completion status on exit
      */
-    final void joinTask(ForkJoinTask<?> joinMe, boolean timed, long nanos) {
-        // currentJoin only written by this thread; only need ordered store
+    final int joinTask(ForkJoinTask<?> joinMe) {
         ForkJoinTask<?> prevJoin = currentJoin;
-        UNSAFE.putOrderedObject(this, currentJoinOffset, joinMe);
-        pool.awaitJoin(joinMe, this, timed, nanos);
-        UNSAFE.putOrderedObject(this, currentJoinOffset, prevJoin);
+        currentJoin = joinMe;
+        for (int s, retries = MAX_HELP;;) {
+            if ((s = joinMe.status) < 0) {
+                currentJoin = prevJoin;
+                return s;
+            }
+            if (retries > 0) {
+                if (queueTop != queueBase) {
+                    if (!localHelpJoinTask(joinMe))
+                        retries = 0;           // cannot help
+                }
+                else if (retries == MAX_HELP >>> 1) {
+                    --retries;                 // check uncommon case
+                    if (tryDeqAndExec(joinMe) >= 0)
+                        Thread.yield();        // for politeness
+                }
+                else
+                    retries = helpJoinTask(joinMe)? MAX_HELP : retries - 1;
+            }
+            else {
+                retries = MAX_HELP;           // restart if not done
+                pool.tryAwaitJoin(joinMe);
+            }
+        }
+    }
+
+    /**
+     * If present, pops and executes the given task, or any other
+     * cancelled task
+     *
+     * @return false if any other non-cancelled task exists in local queue
+     */
+    private boolean localHelpJoinTask(ForkJoinTask<?> joinMe) {
+        int s, i; ForkJoinTask<?>[] q; ForkJoinTask<?> t;
+        if ((s = queueTop) != queueBase && (q = queue) != null &&
+            (i = (q.length - 1) & --s) >= 0 &&
+            (t = q[i]) != null) {
+            if (t != joinMe && t.status >= 0)
+                return false;
+            if (UNSAFE.compareAndSwapObject
+                (q, (i << ASHIFT) + ABASE, t, null)) {
+                queueTop = s;           // or putOrderedInt
+                t.doExec();
+            }
+        }
+        return true;
     }
 
     /**
-     * Tries to locate and help perform tasks for a stealer of the
-     * given task, or in turn one of its stealers.  Traces
+     * Tries to locate and execute tasks for a stealer of the given
+     * task, or in turn one of its stealers, Traces
      * currentSteal->currentJoin links looking for a thread working on
      * a descendant of the given task and with a non-empty queue to
-     * steal back and execute tasks from.
-     *
-     * The implementation is very branchy to cope with potential
-     * inconsistencies or loops encountering chains that are stale,
-     * unknown, or of length greater than MAX_HELP_DEPTH links.  All
-     * of these cases are dealt with by just returning back to the
-     * caller, who is expected to retry if other join mechanisms also
-     * don't work out.
+     * steal back and execute tasks from.  The implementation is very
+     * branchy to cope with potential inconsistencies or loops
+     * encountering chains that are stale, unknown, or of length
+     * greater than MAX_HELP links.  All of these cases are dealt with
+     * by just retrying by caller.
      *
      * @param joinMe the task to join
-     * @param running if false, then must update pool count upon
-     *  running a task
-     * @return value of running on exit
+     * @param canSteal true if local queue is empty
+     * @return true if ran a task
      */
-    final boolean helpJoinTask(ForkJoinTask<?> joinMe, boolean running) {
-        /*
-         * Initial checks to (1) abort if terminating; (2) clean out
-         * old cancelled tasks from local queue; (3) if joinMe is next
-         * task, run it; (4) omit scan if local queue nonempty (since
-         * it may contain non-descendents of joinMe).
-         */
-        ForkJoinPool p = pool;
-        for (;;) {
-            ForkJoinTask<?>[] q;
-            int s;
-            if (joinMe.status < 0)
-                return running;
-            else if ((runState & TERMINATING) != 0) {
-                joinMe.cancelIgnoringExceptions();
-                return running;
+    private boolean helpJoinTask(ForkJoinTask<?> joinMe) {
+        boolean helped = false;
+        int m = pool.scanGuard & SMASK;
+        ForkJoinWorkerThread[] ws = pool.workers;
+        if (ws != null && ws.length > m && joinMe.status >= 0) {
+            int levels = MAX_HELP;              // remaining chain length
+            ForkJoinTask<?> task = joinMe;      // base of chain
+            outer:for (ForkJoinWorkerThread thread = this;;) {
+                // Try to find v, the stealer of task, by first using hint
+                ForkJoinWorkerThread v = ws[thread.stealHint & m];
+                if (v == null || v.currentSteal != task) {
+                    for (int j = 0; ;) {        // search array
+                        if ((v = ws[j]) != null && v.currentSteal == task) {
+                            thread.stealHint = j;
+                            break;              // save hint for next time
+                        }
+                        if (++j > m)
+                            break outer;        // can't find stealer
+                    }
+                }
+                // Try to help v, using specialized form of deqTask
+                for (;;) {
+                    ForkJoinTask<?>[] q; int b, i;
+                    if (joinMe.status < 0)
+                        break outer;
+                    if ((b = v.queueBase) == v.queueTop ||
+                        (q = v.queue) == null ||
+                        (i = (q.length-1) & b) < 0)
+                        break;                  // empty
+                    long u = (i << ASHIFT) + ABASE;
+                    ForkJoinTask<?> t = q[i];
+                    if (task.status < 0)
+                        break outer;            // stale
+                    if (t != null && v.queueBase == b &&
+                        UNSAFE.compareAndSwapObject(q, u, t, null)) {
+                        v.queueBase = b + 1;
+                        v.stealHint = poolIndex;
+                        ForkJoinTask<?> ps = currentSteal;
+                        currentSteal = t;
+                        t.doExec();
+                        currentSteal = ps;
+                        helped = true;
+                    }
+                }
+                // Try to descend to find v's stealer
+                ForkJoinTask<?> next = v.currentJoin;
+                if (--levels > 0 && task.status >= 0 &&
+                    next != null && next != task) {
+                    task = next;
+                    thread = v;
+                }
+                else
+                    break;  // max levels, stale, dead-end, or cyclic
             }
-            else if ((s = sp) == base || (q = queue) == null)
-                break;                            // queue empty
-            else {
-                int i = (q.length - 1) & --s;
-                long u = (i << qShift) + qBase;   // raw offset
-                ForkJoinTask<?> t = q[i];
-                if (t == null)
-                    break;                        // lost to a stealer
-                else if (t != joinMe && t.status >= 0)
-                    return running;               // cannot safely help
-                else if ((running ||
-                          (running = p.tryIncrementRunningCount())) &&
-                         UNSAFE.compareAndSwapObject(q, u, t, null)) {
-                    sp = s; // putOrderedInt may encourage more timely write
-                    // UNSAFE.putOrderedInt(this, spOffset, s);
-                    t.quietlyExec();
+        }
+        return helped;
+    }
+
+    /**
+     * Performs an uncommon case for joinTask: If task t is at base of
+     * some workers queue, steals and executes it.
+     *
+     * @param t the task
+     * @return t's status
+     */
+    private int tryDeqAndExec(ForkJoinTask<?> t) {
+        int m = pool.scanGuard & SMASK;
+        ForkJoinWorkerThread[] ws = pool.workers;
+        if (ws != null && ws.length > m && t.status >= 0) {
+            for (int j = 0; j <= m; ++j) {
+                ForkJoinTask<?>[] q; int b, i;
+                ForkJoinWorkerThread v = ws[j];
+                if (v != null &&
+                    (b = v.queueBase) != v.queueTop &&
+                    (q = v.queue) != null &&
+                    (i = (q.length - 1) & b) >= 0 &&
+                    q[i] ==  t) {
+                    long u = (i << ASHIFT) + ABASE;
+                    if (v.queueBase == b &&
+                        UNSAFE.compareAndSwapObject(q, u, t, null)) {
+                        v.queueBase = b + 1;
+                        v.stealHint = poolIndex;
+                        ForkJoinTask<?> ps = currentSteal;
+                        currentSteal = t;
+                        t.doExec();
+                        currentSteal = ps;
+                    }
+                    break;
                 }
             }
         }
-
-        int n;                                    // worker array size
-        ForkJoinWorkerThread[] ws = p.workers;
-        if (ws != null && (n = ws.length) > 1) {  // need at least 2 workers
-            ForkJoinTask<?> task = joinMe;        // base of chain
-            ForkJoinWorkerThread thread = this;   // thread with stolen task
-
-            outer:for (int d = 0; d < MAX_HELP_DEPTH; ++d) { // chain length
-                // Try to find v, the stealer of task, by first using hint
-                ForkJoinWorkerThread v = ws[thread.stealHint & (n - 1)];
-                if (v == null || v.currentSteal != task) {
-                    for (int j = 0; ; ++j) {      // search array
-                        if (j < n) {
-                            ForkJoinTask<?> vs;
-                            if ((v = ws[j]) != null &&
-                                (vs = v.currentSteal) != null) {
-                                if (joinMe.status < 0)
-                                    break outer;
-                                if (vs == task) {
-                                    if (task.status < 0)
-                                        break outer; // stale
-                                    thread.stealHint = j;
-                                    break;        // save hint for next time
-                                }
-                            }
-                        }
-                        else
-                            break outer;          // no stealer
-                    }
-                }
-
-                // Try to help v, using specialized form of deqTask
-                for (;;) {
-                    if (joinMe.status < 0)
-                        break outer;
-                    int b = v.base;
-                    ForkJoinTask<?>[] q = v.queue;
-                    if (b == v.sp || q == null)
-                        break;                    // empty
-                    int i = (q.length - 1) & b;
-                    long u = (i << qShift) + qBase;
-                    ForkJoinTask<?> t = q[i];
-                    if (task.status < 0)
-                        break outer;              // stale
-                    if (t != null &&
-                        (running ||
-                         (running = p.tryIncrementRunningCount())) &&
-                        v.base == b++ &&
-                        UNSAFE.compareAndSwapObject(q, u, t, null)) {
-                        if (t != joinMe && joinMe.status < 0) {
-                            UNSAFE.putObjectVolatile(q, u, t);
-                            break outer;          // joinMe cancelled; back out
-                        }
-                        v.base = b;
-                        if (t.status >= 0) {
-                            ForkJoinTask<?> ps = currentSteal;
-                            int pid = poolIndex;
-                            v.stealHint = pid;
-                            UNSAFE.putOrderedObject(this,
-                                                    currentStealOffset, t);
-                            t.quietlyExec();
-                            UNSAFE.putOrderedObject(this,
-                                                    currentStealOffset, ps);
-                        }
-                    }
-                    else if ((runState & TERMINATING) != 0) {
-                        joinMe.cancelIgnoringExceptions();
-                        break outer;
-                    }
-                }
-
-                // Try to descend to find v's stealer
-                ForkJoinTask<?> next = v.currentJoin;
-                if (task.status < 0 || next == null || next == task ||
-                    joinMe.status < 0)
-                    break;                 // done, stale, dead-end, or cyclic
-                task = next;
-                thread = v;
-            }
-        }
-        return running;
+        return t.status;
     }
 
     /**
-     * Implements ForkJoinTask.getSurplusQueuedTaskCount().
-     * Returns an estimate of the number of tasks, offset by a
-     * function of number of idle workers.
+     * Implements ForkJoinTask.getSurplusQueuedTaskCount().  Returns
+     * an estimate of the number of tasks, offset by a function of
+     * number of idle workers.
      *
      * This method provides a cheap heuristic guide for task
      * partitioning when programmers, frameworks, tools, or languages
@@ -1159,82 +903,96 @@
      * When all threads are active, it is on average OK to estimate
      * surplus strictly locally. In steady-state, if one thread is
      * maintaining say 2 surplus tasks, then so are others. So we can
-     * just use estimated queue length (although note that (sp - base)
-     * can be an overestimate because of stealers lagging increments
-     * of base).  However, this strategy alone leads to serious
-     * mis-estimates in some non-steady-state conditions (ramp-up,
-     * ramp-down, other stalls). We can detect many of these by
-     * further considering the number of "idle" threads, that are
+     * just use estimated queue length (although note that (queueTop -
+     * queueBase) can be an overestimate because of stealers lagging
+     * increments of queueBase).  However, this strategy alone leads
+     * to serious mis-estimates in some non-steady-state conditions
+     * (ramp-up, ramp-down, other stalls). We can detect many of these
+     * by further considering the number of "idle" threads, that are
      * known to have zero queued tasks, so compensate by a factor of
      * (#idle/#active) threads.
      */
     final int getEstimatedSurplusTaskCount() {
-        return sp - base - pool.idlePerActive();
+        return queueTop - queueBase - pool.idlePerActive();
     }
 
     /**
-     * Runs tasks until {@code pool.isQuiescent()}.
+     * Runs tasks until {@code pool.isQuiescent()}. We piggyback on
+     * pool's active count ctl maintenance, but rather than blocking
+     * when tasks cannot be found, we rescan until all others cannot
+     * find tasks either. The bracketing by pool quiescerCounts
+     * updates suppresses pool auto-shutdown mechanics that could
+     * otherwise prematurely terminate the pool because all threads
+     * appear to be inactive.
      */
     final void helpQuiescePool() {
+        boolean active = true;
         ForkJoinTask<?> ps = currentSteal; // to restore below
+        ForkJoinPool p = pool;
+        p.addQuiescerCount(1);
         for (;;) {
-            ForkJoinTask<?> t = pollLocalTask();
-            if (t != null || (t = scan()) != null)
-                t.quietlyExec();
+            ForkJoinWorkerThread[] ws = p.workers;
+            ForkJoinWorkerThread v = null;
+            int n;
+            if (queueTop != queueBase)
+                v = this;
+            else if (ws != null && (n = ws.length) > 1) {
+                ForkJoinWorkerThread w;
+                int r = nextSeed(); // cheap version of FJP.scan
+                int steps = n << 1;
+                for (int i = 0; i < steps; ++i) {
+                    if ((w = ws[(i + r) & (n - 1)]) != null &&
+                        w.queueBase != w.queueTop) {
+                        v = w;
+                        break;
+                    }
+                }
+            }
+            if (v != null) {
+                ForkJoinTask<?> t;
+                if (!active) {
+                    active = true;
+                    p.addActiveCount(1);
+                }
+                if ((t = (v != this) ? v.deqTask() :
+                     locallyFifo? locallyDeqTask() : popTask()) != null) {
+                    currentSteal = t;
+                    t.doExec();
+                    currentSteal = ps;
+                }
+            }
             else {
-                ForkJoinPool p = pool;
-                int a; // to inline CASes
                 if (active) {
-                    if (!UNSAFE.compareAndSwapInt
-                        (p, poolRunStateOffset, a = p.runState, a - 1))
-                        continue;   // retry later
-                    active = false; // inactivate
-                    UNSAFE.putOrderedObject(this, currentStealOffset, ps);
+                    active = false;
+                    p.addActiveCount(-1);
                 }
                 if (p.isQuiescent()) {
-                    active = true; // re-activate
-                    do {} while (!UNSAFE.compareAndSwapInt
-                                 (p, poolRunStateOffset, a = p.runState, a+1));
-                    return;
+                    p.addActiveCount(1);
+                    p.addQuiescerCount(-1);
+                    break;
                 }
             }
         }
     }
 
     // Unsafe mechanics
-
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long spOffset =
-        objectFieldOffset("sp", ForkJoinWorkerThread.class);
-    private static final long runStateOffset =
-        objectFieldOffset("runState", ForkJoinWorkerThread.class);
-    private static final long currentJoinOffset =
-        objectFieldOffset("currentJoin", ForkJoinWorkerThread.class);
-    private static final long currentStealOffset =
-        objectFieldOffset("currentSteal", ForkJoinWorkerThread.class);
-    private static final long qBase =
-        UNSAFE.arrayBaseOffset(ForkJoinTask[].class);
-    private static final long poolRunStateOffset = // to inline CAS
-        objectFieldOffset("runState", ForkJoinPool.class);
-
-    private static final int qShift;
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long ABASE;
+    private static final int ASHIFT;
 
     static {
-        int s = UNSAFE.arrayIndexScale(ForkJoinTask[].class);
+        int s;
+        try {
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class a = ForkJoinTask[].class;
+            ABASE = UNSAFE.arrayBaseOffset(a);
+            s = UNSAFE.arrayIndexScale(a);
+        } catch (Exception e) {
+            throw new Error(e);
+        }
         if ((s & (s-1)) != 0)
             throw new Error("data type scale not a power of two");
-        qShift = 31 - Integer.numberOfLeadingZeros(s);
-        MAXIMUM_QUEUE_CAPACITY = 1 << (31 - qShift);
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(s);
     }
 
-    private static long objectFieldOffset(String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
-    }
 }
--- a/src/share/classes/java/util/concurrent/LinkedTransferQueue.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/LinkedTransferQueue.java	Wed Apr 20 04:38:36 2011 +0100
@@ -525,16 +525,27 @@
             return false;
         }
 
+        private static final long serialVersionUID = -3375979862319811754L;
+
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-        private static final long nextOffset =
-            objectFieldOffset(UNSAFE, "next", Node.class);
-        private static final long itemOffset =
-            objectFieldOffset(UNSAFE, "item", Node.class);
-        private static final long waiterOffset =
-            objectFieldOffset(UNSAFE, "waiter", Node.class);
-
-        private static final long serialVersionUID = -3375979862319811754L;
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long itemOffset;
+        private static final long nextOffset;
+        private static final long waiterOffset;
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = Node.class;
+                itemOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("item"));
+                nextOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("next"));
+                waiterOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("waiter"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /** head of the queue; null until first enqueue */
@@ -1312,23 +1323,22 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long headOffset =
-        objectFieldOffset(UNSAFE, "head", LinkedTransferQueue.class);
-    private static final long tailOffset =
-        objectFieldOffset(UNSAFE, "tail", LinkedTransferQueue.class);
-    private static final long sweepVotesOffset =
-        objectFieldOffset(UNSAFE, "sweepVotes", LinkedTransferQueue.class);
-
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long headOffset;
+    private static final long tailOffset;
+    private static final long sweepVotesOffset;
+    static {
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = LinkedTransferQueue.class;
+            headOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("head"));
+            tailOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("tail"));
+            sweepVotesOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("sweepVotes"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
 }
--- a/src/share/classes/java/util/concurrent/Phaser.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/Phaser.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1137,18 +1137,16 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long stateOffset =
-        objectFieldOffset("state", Phaser.class);
-
-    private static long objectFieldOffset(String field, Class<?> klazz) {
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long stateOffset;
+    static {
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = Phaser.class;
+            stateOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("state"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
 }
--- a/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Wed Apr 20 04:38:36 2011 +0100
@@ -963,21 +963,16 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long allocationSpinLockOffset =
-        objectFieldOffset(UNSAFE, "allocationSpinLock",
-                          PriorityBlockingQueue.class);
-
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
+    private static final sun.misc.Unsafe UNSAFE;
+    private static final long allocationSpinLockOffset;
+    static {
         try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
+            UNSAFE = sun.misc.Unsafe.getUnsafe();
+            Class k = PriorityBlockingQueue.class;
+            allocationSpinLockOffset = UNSAFE.objectFieldOffset
+                (k.getDeclaredField("allocationSpinLock"));
+        } catch (Exception e) {
+            throw new Error(e);
         }
     }
-
 }
--- a/src/share/classes/java/util/concurrent/SynchronousQueue.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/concurrent/SynchronousQueue.java	Wed Apr 20 04:38:36 2011 +0100
@@ -279,12 +279,22 @@
             }
 
             // Unsafe mechanics
-            private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-            private static final long nextOffset =
-                objectFieldOffset(UNSAFE, "next", SNode.class);
-            private static final long matchOffset =
-                objectFieldOffset(UNSAFE, "match", SNode.class);
+            private static final sun.misc.Unsafe UNSAFE;
+            private static final long matchOffset;
+            private static final long nextOffset;
 
+            static {
+                try {
+                    UNSAFE = sun.misc.Unsafe.getUnsafe();
+                    Class k = SNode.class;
+                    matchOffset = UNSAFE.objectFieldOffset
+                        (k.getDeclaredField("match"));
+                    nextOffset = UNSAFE.objectFieldOffset
+                        (k.getDeclaredField("next"));
+                } catch (Exception e) {
+                    throw new Error(e);
+                }
+            }
         }
 
         /** The head (top) of the stack */
@@ -498,10 +508,18 @@
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-        private static final long headOffset =
-            objectFieldOffset(UNSAFE, "head", TransferStack.class);
-
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long headOffset;
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = TransferStack.class;
+                headOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("head"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /** Dual Queue */
@@ -558,11 +576,22 @@
             }
 
             // Unsafe mechanics
-            private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-            private static final long nextOffset =
-                objectFieldOffset(UNSAFE, "next", QNode.class);
-            private static final long itemOffset =
-                objectFieldOffset(UNSAFE, "item", QNode.class);
+            private static final sun.misc.Unsafe UNSAFE;
+            private static final long itemOffset;
+            private static final long nextOffset;
+
+            static {
+                try {
+                    UNSAFE = sun.misc.Unsafe.getUnsafe();
+                    Class k = QNode.class;
+                    itemOffset = UNSAFE.objectFieldOffset
+                        (k.getDeclaredField("item"));
+                    nextOffset = UNSAFE.objectFieldOffset
+                        (k.getDeclaredField("next"));
+                } catch (Exception e) {
+                    throw new Error(e);
+                }
+            }
         }
 
         /** Head of queue */
@@ -791,15 +820,24 @@
             }
         }
 
-        // unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-        private static final long headOffset =
-            objectFieldOffset(UNSAFE, "head", TransferQueue.class);
-        private static final long tailOffset =
-            objectFieldOffset(UNSAFE, "tail", TransferQueue.class);
-        private static final long cleanMeOffset =
-            objectFieldOffset(UNSAFE, "cleanMe", TransferQueue.class);
-
+        private static final sun.misc.Unsafe UNSAFE;
+        private static final long headOffset;
+        private static final long tailOffset;
+        private static final long cleanMeOffset;
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                Class k = TransferQueue.class;
+                headOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("head"));
+                tailOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("tail"));
+                cleanMeOffset = UNSAFE.objectFieldOffset
+                    (k.getDeclaredField("cleanMe"));
+            } catch (Exception e) {
+                throw new Error(e);
+            }
+        }
     }
 
     /**
--- a/src/share/classes/java/util/jar/JarFile.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/jar/JarFile.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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,11 +27,13 @@
 
 import java.io.*;
 import java.lang.ref.SoftReference;
+import java.net.URL;
 import java.util.*;
 import java.util.zip.*;
 import java.security.CodeSigner;
 import java.security.cert.Certificate;
 import java.security.AccessController;
+import java.security.CodeSource;
 import sun.security.action.GetPropertyAction;
 import sun.security.util.ManifestEntryVerifier;
 import sun.misc.SharedSecrets;
@@ -262,7 +264,7 @@
                 throw new RuntimeException(e);
             }
             if (certs == null && jv != null) {
-                certs = jv.getCerts(getName());
+                certs = jv.getCerts(JarFile.this, this);
             }
             return certs == null ? null : certs.clone();
         }
@@ -273,7 +275,7 @@
                 throw new RuntimeException(e);
             }
             if (signers == null && jv != null) {
-                signers = jv.getCodeSigners(getName());
+                signers = jv.getCodeSigners(JarFile.this, this);
             }
             return signers == null ? null : signers.clone();
         }
@@ -374,9 +376,9 @@
      */
     private byte[] getBytes(ZipEntry ze) throws IOException {
         byte[] b = new byte[(int)ze.getSize()];
-        DataInputStream is = new DataInputStream(super.getInputStream(ze));
-        is.readFully(b, 0, b.length);
-        is.close();
+        try (DataInputStream is = new DataInputStream(super.getInputStream(ze))) {
+            is.readFully(b, 0, b.length);
+        }
         return b;
     }
 
@@ -478,10 +480,10 @@
             JarEntry manEntry = getManEntry();
             if (manEntry != null) {
                 byte[] b = new byte[(int)manEntry.getSize()];
-                DataInputStream dis = new DataInputStream(
-                                                          super.getInputStream(manEntry));
-                dis.readFully(b, 0, b.length);
-                dis.close();
+                try (DataInputStream dis = new DataInputStream(
+                         super.getInputStream(manEntry))) {
+                    dis.readFully(b, 0, b.length);
+                }
 
                 int last = b.length - src.length;
                 int i = 0;
@@ -544,4 +546,191 @@
         }
         return false;
     }
+
+    private synchronized void ensureInitialization() {
+        try {
+            maybeInstantiateVerifier();
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        if (jv != null && !jvInitialized) {
+            initializeVerifier();
+            jvInitialized = true;
+        }
+    }
+
+    JarEntry newEntry(ZipEntry ze) {
+        return new JarFileEntry(ze);
+    }
+
+    Enumeration<String> entryNames(CodeSource[] cs) {
+        ensureInitialization();
+        if (jv != null) {
+            return jv.entryNames(this, cs);
+        }
+
+        /*
+         * JAR file has no signed content. Is there a non-signing
+         * code source?
+         */
+        boolean includeUnsigned = false;
+        for (int i = 0; i < cs.length; i++) {
+            if (cs[i].getCodeSigners() == null) {
+                includeUnsigned = true;
+                break;
+            }
+        }
+        if (includeUnsigned) {
+            return unsignedEntryNames();
+        } else {
+            return new Enumeration<String>() {
+
+                public boolean hasMoreElements() {
+                    return false;
+                }
+
+                public String nextElement() {
+                    throw new NoSuchElementException();
+                }
+            };
+        }
+    }
+
+    /**
+     * Returns an enumeration of the zip file entries
+     * excluding internal JAR mechanism entries and including
+     * signed entries missing from the ZIP directory.
+     */
+    Enumeration<JarEntry> entries2() {
+        ensureInitialization();
+        if (jv != null) {
+            return jv.entries2(this, super.entries());
+        }
+
+        // screen out entries which are never signed
+        final Enumeration enum_ = super.entries();
+        return new Enumeration<JarEntry>() {
+
+            ZipEntry entry;
+
+            public boolean hasMoreElements() {
+                if (entry != null) {
+                    return true;
+                }
+                while (enum_.hasMoreElements()) {
+                    ZipEntry ze = (ZipEntry) enum_.nextElement();
+                    if (JarVerifier.isSigningRelated(ze.getName())) {
+                        continue;
+                    }
+                    entry = ze;
+                    return true;
+                }
+                return false;
+            }
+
+            public JarFileEntry nextElement() {
+                if (hasMoreElements()) {
+                    ZipEntry ze = entry;
+                    entry = null;
+                    return new JarFileEntry(ze);
+                }
+                throw new NoSuchElementException();
+            }
+        };
+    }
+
+    CodeSource[] getCodeSources(URL url) {
+        ensureInitialization();
+        if (jv != null) {
+            return jv.getCodeSources(this, url);
+        }
+
+        /*
+         * JAR file has no signed content. Is there a non-signing
+         * code source?
+         */
+        Enumeration unsigned = unsignedEntryNames();
+        if (unsigned.hasMoreElements()) {
+            return new CodeSource[]{JarVerifier.getUnsignedCS(url)};
+        } else {
+            return null;
+        }
+    }
+
+    private Enumeration<String> unsignedEntryNames() {
+        final Enumeration entries = entries();
+        return new Enumeration<String>() {
+
+            String name;
+
+            /*
+             * Grab entries from ZIP directory but screen out
+             * metadata.
+             */
+            public boolean hasMoreElements() {
+                if (name != null) {
+                    return true;
+                }
+                while (entries.hasMoreElements()) {
+                    String value;
+                    ZipEntry e = (ZipEntry) entries.nextElement();
+                    value = e.getName();
+                    if (e.isDirectory() || JarVerifier.isSigningRelated(value)) {
+                        continue;
+                    }
+                    name = value;
+                    return true;
+                }
+                return false;
+            }
+
+            public String nextElement() {
+                if (hasMoreElements()) {
+                    String value = name;
+                    name = null;
+                    return value;
+                }
+                throw new NoSuchElementException();
+            }
+        };
+    }
+
+    CodeSource getCodeSource(URL url, String name) {
+        ensureInitialization();
+        if (jv != null) {
+            if (jv.eagerValidation) {
+                CodeSource cs = null;
+                JarEntry je = getJarEntry(name);
+                if (je != null) {
+                    cs = jv.getCodeSource(url, this, je);
+                } else {
+                    cs = jv.getCodeSource(url, name);
+                }
+                return cs;
+            } else {
+                return jv.getCodeSource(url, name);
+            }
+        }
+
+        return JarVerifier.getUnsignedCS(url);
+    }
+
+    void setEagerValidation(boolean eager) {
+        try {
+            maybeInstantiateVerifier();
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        if (jv != null) {
+            jv.setEagerValidation(eager);
+        }
+    }
+
+    List getManifestDigests() {
+        ensureInitialization();
+        if (jv != null) {
+            return jv.getManifestDigests();
+        }
+        return new ArrayList();
+    }
 }
--- a/src/share/classes/java/util/jar/JarVerifier.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/jar/JarVerifier.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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,11 @@
 package java.util.jar;
 
 import java.io.*;
+import java.net.URL;
 import java.util.*;
 import java.security.*;
 import java.security.cert.CertificateException;
+import java.util.zip.ZipEntry;
 
 import sun.security.util.ManifestDigester;
 import sun.security.util.ManifestEntryVerifier;
@@ -81,6 +83,15 @@
     /** the bytes for the manDig object */
     byte manifestRawBytes[] = null;
 
+    /** controls eager signature validation */
+    boolean eagerValidation;
+
+    /** makes code source singleton instances unique to us */
+    private Object csdomain = new Object();
+
+    /** collect -DIGEST-MANIFEST values for blacklist */
+    private List manifestDigests;
+
     public JarVerifier(byte rawBytes[]) {
         manifestRawBytes = rawBytes;
         sigFileSigners = new Hashtable();
@@ -88,6 +99,7 @@
         sigFileData = new Hashtable(11);
         pendingBlocks = new ArrayList();
         baos = new ByteArrayOutputStream();
+        manifestDigests = new ArrayList();
     }
 
     /**
@@ -247,7 +259,7 @@
                             }
 
                             sfv.setSignatureFile(bytes);
-                            sfv.process(sigFileSigners);
+                            sfv.process(sigFileSigners, manifestDigests);
                         }
                     }
                     return;
@@ -290,7 +302,7 @@
                         sfv.setSignatureFile(bytes);
                     }
                 }
-                sfv.process(sigFileSigners);
+                sfv.process(sigFileSigners, manifestDigests);
 
             } catch (IOException ioe) {
                 // e.g. sun.security.pkcs.ParsingException
@@ -312,12 +324,18 @@
     /**
      * Return an array of java.security.cert.Certificate objects for
      * the given file in the jar.
+     * @deprecated
      */
     public java.security.cert.Certificate[] getCerts(String name)
     {
         return mapSignersToCertArray(getCodeSigners(name));
     }
 
+    public java.security.cert.Certificate[] getCerts(JarFile jar, JarEntry entry)
+    {
+        return mapSignersToCertArray(getCodeSigners(jar, entry));
+    }
+
     /**
      * return an array of CodeSigner objects for
      * the given file in the jar. this array is not cloned.
@@ -328,6 +346,28 @@
         return (CodeSigner[])verifiedSigners.get(name);
     }
 
+    public CodeSigner[] getCodeSigners(JarFile jar, JarEntry entry)
+    {
+        String name = entry.getName();
+        if (eagerValidation && sigFileSigners.get(name) != null) {
+            /*
+             * Force a read of the entry data to generate the
+             * verification hash.
+             */
+            try {
+                InputStream s = jar.getInputStream(entry);
+                byte[] buffer = new byte[1024];
+                int n = buffer.length;
+                while (n != -1) {
+                    n = s.read(buffer, 0, buffer.length);
+                }
+                s.close();
+            } catch (IOException e) {
+            }
+        }
+        return getCodeSigners(name);
+    }
+
     /*
      * Convert an array of signers into an array of concatenated certificate
      * arrays.
@@ -444,4 +484,393 @@
         }
 
     }
+
+    // Extended JavaUtilJarAccess CodeSource API Support
+
+    private Map urlToCodeSourceMap = new HashMap();
+    private Map signerToCodeSource = new HashMap();
+    private URL lastURL;
+    private Map lastURLMap;
+
+    /*
+     * Create a unique mapping from codeSigner cache entries to CodeSource.
+     * In theory, multiple URLs origins could map to a single locally cached
+     * and shared JAR file although in practice there will be a single URL in use.
+     */
+    private synchronized CodeSource mapSignersToCodeSource(URL url, CodeSigner[] signers) {
+        Map map;
+        if (url == lastURL) {
+            map = lastURLMap;
+        } else {
+            map = (Map) urlToCodeSourceMap.get(url);
+            if (map == null) {
+                map = new HashMap();
+                urlToCodeSourceMap.put(url, map);
+            }
+            lastURLMap = map;
+            lastURL = url;
+        }
+        CodeSource cs = (CodeSource) map.get(signers);
+        if (cs == null) {
+            cs = new VerifierCodeSource(csdomain, url, signers);
+            signerToCodeSource.put(signers, cs);
+        }
+        return cs;
+    }
+
+    private CodeSource[] mapSignersToCodeSources(URL url, List signers, boolean unsigned) {
+        List sources = new ArrayList();
+
+        for (int i = 0; i < signers.size(); i++) {
+            sources.add(mapSignersToCodeSource(url, (CodeSigner[]) signers.get(i)));
+        }
+        if (unsigned) {
+            sources.add(mapSignersToCodeSource(url, null));
+        }
+        return (CodeSource[]) sources.toArray(new CodeSource[sources.size()]);
+    }
+    private CodeSigner[] emptySigner = new CodeSigner[0];
+
+    /*
+     * Match CodeSource to a CodeSigner[] in the signer cache.
+     */
+    private CodeSigner[] findMatchingSigners(CodeSource cs) {
+        if (cs instanceof VerifierCodeSource) {
+            VerifierCodeSource vcs = (VerifierCodeSource) cs;
+            if (vcs.isSameDomain(csdomain)) {
+                return ((VerifierCodeSource) cs).getPrivateSigners();
+            }
+        }
+
+        /*
+         * In practice signers should always be optimized above
+         * but this handles a CodeSource of any type, just in case.
+         */
+        CodeSource[] sources = mapSignersToCodeSources(cs.getLocation(), getJarCodeSigners(), true);
+        List sourceList = new ArrayList();
+        for (int i = 0; i < sources.length; i++) {
+            sourceList.add(sources[i]);
+        }
+        int j = sourceList.indexOf(cs);
+        if (j != -1) {
+            CodeSigner[] match;
+            match = ((VerifierCodeSource) sourceList.get(j)).getPrivateSigners();
+            if (match == null) {
+                match = emptySigner;
+            }
+            return match;
+        }
+        return null;
+    }
+
+    /*
+     * Instances of this class hold uncopied references to internal
+     * signing data that can be compared by object reference identity.
+     */
+    private static class VerifierCodeSource extends CodeSource {
+
+        URL vlocation;
+        CodeSigner[] vsigners;
+        java.security.cert.Certificate[] vcerts;
+        Object csdomain;
+
+        VerifierCodeSource(Object csdomain, URL location, CodeSigner[] signers) {
+            super(location, signers);
+            this.csdomain = csdomain;
+            vlocation = location;
+            vsigners = signers; // from signerCache
+        }
+
+        VerifierCodeSource(Object csdomain, URL location, java.security.cert.Certificate[] certs) {
+            super(location, certs);
+            this.csdomain = csdomain;
+            vlocation = location;
+            vcerts = certs; // from signerCache
+        }
+
+        /*
+         * All VerifierCodeSource instances are constructed based on
+         * singleton signerCache or signerCacheCert entries for each unique signer.
+         * No CodeSigner<->Certificate[] conversion is required.
+         * We use these assumptions to optimize equality comparisons.
+         */
+        public boolean equals(Object obj) {
+            if (obj == this) {
+                return true;
+            }
+            if (obj instanceof VerifierCodeSource) {
+                VerifierCodeSource that = (VerifierCodeSource) obj;
+
+                /*
+                 * Only compare against other per-signer singletons constructed
+                 * on behalf of the same JarFile instance. Otherwise, compare
+                 * things the slower way.
+                 */
+                if (isSameDomain(that.csdomain)) {
+                    if (that.vsigners != this.vsigners
+                            || that.vcerts != this.vcerts) {
+                        return false;
+                    }
+                    if (that.vlocation != null) {
+                        return that.vlocation.equals(this.vlocation);
+                    } else if (this.vlocation != null) {
+                        return this.vlocation.equals(that.vlocation);
+                    } else { // both null
+                        return true;
+                    }
+                }
+            }
+            return super.equals(obj);
+        }
+
+        boolean isSameDomain(Object csdomain) {
+            return this.csdomain == csdomain;
+        }
+
+        private CodeSigner[] getPrivateSigners() {
+            return vsigners;
+        }
+
+        private java.security.cert.Certificate[] getPrivateCertificates() {
+            return vcerts;
+        }
+    }
+    private Map signerMap;
+
+    private synchronized Map signerMap() {
+        if (signerMap == null) {
+            /*
+             * Snapshot signer state so it doesn't change on us. We care
+             * only about the asserted signatures. Verification of
+             * signature validity happens via the JarEntry apis.
+             */
+            signerMap = new HashMap(verifiedSigners.size() + sigFileSigners.size());
+            signerMap.putAll(verifiedSigners);
+            signerMap.putAll(sigFileSigners);
+        }
+        return signerMap;
+    }
+
+    public synchronized Enumeration<String> entryNames(JarFile jar, final CodeSource[] cs) {
+        final Map map = signerMap();
+        final Iterator itor = map.entrySet().iterator();
+        boolean matchUnsigned = false;
+
+        /*
+         * Grab a single copy of the CodeSigner arrays. Check
+         * to see if we can optimize CodeSigner equality test.
+         */
+        List req = new ArrayList(cs.length);
+        for (int i = 0; i < cs.length; i++) {
+            CodeSigner[] match = findMatchingSigners(cs[i]);
+            if (match != null) {
+                if (match.length > 0) {
+                    req.add(match);
+                } else {
+                    matchUnsigned = true;
+                }
+            }
+        }
+
+        final List signersReq = req;
+        final Enumeration enum2 = (matchUnsigned) ? unsignedEntryNames(jar) : emptyEnumeration;
+
+        return new Enumeration<String>() {
+
+            String name;
+
+            public boolean hasMoreElements() {
+                if (name != null) {
+                    return true;
+                }
+
+                while (itor.hasNext()) {
+                    Map.Entry e = (Map.Entry) itor.next();
+                    if (signersReq.contains((CodeSigner[]) e.getValue())) {
+                        name = (String) e.getKey();
+                        return true;
+                    }
+                }
+                while (enum2.hasMoreElements()) {
+                    name = (String) enum2.nextElement();
+                    return true;
+                }
+                return false;
+            }
+
+            public String nextElement() {
+                if (hasMoreElements()) {
+                    String value = name;
+                    name = null;
+                    return value;
+                }
+                throw new NoSuchElementException();
+            }
+        };
+    }
+
+    /*
+     * Like entries() but screens out internal JAR mechanism entries
+     * and includes signed entries with no ZIP data.
+     */
+    public Enumeration<JarEntry> entries2(final JarFile jar, Enumeration e) {
+        final Map map = new HashMap();
+        map.putAll(signerMap());
+        final Enumeration enum_ = e;
+        return new Enumeration<JarEntry>() {
+
+            Enumeration signers = null;
+            JarEntry entry;
+
+            public boolean hasMoreElements() {
+                if (entry != null) {
+                    return true;
+                }
+                while (enum_.hasMoreElements()) {
+                    ZipEntry ze = (ZipEntry) enum_.nextElement();
+                    if (JarVerifier.isSigningRelated(ze.getName())) {
+                        continue;
+                    }
+                    entry = jar.newEntry(ze);
+                    return true;
+                }
+                if (signers == null) {
+                    signers = Collections.enumeration(map.keySet());
+                }
+                while (signers.hasMoreElements()) {
+                    String name = (String) signers.nextElement();
+                    entry = jar.newEntry(new ZipEntry(name));
+                    return true;
+                }
+
+                // Any map entries left?
+                return false;
+            }
+
+            public JarEntry nextElement() {
+                if (hasMoreElements()) {
+                    JarEntry je = entry;
+                    map.remove(je.getName());
+                    entry = null;
+                    return je;
+                }
+                throw new NoSuchElementException();
+            }
+        };
+    }
+    private Enumeration emptyEnumeration = new Enumeration<String>() {
+
+        public boolean hasMoreElements() {
+            return false;
+        }
+
+        public String nextElement() {
+            throw new NoSuchElementException();
+        }
+    };
+
+    // true if file is part of the signature mechanism itself
+    static boolean isSigningRelated(String name) {
+        name = name.toUpperCase(Locale.ENGLISH);
+        if (!name.startsWith("META-INF/")) {
+            return false;
+        }
+        name = name.substring(9);
+        if (name.indexOf('/') != -1) {
+            return false;
+        }
+        if (name.endsWith(".DSA")
+                || name.endsWith(".RSA")
+                || name.endsWith(".SF")
+                || name.endsWith(".EC")
+                || name.startsWith("SIG-")
+                || name.equals("MANIFEST.MF")) {
+            return true;
+        }
+        return false;
+    }
+
+    private Enumeration<String> unsignedEntryNames(JarFile jar) {
+        final Map map = signerMap();
+        final Enumeration entries = jar.entries();
+        return new Enumeration<String>() {
+
+            String name;
+
+            /*
+             * Grab entries from ZIP directory but screen out
+             * metadata.
+             */
+            public boolean hasMoreElements() {
+                if (name != null) {
+                    return true;
+                }
+                while (entries.hasMoreElements()) {
+                    String value;
+                    ZipEntry e = (ZipEntry) entries.nextElement();
+                    value = e.getName();
+                    if (e.isDirectory() || isSigningRelated(value)) {
+                        continue;
+                    }
+                    if (map.get(value) == null) {
+                        name = value;
+                        return true;
+                    }
+                }
+                return false;
+            }
+
+            public String nextElement() {
+                if (hasMoreElements()) {
+                    String value = name;
+                    name = null;
+                    return value;
+                }
+                throw new NoSuchElementException();
+            }
+        };
+    }
+    private List jarCodeSigners;
+
+    private synchronized List getJarCodeSigners() {
+        CodeSigner[] signers;
+        if (jarCodeSigners == null) {
+            HashSet set = new HashSet();
+            set.addAll(signerMap().values());
+            jarCodeSigners = new ArrayList();
+            jarCodeSigners.addAll(set);
+        }
+        return jarCodeSigners;
+    }
+
+    public synchronized CodeSource[] getCodeSources(JarFile jar, URL url) {
+        boolean hasUnsigned = unsignedEntryNames(jar).hasMoreElements();
+
+        return mapSignersToCodeSources(url, getJarCodeSigners(), hasUnsigned);
+    }
+
+    public CodeSource getCodeSource(URL url, String name) {
+        CodeSigner[] signers;
+
+        signers = (CodeSigner[]) signerMap().get(name);
+        return mapSignersToCodeSource(url, signers);
+    }
+
+    public CodeSource getCodeSource(URL url, JarFile jar, JarEntry je) {
+        CodeSigner[] signers;
+
+        return mapSignersToCodeSource(url, getCodeSigners(jar, je));
+    }
+
+    public void setEagerValidation(boolean eager) {
+        eagerValidation = eager;
+    }
+
+    public synchronized List getManifestDigests() {
+        return Collections.unmodifiableList(manifestDigests);
+    }
+
+    static CodeSource getUnsignedCS(URL url) {
+        return new VerifierCodeSource(null, url, (java.security.cert.Certificate[]) null);
+    }
 }
--- a/src/share/classes/java/util/jar/JavaUtilJarAccessImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/jar/JavaUtilJarAccessImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, 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,10 +26,38 @@
 package java.util.jar;
 
 import java.io.IOException;
+import java.net.URL;
+import java.security.CodeSource;
+import java.util.Enumeration;
+import java.util.List;
 import sun.misc.JavaUtilJarAccess;
 
 class JavaUtilJarAccessImpl implements JavaUtilJarAccess {
     public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException {
         return jar.hasClassPathAttribute();
     }
+
+    public CodeSource[] getCodeSources(JarFile jar, URL url) {
+        return jar.getCodeSources(url);
+    }
+
+    public CodeSource getCodeSource(JarFile jar, URL url, String name) {
+        return jar.getCodeSource(url, name);
+    }
+
+    public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs) {
+        return jar.entryNames(cs);
+    }
+
+    public Enumeration<JarEntry> entries2(JarFile jar) {
+        return jar.entries2();
+    }
+
+    public void setEagerValidation(JarFile jar, boolean eager) {
+        jar.setEagerValidation(eager);
+    }
+
+    public List getManifestDigests(JarFile jar) {
+        return jar.getManifestDigests();
+    }
 }
--- a/src/share/classes/java/util/zip/ZipEntry.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/java/util/zip/ZipEntry.java	Wed Apr 20 04:38:36 2011 +0100
@@ -26,7 +26,6 @@
 package java.util.zip;
 
 import java.util.Date;
-import sun.misc.BootClassLoaderHook;
 
 /**
  * This class is used to represent a ZIP file entry.
--- a/src/share/classes/javax/crypto/SecretKeyFactory.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/crypto/SecretKeyFactory.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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,7 +61,6 @@
  * <p> Every implementation of the Java platform is required to support the
  * following standard <code>SecretKeyFactory</code> algorithms:
  * <ul>
- * <li><tt>AES</tt></li>
  * <li><tt>DES</tt></li>
  * <li><tt>DESede</tt></li>
  * </ul>
--- a/src/share/classes/javax/script/ScriptEngineFactory.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/script/ScriptEngineFactory.java	Wed Apr 20 04:38:36 2011 +0100
@@ -115,20 +115,19 @@
      * with respect to concurrent execution of scripts and maintenance of state is also defined.
      * These values for the <code><b>THREADING</b></code> key are:<br><br>
      * <ul>
-     * <p><code>null</code> - The engine implementation is not thread safe, and cannot
+     * <li><code>null</code> - The engine implementation is not thread safe, and cannot
      * be used to execute scripts concurrently on multiple threads.
-     * <p><code>&quot;MULTITHREADED&quot;</code> - The engine implementation is internally
+     * <li><code>&quot;MULTITHREADED&quot;</code> - The engine implementation is internally
      * thread-safe and scripts may execute concurrently although effects of script execution
      * on one thread may be visible to scripts on other threads.
-     * <p><code>&quot;THREAD-ISOLATED&quot;</code> - The implementation satisfies the requirements
+     * <li><code>&quot;THREAD-ISOLATED&quot;</code> - The implementation satisfies the requirements
      * of &quot;MULTITHREADED&quot;, and also, the engine maintains independent values
      * for symbols in scripts executing on different threads.
-     * <p><code>&quot;STATELESS&quot;</code> - The implementation satisfies the requirements of
-     * <code>&quot;THREAD-ISOLATED&quot;</code>.  In addition, script executions do not alter the
+     * <li><code>&quot;STATELESS&quot;</code> - The implementation satisfies the requirements of
+     * <li><code>&quot;THREAD-ISOLATED&quot;</code>.  In addition, script executions do not alter the
      * mappings in the <code>Bindings</code> which is the engine scope of the
      * <code>ScriptEngine</code>.  In particular, the keys in the <code>Bindings</code>
      * and their associated values are the same before and after the execution of the script.
-     * </li>
      * </ul>
      * <br><br>
      * Implementations may define implementation-specific keys.
@@ -145,22 +144,23 @@
      * of the supported scripting language.  For instance, an implementaton for a Javascript
      * engine might be;
      * <p>
-     * <code><pre>
+     * <pre>
+     * <code>
      * public String getMethodCallSyntax(String obj,
      *                                   String m, String... args) {
      *      String ret = obj;
      *      ret += "." + m + "(";
      *      for (int i = 0; i < args.length; i++) {
      *          ret += args[i];
-     *          if (i == args.length - 1) {
-     *              ret += ")";
-     *          } else {
+     *          if (i < args.length - 1) {
      *              ret += ",";
      *          }
      *      }
+     *      ret += ")";
      *      return ret;
      * }
-     *</pre></code>
+     *</code>
+     *</pre>
      * <p>
      *
      * @param obj The name representing the object whose method is to be invoked. The
--- a/src/share/classes/javax/sound/midi/MidiSystem.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/sound/midi/MidiSystem.java	Wed Apr 20 04:38:36 2011 +0100
@@ -441,13 +441,6 @@
                 Synthesizer synth = getSynthesizer();
                 if (synth instanceof ReferenceCountingDevice) {
                     rec = ((ReferenceCountingDevice) synth).getReceiverReferenceCounting();
-                    // only use MixerSynth if it could successfully load a soundbank
-                    if (synth.getClass().toString().contains("com.sun.media.sound.MixerSynth")
-                        && (synth.getDefaultSoundbank() == null)) {
-                        // don't use this receiver if no soundbank available
-                        rec = null;
-                        synth.close();
-                    }
                 } else {
                     synth.open();
                     try {
--- a/src/share/classes/javax/sound/sampled/AudioSystem.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/sound/sampled/AudioSystem.java	Wed Apr 20 04:38:36 2011 +0100
@@ -670,6 +670,12 @@
      * <p>The returned <code>TargetDataLine</code>'s default
      * audio format will be initialized with <code>format</code>.
      *
+     * <p>If the system property
+     * {@code javax.sound.sampled.TargetDataLine}
+     * is defined or it is defined in the file &quot;sound.properties&quot;,
+     * it is used to retrieve the default target data line.
+     * For details, refer to the {@link AudioSystem class description}.
+     *
      * @param format an <code>AudioFormat</code> object specifying
      *        the supported audio format of the returned line,
      *        or <code>null</code> for any audio format
@@ -712,12 +718,6 @@
      * <p>The returned <code>TargetDataLine</code>'s default
      * audio format will be initialized with <code>format</code>.
      *
-     * <p>If the system property
-     * <code>javax.sound.sampled.TargetDataLine</code>
-     * is defined or it is defined in the file &quot;sound.properties&quot;,
-     * it is used to retrieve the default target data line.
-     * For details, refer to the {@link AudioSystem class description}.
-     *
      * @param format an <code>AudioFormat</code> object specifying
      *        the supported audio format of the returned line,
      *        or <code>null</code> for any audio format
--- a/src/share/classes/javax/sql/rowset/serial/SerialClob.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/sql/rowset/serial/SerialClob.java	Wed Apr 20 04:38:36 2011 +0100
@@ -57,10 +57,10 @@
     private char buf[];
 
     /**
-     * Internal Clob representation if SerialClob is intialized with a
-     * Clob
+     * Internal Clob representation if SerialClob is initialized with a
+     * Clob. Null if SerialClob is initialized with a char[].
      */
-    private Clob clob;
+    private final Clob clob;
 
     /**
      * The length in characters of this <code>SerialClob</code> object's
@@ -71,12 +71,12 @@
     private long len;
 
     /**
-     * The original length in characters of tgus <code>SerialClob</code>
-     * objects internal array of characters.
+     * The original length in characters of this <code>SerialClob</code>
+     * object's internal array of characters.
      *
      * @serial
      */
-    private long origLen;
+    private final long origLen;
 
     /**
      * Constructs a <code>SerialClob</code> object that is a serialized version of
@@ -104,6 +104,7 @@
            buf[i] = ch[i];
         }
         origLen = len;
+        clob = null;
     }
 
     /**
@@ -117,19 +118,19 @@
      * the database. Otherwise, the new <code>SerialClob</code> object
      * object will contain no data.
      * <p>
-     * Note: The <code>Clob</code> object supplied to this constructor cannot
-     * return <code>null</code> for the <code>Clob.getCharacterStream()</code>
+     * Note: The <code>Clob</code> object supplied to this constructor must
+     * return non-null for both the <code>Clob.getCharacterStream()</code>
      * and <code>Clob.getAsciiStream</code> methods. This <code>SerialClob</code>
-     * constructor cannot  serialize a <code>Clob</code> object in this instance
+     * constructor cannot serialize a <code>Clob</code> object in this instance
      * and will throw an <code>SQLException</code> object.
      *
      * @param  clob the <code>Clob</code> object from which this
      *     <code>SerialClob</code> object is to be constructed; cannot be null
      * @throws SerialException if an error occurs during serialization
      * @throws SQLException if a SQL error occurs in capturing the CLOB;
-     *     if the <code>Clob</code> object is a null; or if both the
+     *     if the <code>Clob</code> object is a null; or if either of the
      *     <code>Clob.getCharacterStream()</code> and <code>Clob.getAsciiStream()</code>
-     *     methods on the <code>Clob</code> return a null
+     *     methods on the <code>Clob</code> returns a null
      * @see java.sql.Clob
      */
     public SerialClob(Clob clob) throws SerialException, SQLException {
@@ -144,19 +145,27 @@
         int read = 0;
         int offset = 0;
 
-        BufferedReader reader;
-        if ( (((reader = new BufferedReader(clob.getCharacterStream())) == null)) &&
-            (clob.getAsciiStream() == null)) {
-            throw new SQLException("Invalid Clob object. Calls to getCharacterStream " +
-                "and getAsciiStream return null which cannot be serialized.");
-        }
+        try (Reader charStream = clob.getCharacterStream()) {
+            if (charStream == null) {
+                throw new SQLException("Invalid Clob object. The call to getCharacterStream " +
+                    "returned null which cannot be serialized.");
+            }
 
-        try {
-            do {
-                read = reader.read(buf, offset, (int)(len - offset));
-                offset += read;
-            } while (read > 0);
+            // Note: get an ASCII stream in order to null-check it,
+            // even though we don't do anything with it.
+            try (InputStream asciiStream = clob.getAsciiStream()) {
+                if (asciiStream == null) {
+                    throw new SQLException("Invalid Clob object. The call to getAsciiStream " +
+                        "returned null which cannot be serialized.");
+                }
+            }
 
+            try (Reader reader = new BufferedReader(charStream)) {
+                do {
+                    read = reader.read(buf, offset, (int)(len - offset));
+                    offset += read;
+                } while (read > 0);
+            }
         } catch (java.io.IOException ex) {
             throw new SerialException("SerialClob: " + ex.getMessage());
         }
@@ -207,13 +216,13 @@
      *     used to create this <code>SerialClob</code> object
      */
     public java.io.InputStream getAsciiStream() throws SerialException, SQLException {
-       if (this.clob != null) {
-             return this.clob.getAsciiStream();
-         } else {
-             throw new SerialException("Unsupported operation. SerialClob cannot " +
+        if (this.clob != null) {
+            return this.clob.getAsciiStream();
+        } else {
+            throw new SerialException("Unsupported operation. SerialClob cannot " +
                 "return a the CLOB value as an ascii stream, unless instantiated " +
                 "with a fully implemented Clob object.");
-         }
+        }
     }
 
     /**
--- a/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Wed Apr 20 04:38:36 2011 +0100
@@ -32,6 +32,7 @@
 import javax.sql.*;
 
 import java.io.FileInputStream;
+import java.io.InputStream;
 import java.io.IOException;
 import java.io.FileNotFoundException;
 
@@ -366,7 +367,9 @@
                     // Load user's implementation of SyncProvider
                     // here. -Drowset.properties=/abc/def/pqr.txt
                     ROWSET_PROPERTIES = strRowsetProperties;
-                    properties.load(new FileInputStream(ROWSET_PROPERTIES));
+                    try (FileInputStream fis = new FileInputStream(ROWSET_PROPERTIES)) {
+                        properties.load(fis);
+                    }
                     parseProperties(properties);
                 }
 
@@ -376,12 +379,19 @@
                 ROWSET_PROPERTIES = "javax" + strFileSep + "sql" +
                         strFileSep + "rowset" + strFileSep +
                         "rowset.properties";
-                // properties.load(
-                //                ClassLoader.getSystemResourceAsStream(ROWSET_PROPERTIES));
 
                 ClassLoader cl = Thread.currentThread().getContextClassLoader();
 
-                properties.load(cl.getResourceAsStream(ROWSET_PROPERTIES));
+                try (InputStream stream =
+                         (cl == null) ? ClassLoader.getSystemResourceAsStream(ROWSET_PROPERTIES)
+                                      : cl.getResourceAsStream(ROWSET_PROPERTIES)) {
+                    if (stream == null) {
+                        throw new SyncFactoryException(
+                            "Resource " + ROWSET_PROPERTIES + " not found");
+                    }
+                    properties.load(stream);
+                }
+
                 parseProperties(properties);
 
             // removed else, has properties should sum together
--- a/src/share/classes/javax/swing/DefaultDesktopManager.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/DefaultDesktopManager.java	Wed Apr 20 04:38:36 2011 +0100
@@ -174,6 +174,8 @@
         if(!wasIcon(f)) {
             Rectangle r = getBoundsForIconOf(f);
             desktopIcon.setBounds(r.x, r.y, r.width, r.height);
+            // we must validate the hierarchy to not break the hw/lw mixing
+            desktopIcon.revalidate();
             setWasIcon(f, Boolean.TRUE);
         }
 
@@ -453,11 +455,9 @@
 
     /** This moves the <code>JComponent</code> and repaints the damaged areas. */
     public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) {
-        boolean didResize = (f.getWidth() != newWidth || f.getHeight() != newHeight);
         f.setBounds(newX, newY, newWidth, newHeight);
-        if(didResize) {
-            f.validate();
-        }
+        // we must validate the hierarchy to not break the hw/lw mixing
+        f.revalidate();
     }
 
     /** Convenience method to remove the desktopIcon of <b>f</b> is necessary. */
--- a/src/share/classes/javax/swing/JComponent.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/JComponent.java	Wed Apr 20 04:38:36 2011 +0100
@@ -4901,14 +4901,17 @@
      * Returns {@code true} if a paint triggered on a child component should cause
      * painting to originate from this Component, or one of its ancestors.
      * <p/>
-     * Calling {@link JComponent#repaint} on a Swing component will be delegated to
-     * the first ancestor which {@code isPaintingOrigin()} returns {@code true},
-     * if there are any.
+     * Calling {@link #repaint} or {@link #paintImmediately(int, int, int, int)}
+     * on a Swing component will result in calling
+     * the {@link JComponent#paintImmediately(int, int, int, int)} method of
+     * the first ancestor which {@code isPaintingOrigin()} returns {@code true}, if there are any.
      * <p/>
-     * {@code JComponent} subclasses that need to be repainted when any of their
+     * {@code JComponent} subclasses that need to be painted when any of their
      * children are repainted should override this method to return {@code true}.
      *
      * @return always returns {@code false}
+     *
+     * @see #paintImmediately(int, int, int, int)
      */
     protected boolean isPaintingOrigin() {
         return false;
@@ -4923,12 +4926,16 @@
      * and can collapse redundant requests into a single paint call.
      * This method is useful if one needs to update the display while
      * the current event is being dispatched.
+     * <p>
+     * This method is to be overridden when the dirty region needs to be changed
+     * for components that are painting origins.
      *
      * @param x  the x value of the region to be painted
      * @param y  the y value of the region to be painted
      * @param w  the width of the region to be painted
      * @param h  the height of the region to be painted
      * @see #repaint
+     * @see #isPaintingOrigin()
      */
     public void paintImmediately(int x,int y,int w, int h) {
         Component c = this;
@@ -4937,6 +4944,15 @@
         if(!isShowing()) {
             return;
         }
+
+        JComponent paintingOigin = SwingUtilities.getPaintingOrigin(this);
+        if (paintingOigin != null) {
+            Rectangle rectangle = SwingUtilities.convertRectangle(
+                    c, new Rectangle(x, y, w, h), paintingOigin);
+            paintingOigin.paintImmediately(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
+            return;
+        }
+
         while(!c.isOpaque()) {
             parent = c.getParent();
             if(parent != null) {
@@ -5133,31 +5149,30 @@
                 }
             }
         }
-
         try {
-            g = safelyGetGraphics(paintingComponent, c);
-            try {
-                if (hasBuffer) {
-                    RepaintManager rm = RepaintManager.currentManager(
-                                               bufferedComponent);
-                    rm.beginPaint();
-                    try {
-                        rm.paint(paintingComponent, bufferedComponent, g,
-                                 paintImmediatelyClip.x,
-                                 paintImmediatelyClip.y,
-                                 paintImmediatelyClip.width,
-                                 paintImmediatelyClip.height);
-                    } finally {
-                        rm.endPaint();
+            if ((g = safelyGetGraphics(paintingComponent, c)) != null) {
+                try {
+                    if (hasBuffer) {
+                        RepaintManager rm = RepaintManager.currentManager(
+                                bufferedComponent);
+                        rm.beginPaint();
+                        try {
+                            rm.paint(paintingComponent, bufferedComponent, g,
+                                    paintImmediatelyClip.x,
+                                    paintImmediatelyClip.y,
+                                    paintImmediatelyClip.width,
+                                    paintImmediatelyClip.height);
+                        } finally {
+                            rm.endPaint();
+                        }
+                    } else {
+                        g.setClip(paintImmediatelyClip.x, paintImmediatelyClip.y,
+                                paintImmediatelyClip.width, paintImmediatelyClip.height);
+                        paintingComponent.paint(g);
                     }
+                } finally {
+                    g.dispose();
                 }
-                else {
-                    g.setClip(paintImmediatelyClip.x,paintImmediatelyClip.y,
-                       paintImmediatelyClip.width,paintImmediatelyClip.height);
-                    paintingComponent.paint(g);
-                }
-            } finally {
-                g.dispose();
             }
         }
         finally {
--- a/src/share/classes/javax/swing/JLayer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/JLayer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -156,8 +156,9 @@
     // when layerUI is serializable
     private LayerUI<? super V> layerUI;
     private JPanel glassPane;
-    private boolean isPainting;
     private long eventMask;
+    private transient boolean isPainting;
+    private transient boolean isPaintingImmediately;
 
     private static final LayerEventController eventController =
             new LayerEventController();
@@ -393,17 +394,25 @@
     }
 
     /**
-     * Delegates repainting to {@link javax.swing.plaf.LayerUI#repaint} method.
+     * Delegates its functionality to the
+     * {@link javax.swing.plaf.LayerUI#paintImmediately(int, int, int, int, JLayer)} method,
+     * if {@code LayerUI} is set.
      *
-     * @param tm  this parameter is not used
-     * @param x  the x value of the dirty region
-     * @param y  the y value of the dirty region
-     * @param width  the width of the dirty region
-     * @param height  the height of the dirty region
+     * @param x  the x value of the region to be painted
+     * @param y  the y value of the region to be painted
+     * @param w  the width of the region to be painted
+     * @param h  the height of the region to be painted
      */
-    public void repaint(long tm, int x, int y, int width, int height) {
-        if (getUI() != null) {
-            getUI().repaint(tm, x, y, width, height, this);
+    public void paintImmediately(int x, int y, int w, int h) {
+        if (!isPaintingImmediately && getUI() != null) {
+            isPaintingImmediately = true;
+            try {
+                getUI().paintImmediately(x, y, w, h, this);
+            } finally {
+                isPaintingImmediately = false;
+            }
+        } else {
+            super.paintImmediately(x, y, w, h);
         }
     }
 
@@ -415,8 +424,11 @@
     public void paint(Graphics g) {
         if (!isPainting) {
             isPainting = true;
-            super.paintComponent(g);
-            isPainting = false;
+            try {
+                super.paintComponent(g);
+            } finally {
+                isPainting = false;
+            }
         } else {
             super.paint(g);
         }
--- a/src/share/classes/javax/swing/JOptionPane.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/JOptionPane.java	Wed Apr 20 04:38:36 2011 +0100
@@ -987,11 +987,33 @@
         }
         dialog.pack();
         dialog.setLocationRelativeTo(parentComponent);
+
+        final PropertyChangeListener listener = new PropertyChangeListener() {
+            public void propertyChange(PropertyChangeEvent event) {
+                // Let the defaultCloseOperation handle the closing
+                // if the user closed the window without selecting a button
+                // (newValue = null in that case).  Otherwise, close the dialog.
+                if (dialog.isVisible() && event.getSource() == JOptionPane.this &&
+                        (event.getPropertyName().equals(VALUE_PROPERTY) ||
+                                event.getPropertyName().equals(INPUT_VALUE_PROPERTY)) &&
+                        event.getNewValue() != null &&
+                        event.getNewValue() != JOptionPane.UNINITIALIZED_VALUE) {
+                    dialog.setVisible(false);
+                }
+            }
+        };
+
         WindowAdapter adapter = new WindowAdapter() {
             private boolean gotFocus = false;
             public void windowClosing(WindowEvent we) {
                 setValue(null);
             }
+
+            public void windowClosed(WindowEvent e) {
+                removePropertyChangeListener(listener);
+                dialog.getContentPane().removeAll();
+            }
+
             public void windowGainedFocus(WindowEvent we) {
                 // Once window gets focus, set initial focus
                 if (!gotFocus) {
@@ -1008,20 +1030,8 @@
                 setValue(JOptionPane.UNINITIALIZED_VALUE);
             }
         });
-        addPropertyChangeListener(new PropertyChangeListener() {
-            public void propertyChange(PropertyChangeEvent event) {
-                // Let the defaultCloseOperation handle the closing
-                // if the user closed the window without selecting a button
-                // (newValue = null in that case).  Otherwise, close the dialog.
-                if (dialog.isVisible() && event.getSource() == JOptionPane.this &&
-                  (event.getPropertyName().equals(VALUE_PROPERTY) ||
-                   event.getPropertyName().equals(INPUT_VALUE_PROPERTY)) &&
-                  event.getNewValue() != null &&
-                  event.getNewValue() != JOptionPane.UNINITIALIZED_VALUE) {
-                    dialog.setVisible(false);
-                }
-            }
-        });
+
+        addPropertyChangeListener(listener);
     }
 
 
--- a/src/share/classes/javax/swing/JViewport.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/JViewport.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1111,6 +1111,8 @@
                 view.setLocation(newX, newY);
                 repaintAll = false;
             }
+            // we must validate the hierarchy to not break the hw/lw mixing
+            revalidate();
             fireStateChanged();
         }
     }
--- a/src/share/classes/javax/swing/LookAndFeel.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/LookAndFeel.java	Wed Apr 20 04:38:36 2011 +0100
@@ -332,12 +332,13 @@
     {
         JTextComponent.KeyBinding[] rv = new JTextComponent.KeyBinding[keyBindingList.length / 2];
 
-        for(int i = 0; i < keyBindingList.length; i += 2) {
-            KeyStroke keystroke = (keyBindingList[i] instanceof KeyStroke)
-                ? (KeyStroke)keyBindingList[i]
-                : KeyStroke.getKeyStroke((String)keyBindingList[i]);
-            String action = (String)keyBindingList[i+1];
-            rv[i / 2] = new JTextComponent.KeyBinding(keystroke, action);
+        for(int i = 0; i < rv.length; i ++) {
+            Object o = keyBindingList[2 * i];
+            KeyStroke keystroke = (o instanceof KeyStroke)
+                ? (KeyStroke) o
+                : KeyStroke.getKeyStroke((String) o);
+            String action = (String) keyBindingList[2 * i + 1];
+            rv[i] = new JTextComponent.KeyBinding(keystroke, action);
         }
 
         return rv;
--- a/src/share/classes/javax/swing/RepaintManager.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/RepaintManager.java	Wed Apr 20 04:38:36 2011 +0100
@@ -438,7 +438,6 @@
      * @param y Y coordinate of the region to repaint
      * @param w Width of the region to repaint
      * @param h Height of the region to repaint
-     * @see JComponent#isPaintingOrigin()
      * @see JComponent#repaint
      */
     public void addDirtyRegion(JComponent c, int x, int y, int w, int h)
@@ -448,16 +447,6 @@
             delegate.addDirtyRegion(c, x, y, w, h);
             return;
         }
-        Container p = c;
-        while ((p = p.getParent()) instanceof JComponent) {
-            JComponent jp = (JComponent) p;
-            if (jp.isPaintingOrigin()) {
-                Rectangle rectangle = SwingUtilities.convertRectangle(
-                        c, new Rectangle(x, y, w, h), jp);
-                jp.repaint(0, rectangle.x, rectangle.y, rectangle.width, rectangle.height);
-                return;
-            }
-        }
         addDirtyRegion0(c, x, y, w, h);
     }
 
--- a/src/share/classes/javax/swing/SwingUtilities.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/SwingUtilities.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1529,6 +1529,17 @@
         return applet;
     }
 
+    static JComponent getPaintingOrigin(JComponent c) {
+        Container p = c;
+        while ((p = p.getParent()) instanceof JComponent) {
+            JComponent jp = (JComponent) p;
+            if (jp.isPaintingOrigin()) {
+                return jp;
+            }
+        }
+        return null;
+    }
+
     /**
      * Process the key bindings for the <code>Component</code> associated with
      * <code>event</code>. This method is only useful if
--- a/src/share/classes/javax/swing/plaf/LayerUI.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/plaf/LayerUI.java	Wed Apr 20 04:38:36 2011 +0100
@@ -703,21 +703,19 @@
     }
 
     /**
-     * Adds the specified region to the dirty region list if the component
-     * is showing.  The component will be repainted after all of the
-     * currently pending events have been dispatched.
+     * Paints the specified region in the {@code JLayer} this {@code LayerUI} is set to, immediately.
      * <p/>
      * This method is to be overridden when the dirty region needs to be changed.
+     * The default implementation delegates its functionality to {@link JComponent#paintImmediately(int, int, int, int)}.
      *
-     * @param tm  this parameter is not used
-     * @param x  the x value of the dirty region
-     * @param y  the y value of the dirty region
-     * @param width  the width of the dirty region
-     * @param height  the height of the dirty region
-     * @see java.awt.Component#isShowing
-     * @see RepaintManager#addDirtyRegion
+     * @param x  the x value of the region to be painted
+     * @param y  the y value of the region to be painted
+     * @param w  the width of the region to be painted
+     * @param h  the height of the region to be painted
+     *
+     * @see JComponent#paintImmediately(int, int, int, int)
      */
-    public void repaint(long tm, int x, int y, int width, int height, JLayer<? extends V> l) {
-        RepaintManager.currentManager(l).addDirtyRegion(l, x, y, width, height);
+    public void paintImmediately(int x, int y, int width, int height, JLayer<? extends V> l) {
+        l.paintImmediately(x, y, width, height);
     }
 }
--- a/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1964,18 +1964,18 @@
     }
 
     /** Returns the preferred size to properly display the tree,
-      * this is a cover method for getPreferredSize(c, false).
+      * this is a cover method for getPreferredSize(c, true).
       */
     public Dimension getPreferredSize(JComponent c) {
         return getPreferredSize(c, true);
     }
 
     /** Returns the preferred size to represent the tree in
-      * <I>c</I>.  If <I>checkConsistancy</I> is true
-      * <b>checkConsistancy</b> is messaged first.
+      * <I>c</I>.  If <I>checkConsistency</I> is true
+      * <b>checkConsistency</b> is messaged first.
       */
     public Dimension getPreferredSize(JComponent c,
-                                      boolean checkConsistancy) {
+                                      boolean checkConsistency) {
         Dimension       pSize = this.getPreferredMinSize();
 
         if(!validCachedPreferredSize)
--- a/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Wed Apr 20 04:38:36 2011 +0100
@@ -510,7 +510,6 @@
         Font holdf = g.getFont();
         Color holdc = g.getColor();
 
-        paintBackground(g, lh);
         paintCheckIcon(g, lh, lr);
         paintIcon(g, lh, lr);
         paintText(g, lh, lr);
--- a/src/share/classes/javax/swing/text/Utilities.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/text/Utilities.java	Wed Apr 20 04:38:36 2011 +0100
@@ -390,11 +390,15 @@
             }
             if ((x >= currX) && (x < nextX)) {
                 // found the hit position... return the appropriate side
-                if ((round == false) || ((x - currX) < (nextX - x))) {
-                    return i - txtOffset;
-                } else {
-                    return i + 1 - txtOffset;
+                int offset = ((round == false) || ((x - currX) < (nextX - x))) ?
+                        (i - txtOffset) : (i + 1 - txtOffset);
+                // the length of the string measured as a whole may differ from
+                // the sum of individual character lengths, for example if
+                // fractional metrics are enabled; and we must guard from this.
+                while (metrics.charsWidth(txt, txtOffset, offset + 1) > (x - x0)) {
+                    offset--;
                 }
+                return (offset < 0 ? 0 : offset);
             }
             currX = nextX;
         }
@@ -404,24 +408,6 @@
     }
 
     /**
-     * Adjust text offset so that the length of a resulting string as a whole
-     * fits into the specified width.
-     */
-    static int adjustOffsetForFractionalMetrics(
-            Segment s, FontMetrics fm, int offset, int width) {
-        // Sometimes the offset returned by getTabbedTextOffset is beyond the
-        // available area, when fractional metrics are enabled. We should
-        // guard against this.
-        if (offset < s.count) {
-            while (offset > 0 &&
-                    fm.charsWidth(s.array, s.offset, offset + 1) > width) {
-                offset--;
-            }
-        }
-        return offset;
-    }
-
-    /**
      * Determine where to break the given text to fit
      * within the given span. This tries to find a word boundary.
      * @param s  the source of the text
@@ -443,7 +429,6 @@
         int txtCount = s.count;
         int index = Utilities.getTabbedTextOffset(s, metrics, x0, x,
                                                   e, startOffset, false);
-        index = adjustOffsetForFractionalMetrics(s, metrics, index, x - x0);
 
         if (index >= txtCount - 1) {
             return txtCount;
--- a/src/share/classes/javax/swing/text/WrappedPlainView.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/text/WrappedPlainView.java	Wed Apr 20 04:38:36 2011 +0100
@@ -239,11 +239,9 @@
                                                 tabBase, tabBase + currentWidth,
                                                 this, p0);
         } else {
-            int offset = Utilities.getTabbedTextOffset(segment, metrics,
-                    tabBase, tabBase + currentWidth, this, p0, false);
-            offset = Utilities.adjustOffsetForFractionalMetrics(
-                    segment, metrics, offset, currentWidth);
-            p = p0 + offset;
+            p = p0 + Utilities.getTabbedTextOffset(segment, metrics,
+                                                   tabBase, tabBase + currentWidth,
+                                                   this, p0, false);
         }
         SegmentCache.releaseSharedSegment(segment);
         return p;
--- a/src/share/classes/javax/swing/text/html/CSSBorder.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/javax/swing/text/html/CSSBorder.java	Wed Apr 20 04:38:36 2011 +0100
@@ -203,10 +203,11 @@
 
     public void paintBorder(Component c, Graphics g,
                                         int x, int y, int width, int height) {
-        assert (g instanceof Graphics2D) : "need Graphics2D instanse";
-        Graphics2D g2 = (Graphics2D) g;
-        Color savedColor = g2.getColor();
-        Shape savedClip = g2.getClip();
+        if (!(g instanceof Graphics2D)) {
+            return;
+        }
+
+        Graphics2D g2 = (Graphics2D) g.create();
 
         int[] widths = getWidths();
 
@@ -238,16 +239,16 @@
                 BorderPainter painter = getBorderPainter(i);
 
                 double angle = i * Math.PI / 2;
+                g2.setClip(g.getClip()); // Restore initial clip
                 g2.translate(intCorners[i][0], intCorners[i][1]);
                 g2.rotate(angle);
-                g2.setClip(shape);
-                painter.paint(shape, g, color, i);
+                g2.clip(shape);
+                painter.paint(shape, g2, color, i);
                 g2.rotate(-angle);
                 g2.translate(-intCorners[i][0], -intCorners[i][1]);
             }
         }
-        g2.setColor(savedColor);
-        g2.setClip(savedClip);
+        g2.dispose();
     }
 
 
--- a/src/share/classes/org/relaxng/datatype/Datatype.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * Datatype object.
- *
- * This object has the following functionality:
- *
- * <ol>
- *  <li> functionality to identify a class of character sequences. This is
- *       done through the isValid method.
- *
- *  <li> functionality to produce a "value object" from a character sequence and
- *               context information.
- *
- *  <li> functionality to test the equality of two value objects.
- * </ol>
- *
- * This interface also defines the createStreamingValidator method,
- * which is intended to efficiently support the validation of
- * large character sequences.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface Datatype {
-
-        /**
-         * Checks if the specified 'literal' matches this Datatype
-         * with respect to the current context.
-         *
-         * @param literal
-         *              the lexical representation to be checked.
-         * @param context
-         *              If this datatype is context-dependent
-         *              (i.e. the {@link #isContextDependent} method returns true),
-         *              then the caller must provide a non-null valid context object.
-         *              Otherwise, the caller can pass null.
-         *
-         * @return
-         *              true if the 'literal' is a member of this Datatype;
-         *              false if it's not a member of this Datatype.
-         */
-        boolean isValid( String literal, ValidationContext context );
-
-        /**
-         * Similar to the isValid method but throws an exception with diagnosis
-         * in case of errors.
-         *
-         * <p>
-         * If the specified 'literal' is a valid lexical representation for this
-         * datatype, then this method must return without throwing any exception.
-         * If not, the callee must throw an exception (with diagnosis message,
-         * if possible.)
-         *
-         * <p>
-         * The application can use this method to provide detailed error message
-         * to users. This method is kept separate from the isValid method to
-         * achieve higher performance during normal validation.
-         *
-         * @exception DatatypeException
-         *              If the given literal is invalid, then this exception is thrown.
-         *              If the callee supports error diagnosis, then the exception should
-         *              contain a diagnosis message.
-         */
-        void checkValid( String literal, ValidationContext context )
-                throws DatatypeException;
-
-        /**
-         * Creates an instance of a streaming validator for this type.
-         *
-         * <p>
-         * By using streaming validators instead of the isValid method,
-         * the caller can avoid keeping the entire string, which is
-         * sometimes quite big, in memory.
-         *
-         * @param context
-         *              If this datatype is context-dependent
-         *              (i.e. the {@link #isContextDependent} method returns true),
-         *              then the caller must provide a non-null valid context object.
-         *              Otherwise, the caller can pass null.
-         *              The callee may keep a reference to this context object
-         *              only while the returned streaming validator is being used.
-         */
-        DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
-
-        /**
-         * Converts lexcial value and the current context to the corresponding
-         * value object.
-         *
-         * <p>
-         * The caller cannot generally assume that the value object is
-         * a meaningful Java object. For example, the caller cannot expect
-         * this method to return <code>java.lang.Number</code> type for
-         * the "integer" type of XML Schema Part 2.
-         *
-         * <p>
-         * Also, the caller cannot assume that the equals method and
-         * the hashCode method of the value object are consistent with
-         * the semantics of the datatype. For that purpose, the sameValue
-         * method and the valueHashCode method have to be used. Note that
-         * this means you cannot use classes like
-         * <code>java.util.Hashtable</code> to store the value objects.
-         *
-         * <p>
-         * The returned value object should be used solely for the sameValue
-         * and valueHashCode methods.
-         *
-         * @param context
-         *              If this datatype is context-dependent
-         *              (when the {@link #isContextDependent} method returns true),
-         *              then the caller must provide a non-null valid context object.
-         *              Otherwise, the caller can pass null.
-         *
-         * @return      null
-         *              when the given lexical value is not a valid lexical
-         *              value for this type.
-         */
-        Object createValue( String literal, ValidationContext context );
-
-        /**
-         * Tests the equality of two value objects which were originally
-         * created by the createValue method of this object.
-         *
-         * The behavior is undefined if objects not created by this type
-         * are passed. It is the caller's responsibility to ensure that
-         * value objects belong to this type.
-         *
-         * @return
-         *              true if two value objects are considered equal according to
-         *              the definition of this datatype; false if otherwise.
-         */
-        boolean sameValue( Object value1, Object value2 );
-
-
-        /**
-         * Computes the hash code for a value object,
-         * which is consistent with the sameValue method.
-         *
-         * @return
-         *              hash code for the specified value object.
-         */
-        int valueHashCode( Object value );
-
-
-
-
-        /**
-         * Indicates that the datatype doesn't have ID/IDREF semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_NULL = 0;
-
-        /**
-         * Indicates that RELAX NG compatibility processors should
-         * treat this datatype as having ID semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_ID = 1;
-
-        /**
-         * Indicates that RELAX NG compatibility processors should
-         * treat this datatype as having IDREF semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_IDREF = 2;
-
-        /**
-         * Indicates that RELAX NG compatibility processors should
-         * treat this datatype as having IDREFS semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_IDREFS = 3;
-
-        /**
-         * Checks if the ID/IDREF semantics is associated with this
-         * datatype.
-         *
-         * <p>
-         * This method is introduced to support the RELAX NG DTD
-         * compatibility spec. (Of course it's always free to use
-         * this method for other purposes.)
-         *
-         * <p>
-         * If you are implementing a datatype library and have no idea about
-         * the "RELAX NG DTD compatibility" thing, just return
-         * <code>ID_TYPE_NULL</code> is fine.
-         *
-         * @return
-         *              If this datatype doesn't have any ID/IDREF semantics,
-         *              it returns {@link #ID_TYPE_NULL}. If it has such a semantics
-         *              (for example, XSD:ID, XSD:IDREF and comp:ID type), then
-         *              it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
-         *              {@link #ID_TYPE_IDREFS}.
-         */
-        public int getIdType();
-
-
-        /**
-         * Checks if this datatype may need a context object for
-         * the validation.
-         *
-         * <p>
-         * The callee must return true even when the context
-         * is not always necessary. (For example, the "QName" type
-         * doesn't need a context object when validating unprefixed
-         * string. But nonetheless QName must return true.)
-         *
-         * <p>
-         * XSD's <code>string</code> and <code>short</code> types
-         * are examples of context-independent datatypes.
-         * Its <code>QName</code> and <code>ENTITY</code> types
-         * are examples of context-dependent datatypes.
-         *
-         * <p>
-         * When a datatype is context-independent, then
-         * the {@link #isValid} method, the {@link #checkValid} method,
-         * the {@link #createStreamingValidator} method and
-         * the {@link #createValue} method can be called without
-         * providing a context object.
-         *
-         * @return
-         *              <b>true</b> if this datatype is context-dependent
-         *              (it needs a context object sometimes);
-         *
-         *              <b>false</b> if this datatype is context-<b>in</b>dependent
-         *              (it never needs a context object).
-         */
-        public boolean isContextDependent();
-}
--- a/src/share/classes/org/relaxng/datatype/DatatypeBuilder.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * Creates a user-defined type by adding parameters to
- * the pre-defined type.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeBuilder {
-
-        /**
-         * Adds a new parameter.
-         *
-         * @param name
-         *              The name of the parameter to be added.
-         * @param strValue
-         *              The raw value of the parameter. Caller may not normalize
-         *              this value because any white space is potentially significant.
-         * @param context
-         *              The context information which can be used by the callee to
-         *              acquire additional information. This context object is
-         *              valid only during this method call. The callee may not
-         *              keep a reference to this object.
-         * @exception   DatatypeException
-         *              When the given parameter is inappropriate for some reason.
-         *              The callee is responsible to recover from this error.
-         *              That is, the object should behave as if no such error
-         *              was occured.
-         */
-        void addParameter( String name, String strValue, ValidationContext context )
-                throws DatatypeException;
-
-        /**
-         * Derives a new Datatype from a Datatype by parameters that
-         * were already set through the addParameter method.
-         *
-         * @exception DatatypeException
-         *              DatatypeException must be thrown if the derivation is
-         *              somehow invalid. For example, a required parameter is missing,
-         *              etc. The exception should contain a diagnosis message
-         *              if possible.
-         */
-        Datatype createDatatype() throws DatatypeException;
-}
--- a/src/share/classes/org/relaxng/datatype/DatatypeException.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * Signals Datatype related exceptions.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class DatatypeException extends Exception {
-
-        public DatatypeException( int index, String msg ) {
-                super(msg);
-                this.index = index;
-        }
-        public DatatypeException( String msg ) {
-                this(UNKNOWN,msg);
-        }
-        /**
-         * A constructor for those datatype libraries which don't support any
-         * diagnostic information at all.
-         */
-        public DatatypeException() {
-                this(UNKNOWN,null);
-        }
-
-
-        private final int index;
-
-        public static final int UNKNOWN = -1;
-
-        /**
-         * Gets the index of the content where the error occured.
-         * UNKNOWN can be returned to indicate that no index information
-         * is available.
-         */
-        public int getIndex() {
-                return index;
-        }
-}
--- a/src/share/classes/org/relaxng/datatype/DatatypeLibrary.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * A Datatype library
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibrary {
-
-        /**
-         * Creates a new instance of DatatypeBuilder.
-         *
-         * The callee should throw a DatatypeException in case of an error.
-         *
-         * @param baseTypeLocalName
-         *              The local name of the base type.
-         *
-         * @return
-         *              A non-null valid datatype object.
-         */
-        DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
-                throws DatatypeException;
-
-        /**
-         * Gets or creates a pre-defined type.
-         *
-         * This is just a short-cut of
-         * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
-         *
-         * The callee should throw a DatatypeException in case of an error.
-         *
-         * @return
-         *              A non-null valid datatype object.
-         */
-        Datatype createDatatype( String typeLocalName ) throws DatatypeException;
-}
--- a/src/share/classes/org/relaxng/datatype/DatatypeLibraryFactory.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * Factory class for the DatatypeLibrary class.
- *
- * <p>
- * The datatype library should provide the implementation of
- * this interface if it wants to be found by the schema processors.
- * The implementor also have to place a file in your jar file.
- * See the reference datatype library implementation for detail.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibraryFactory
-{
-        /**
-         * Creates a new instance of a DatatypeLibrary that supports
-         * the specified namespace URI.
-         *
-         * @return
-         *              <code>null</code> if the specified namespace URI is not
-         *              supported.
-         */
-        DatatypeLibrary createDatatypeLibrary( String namespaceURI );
-}
--- a/src/share/classes/org/relaxng/datatype/DatatypeStreamingValidator.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * Datatype streaming validator.
- *
- * <p>
- * The streaming validator is an optional feature that is useful for
- * certain Datatypes. It allows the caller to incrementally provide
- * the literal.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeStreamingValidator {
-
-        /**
-         * Passes an additional fragment of the literal.
-         *
-         * <p>
-         * The application can call this method several times, then call
-         * the isValid method (or the checkValid method) to check the validity
-         * of the accumulated characters.
-         */
-        void addCharacters( char[] buf, int start, int len );
-
-        /**
-         * Tells if the accumulated literal is valid with respect to
-         * the underlying Datatype.
-         *
-         * @return
-         *              True if it is valid. False if otherwise.
-         */
-        boolean isValid();
-
-        /**
-         * Similar to the isValid method, but this method throws
-         * Exception (with possibly diagnostic information), instead of
-         * returning false.
-         *
-         * @exception DatatypeException
-         *              If the callee supports the diagnosis and the accumulated
-         *              literal is invalid, then this exception that possibly
-         *              contains diagnosis information is thrown.
-         */
-        void checkValid() throws DatatypeException;
-}
--- a/src/share/classes/org/relaxng/datatype/ValidationContext.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype;
-
-/**
- * An interface that must be implemented by caller to
- * provide context information that is necessary to
- * perform validation of some Datatypes.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface ValidationContext {
-
-        /**
-         * Resolves a namespace prefix to the corresponding namespace URI.
-         *
-         * This method is used for validating the QName type, for example.
-         *
-         * <p>
-         * If the prefix is "" (empty string), it indicates
-         * an unprefixed value. The callee
-         * should resolve it as for an unprefixed
-         * element, rather than for an unprefixed attribute.
-         *
-         * <p>
-         * If the prefix is "xml", then the callee must resolve
-         * this prefix into "http://www.w3.org/XML/1998/namespace",
-         * as defined in the XML Namespaces Recommendation.
-         *
-         * @return
-         *              namespace URI of this prefix.
-         *              If the specified prefix is not declared,
-         *              the implementation must return null.
-         */
-        String resolveNamespacePrefix( String prefix );
-
-        /**
-         * Returns the base URI of the context.  The null string may be returned
-         * if no base URI is known.
-         */
-        String getBaseUri();
-
-        /**
-         * Checks if an unparsed entity is declared with the
-         * specified name.
-         *
-         * @return
-         *  true
-         *              if the DTD has an unparsed entity declaration for
-         *              the specified name.
-         *  false
-         *              otherwise.
-         */
-        boolean isUnparsedEntity( String entityName );
-
-        /**
-         * Checks if a notation is declared with the
-         * specified name.
-         *
-         * @return
-         *  true
-         *              if the DTD has a notation declaration for the specified name.
-         *  false
-         *              otherwise.
-         */
-        boolean isNotation( String notationName );
-}
--- a/src/share/classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Vector;
-import java.io.Reader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-
-/**
- * Discovers the datatype library implementation from the classpath.
- *
- * <p>
- * The call of the createDatatypeLibrary method finds an implementation
- * from a given datatype library URI at run-time.
- */
-public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
-  private final Service service = new Service(DatatypeLibraryFactory.class);
-
-  public DatatypeLibrary createDatatypeLibrary(String uri) {
-    for (Enumeration e = service.getProviders();
-         e.hasMoreElements();) {
-      DatatypeLibraryFactory factory
-        = (DatatypeLibraryFactory)e.nextElement();
-      DatatypeLibrary library = factory.createDatatypeLibrary(uri);
-      if (library != null)
-        return library;
-    }
-    return null;
-  }
-
-        private static class Service {
-          private final Class serviceClass;
-          private final Enumeration configFiles;
-          private Enumeration classNames = null;
-          private final Vector providers = new Vector();
-          private Loader loader;
-
-          private class ProviderEnumeration implements Enumeration {
-            private int nextIndex = 0;
-
-            public boolean hasMoreElements() {
-              return nextIndex < providers.size() || moreProviders();
-            }
-
-            public Object nextElement() {
-              try {
-                return providers.elementAt(nextIndex++);
-              }
-              catch (ArrayIndexOutOfBoundsException e) {
-                throw new NoSuchElementException();
-              }
-            }
-          }
-
-          private static class Singleton implements Enumeration {
-            private Object obj;
-            private Singleton(Object obj) {
-              this.obj = obj;
-            }
-
-            public boolean hasMoreElements() {
-              return obj != null;
-            }
-
-            public Object nextElement() {
-              if (obj == null)
-                throw new NoSuchElementException();
-              Object tem = obj;
-              obj = null;
-              return tem;
-            }
-          }
-
-          // JDK 1.1
-          private static class Loader {
-            Enumeration getResources(String resName) {
-              ClassLoader cl = Loader.class.getClassLoader();
-              URL url;
-              if (cl == null)
-                url = ClassLoader.getSystemResource(resName);
-              else
-                url = cl.getResource(resName);
-              return new Singleton(url);
-            }
-
-            Class loadClass(String name) throws ClassNotFoundException {
-              return Class.forName(name);
-            }
-          }
-
-          // JDK 1.2+
-          private static class Loader2 extends Loader {
-            private ClassLoader cl;
-
-            Loader2() {
-              cl = Loader2.class.getClassLoader();
-              // If the thread context class loader has the class loader
-              // of this class as an ancestor, use the thread context class
-              // loader.  Otherwise, the thread context class loader
-              // probably hasn't been set up properly, so don't use it.
-              ClassLoader clt = Thread.currentThread().getContextClassLoader();
-              for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
-                if (tem == cl) {
-                  cl = clt;
-                  break;
-                }
-            }
-
-            Enumeration getResources(String resName) {
-              try {
-                    return cl.getResources(resName);
-
-              }
-              catch (IOException e) {
-                return new Singleton(null);
-              }
-            }
-
-            Class loadClass(String name) throws ClassNotFoundException {
-              return Class.forName(name, true, cl);
-            }
-          }
-
-          public Service(Class cls) {
-            try {
-              loader = new Loader2();
-            }
-            catch (NoSuchMethodError e) {
-              loader = new Loader();
-            }
-            serviceClass = cls;
-            String resName = "META-INF/services/" + serviceClass.getName();
-            configFiles = loader.getResources(resName);
-          }
-
-          public Enumeration getProviders() {
-            return new ProviderEnumeration();
-          }
-
-          synchronized private boolean moreProviders() {
-            for (;;) {
-              while (classNames == null) {
-                if (!configFiles.hasMoreElements())
-                  return false;
-                classNames = parseConfigFile((URL)configFiles.nextElement());
-              }
-              while (classNames.hasMoreElements()) {
-                String className = (String)classNames.nextElement();
-                try {
-                  Class cls = loader.loadClass(className);
-                  Object obj = cls.newInstance();
-                  if (serviceClass.isInstance(obj)) {
-                    providers.addElement(obj);
-                    return true;
-                  }
-                }
-                catch (ClassNotFoundException e) { }
-                catch (InstantiationException e) { }
-                catch (IllegalAccessException e) { }
-                catch (LinkageError e) { }
-              }
-              classNames = null;
-            }
-          }
-
-          private static final int START = 0;
-          private static final int IN_NAME = 1;
-          private static final int IN_COMMENT = 2;
-
-          private static Enumeration parseConfigFile(URL url) {
-            try {
-              InputStream in = url.openStream();
-              Reader r;
-              try {
-                r = new InputStreamReader(in, "UTF-8");
-              }
-              catch (UnsupportedEncodingException e) {
-                r = new InputStreamReader(in, "UTF8");
-              }
-              r = new BufferedReader(r);
-              Vector tokens = new Vector();
-              StringBuffer tokenBuf = new StringBuffer();
-              int state = START;
-              for (;;) {
-                int n = r.read();
-                if (n < 0)
-                  break;
-                char c = (char)n;
-                switch (c) {
-                case '\r':
-                case '\n':
-                  state = START;
-                  break;
-                case ' ':
-                case '\t':
-                  break;
-                case '#':
-                  state = IN_COMMENT;
-                  break;
-                default:
-                  if (state != IN_COMMENT) {
-                    state = IN_NAME;
-                    tokenBuf.append(c);
-                  }
-                  break;
-                }
-                if (tokenBuf.length() != 0 && state != IN_NAME) {
-                  tokens.addElement(tokenBuf.toString());
-                  tokenBuf.setLength(0);
-                }
-              }
-              if (tokenBuf.length() != 0)
-                tokens.addElement(tokenBuf.toString());
-              return tokens.elements();
-            }
-            catch (IOException e) {
-              return null;
-            }
-          }
-        }
-
-}
--- a/src/share/classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeBuilder}.
- *
- * This implementation can be used for Datatypes which have no parameters.
- * Any attempt to add parameters will be rejected.
- *
- * <p>
- * Typical usage would be:
- * <PRE><XMP>
- * class MyDatatypeLibrary implements DatatypeLibrary {
- *     ....
- *     DatatypeBuilder createDatatypeBuilder( String typeName ) {
- *         return new ParameterleessDatatypeBuilder(createDatatype(typeName));
- *     }
- *     ....
- * }
- * </XMP></PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
-
-        /** This type object is returned for the derive method. */
-        private final Datatype baseType;
-
-        public ParameterlessDatatypeBuilder( Datatype baseType ) {
-                this.baseType = baseType;
-        }
-
-        public void addParameter( String name, String strValue, ValidationContext context )
-                        throws DatatypeException {
-                throw new DatatypeException();
-        }
-
-        public Datatype createDatatype() throws DatatypeException {
-                return baseType;
-        }
-}
--- a/src/share/classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2005, 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 org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeStreamingValidator}.
- *
- * <p>
- * This implementation can be used as a quick hack when the performance
- * of streaming validation is not important. And this implementation
- * also shows you how to implement the DatatypeStreamingValidator interface.
- *
- * <p>
- * Typical usage would be:
- * <PRE><XMP>
- * class MyDatatype implements Datatype {
- *     ....
- *     public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
- *         return new StreamingValidatorImpl(this,context);
- *     }
- *     ....
- * }
- * </XMP></PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
-
-        /** This buffer accumulates characters. */
-        private final StringBuffer buffer = new StringBuffer();
-
-        /** Datatype obejct that creates this streaming validator. */
-        private final Datatype baseType;
-
-        /** The current context. */
-        private final ValidationContext context;
-
-        public void addCharacters( char[] buf, int start, int len ) {
-                // append characters to the current buffer.
-                buffer.append(buf,start,len);
-        }
-
-        public boolean isValid() {
-                return baseType.isValid(buffer.toString(),context);
-        }
-
-        public void checkValid() throws DatatypeException {
-                baseType.checkValid(buffer.toString(),context);
-        }
-
-        public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
-                this.baseType = baseType;
-                this.context = context;
-        }
-}
--- a/src/share/classes/overview-core.html	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/overview-core.html	Wed Apr 20 04:38:36 2011 +0100
@@ -33,7 +33,7 @@
 
 <body>
 
-This document is the API specification for version&nbsp;6 of the Java&#x2122;
+This document is the API specification for the Java&#x2122;
 Platform, Standard Edition.
 
 </body>
--- a/src/share/classes/sun/applet/resources/MsgAppletViewer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/applet/resources/MsgAppletViewer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -103,7 +103,6 @@
             {"appletclassloader.fileexception", "{0} exception when loading: {1}"},
             {"appletclassloader.filedeath", "{0} killed when loading: {1}"},
             {"appletclassloader.fileerror", "{0} error when loading: {1}"},
-            {"appletclassloader.findclass.verbose.findclass", "{0} find class {1}"},
             {"appletclassloader.findclass.verbose.openstream", "Opening stream to: {0} to get {1}"},
             {"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource for name: {0}"},
             {"appletclassloader.getresource.verbose.found", "Found resource: {0} as a system resource"},
--- a/src/share/classes/sun/awt/image/ImageFetcher.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/awt/image/ImageFetcher.java	Wed Apr 20 04:38:36 2011 +0100
@@ -61,8 +61,10 @@
     /**
       * Adds an ImageFetchable to the queue of items to fetch.  Instantiates
       * a new ImageFetcher if it's reasonable to do so.
+      * If there is no available fetcher to process an ImageFetchable, then
+      * reports failure to caller.
       */
-    public static void add(ImageFetchable src) {
+    public static boolean add(ImageFetchable src) {
         final FetcherInfo info = FetcherInfo.getFetcherInfo();
         synchronized(info.waitList) {
             if (!info.waitList.contains(src)) {
@@ -71,9 +73,23 @@
                             info.numFetchers < info.fetchers.length) {
                     createFetchers(info);
                 }
-                info.waitList.notify();
+                /* Creation of new fetcher may fail due to high vm load
+                 * or some other reason.
+                 * If there is already exist, but busy, fetcher, we leave
+                 * the src in queue (it will be handled by existing
+                 * fetcher later).
+                 * Otherwise, we report failure: there is no fetcher
+                 * to handle the src.
+                 */
+                if (info.numFetchers > 0) {
+                    info.waitList.notify();
+                } else {
+                    info.waitList.removeElement(src);
+                    return false;
+                }
             }
         }
+        return true;
     }
 
     /**
@@ -291,11 +307,15 @@
          public Object run() {
              for (int i = 0; i < info.fetchers.length; i++) {
                if (info.fetchers[i] == null) {
-                   info.fetchers[i] = new ImageFetcher(
+                   ImageFetcher f = new ImageFetcher(
                            fetcherGroup, i);
-                   info.fetchers[i].start();
-                   info.numFetchers++;
-                   break;
+                   try {
+                       f.start();
+                       info.fetchers[i] = f;
+                       info.numFetchers++;
+                       break;
+                   } catch (Error e) {
+                   }
                }
              }
           return null;
--- a/src/share/classes/sun/awt/image/InputStreamImageSource.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/awt/image/InputStreamImageSource.java	Wed Apr 20 04:38:36 2011 +0100
@@ -164,8 +164,13 @@
 
     private synchronized void startProduction() {
         if (!awaitingFetch) {
-            ImageFetcher.add(this);
-            awaitingFetch = true;
+            if (ImageFetcher.add(this)) {
+                awaitingFetch = true;
+            } else {
+                ImageConsumerQueue cq = consumers;
+                consumers = null;
+                errorAllConsumers(cq, false);
+            }
         }
     }
 
--- a/src/share/classes/sun/dyn/Access.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn;
-
-import sun.reflect.Reflection;
-
-/**
- * Access control to this package.
- * Classes in other packages can attempt to acquire the access token,
- * but will fail if they are not recognized as friends.
- * Certain methods in this package, although public, require a non-null
- * access token in order to proceed; they act like package-private methods.
- * @author jrose
- */
-
-public class Access {
-
-    private Access() { }
-
-    /**
-     * The heart of this pattern:  The list of classes which are
-     * permitted to acquire the access token, and become honorary
-     * members of this package.
-     */
-    private static final String[] FRIENDS = {
-        "java.dyn.", "sun.dyn."
-    };
-
-    /**
-     * The following object is NOT public.  That's the point of the pattern.
-     * It is package-private, so that any member of this package
-     * can acquire the access token, and give it away to trusted friends.
-     */
-    static final Access TOKEN = new Access();
-
-    /**
-     * @return Access.TOKEN, if the caller is a friend of this package
-     */
-    public static Access getToken() {
-        Class<?> callc = Reflection.getCallerClass(2);
-        if (isFriend(callc))
-            return TOKEN;
-        else
-            throw new IllegalAccessError("bad caller: " + callc);
-    }
-
-    /** Is the given name the name of a class which could be our friend? */
-    public static boolean isFriendName(String name) {
-        for (String friend : FRIENDS) {
-            if (name.startsWith(friend))
-                return true;
-        }
-        return false;
-    }
-
-    /** Is the given class a friend?  True if {@link #isFriendName},
-     *  and the given class also shares a class loader with us.
-     */
-    public static boolean isFriend(Class<?> c) {
-        return isFriendName(c.getName()) && c.getClassLoader() == CLASS_LOADER;
-    }
-
-    private static final ClassLoader CLASS_LOADER = Access.class.getClassLoader();
-
-    /**
-     * Throw an IllegalAccessError if the caller does not possess
-     * the Access.TOKEN.
-     * @param must be Access.TOKEN
-     */
-    public static void check(Access token) {
-        if (token == null)
-            fail();
-        // else it must be the unique Access.TOKEN
-        assert(token == Access.TOKEN);
-    }
-    private static void fail() {
-        final int CALLER_DEPTH = 3;
-        // 0: Reflection.getCC, 1: this.fail, 2: Access.*, 3: caller
-        Class<?> callc = Reflection.getCallerClass(CALLER_DEPTH);
-        throw new IllegalAccessError("bad caller: " + callc);
-    }
-
-    static {
-        //sun.reflect.Reflection.registerMethodsToFilter(MH.class, "getToken");
-    }
-}
--- a/src/share/classes/sun/dyn/AdapterMethodHandle.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,951 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import sun.dyn.util.VerifyType;
-import sun.dyn.util.Wrapper;
-import java.dyn.*;
-import java.util.Arrays;
-import static sun.dyn.MethodHandleNatives.Constants.*;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * This method handle performs simple conversion or checking of a single argument.
- * @author jrose
- */
-public class AdapterMethodHandle extends BoundMethodHandle {
-
-    //MethodHandle vmtarget;   // next AMH or BMH in chain or final DMH
-    //Object       argument;   // parameter to the conversion if needed
-    //int          vmargslot;  // which argument slot is affected
-    private final int conversion;  // the type of conversion: RETYPE_ONLY, etc.
-
-    // Constructors in this class *must* be package scoped or private.
-    private AdapterMethodHandle(MethodHandle target, MethodType newType,
-                long conv, Object convArg) {
-        super(newType, convArg, newType.parameterSlotDepth(1+convArgPos(conv)));
-        this.conversion = convCode(conv);
-        if (MethodHandleNatives.JVM_SUPPORT) {
-            // JVM might update VM-specific bits of conversion (ignore)
-            MethodHandleNatives.init(this, target, convArgPos(conv));
-        }
-    }
-    private AdapterMethodHandle(MethodHandle target, MethodType newType,
-                long conv) {
-        this(target, newType, conv, null);
-    }
-
-    private static final Access IMPL_TOKEN = Access.getToken();
-
-    // TO DO:  When adapting another MH with a null conversion, clone
-    // the target and change its type, instead of adding another layer.
-
-    /** Can a JVM-level adapter directly implement the proposed
-     *  argument conversions, as if by MethodHandles.convertArguments?
-     */
-    public static boolean canPairwiseConvert(MethodType newType, MethodType oldType) {
-        // same number of args, of course
-        int len = newType.parameterCount();
-        if (len != oldType.parameterCount())
-            return false;
-
-        // Check return type.  (Not much can be done with it.)
-        Class<?> exp = newType.returnType();
-        Class<?> ret = oldType.returnType();
-        if (!VerifyType.isNullConversion(ret, exp))
-            return false;
-
-        // Check args pairwise.
-        for (int i = 0; i < len; i++) {
-            Class<?> src = newType.parameterType(i); // source type
-            Class<?> dst = oldType.parameterType(i); // destination type
-            if (!canConvertArgument(src, dst))
-                return false;
-        }
-
-        return true;
-    }
-
-    /** Can a JVM-level adapter directly implement the proposed
-     *  argument conversion, as if by MethodHandles.convertArguments?
-     */
-    public static boolean canConvertArgument(Class<?> src, Class<?> dst) {
-        // ? Retool this logic to use RETYPE_ONLY, CHECK_CAST, etc., as opcodes,
-        // so we don't need to repeat so much decision making.
-        if (VerifyType.isNullConversion(src, dst)) {
-            return true;
-        } else if (src.isPrimitive()) {
-            if (dst.isPrimitive())
-                return canPrimCast(src, dst);
-            else
-                return canBoxArgument(src, dst);
-        } else {
-            if (dst.isPrimitive())
-                return canUnboxArgument(src, dst);
-            else
-                return true;  // any two refs can be interconverted
-        }
-    }
-
-    /**
-     * Create a JVM-level adapter method handle to conform the given method
-     * handle to the similar newType, using only pairwise argument conversions.
-     * For each argument, convert incoming argument to the exact type needed.
-     * Only null conversions are allowed on the return value (until
-     * the JVM supports ricochet adapters).
-     * The argument conversions allowed are casting, unboxing,
-     * integral widening or narrowing, and floating point widening or narrowing.
-     * @param token access check
-     * @param newType required call type
-     * @param target original method handle
-     * @return an adapter to the original handle with the desired new type,
-     *          or the original target if the types are already identical
-     *          or null if the adaptation cannot be made
-     */
-    public static MethodHandle makePairwiseConvert(Access token,
-                MethodType newType, MethodHandle target) {
-        Access.check(token);
-        MethodType oldType = target.type();
-        if (newType == oldType)  return target;
-
-        if (!canPairwiseConvert(newType, oldType))
-            return null;
-        // (after this point, it is an assertion error to fail to convert)
-
-        // Find last non-trivial conversion (if any).
-        int lastConv = newType.parameterCount()-1;
-        while (lastConv >= 0) {
-            Class<?> src = newType.parameterType(lastConv); // source type
-            Class<?> dst = oldType.parameterType(lastConv); // destination type
-            if (VerifyType.isNullConversion(src, dst)) {
-                --lastConv;
-            } else {
-                break;
-            }
-        }
-        // Now build a chain of one or more adapters.
-        MethodHandle adapter = target;
-        MethodType midType = oldType.changeReturnType(newType.returnType());
-        for (int i = 0; i <= lastConv; i++) {
-            Class<?> src = newType.parameterType(i); // source type
-            Class<?> dst = midType.parameterType(i); // destination type
-            if (VerifyType.isNullConversion(src, dst)) {
-                // do nothing: difference is trivial
-                continue;
-            }
-            // Work the current type backward toward the desired caller type:
-            if (i != lastConv) {
-                midType = midType.changeParameterType(i, src);
-            } else {
-                // When doing the last (or only) real conversion,
-                // force all remaining null conversions to happen also.
-                assert(VerifyType.isNullConversion(newType, midType.changeParameterType(i, src)));
-                midType = newType;
-            }
-
-            // Tricky case analysis follows.
-            // It parallels canConvertArgument() above.
-            if (src.isPrimitive()) {
-                if (dst.isPrimitive()) {
-                    adapter = makePrimCast(token, midType, adapter, i, dst);
-                } else {
-                    adapter = makeBoxArgument(token, midType, adapter, i, dst);
-                }
-            } else {
-                if (dst.isPrimitive()) {
-                    // Caller has boxed a primitive.  Unbox it for the target.
-                    // The box type must correspond exactly to the primitive type.
-                    // This is simpler than the powerful set of widening
-                    // conversions supported by reflect.Method.invoke.
-                    // Those conversions require a big nest of if/then/else logic,
-                    // which we prefer to make a user responsibility.
-                    adapter = makeUnboxArgument(token, midType, adapter, i, dst);
-                } else {
-                    // Simple reference conversion.
-                    // Note:  Do not check for a class hierarchy relation
-                    // between src and dst.  In all cases a 'null' argument
-                    // will pass the cast conversion.
-                    adapter = makeCheckCast(token, midType, adapter, i, dst);
-                }
-            }
-            assert(adapter != null);
-            assert(adapter.type() == midType);
-        }
-        if (adapter.type() != newType) {
-            // Only trivial conversions remain.
-            adapter = makeRetypeOnly(IMPL_TOKEN, newType, adapter);
-            assert(adapter != null);
-            // Actually, that's because there were no non-trivial ones:
-            assert(lastConv == -1);
-        }
-        assert(adapter.type() == newType);
-        return adapter;
-    }
-
-    /**
-     * Create a JVM-level adapter method handle to permute the arguments
-     * of the given method.
-     * @param token access check
-     * @param newType required call type
-     * @param target original method handle
-     * @param argumentMap for each target argument, position of its source in newType
-     * @return an adapter to the original handle with the desired new type,
-     *          or the original target if the types are already identical
-     *          and the permutation is null
-     * @throws IllegalArgumentException if the adaptation cannot be made
-     *          directly by a JVM-level adapter, without help from Java code
-     */
-    public static MethodHandle makePermutation(Access token,
-                MethodType newType, MethodHandle target,
-                int[] argumentMap) {
-        MethodType oldType = target.type();
-        boolean nullPermutation = true;
-        for (int i = 0; i < argumentMap.length; i++) {
-            int pos = argumentMap[i];
-            if (pos != i)
-                nullPermutation = false;
-            if (pos < 0 || pos >= newType.parameterCount()) {
-                argumentMap = new int[0]; break;
-            }
-        }
-        if (argumentMap.length != oldType.parameterCount())
-            throw newIllegalArgumentException("bad permutation: "+Arrays.toString(argumentMap));
-        if (nullPermutation) {
-            MethodHandle res = makePairwiseConvert(token, newType, target);
-            // well, that was easy
-            if (res == null)
-                throw newIllegalArgumentException("cannot convert pairwise: "+newType);
-            return res;
-        }
-
-        // Check return type.  (Not much can be done with it.)
-        Class<?> exp = newType.returnType();
-        Class<?> ret = oldType.returnType();
-        if (!VerifyType.isNullConversion(ret, exp))
-            throw newIllegalArgumentException("bad return conversion for "+newType);
-
-        // See if the argument types match up.
-        for (int i = 0; i < argumentMap.length; i++) {
-            int j = argumentMap[i];
-            Class<?> src = newType.parameterType(j);
-            Class<?> dst = oldType.parameterType(i);
-            if (!VerifyType.isNullConversion(src, dst))
-                throw newIllegalArgumentException("bad argument #"+j+" conversion for "+newType);
-        }
-
-        // Now figure out a nice mix of SWAP, ROT, DUP, and DROP adapters.
-        // A workable greedy algorithm is as follows:
-        // Drop unused outgoing arguments (right to left: shallowest first).
-        // Duplicate doubly-used outgoing arguments (left to right: deepest first).
-        // Then the remaining problem is a true argument permutation.
-        // Marshal the outgoing arguments as required from left to right.
-        // That is, find the deepest outgoing stack position that does not yet
-        // have the correct argument value, and correct at least that position
-        // by swapping or rotating in the misplaced value (from a shallower place).
-        // If the misplaced value is followed by one or more consecutive values
-        // (also misplaced)  issue a rotation which brings as many as possible
-        // into position.  Otherwise make progress with either a swap or a
-        // rotation.  Prefer the swap as cheaper, but do not use it if it
-        // breaks a slot pair.  Prefer the rotation over the swap if it would
-        // preserve more consecutive values shallower than the target position.
-        // When more than one rotation will work (because the required value
-        // is already adjacent to the target position), then use a rotation
-        // which moves the old value in the target position adjacent to
-        // one of its consecutive values.  Also, prefer shorter rotation
-        // spans, since they use fewer memory cycles for shuffling.
-
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    private static byte basicType(Class<?> type) {
-        if (type == null)  return T_VOID;
-        switch (Wrapper.forBasicType(type)) {
-            case BOOLEAN:  return T_BOOLEAN;
-            case CHAR:     return T_CHAR;
-            case FLOAT:    return T_FLOAT;
-            case DOUBLE:   return T_DOUBLE;
-            case BYTE:     return T_BYTE;
-            case SHORT:    return T_SHORT;
-            case INT:      return T_INT;
-            case LONG:     return T_LONG;
-            case OBJECT:   return T_OBJECT;
-            case VOID:     return T_VOID;
-        }
-        return 99; // T_ILLEGAL or some such
-    }
-
-    /** Number of stack slots for the given type.
-     *  Two for T_DOUBLE and T_FLOAT, one for the rest.
-     */
-    private static int type2size(int type) {
-        assert(type >= T_BOOLEAN && type <= T_OBJECT);
-        return (type == T_LONG || type == T_DOUBLE) ? 2 : 1;
-    }
-    private static int type2size(Class<?> type) {
-        return type2size(basicType(type));
-    }
-
-    /** The given stackMove is the number of slots pushed.
-     * It might be negative.  Scale it (multiply) by the
-     * VM's notion of how an address changes with a push,
-     * to get the raw SP change for stackMove.
-     * Then shift and mask it into the correct field.
-     */
-    private static long insertStackMove(int stackMove) {
-        // following variable must be long to avoid sign extension after '<<'
-        long spChange = stackMove * MethodHandleNatives.JVM_STACK_MOVE_UNIT;
-        return (spChange & CONV_STACK_MOVE_MASK) << CONV_STACK_MOVE_SHIFT;
-    }
-
-    /** Construct an adapter conversion descriptor for a single-argument conversion. */
-    private static long makeConv(int convOp, int argnum, int src, int dest) {
-        assert(src  == (src  & 0xF));
-        assert(dest == (dest & 0xF));
-        assert(convOp >= OP_CHECK_CAST && convOp <= OP_PRIM_TO_REF);
-        int stackMove = type2size(dest) - type2size(src);
-        return ((long) argnum << 32 |
-                (long) convOp << CONV_OP_SHIFT |
-                (int)  src    << CONV_SRC_TYPE_SHIFT |
-                (int)  dest   << CONV_DEST_TYPE_SHIFT |
-                insertStackMove(stackMove)
-                );
-    }
-    private static long makeConv(int convOp, int argnum, int stackMove) {
-        assert(convOp >= OP_DUP_ARGS && convOp <= OP_SPREAD_ARGS);
-        byte src = 0, dest = 0;
-        if (convOp >= OP_COLLECT_ARGS && convOp <= OP_SPREAD_ARGS)
-            src = dest = T_OBJECT;
-        return ((long) argnum << 32 |
-                (long) convOp << CONV_OP_SHIFT |
-                (int)  src    << CONV_SRC_TYPE_SHIFT |
-                (int)  dest   << CONV_DEST_TYPE_SHIFT |
-                insertStackMove(stackMove)
-                );
-    }
-    private static long makeSwapConv(int convOp, int srcArg, byte type, int destSlot) {
-        assert(convOp >= OP_SWAP_ARGS && convOp <= OP_ROT_ARGS);
-        return ((long) srcArg << 32 |
-                (long) convOp << CONV_OP_SHIFT |
-                (int)  type   << CONV_SRC_TYPE_SHIFT |
-                (int)  type   << CONV_DEST_TYPE_SHIFT |
-                (int)  destSlot << CONV_VMINFO_SHIFT
-                );
-    }
-    private static long makeConv(int convOp) {
-        assert(convOp == OP_RETYPE_ONLY || convOp == OP_RETYPE_RAW);
-        return ((long)-1 << 32) | (convOp << CONV_OP_SHIFT);   // stackMove, src, dst all zero
-    }
-    private static int convCode(long conv) {
-        return (int)conv;
-    }
-    private static int convArgPos(long conv) {
-        return (int)(conv >>> 32);
-    }
-    private static boolean convOpSupported(int convOp) {
-        assert(convOp >= 0 && convOp <= CONV_OP_LIMIT);
-        return ((1<<convOp) & MethodHandleNatives.CONV_OP_IMPLEMENTED_MASK) != 0;
-    }
-
-    /** One of OP_RETYPE_ONLY, etc. */
-    int conversionOp() { return (conversion & CONV_OP_MASK) >> CONV_OP_SHIFT; }
-
-    /* Return one plus the position of the first non-trivial difference
-     * between the given types.  This is not a symmetric operation;
-     * we are considering adapting the targetType to adapterType.
-     * Trivial differences are those which could be ignored by the JVM
-     * without subverting the verifier.  Otherwise, adaptable differences
-     * are ones for which we could create an adapter to make the type change.
-     * Return zero if there are no differences (other than trivial ones).
-     * Return 1+N if N is the only adaptable argument difference.
-     * Return the -2-N where N is the first of several adaptable
-     * argument differences.
-     * Return -1 if there there are differences which are not adaptable.
-     */
-    private static int diffTypes(MethodType adapterType,
-                                 MethodType targetType,
-                                 boolean raw) {
-        int diff;
-        diff = diffReturnTypes(adapterType, targetType, raw);
-        if (diff != 0)  return diff;
-        int nargs = adapterType.parameterCount();
-        if (nargs != targetType.parameterCount())
-            return -1;
-        diff = diffParamTypes(adapterType, 0, targetType, 0, nargs, raw);
-        //System.out.println("diff "+adapterType);
-        //System.out.println("  "+diff+" "+targetType);
-        return diff;
-    }
-    private static int diffReturnTypes(MethodType adapterType,
-                                       MethodType targetType,
-                                       boolean raw) {
-        Class<?> src = targetType.returnType();
-        Class<?> dst = adapterType.returnType();
-        if ((!raw
-             ? VerifyType.canPassUnchecked(src, dst)
-             : VerifyType.canPassRaw(src, dst)
-             ) > 0)
-            return 0;  // no significant difference
-        if (raw && !src.isPrimitive() && !dst.isPrimitive())
-            return 0;  // can force a reference return (very carefully!)
-        //if (false)  return 1;  // never adaptable!
-        return -1;  // some significant difference
-    }
-    private static int diffParamTypes(MethodType adapterType, int astart,
-                                      MethodType targetType, int tstart,
-                                      int nargs, boolean raw) {
-        assert(nargs >= 0);
-        int res = 0;
-        for (int i = 0; i < nargs; i++) {
-            Class<?> src  = adapterType.parameterType(astart+i);
-            Class<?> dest = targetType.parameterType(tstart+i);
-            if ((!raw
-                 ? VerifyType.canPassUnchecked(src, dest)
-                 : VerifyType.canPassRaw(src, dest)
-                ) <= 0) {
-                // found a difference; is it the only one so far?
-                if (res != 0)
-                    return -1-res; // return -2-i for prev. i
-                res = 1+i;
-            }
-        }
-        return res;
-    }
-
-    /** Can a retyping adapter (alone) validly convert the target to newType? */
-    public static boolean canRetypeOnly(MethodType newType, MethodType targetType) {
-        return canRetype(newType, targetType, false);
-    }
-    /** Can a retyping adapter (alone) convert the target to newType?
-     *  It is allowed to widen subword types and void to int, to make bitwise
-     *  conversions between float/int and double/long, and to perform unchecked
-     *  reference conversions on return.  This last feature requires that the
-     *  caller be trusted, and perform explicit cast conversions on return values.
-     */
-    public static boolean canRetypeRaw(MethodType newType, MethodType targetType) {
-        return canRetype(newType, targetType, true);
-    }
-    static boolean canRetype(MethodType newType, MethodType targetType, boolean raw) {
-        if (!convOpSupported(raw ? OP_RETYPE_RAW : OP_RETYPE_ONLY))  return false;
-        int diff = diffTypes(newType, targetType, raw);
-        // %%% This assert is too strong.  Factor diff into VerifyType and reconcile.
-        assert(raw || (diff == 0) == VerifyType.isNullConversion(newType, targetType));
-        return diff == 0;
-    }
-
-    /** Factory method:  Performs no conversions; simply retypes the adapter.
-     *  Allows unchecked argument conversions pairwise, if they are safe.
-     *  Returns null if not possible.
-     */
-    public static MethodHandle makeRetypeOnly(Access token,
-                MethodType newType, MethodHandle target) {
-        return makeRetype(token, newType, target, false);
-    }
-    public static MethodHandle makeRetypeRaw(Access token,
-                MethodType newType, MethodHandle target) {
-        return makeRetype(token, newType, target, true);
-    }
-    static MethodHandle makeRetype(Access token,
-                MethodType newType, MethodHandle target, boolean raw) {
-        Access.check(token);
-        MethodType oldType = target.type();
-        if (oldType == newType)  return target;
-        if (!canRetype(newType, oldType, raw))
-            return null;
-        // TO DO:  clone the target guy, whatever he is, with new type.
-        return new AdapterMethodHandle(target, newType, makeConv(raw ? OP_RETYPE_RAW : OP_RETYPE_ONLY));
-    }
-
-    static MethodHandle makeTypeHandler(Access token,
-                MethodHandle target, MethodHandle typeHandler) {
-        Access.check(token);
-        return new WithTypeHandler(target, typeHandler);
-    }
-
-    static class WithTypeHandler extends AdapterMethodHandle {
-        final MethodHandle target, typeHandler;
-        WithTypeHandler(MethodHandle target, MethodHandle typeHandler) {
-            super(target, target.type(), makeConv(OP_RETYPE_ONLY));
-            this.target = target;
-            this.typeHandler = typeHandler.asType(TYPE_HANDLER_TYPE);
-        }
-
-        public MethodHandle asType(MethodType newType) {
-            if (this.type() == newType)
-                return this;
-            try {
-                MethodHandle retyped = (MethodHandle) typeHandler.invokeExact(target, newType);
-                // Contract:  Must return the desired type, or throw WMT
-                if (retyped.type() != newType)
-                    throw new WrongMethodTypeException(retyped.toString());
-                return retyped;
-            } catch (Throwable ex) {
-                if (ex instanceof Error)  throw (Error)ex;
-                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
-                throw new RuntimeException(ex);
-            }
-        }
-        private static final MethodType TYPE_HANDLER_TYPE
-            = MethodType.methodType(MethodHandle.class, MethodHandle.class, MethodType.class);
-    }
-
-    /** Can a checkcast adapter validly convert the target to newType?
-     *  The JVM supports all kind of reference casts, even silly ones.
-     */
-    public static boolean canCheckCast(MethodType newType, MethodType targetType,
-                int arg, Class<?> castType) {
-        if (!convOpSupported(OP_CHECK_CAST))  return false;
-        Class<?> src = newType.parameterType(arg);
-        Class<?> dst = targetType.parameterType(arg);
-        if (!canCheckCast(src, castType)
-                || !VerifyType.isNullConversion(castType, dst))
-            return false;
-        int diff = diffTypes(newType, targetType, false);
-        return (diff == arg+1);  // arg is sole non-trivial diff
-    }
-    /** Can an primitive conversion adapter validly convert src to dst? */
-    public static boolean canCheckCast(Class<?> src, Class<?> dst) {
-        return (!src.isPrimitive() && !dst.isPrimitive());
-    }
-
-    /** Factory method:  Forces a cast at the given argument.
-     *  The castType is the target of the cast, and can be any type
-     *  with a null conversion to the corresponding target parameter.
-     *  Return null if this cannot be done.
-     */
-    public static MethodHandle makeCheckCast(Access token,
-                MethodType newType, MethodHandle target,
-                int arg, Class<?> castType) {
-        Access.check(token);
-        if (!canCheckCast(newType, target.type(), arg, castType))
-            return null;
-        long conv = makeConv(OP_CHECK_CAST, arg, T_OBJECT, T_OBJECT);
-        return new AdapterMethodHandle(target, newType, conv, castType);
-    }
-
-    /** Can an primitive conversion adapter validly convert the target to newType?
-     *  The JVM currently supports all conversions except those between
-     *  floating and integral types.
-     */
-    public static boolean canPrimCast(MethodType newType, MethodType targetType,
-                int arg, Class<?> convType) {
-        if (!convOpSupported(OP_PRIM_TO_PRIM))  return false;
-        Class<?> src = newType.parameterType(arg);
-        Class<?> dst = targetType.parameterType(arg);
-        if (!canPrimCast(src, convType)
-                || !VerifyType.isNullConversion(convType, dst))
-            return false;
-        int diff = diffTypes(newType, targetType, false);
-        return (diff == arg+1);  // arg is sole non-trivial diff
-    }
-    /** Can an primitive conversion adapter validly convert src to dst? */
-    public static boolean canPrimCast(Class<?> src, Class<?> dst) {
-        if (src == dst || !src.isPrimitive() || !dst.isPrimitive()) {
-            return false;
-        } else if (Wrapper.forPrimitiveType(dst).isFloating()) {
-            // both must be floating types
-            return Wrapper.forPrimitiveType(src).isFloating();
-        } else {
-            // both are integral, and all combinations work fine
-            assert(Wrapper.forPrimitiveType(src).isIntegral() &&
-                   Wrapper.forPrimitiveType(dst).isIntegral());
-            return true;
-        }
-    }
-
-    /** Factory method:  Truncate the given argument with zero or sign extension,
-     *  and/or convert between single and doubleword versions of integer or float.
-     *  The convType is the target of the conversion, and can be any type
-     *  with a null conversion to the corresponding target parameter.
-     *  Return null if this cannot be done.
-     */
-    public static MethodHandle makePrimCast(Access token,
-                MethodType newType, MethodHandle target,
-                int arg, Class<?> convType) {
-        Access.check(token);
-        MethodType oldType = target.type();
-        if (!canPrimCast(newType, oldType, arg, convType))
-            return null;
-        Class<?> src = newType.parameterType(arg);
-        long conv = makeConv(OP_PRIM_TO_PRIM, arg, basicType(src), basicType(convType));
-        return new AdapterMethodHandle(target, newType, conv);
-    }
-
-    /** Can an unboxing conversion validly convert src to dst?
-     *  The JVM currently supports all kinds of casting and unboxing.
-     *  The convType is the unboxed type; it can be either a primitive or wrapper.
-     */
-    public static boolean canUnboxArgument(MethodType newType, MethodType targetType,
-                int arg, Class<?> convType) {
-        if (!convOpSupported(OP_REF_TO_PRIM))  return false;
-        Class<?> src = newType.parameterType(arg);
-        Class<?> dst = targetType.parameterType(arg);
-        Class<?> boxType = Wrapper.asWrapperType(convType);
-        convType = Wrapper.asPrimitiveType(convType);
-        if (!canCheckCast(src, boxType)
-                || boxType == convType
-                || !VerifyType.isNullConversion(convType, dst))
-            return false;
-        int diff = diffTypes(newType, targetType, false);
-        return (diff == arg+1);  // arg is sole non-trivial diff
-    }
-    /** Can an primitive unboxing adapter validly convert src to dst? */
-    public static boolean canUnboxArgument(Class<?> src, Class<?> dst) {
-        return (!src.isPrimitive() && Wrapper.asPrimitiveType(dst).isPrimitive());
-    }
-
-    /** Factory method:  Unbox the given argument.
-     *  Return null if this cannot be done.
-     */
-    public static MethodHandle makeUnboxArgument(Access token,
-                MethodType newType, MethodHandle target,
-                int arg, Class<?> convType) {
-        MethodType oldType = target.type();
-        Class<?> src = newType.parameterType(arg);
-        Class<?> dst = oldType.parameterType(arg);
-        Class<?> boxType = Wrapper.asWrapperType(convType);
-        Class<?> primType = Wrapper.asPrimitiveType(convType);
-        if (!canUnboxArgument(newType, oldType, arg, convType))
-            return null;
-        MethodType castDone = newType;
-        if (!VerifyType.isNullConversion(src, boxType))
-            castDone = newType.changeParameterType(arg, boxType);
-        long conv = makeConv(OP_REF_TO_PRIM, arg, T_OBJECT, basicType(primType));
-        MethodHandle adapter = new AdapterMethodHandle(target, castDone, conv, boxType);
-        if (castDone == newType)
-            return adapter;
-        return makeCheckCast(token, newType, adapter, arg, boxType);
-    }
-
-    /** Can an primitive boxing adapter validly convert src to dst? */
-    public static boolean canBoxArgument(Class<?> src, Class<?> dst) {
-        if (!convOpSupported(OP_PRIM_TO_REF))  return false;
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    /** Factory method:  Unbox the given argument.
-     *  Return null if this cannot be done.
-     */
-    public static MethodHandle makeBoxArgument(Access token,
-                MethodType newType, MethodHandle target,
-                int arg, Class<?> convType) {
-        // this is difficult to do in the JVM because it must GC
-        return null;
-    }
-
-    /** Can an adapter simply drop arguments to convert the target to newType? */
-    public static boolean canDropArguments(MethodType newType, MethodType targetType,
-                int dropArgPos, int dropArgCount) {
-        if (dropArgCount == 0)
-            return canRetypeOnly(newType, targetType);
-        if (!convOpSupported(OP_DROP_ARGS))  return false;
-        if (diffReturnTypes(newType, targetType, false) != 0)
-            return false;
-        int nptypes = newType.parameterCount();
-        // parameter types must be the same up to the drop point
-        if (dropArgPos != 0 && diffParamTypes(newType, 0, targetType, 0, dropArgPos, false) != 0)
-            return false;
-        int afterPos = dropArgPos + dropArgCount;
-        int afterCount = nptypes - afterPos;
-        if (dropArgPos < 0 || dropArgPos >= nptypes ||
-            dropArgCount < 1 || afterPos > nptypes ||
-            targetType.parameterCount() != nptypes - dropArgCount)
-            return false;
-        // parameter types after the drop point must also be the same
-        if (afterCount != 0 && diffParamTypes(newType, afterPos, targetType, dropArgPos, afterCount, false) != 0)
-            return false;
-        return true;
-    }
-
-    /** Factory method:  Drop selected arguments.
-     *  Allow unchecked retyping of remaining arguments, pairwise.
-     *  Return null if this is not possible.
-     */
-    public static MethodHandle makeDropArguments(Access token,
-                MethodType newType, MethodHandle target,
-                int dropArgPos, int dropArgCount) {
-        Access.check(token);
-        if (dropArgCount == 0)
-            return makeRetypeOnly(IMPL_TOKEN, newType, target);
-        if (!canDropArguments(newType, target.type(), dropArgPos, dropArgCount))
-            return null;
-        // in  arglist: [0: ...keep1 | dpos: drop... | dpos+dcount: keep2... ]
-        // out arglist: [0: ...keep1 |                        dpos: keep2... ]
-        int keep2InPos  = dropArgPos + dropArgCount;
-        int dropSlot    = newType.parameterSlotDepth(keep2InPos);
-        int keep1InSlot = newType.parameterSlotDepth(dropArgPos);
-        int slotCount   = keep1InSlot - dropSlot;
-        assert(slotCount >= dropArgCount);
-        assert(target.type().parameterSlotCount() + slotCount == newType.parameterSlotCount());
-        long conv = makeConv(OP_DROP_ARGS, dropArgPos + dropArgCount - 1, -slotCount);
-        return new AdapterMethodHandle(target, newType, conv);
-    }
-
-    /** Can an adapter duplicate an argument to convert the target to newType? */
-    public static boolean canDupArguments(MethodType newType, MethodType targetType,
-                int dupArgPos, int dupArgCount) {
-        if (!convOpSupported(OP_DUP_ARGS))  return false;
-        if (diffReturnTypes(newType, targetType, false) != 0)
-            return false;
-        int nptypes = newType.parameterCount();
-        if (dupArgCount < 0 || dupArgPos + dupArgCount > nptypes)
-            return false;
-        if (targetType.parameterCount() != nptypes + dupArgCount)
-            return false;
-        // parameter types must be the same up to the duplicated arguments
-        if (diffParamTypes(newType, 0, targetType, 0, nptypes, false) != 0)
-            return false;
-        // duplicated types must be, well, duplicates
-        if (diffParamTypes(newType, dupArgPos, targetType, nptypes, dupArgCount, false) != 0)
-            return false;
-        return true;
-    }
-
-    /** Factory method:  Duplicate the selected argument.
-     *  Return null if this is not possible.
-     */
-    public static MethodHandle makeDupArguments(Access token,
-                MethodType newType, MethodHandle target,
-                int dupArgPos, int dupArgCount) {
-        Access.check(token);
-        if (!canDupArguments(newType, target.type(), dupArgPos, dupArgCount))
-            return null;
-        if (dupArgCount == 0)
-            return target;
-        // in  arglist: [0: ...keep1 | dpos: dup... | dpos+dcount: keep2... ]
-        // out arglist: [0: ...keep1 | dpos: dup... | dpos+dcount: keep2... | dup... ]
-        int keep2InPos  = dupArgPos + dupArgCount;
-        int dupSlot     = newType.parameterSlotDepth(keep2InPos);
-        int keep1InSlot = newType.parameterSlotDepth(dupArgPos);
-        int slotCount   = keep1InSlot - dupSlot;
-        assert(target.type().parameterSlotCount() - slotCount == newType.parameterSlotCount());
-        long conv = makeConv(OP_DUP_ARGS, dupArgPos + dupArgCount - 1, slotCount);
-        return new AdapterMethodHandle(target, newType, conv);
-    }
-
-    /** Can an adapter swap two arguments to convert the target to newType? */
-    public static boolean canSwapArguments(MethodType newType, MethodType targetType,
-                int swapArg1, int swapArg2) {
-        if (!convOpSupported(OP_SWAP_ARGS))  return false;
-        if (diffReturnTypes(newType, targetType, false) != 0)
-            return false;
-        if (swapArg1 >= swapArg2)  return false;  // caller resp
-        int nptypes = newType.parameterCount();
-        if (targetType.parameterCount() != nptypes)
-            return false;
-        if (swapArg1 < 0 || swapArg2 >= nptypes)
-            return false;
-        if (diffParamTypes(newType, 0, targetType, 0, swapArg1, false) != 0)
-            return false;
-        if (diffParamTypes(newType, swapArg1, targetType, swapArg2, 1, false) != 0)
-            return false;
-        if (diffParamTypes(newType, swapArg1+1, targetType, swapArg1+1, swapArg2-swapArg1-1, false) != 0)
-            return false;
-        if (diffParamTypes(newType, swapArg2, targetType, swapArg1, 1, false) != 0)
-            return false;
-        if (diffParamTypes(newType, swapArg2+1, targetType, swapArg2+1, nptypes-swapArg2-1, false) != 0)
-            return false;
-        return true;
-    }
-
-    /** Factory method:  Swap the selected arguments.
-     *  Return null if this is not possible.
-     */
-    public static MethodHandle makeSwapArguments(Access token,
-                MethodType newType, MethodHandle target,
-                int swapArg1, int swapArg2) {
-        Access.check(token);
-        if (swapArg1 == swapArg2)
-            return target;
-        if (swapArg1 > swapArg2) { int t = swapArg1; swapArg1 = swapArg2; swapArg2 = t; }
-        if (!canSwapArguments(newType, target.type(), swapArg1, swapArg2))
-            return null;
-        Class<?> swapType = newType.parameterType(swapArg1);
-        // in  arglist: [0: ...keep1 | pos1: a1 | pos1+1: keep2... | pos2: a2 | pos2+1: keep3... ]
-        // out arglist: [0: ...keep1 | pos1: a2 | pos1+1: keep2... | pos2: a1 | pos2+1: keep3... ]
-        int swapSlot2  = newType.parameterSlotDepth(swapArg2 + 1);
-        long conv = makeSwapConv(OP_SWAP_ARGS, swapArg1, basicType(swapType), swapSlot2);
-        return new AdapterMethodHandle(target, newType, conv);
-    }
-
-    static int positiveRotation(int argCount, int rotateBy) {
-        assert(argCount > 0);
-        if (rotateBy >= 0) {
-            if (rotateBy < argCount)
-                return rotateBy;
-            return rotateBy % argCount;
-        } else if (rotateBy >= -argCount) {
-            return rotateBy + argCount;
-        } else {
-            return (-1-((-1-rotateBy) % argCount)) + argCount;
-        }
-    }
-
-    final static int MAX_ARG_ROTATION = 1;
-
-    /** Can an adapter rotate arguments to convert the target to newType? */
-    public static boolean canRotateArguments(MethodType newType, MethodType targetType,
-                int firstArg, int argCount, int rotateBy) {
-        if (!convOpSupported(OP_ROT_ARGS))  return false;
-        if (argCount <= 2)  return false;  // must be a swap, not a rotate
-        rotateBy = positiveRotation(argCount, rotateBy);
-        if (rotateBy == 0)  return false;  // no rotation
-        if (rotateBy > MAX_ARG_ROTATION && rotateBy < argCount - MAX_ARG_ROTATION)
-            return false;  // too many argument positions
-        // Rotate incoming args right N to the out args, N in 1..(argCouunt-1).
-        if (diffReturnTypes(newType, targetType, false) != 0)
-            return false;
-        int nptypes = newType.parameterCount();
-        if (targetType.parameterCount() != nptypes)
-            return false;
-        if (firstArg < 0 || firstArg >= nptypes)  return false;
-        int argLimit = firstArg + argCount;
-        if (argLimit > nptypes)  return false;
-        if (diffParamTypes(newType, 0, targetType, 0, firstArg, false) != 0)
-            return false;
-        int newChunk1 = argCount - rotateBy, newChunk2 = rotateBy;
-        // swap new chunk1 with target chunk2
-        if (diffParamTypes(newType, firstArg, targetType, argLimit-newChunk1, newChunk1, false) != 0)
-            return false;
-        // swap new chunk2 with target chunk1
-        if (diffParamTypes(newType, firstArg+newChunk1, targetType, firstArg, newChunk2, false) != 0)
-            return false;
-        return true;
-    }
-
-    /** Factory method:  Rotate the selected argument range.
-     *  Return null if this is not possible.
-     */
-    public static MethodHandle makeRotateArguments(Access token,
-                MethodType newType, MethodHandle target,
-                int firstArg, int argCount, int rotateBy) {
-        Access.check(token);
-        rotateBy = positiveRotation(argCount, rotateBy);
-        if (!canRotateArguments(newType, target.type(), firstArg, argCount, rotateBy))
-            return null;
-        // Decide whether it should be done as a right or left rotation,
-        // on the JVM stack.  Return the number of stack slots to rotate by,
-        // positive if right, negative if left.
-        int limit = firstArg + argCount;
-        int depth0 = newType.parameterSlotDepth(firstArg);
-        int depth1 = newType.parameterSlotDepth(limit-rotateBy);
-        int depth2 = newType.parameterSlotDepth(limit);
-        int chunk1Slots = depth0 - depth1; assert(chunk1Slots > 0);
-        int chunk2Slots = depth1 - depth2; assert(chunk2Slots > 0);
-        // From here on out, it assumes a single-argument shift.
-        assert(MAX_ARG_ROTATION == 1);
-        int srcArg, dstArg;
-        byte basicType;
-        if (chunk2Slots <= chunk1Slots) {
-            // Rotate right/down N (rotateBy = +N, N small, c2 small):
-            // in  arglist: [0: ...keep1 | arg1: c1...  | limit-N: c2 | limit: keep2... ]
-            // out arglist: [0: ...keep1 | arg1: c2 | arg1+N: c1...   | limit: keep2... ]
-            srcArg = limit-1;
-            dstArg = firstArg;
-            basicType = basicType(newType.parameterType(srcArg));
-            assert(chunk2Slots == type2size(basicType));
-        } else {
-            // Rotate left/up N (rotateBy = -N, N small, c1 small):
-            // in  arglist: [0: ...keep1 | arg1: c1 | arg1+N: c2...   | limit: keep2... ]
-            // out arglist: [0: ...keep1 | arg1: c2 ... | limit-N: c1 | limit: keep2... ]
-            srcArg = firstArg;
-            dstArg = limit-1;
-            basicType = basicType(newType.parameterType(srcArg));
-            assert(chunk1Slots == type2size(basicType));
-        }
-        int dstSlot = newType.parameterSlotDepth(dstArg + 1);
-        long conv = makeSwapConv(OP_ROT_ARGS, srcArg, basicType, dstSlot);
-        return new AdapterMethodHandle(target, newType, conv);
-    }
-
-    /** Can an adapter spread an argument to convert the target to newType? */
-    public static boolean canSpreadArguments(MethodType newType, MethodType targetType,
-                Class<?> spreadArgType, int spreadArgPos, int spreadArgCount) {
-        if (!convOpSupported(OP_SPREAD_ARGS))  return false;
-        if (diffReturnTypes(newType, targetType, false) != 0)
-            return false;
-        int nptypes = newType.parameterCount();
-        // parameter types must be the same up to the spread point
-        if (spreadArgPos != 0 && diffParamTypes(newType, 0, targetType, 0, spreadArgPos, false) != 0)
-            return false;
-        int afterPos = spreadArgPos + spreadArgCount;
-        int afterCount = nptypes - (spreadArgPos + 1);
-        if (spreadArgPos < 0 || spreadArgPos >= nptypes ||
-            spreadArgCount < 0 ||
-            targetType.parameterCount() != afterPos + afterCount)
-            return false;
-        // parameter types after the spread point must also be the same
-        if (afterCount != 0 && diffParamTypes(newType, spreadArgPos+1, targetType, afterPos, afterCount, false) != 0)
-            return false;
-        // match the array element type to the spread arg types
-        Class<?> rawSpreadArgType = newType.parameterType(spreadArgPos);
-        if (rawSpreadArgType != spreadArgType && !canCheckCast(rawSpreadArgType, spreadArgType))
-            return false;
-        for (int i = 0; i < spreadArgCount; i++) {
-            Class<?> src = VerifyType.spreadArgElementType(spreadArgType, i);
-            Class<?> dst = targetType.parameterType(spreadArgPos + i);
-            if (src == null || !VerifyType.isNullConversion(src, dst))
-                return false;
-        }
-        return true;
-    }
-
-
-    /** Factory method:  Spread selected argument. */
-    public static MethodHandle makeSpreadArguments(Access token,
-                MethodType newType, MethodHandle target,
-                Class<?> spreadArgType, int spreadArgPos, int spreadArgCount) {
-        Access.check(token);
-        MethodType targetType = target.type();
-        if (!canSpreadArguments(newType, targetType, spreadArgType, spreadArgPos, spreadArgCount))
-            return null;
-        // in  arglist: [0: ...keep1 | spos: spreadArg | spos+1:      keep2... ]
-        // out arglist: [0: ...keep1 | spos: spread... | spos+scount: keep2... ]
-        int keep2OutPos  = spreadArgPos + spreadArgCount;
-        int spreadSlot   = targetType.parameterSlotDepth(keep2OutPos);
-        int keep1OutSlot = targetType.parameterSlotDepth(spreadArgPos);
-        int slotCount    = keep1OutSlot - spreadSlot;
-        assert(spreadSlot == newType.parameterSlotDepth(spreadArgPos+1));
-        assert(slotCount >= spreadArgCount);
-        long conv = makeConv(OP_SPREAD_ARGS, spreadArgPos, slotCount-1);
-        MethodHandle res = new AdapterMethodHandle(target, newType, conv, spreadArgType);
-        assert(res.type().parameterType(spreadArgPos) == spreadArgType);
-        return res;
-    }
-
-    // TO DO: makeCollectArguments, makeFlyby, makeRicochet
-
-    @Override
-    public String toString() {
-        return nonAdapter((MethodHandle)vmtarget).toString();
-    }
-
-    private static MethodHandle nonAdapter(MethodHandle mh) {
-        while (mh instanceof AdapterMethodHandle) {
-            mh = (MethodHandle) mh.vmtarget;
-        }
-        return mh;
-    }
-}
--- a/src/share/classes/sun/dyn/BoundMethodHandle.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import sun.dyn.util.VerifyType;
-import sun.dyn.util.Wrapper;
-import java.dyn.*;
-import java.util.List;
-import sun.dyn.MethodHandleNatives.Constants;
-import static sun.dyn.MethodHandleImpl.IMPL_LOOKUP;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * The flavor of method handle which emulates an invoke instruction
- * on a predetermined argument.  The JVM dispatches to the correct method
- * when the handle is created, not when it is invoked.
- * @author jrose
- */
-public class BoundMethodHandle extends MethodHandle {
-    //MethodHandle vmtarget;           // next BMH or final DMH or methodOop
-    private final Object argument;     // argument to insert
-    private final int    vmargslot;    // position at which it is inserted
-
-    private static final Access IMPL_TOKEN = Access.getToken();
-    private static final MemberName.Factory IMPL_NAMES = MemberName.getFactory(IMPL_TOKEN);
-
-    // Constructors in this class *must* be package scoped or private.
-
-    /** Bind a direct MH to its receiver (or first ref. argument).
-     *  The JVM will pre-dispatch the MH if it is not already static.
-     */
-    BoundMethodHandle(DirectMethodHandle mh, Object argument) {
-        super(Access.TOKEN, mh.type().dropParameterTypes(0, 1));
-        // check the type now, once for all:
-        this.argument = checkReferenceArgument(argument, mh, 0);
-        this.vmargslot = this.type().parameterSlotCount();
-        if (MethodHandleNatives.JVM_SUPPORT) {
-            this.vmtarget = null;  // maybe updated by JVM
-            MethodHandleNatives.init(this, mh, 0);
-        } else {
-            this.vmtarget = mh;
-        }
-    }
-
-    /** Insert an argument into an arbitrary method handle.
-     *  If argnum is zero, inserts the first argument, etc.
-     *  The argument type must be a reference.
-     */
-    BoundMethodHandle(MethodHandle mh, Object argument, int argnum) {
-        this(mh.type().dropParameterTypes(argnum, argnum+1),
-             mh, argument, argnum);
-    }
-
-    /** Insert an argument into an arbitrary method handle.
-     *  If argnum is zero, inserts the first argument, etc.
-     */
-    BoundMethodHandle(MethodType type, MethodHandle mh, Object argument, int argnum) {
-        super(Access.TOKEN, type);
-        if (mh.type().parameterType(argnum).isPrimitive())
-            this.argument = bindPrimitiveArgument(argument, mh, argnum);
-        else {
-            this.argument = checkReferenceArgument(argument, mh, argnum);
-        }
-        this.vmargslot = type.parameterSlotDepth(argnum);
-        initTarget(mh, argnum);
-    }
-
-    private void initTarget(MethodHandle mh, int argnum) {
-        if (MethodHandleNatives.JVM_SUPPORT) {
-            this.vmtarget = null; // maybe updated by JVM
-            MethodHandleNatives.init(this, mh, argnum);
-        } else {
-            this.vmtarget = mh;
-        }
-    }
-
-    /** For the AdapterMethodHandle subclass.
-     */
-    BoundMethodHandle(MethodType type, Object argument, int vmargslot) {
-        super(Access.TOKEN, type);
-        this.argument = argument;
-        this.vmargslot = vmargslot;
-        assert(this instanceof AdapterMethodHandle);
-    }
-
-    /** Initialize the current object as a self-bound method handle, binding it
-     *  as the first argument of the method handle {@code entryPoint}.
-     *  The invocation type of the resulting method handle will be the
-     *  same as {@code entryPoint},  except that the first argument
-     *  type will be dropped.
-     */
-    protected BoundMethodHandle(Access token, MethodHandle entryPoint) {
-        super(token, entryPoint.type().dropParameterTypes(0, 1));
-        this.argument = this; // kludge; get rid of
-        this.vmargslot = this.type().parameterSlotDepth(0);
-        initTarget(entryPoint, 0);
-    }
-
-    /** Make sure the given {@code argument} can be used as {@code argnum}-th
-     *  parameter of the given method handle {@code mh}, which must be a reference.
-     *  <p>
-     *  If this fails, throw a suitable {@code WrongMethodTypeException},
-     *  which will prevent the creation of an illegally typed bound
-     *  method handle.
-     */
-    final static Object checkReferenceArgument(Object argument, MethodHandle mh, int argnum) {
-        Class<?> ptype = mh.type().parameterType(argnum);
-        if (ptype.isPrimitive()) {
-            // fail
-        } else if (argument == null) {
-            return null;
-        } else if (VerifyType.isNullReferenceConversion(argument.getClass(), ptype)) {
-            return argument;
-        }
-        throw badBoundArgumentException(argument, mh, argnum);
-    }
-
-    /** Make sure the given {@code argument} can be used as {@code argnum}-th
-     *  parameter of the given method handle {@code mh}, which must be a primitive.
-     *  <p>
-     *  If this fails, throw a suitable {@code WrongMethodTypeException},
-     *  which will prevent the creation of an illegally typed bound
-     *  method handle.
-     */
-    final static Object bindPrimitiveArgument(Object argument, MethodHandle mh, int argnum) {
-        Class<?> ptype = mh.type().parameterType(argnum);
-        Wrapper  wrap = Wrapper.forPrimitiveType(ptype);
-        Object   zero  = wrap.zero();
-        if (zero == null) {
-            // fail
-        } else if (argument == null) {
-            if (ptype != int.class && wrap.isSubwordOrInt())
-                return Integer.valueOf(0);
-            else
-                return zero;
-        } else if (VerifyType.isNullReferenceConversion(argument.getClass(), zero.getClass())) {
-            if (ptype != int.class && wrap.isSubwordOrInt())
-                return Wrapper.INT.wrap(argument);
-            else
-                return argument;
-        }
-        throw badBoundArgumentException(argument, mh, argnum);
-    }
-
-    final static RuntimeException badBoundArgumentException(Object argument, MethodHandle mh, int argnum) {
-        String atype = (argument == null) ? "null" : argument.getClass().toString();
-        return new WrongMethodTypeException("cannot bind "+atype+" argument to parameter #"+argnum+" of "+mh.type());
-    }
-
-    @Override
-    public String toString() {
-        return MethodHandleImpl.addTypeString(baseName(), this);
-    }
-
-    /** Component of toString() before the type string. */
-    protected String baseName() {
-        MethodHandle mh = this;
-        while (mh instanceof BoundMethodHandle) {
-            Object info = MethodHandleNatives.getTargetInfo(mh);
-            if (info instanceof MethodHandle) {
-                mh = (MethodHandle) info;
-            } else {
-                String name = null;
-                if (info instanceof MemberName)
-                    name = ((MemberName)info).getName();
-                if (name != null)
-                    return name;
-                else
-                    return noParens(super.toString()); // "invoke", probably
-            }
-            assert(mh != this);
-        }
-        return noParens(mh.toString());
-    }
-
-    private static String noParens(String str) {
-        int paren = str.indexOf('(');
-        if (paren >= 0) str = str.substring(0, paren);
-        return str;
-    }
-}
--- a/src/share/classes/sun/dyn/CallSiteImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import static sun.dyn.MemberName.uncaughtException;
-
-/**
- * Parts of CallSite known to the JVM.
- * @author jrose
- */
-public class CallSiteImpl {
-    // this implements the upcall from the JVM, MethodHandleNatives.makeDynamicCallSite:
-    static CallSite makeSite(MethodHandle bootstrapMethod,
-                             // Callee information:
-                             String name, MethodType type,
-                             // Call-site attributes, if any:
-                             Object info,
-                             // Caller information:
-                             MemberName callerMethod, int callerBCI) {
-        Class<?> callerClass = callerMethod.getDeclaringClass();
-        Object caller;
-        if (bootstrapMethod.type().parameterType(0) == Class.class)
-            caller = callerClass;  // remove for PFD
-        else
-            caller = MethodHandleImpl.IMPL_LOOKUP.in(callerClass);
-        if (bootstrapMethod == null) {
-            // If there is no bootstrap method, throw IncompatibleClassChangeError.
-            // This is a valid generic error type for resolution (JLS 12.3.3).
-            throw new IncompatibleClassChangeError
-                ("Class "+callerClass.getName()+" has not declared a bootstrap method for invokedynamic");
-        }
-        CallSite site;
-        try {
-            Object binding;
-            if (info == null) {
-                if (false)  // switch when invokeGeneric works
-                    binding = bootstrapMethod.invokeGeneric(caller, name, type);
-                else
-                    binding = bootstrapMethod.invokeVarargs(new Object[]{ caller, name, type });
-            } else {
-                info = maybeReBox(info);
-                if (false)  // switch when invokeGeneric works
-                    binding = bootstrapMethod.invokeGeneric(caller, name, type, info);
-                else
-                    binding = bootstrapMethod.invokeVarargs(new Object[]{ caller, name, type, info });
-            }
-            //System.out.println("BSM for "+name+type+" => "+binding);
-            if (binding instanceof CallSite) {
-                site = (CallSite) binding;
-            } else if (binding instanceof MethodHandle) {
-                // Transitional!
-                MethodHandle target = (MethodHandle) binding;
-                site = new ConstantCallSite(target);
-            } else {
-                throw new ClassCastException("bootstrap method failed to produce a MethodHandle or CallSite");
-            }
-            PRIVATE_INITIALIZE_CALL_SITE.invokeExact(site, name, type,
-                                                     callerMethod, callerBCI);
-            assert(site.getTarget() != null);
-            assert(site.getTarget().type().equals(type));
-        } catch (Throwable ex) {
-            InvokeDynamicBootstrapError bex;
-            if (ex instanceof InvokeDynamicBootstrapError)
-                bex = (InvokeDynamicBootstrapError) ex;
-            else
-                bex = new InvokeDynamicBootstrapError("call site initialization exception", ex);
-            throw bex;
-        }
-        return site;
-    }
-
-    private static Object maybeReBox(Object x) {
-        if (x instanceof Integer) {
-            int xi = (int) x;
-            if (xi == (byte) xi)
-                x = xi;  // must rebox; see JLS 5.1.7
-            return x;
-        } else if (x instanceof Object[]) {
-            Object[] xa = (Object[]) x;
-            for (int i = 0; i < xa.length; i++) {
-                if (xa[i] instanceof Integer)
-                    xa[i] = maybeReBox(xa[i]);
-            }
-            return xa;
-        } else {
-            return x;
-        }
-    }
-
-    // This method is private in CallSite because it touches private fields in CallSite.
-    // These private fields (vmmethod, vmindex) are specific to the JVM.
-    private static final MethodHandle PRIVATE_INITIALIZE_CALL_SITE;
-    static {
-        try {
-            PRIVATE_INITIALIZE_CALL_SITE =
-            MethodHandleImpl.IMPL_LOOKUP.findVirtual(CallSite.class, "initializeFromJVM",
-                MethodType.methodType(void.class,
-                                      String.class, MethodType.class,
-                                      MemberName.class, int.class));
-        } catch (NoAccessException ex) {
-            throw uncaughtException(ex);
-        }
-    }
-
-    public static void setCallSiteTarget(Access token, CallSite site, MethodHandle target) {
-        Access.check(token);
-        MethodHandleNatives.setCallSiteTarget(site, target);
-    }
-}
--- a/src/share/classes/sun/dyn/DirectMethodHandle.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn;
-
-import java.dyn.*;
-import static sun.dyn.MethodHandleNatives.Constants.*;
-
-/**
- * The flavor of method handle which emulates invokespecial or invokestatic.
- * @author jrose
- */
-class DirectMethodHandle extends MethodHandle {
-    //inherited oop    vmtarget;    // methodOop or virtual class/interface oop
-    private final int  vmindex;     // method index within class or interface
-    { vmindex = VM_INDEX_UNINITIALIZED; }  // JVM may change this
-
-    // Constructors in this class *must* be package scoped or private.
-    DirectMethodHandle(MethodType mtype, MemberName m, boolean doDispatch, Class<?> lookupClass) {
-        super(Access.TOKEN, mtype);
-
-        assert(m.isMethod() || !doDispatch && m.isConstructor());
-        if (!m.isResolved())
-            throw new InternalError();
-
-        MethodHandleNatives.init(this, (Object) m, doDispatch, lookupClass);
-    }
-
-    boolean isValid() {
-        return (vmindex != VM_INDEX_UNINITIALIZED);
-    }
-}
--- a/src/share/classes/sun/dyn/FilterGeneric.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4496 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.lang.reflect.*;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * These adapters apply arbitrary conversions to arguments
- * on the way to a ultimate target.
- * For simplicity, these are all generically typed.
- * @author jrose
- */
-class FilterGeneric {
-    // type for the incoming call (will be generic)
-    private final MethodType entryType;
-    // prototype adapters (clone and customize for each new target & conversion!)
-    private final Adapter[] adapters;
-
-    /** Compute and cache information common to all filtering adapters
-     *  with the given generic type
-     */
-    FilterGeneric(MethodType entryType) {
-        this.entryType = entryType;
-        int tableSize = Kind.LIMIT.invokerIndex(1 + entryType.parameterCount());
-        this.adapters = new Adapter[tableSize];
-    }
-
-    Adapter getAdapter(Kind kind, int pos) {
-        int index = kind.invokerIndex(pos);
-        Adapter ad = adapters[index];
-        if (ad != null)  return ad;
-        ad = findAdapter(entryType, kind, pos);
-        if (ad == null)
-            ad = buildAdapterFromBytecodes(entryType, kind, pos);
-        adapters[index] = ad;
-        return ad;
-    }
-
-    Adapter makeInstance(Kind kind, int pos, MethodHandle filter, MethodHandle target) {
-        Adapter ad = getAdapter(kind, pos);
-        return ad.makeInstance(ad.prototypeEntryPoint(), filter, target);
-    }
-
-    /** Build an adapter of the given generic type, which invokes filter
-     *  on the selected incoming argument before passing it to the target.
-     * @param pos the argument to filter
-     * @param filter the function to call on the argument
-     * @param target the target to call with the modified argument list
-     * @return an adapter method handle
-     */
-    public static MethodHandle makeArgumentFilter(int pos, MethodHandle filter, MethodHandle target) {
-        return make(Kind.value, pos, filter, target);
-    }
-
-    /** Build an adapter of the given generic type, which invokes a combiner
-     *  on a selected group of leading arguments.
-     *  The result of the combiner is prepended before all those arguments.
-     * @param combiner the function to call on the selected leading arguments
-     * @param target the target to call with the modified argument list
-     * @return an adapter method handle
-     */
-    public static MethodHandle makeArgumentFolder(MethodHandle combiner, MethodHandle target) {
-        int num = combiner.type().parameterCount();
-        return make(Kind.fold, num, combiner, target);
-    }
-
-    /** Build an adapter of the given generic type, which invokes a filter
-     *  on the incoming arguments, reified as a group.
-     *  The argument may be modified (by side effects in the filter).
-     *  The arguments, possibly modified, are passed on to the target.
-     * @param filter the function to call on the arguments
-     * @param target the target to call with the possibly-modified argument list
-     * @return an adapter method handle
-     */
-    public static MethodHandle makeFlyby(MethodHandle filter, MethodHandle target) {
-        return make(Kind.flyby, 0, filter, target);
-    }
-
-    /** Build an adapter of the given generic type, which invokes a collector
-     *  on the selected incoming argument and all following arguments.
-     *  The result of the collector replaces all those arguments.
-     * @param collector the function to call on the selected trailing arguments
-     * @param target the target to call with the modified argument list
-     * @return an adapter method handle
-     */
-    public static MethodHandle makeArgumentCollector(MethodHandle collector, MethodHandle target) {
-        int pos = target.type().parameterCount() - 1;
-        return make(Kind.collect, pos, collector, target);
-    }
-
-    static MethodHandle make(Kind kind, int pos, MethodHandle filter, MethodHandle target) {
-        FilterGeneric fgen = of(kind, pos, filter.type(), target.type());
-        return fgen.makeInstance(kind, pos, filter, target);
-    }
-
-    /** Return the adapter information for this target and filter type. */
-    static FilterGeneric of(Kind kind, int pos, MethodType filterType, MethodType targetType) {
-        MethodType entryType = entryType(kind, pos, filterType, targetType);
-        if (entryType.generic() != entryType)
-            throw newIllegalArgumentException("must be generic: "+entryType);
-        MethodTypeImpl form = MethodTypeImpl.of(entryType);
-        FilterGeneric filterGen = form.filterGeneric;
-        if (filterGen == null)
-            form.filterGeneric = filterGen = new FilterGeneric(entryType);
-        return filterGen;
-    }
-
-    public String toString() {
-        return "FilterGeneric/"+entryType;
-    }
-
-    static MethodType targetType(MethodType entryType, Kind kind, int pos, MethodType filterType) {
-        MethodType type = entryType;
-        switch (kind) {
-            case value:
-            case flyby:
-                break;  // no change
-            case fold:
-                type = type.insertParameterTypes(0, filterType.returnType());
-                break;
-            case collect:
-                type = type.dropParameterTypes(pos, type.parameterCount());
-                type = type.insertParameterTypes(pos, filterType.returnType());
-                break;
-            default:
-                throw new InternalError();
-        }
-        return type;
-    }
-
-    static MethodType entryType(Kind kind, int pos, MethodType filterType, MethodType targetType) {
-        MethodType type = targetType;
-        switch (kind) {
-            case value:
-            case flyby:
-                break;  // no change
-            case fold:
-                type = type.dropParameterTypes(0, 1);
-                break;
-            case collect:
-                type = type.dropParameterTypes(pos, pos+1);
-                type = type.insertParameterTypes(pos, filterType.parameterList());
-                break;
-            default:
-                throw new InternalError();
-        }
-        return type;
-    }
-
-    /* Create an adapter that handles spreading calls for the given type. */
-    static Adapter findAdapter(MethodType entryType, Kind kind, int pos) {
-        int argc = entryType.parameterCount();
-        String cname0 = "F"+argc;
-        String cname1 = "F"+argc+kind.key;
-        String[] cnames = { cname0, cname1 };
-        String iname = kind.invokerName(pos);
-        // e.g., F5; invoke_C3
-        for (String cname : cnames) {
-            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
-            if (acls == null)  continue;
-            // see if it has the required invoke method
-            MethodHandle entryPoint = null;
-            try {
-                entryPoint = MethodHandleImpl.IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
-            } catch (NoAccessException ex) {
-            }
-            if (entryPoint == null)  continue;
-            Constructor<? extends Adapter> ctor = null;
-            try {
-                ctor = acls.getDeclaredConstructor(MethodHandle.class);
-            } catch (NoSuchMethodException ex) {
-            } catch (SecurityException ex) {
-            }
-            if (ctor == null)  continue;
-            try {
-                // Produce an instance configured as a prototype.
-                return ctor.newInstance(entryPoint);
-            } catch (IllegalArgumentException ex) {
-            } catch (InvocationTargetException wex) {
-                Throwable ex = wex.getTargetException();
-                if (ex instanceof Error)  throw (Error)ex;
-                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
-            } catch (InstantiationException ex) {
-            } catch (IllegalAccessException ex) {
-            }
-        }
-        return null;
-    }
-
-    static Adapter buildAdapterFromBytecodes(MethodType entryType, Kind kind, int pos) {
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    /**
-     * This adapter takes some untyped arguments, and returns an untyped result.
-     * Internally, it applies the invoker to the target, which causes the
-     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
-     * This result is passed to convert, which is responsible for
-     * converting the raw result into a boxed object.
-     * The invoker is kept separate from the target because it can be
-     * generated once per type erasure family, and reused across adapters.
-     */
-    static abstract class Adapter extends BoundMethodHandle {
-        protected final MethodHandle filter; // transforms one or more arguments
-        protected final MethodHandle target; // ultimate target
-
-        @Override
-        public String toString() {
-            return MethodHandleImpl.addTypeString(target, this);
-        }
-
-        protected boolean isPrototype() { return target == null; }
-        protected Adapter(MethodHandle entryPoint) {
-            this(entryPoint, entryPoint, null);
-            assert(isPrototype());
-        }
-        protected MethodHandle prototypeEntryPoint() {
-            if (!isPrototype())  throw new InternalError();
-            return filter;
-        }
-
-        protected Adapter(MethodHandle entryPoint,
-                          MethodHandle filter, MethodHandle target) {
-            super(Access.TOKEN, entryPoint);
-            this.filter = filter;
-            this.target = target;
-        }
-
-        /** Make a copy of self, with new fields. */
-        protected abstract Adapter makeInstance(MethodHandle entryPoint,
-                MethodHandle filter, MethodHandle target);
-        // { return new ThisType(entryPoint, filter, target); }
-
-        static private final String CLASS_PREFIX; // "sun.dyn.FilterGeneric$"
-        static {
-            String aname = Adapter.class.getName();
-            String sname = Adapter.class.getSimpleName();
-            if (!aname.endsWith(sname))  throw new InternalError();
-            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
-        }
-        /** Find a sibing class of Adapter. */
-        static Class<? extends Adapter> findSubClass(String name) {
-            String cname = Adapter.CLASS_PREFIX + name;
-            try {
-                return Class.forName(cname).asSubclass(Adapter.class);
-            } catch (ClassNotFoundException ex) {
-                return null;
-            } catch (ClassCastException ex) {
-                return null;
-            }
-        }
-    }
-
-    static enum Kind {
-        value('V'),      // filter and replace Nth argument value
-        fold('F'),       // fold first N arguments, prepend result
-        collect('C'),    // collect last N arguments, replace with result
-        flyby('Y'),      // reify entire argument list, filter, pass to target
-        LIMIT('?');
-        static final int COUNT = LIMIT.ordinal();
-
-        final char key;
-        Kind(char key) { this.key = key; }
-        String invokerName(int pos) { return "invoke_"+key+""+pos; }
-        int invokerIndex(int pos) { return pos * COUNT + ordinal(); }
-    }
-
-    /* generated classes follow this pattern:
-    static class F1X extends Adapter {
-        protected F1X(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F1X(MethodHandle e, MethodHandle f, MethodHandle t)
-                        { super(e, f, t); }
-        protected F1X makeInstance(MethodHandle e, MethodHandle f, MethodHandle t)
-                        { return new F1X(e, f, t); }
-        protected Object invoke_V0(Object a0) { return target.invokeExact(filter.invokeExact(a0)); }
-        protected Object invoke_F0(Object a0) { return target.invokeExact(filter.invokeExact(), a0); }
-        protected Object invoke_F1(Object a0) { return target.invokeExact(filter.invokeExact(a0), a0); }
-        protected Object invoke_C0(Object a0) { return target.invokeExact(filter.invokeExact(a0)); }
-        protected Object invoke_C1(Object a0) { return target.invokeExact(a0, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0) { Object[] av = { a0 };
-                       filter.invokeExact(av); return target.invokeExact(av[0]); }
-    }
-    static class F2X extends Adapter {
-        protected F2X(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F2X(MethodHandle e, MethodHandle f, MethodHandle t)
-                        { super(e, f, t); }
-        protected F2X makeInstance(MethodHandle e, MethodHandle f, MethodHandle t)
-                        { return new F2X(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0), a1); }
-        protected Object invoke_V1(Object a0, Object a1) { return target.invokeExact(a0, filter.invokeExact(a1)); }
-        protected Object invoke_F0(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(), a0, a1); }
-        protected Object invoke_F1(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0), a0, a1); }
-        protected Object invoke_F2(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0, a1), a0, a1); }
-        protected Object invoke_C0(Object a0, Object a1) { return target.invokeExact(filter.invokeExact(a0, a1)); }
-        protected Object invoke_C1(Object a0, Object a1) { return target.invokeExact(a0, filter.invokeExact(a1)); }
-        protected Object invoke_C2(Object a0, Object a1) { return target.invokeExact(a0, a1, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1) { Object[] av = { a0, a1 };
-                       filter.invokeExact(av); return target.invokeExact(av[0], av[1]); }
-    }
-    // */
-
-    // This one is written by hand:
-    static class F0 extends Adapter {
-        protected F0(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F0(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F0 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F0(e, f, t); }
-        protected Object invoke_F0() throws Throwable {
-            return target.invokeExact(filter.invokeExact()); }
-        protected Object invoke_C0() throws Throwable {
-            return target.invokeExact(filter.invokeExact()); }
-        static final Object[] NO_ARGS = { };
-        protected Object invoke_Y0() throws Throwable {
-            filter.invokeExact(NO_ARGS); // make the flyby
-            return target.invokeExact(); }
-    }
-
-/*
-  : SHELL; n=FilterGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -ea -cp . genclasses | sed 's| *[/]/ *$||') >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
-//{{{
-import java.util.*;
-class genclasses {
-    static String[][] TEMPLATES = { {
-        "@for@ N=1..20",
-        "    //@each-cat@",
-        "    static class @cat@ extends Adapter {",
-        "        protected @cat@(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype",
-        "        protected @cat@(MethodHandle e, MethodHandle f, MethodHandle t) {",
-        "            super(e, f, t); }",
-        "        protected @cat@ makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {",
-        "            return new @cat@(e, f, t); }",
-        "        //@each-P@",
-        "        protected Object invoke_V@P@(@Tvav@) throws Throwable {",
-        "            return target.invokeExact(@a0_@@Psp@filter.invokeExact(a@P@)@_aN@); }",
-        "        //@end-P@",
-        "        //@each-P@",
-        "        protected Object invoke_F@P@(@Tvav@) throws Throwable {",
-        "            return target.invokeExact(filter.invokeExact(@a0@),",
-        "                                 @av@); }",
-        "        //@end-P@",
-        "        protected Object invoke_F@N@(@Tvav@) throws Throwable {",
-        "            return target.invokeExact(filter.invokeExact(@av@),",
-        "                                 @av@); }",
-        "        //@each-P@",
-        "        protected Object invoke_C@P@(@Tvav@) throws Throwable {",
-        "            return target.invokeExact(@a0_@filter.invokeExact(a@P@@_aN@)); }",
-        "        //@end-P@",
-        "        protected Object invoke_C@N@(@Tvav@) throws Throwable {",
-        "            return target.invokeExact(@av@, filter.invokeExact()); }",
-        "        protected Object invoke_Y0(@Tvav@) throws Throwable {",
-        "            Object[] av = { @av@ };",
-        "            filter.invokeExact(av); // make the flyby",
-        "            return target.invokeExact(@av[i]@); }",
-        "    }",
-    } };
-    static final String NEWLINE_INDENT = " //\n                                 ";
-    enum VAR {
-        cat, N, P, Tvav, av, a0, a0_, _aN, Psp, av_i_;
-        public final String pattern = "@"+toString().replace('_','.')+"@";
-        public String binding = toString();
-        static void makeBindings(boolean topLevel, int inargs, int pos) {
-            assert(-1 <= pos && pos < inargs);
-            VAR.cat.binding = "F"+inargs;
-            VAR.N.binding = String.valueOf(inargs); // incoming arg count
-            VAR.P.binding = String.valueOf(pos);  // selected arg position
-            String[] av = new String[inargs];
-            String[] Tvav = new String[inargs];
-            String[] av_i_ = new String[inargs];
-            for (int i = 0; i < inargs; i++) {
-                av[i] = arg(i);
-                av_i_[i] = "av["+i+"]";
-                String spc = "";
-                if (i > 0 && i % 4 == 0) spc = NEWLINE_INDENT+(pos>9?" ":"")+"  ";
-                Tvav[i] = spc+param("Object", av[i]);
-            }
-            VAR.av.binding = comma(av);
-            VAR.av_i_.binding = comma(av_i_);
-            VAR.Tvav.binding = comma(Tvav);
-            if (pos >= 0) {
-                VAR.Psp.binding = (pos > 0 && pos % 10 == 0) ? NEWLINE_INDENT : "";
-                String[] a0 = new String[pos];
-                String[] aN = new String[inargs - (pos+1)];
-                for (int i = 0; i < pos; i++) {
-                    String spc = "";
-                    if (i > 0 && i % 10 == 0) spc = NEWLINE_INDENT;
-                    a0[i] = spc+av[i];
-                }
-                VAR.a0.binding = comma(a0);
-                VAR.a0_.binding = comma(a0, ", ");
-                for (int i = pos+1; i < inargs; i++) {
-                    String spc = "";
-                    if (i > 0 && i % 10 == 0) spc = NEWLINE_INDENT;
-                    aN[i - (pos+1)] = spc+av[i];
-                }
-                VAR._aN.binding = comma(", ", aN);
-            }
-        }
-        static String arg(int i) { return "a"+i; }
-        static String param(String t, String a) { return t+" "+a; }
-        static String comma(String[] v) { return comma(v, ""); }
-        static String comma(String[] v, String sep) { return comma("", v, sep); }
-        static String comma(String sep, String[] v) { return comma(sep, v, ""); }
-        static String comma(String sep1, String[] v, String sep2) {
-            if (v.length == 0)  return "";
-            String res = v[0];
-            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
-            return sep1 + res + sep2;
-        }
-        static String transform(String string) {
-            for (VAR var : values())
-                string = string.replaceAll(var.pattern, var.binding);
-            return string;
-        }
-    }
-    static String[] stringsIn(String[] strings, int beg, int end) {
-        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
-    }
-    static String[] stringsBefore(String[] strings, int pos) {
-        return stringsIn(strings, 0, pos);
-    }
-    static String[] stringsAfter(String[] strings, int pos) {
-        return stringsIn(strings, pos, strings.length);
-    }
-    static int indexAfter(String[] strings, int pos, String tag) {
-        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
-    }
-    static int indexBefore(String[] strings, int pos, String tag) {
-        for (int i = pos, end = strings.length; ; i++) {
-            if (i == end || strings[i].endsWith(tag))  return i;
-        }
-    }
-    static int MIN_ARITY, MAX_ARITY;
-    public static void main(String... av) {
-        for (String[] template : TEMPLATES) {
-            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
-            String[] forLines = stringsBefore(template, forLinesLimit);
-            template = stringsAfter(template, forLinesLimit);
-            for (String forLine : forLines)
-                expandTemplate(forLine, template);
-        }
-    }
-    static void expandTemplate(String forLine, String[] template) {
-        String[] params = forLine.split("[^0-9]+");
-        if (params[0].length() == 0)  params = stringsAfter(params, 1);
-        System.out.println("//params="+Arrays.asList(params));
-        int pcur = 0;
-        MIN_ARITY = Integer.valueOf(params[pcur++]);
-        MAX_ARITY = Integer.valueOf(params[pcur++]);
-        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
-        for (int inargs = MIN_ARITY; inargs <= MAX_ARITY; inargs++) {
-            expandTemplate(template, true, inargs, -1);
-        }
-    }
-    static void expandTemplate(String[] template, boolean topLevel, int inargs, int pos) {
-        VAR.makeBindings(topLevel, inargs, pos);
-        for (int i = 0; i < template.length; i++) {
-            String line = template[i];
-            if (line.endsWith("@each-cat@")) {
-                // ignore
-            } else if (line.endsWith("@each-P@")) {
-                int blockEnd = indexAfter(template, i, "@end-P@");
-                String[] block = stringsIn(template, i+1, blockEnd-1);
-                for (int pos1 = Math.max(0,pos); pos1 < inargs; pos1++)
-                    expandTemplate(block, false, inargs, pos1);
-                VAR.makeBindings(topLevel, inargs, pos);
-                i = blockEnd-1; continue;
-            } else {
-                System.out.println(VAR.transform(line));
-            }
-        }
-    }
-}
-//}}} */
-//params=[1, 20]
-    static class F1 extends Adapter {
-        protected F1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F1(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F1 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F1(e, f, t); }
-        protected Object invoke_V0(Object a0) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0)); }
-        protected Object invoke_F0(Object a0) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0); }
-        protected Object invoke_F1(Object a0) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0); }
-        protected Object invoke_C0(Object a0) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0)); }
-        protected Object invoke_C1(Object a0) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0) throws Throwable {
-            Object[] av = { a0 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0]); }
-    }
-    static class F2 extends Adapter {
-        protected F2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F2(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F2 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F2(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1); }
-        protected Object invoke_V1(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1)); }
-        protected Object invoke_F0(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1); }
-        protected Object invoke_F1(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1); }
-        protected Object invoke_F2(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1); }
-        protected Object invoke_C0(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1)); }
-        protected Object invoke_C1(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1)); }
-        protected Object invoke_C2(Object a0, Object a1) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1) throws Throwable {
-            Object[] av = { a0, a1 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1]); }
-    }
-    static class F3 extends Adapter {
-        protected F3(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F3(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F3 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F3(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2) throws Throwable {
-            Object[] av = { a0, a1, a2 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2]); }
-    }
-    static class F4 extends Adapter {
-        protected F4(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F4(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F4 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F4(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            Object[] av = { a0, a1, a2, a3 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3]); }
-    }
-    static class F5 extends Adapter {
-        protected F5(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F5(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F5 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F5(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4]); }
-    }
-    static class F6 extends Adapter {
-        protected F6(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F6(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F6 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F6(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5]); }
-    }
-    static class F7 extends Adapter {
-        protected F7(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F7(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F7 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F7(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6]); }
-    }
-    static class F8 extends Adapter {
-        protected F8(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F8(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F8 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F8(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7]); }
-    }
-    static class F9 extends Adapter {
-        protected F9(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F9(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F9 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F9(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8]); }
-    }
-    static class F10 extends Adapter {
-        protected F10(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F10(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F10 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F10(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9]); }
-    }
-    static class F11 extends Adapter {
-        protected F11(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F11(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F11 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F11(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10]); }
-    }
-    static class F12 extends Adapter {
-        protected F12(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F12(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F12 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F12(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11]); }
-    }
-    static class F13 extends Adapter {
-        protected F13(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F13(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F13 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F13(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12]); }
-    }
-    static class F14 extends Adapter {
-        protected F14(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F14(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F14 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F14(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13]); }
-    }
-    static class F15 extends Adapter {
-        protected F15(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F15(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F15 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F15(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13, a14); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13, a14); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13, a14); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13, a14); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13), a14); }
-        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13, a14)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13, a14)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13, a14)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13, a14)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14)); }
-        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14]); }
-    }
-    static class F16 extends Adapter {
-        protected F16(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F16(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F16 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F16(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13, a14, a15); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13, a14, a15); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13, a14, a15); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13), a14, a15); }
-        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14), a15); }
-        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13, a14, a15)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13, a14, a15)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13, a14, a15)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14, a15)); }
-        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15)); }
-        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15]); }
-    }
-    static class F17 extends Adapter {
-        protected F17(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F17(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F17 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F17(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16); }
-        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16); }
-        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16); }
-        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16)); }
-        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16)); }
-        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16)); }
-        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16]); }
-    }
-    static class F18 extends Adapter {
-        protected F18(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F18(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F18 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F18(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16, a17); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16, a17); }
-        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16, a17); }
-        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16, a17); }
-        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16), a17); }
-        protected Object invoke_V17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_F18(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16, a17)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16, a17)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16, a17)); }
-        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16, a17)); }
-        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16, a17)); }
-        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17)); }
-        protected Object invoke_C18(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16], av[17]); }
-    }
-    static class F19 extends Adapter {
-        protected F19(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F19(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F19 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F19(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16, a17, a18); }
-        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16, a17, a18); }
-        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16, a17, a18); }
-        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16), a17, a18); }
-        protected Object invoke_V17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17), a18); }
-        protected Object invoke_V18(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F18(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_F19(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16, a17, a18)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16, a17, a18)); }
-        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16, a17, a18)); }
-        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16, a17, a18)); }
-        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17, a18)); }
-        protected Object invoke_C18(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18)); }
-        protected Object invoke_C19(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16], av[17], av[18]); }
-    }
-    static class F20 extends Adapter {
-        protected F20(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected F20(MethodHandle e, MethodHandle f, MethodHandle t) {
-            super(e, f, t); }
-        protected F20 makeInstance(MethodHandle e, MethodHandle f, MethodHandle t) {
-            return new F20(e, f, t); }
-        protected Object invoke_V0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0), a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1), a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2), a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3), a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4), a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5), a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6), a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7), a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8), a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9),
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 filter.invokeExact(a10), a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11), a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12), a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13), a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_V14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14), a15, a16, a17, a18, a19); }
-        protected Object invoke_V15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15), a16, a17, a18, a19); }
-        protected Object invoke_V16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16), a17, a18, a19); }
-        protected Object invoke_V17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17), a18, a19); }
-        protected Object invoke_V18(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18), a19); }
-        protected Object invoke_V19(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, filter.invokeExact(a19)); }
-        protected Object invoke_F0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F18(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F19(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_F20(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19),
-                                 a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19); }
-        protected Object invoke_C0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(filter.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C1(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, filter.invokeExact(a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C2(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, filter.invokeExact(a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C3(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, filter.invokeExact(a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C4(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, filter.invokeExact(a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C5(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, filter.invokeExact(a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C6(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, filter.invokeExact(a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C7(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, filter.invokeExact(a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C8(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, filter.invokeExact(a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C9(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, filter.invokeExact(a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C10(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, filter.invokeExact(a10, a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C11(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, filter.invokeExact(a11, a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C12(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, filter.invokeExact(a12, a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C13(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, filter.invokeExact(a13, a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C14(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, filter.invokeExact(a14, a15, a16, a17, a18, a19)); }
-        protected Object invoke_C15(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, filter.invokeExact(a15, a16, a17, a18, a19)); }
-        protected Object invoke_C16(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, filter.invokeExact(a16, a17, a18, a19)); }
-        protected Object invoke_C17(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, filter.invokeExact(a17, a18, a19)); }
-        protected Object invoke_C18(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, filter.invokeExact(a18, a19)); }
-        protected Object invoke_C19(Object a0, Object a1, Object a2, Object a3,
-                                    Object a4, Object a5, Object a6, Object a7,
-                                    Object a8, Object a9, Object a10, Object a11,
-                                    Object a12, Object a13, Object a14, Object a15,
-                                    Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
-                                 a10, a11, a12, a13, a14, a15, a16, a17, a18, filter.invokeExact(a19)); }
-        protected Object invoke_C20(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, filter.invokeExact()); }
-        protected Object invoke_Y0(Object a0, Object a1, Object a2, Object a3,
-                                   Object a4, Object a5, Object a6, Object a7,
-                                   Object a8, Object a9, Object a10, Object a11,
-                                   Object a12, Object a13, Object a14, Object a15,
-                                   Object a16, Object a17, Object a18, Object a19) throws Throwable {
-            Object[] av = { a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19 };
-            filter.invokeExact(av); // make the flyby
-            return target.invokeExact(av[0], av[1], av[2], av[3], av[4], av[5], av[6], av[7], av[8], av[9], av[10], av[11], av[12], av[13], av[14], av[15], av[16], av[17], av[18], av[19]); }
-    }
-}
--- a/src/share/classes/sun/dyn/FilterOneArgument.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import static sun.dyn.MemberName.uncaughtException;
-
-/**
- * Unary function composition, useful for many small plumbing jobs.
- * The invoke method takes a single reference argument, and returns a reference
- * Internally, it first calls the {@code filter} method on the argument,
- * Making up the difference between the raw method type and the
- * final method type is the responsibility of a JVM-level adapter.
- * @author jrose
- */
-public class FilterOneArgument extends BoundMethodHandle {
-    protected final MethodHandle filter;  // Object -> Object
-    protected final MethodHandle target;  // Object -> Object
-
-    @Override
-    public String toString() {
-        return target.toString();
-    }
-
-    protected Object invoke(Object argument) throws Throwable {
-        Object filteredArgument = filter.invokeExact(argument);
-        return target.invokeExact(filteredArgument);
-    }
-
-    private static final MethodHandle INVOKE;
-    static {
-        try {
-            INVOKE =
-                MethodHandleImpl.IMPL_LOOKUP.findVirtual(FilterOneArgument.class, "invoke",
-                                                         MethodType.genericMethodType(1));
-        } catch (NoAccessException ex) {
-            throw uncaughtException(ex);
-        }
-    }
-
-    protected FilterOneArgument(MethodHandle filter, MethodHandle target) {
-        super(Access.TOKEN, INVOKE);
-        this.filter = filter;
-        this.target = target;
-    }
-
-    public static MethodHandle make(MethodHandle filter, MethodHandle target) {
-        if (filter == null)  return target;
-        if (target == null)  return filter;
-        return new FilterOneArgument(filter, target);
-    }
-
-//    MethodHandle make(MethodHandle filter1, MethodHandle filter2, MethodHandle target) {
-//        MethodHandle filter = make(filter1, filter2);
-//        return make(filter, target);
-//    }
-}
--- a/src/share/classes/sun/dyn/FromGeneric.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,628 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.lang.reflect.*;
-import sun.dyn.util.*;
-
-/**
- * Adapters which mediate between incoming calls which are generic
- * and outgoing calls which are not.  Any call can be represented generically
- * boxing up its arguments, and (on return) unboxing the return value.
- * <p>
- * A call is "generic" (in MethodHandle terms) if its MethodType features
- * only Object arguments.  A non-generic call therefore features
- * primitives and/or reference types other than Object.
- * An adapter has types for its incoming and outgoing calls.
- * The incoming call type is simply determined by the adapter's type
- * (the MethodType it presents to callers).  The outgoing call type
- * is determined by the adapter's target (a MethodHandle that the adapter
- * either binds internally or else takes as a leading argument).
- * (To stretch the term, adapter-like method handles may have multiple
- * targets or be polymorphic across multiple call types.)
- * @author jrose
- */
-class FromGeneric {
-    // type for the outgoing call (may have primitives, etc.)
-    private final MethodType targetType;
-    // type of the outgoing call internal to the adapter
-    private final MethodType internalType;
-    // prototype adapter (clone and customize for each new target!)
-    private final Adapter adapter;
-    // entry point for adapter (Adapter mh, a...) => ...
-    private final MethodHandle entryPoint;
-    // unboxing invoker of type (MH, Object**N) => raw return value
-    // it makes up the difference of internalType => targetType
-    private final MethodHandle unboxingInvoker;
-    // conversion which boxes a the target's raw return value
-    private final MethodHandle returnConversion;
-
-    /** Compute and cache information common to all unboxing adapters
-     *  that can call out to targets of the erasure-family of the given erased type.
-     */
-    private FromGeneric(MethodType targetType) {
-        this.targetType = targetType;
-        MethodType internalType0;
-        // the target invoker will generally need casts on reference arguments
-        Adapter ad = findAdapter(internalType0 = targetType.erase());
-        if (ad != null) {
-            // Immediate hit to exactly the adapter we want,
-            // with no monkeying around with primitive types.
-            this.internalType = internalType0;
-            this.adapter = ad;
-            this.entryPoint = ad.prototypeEntryPoint();
-            this.returnConversion = computeReturnConversion(targetType, internalType0);
-            this.unboxingInvoker = computeUnboxingInvoker(targetType, internalType0);
-            return;
-        }
-
-        // outgoing primitive arguments will be wrapped; unwrap them
-        MethodType primsAsObj = MethodTypeImpl.of(targetType).primArgsAsBoxes();
-        MethodType objArgsRawRet = MethodTypeImpl.of(primsAsObj).primsAsInts();
-        if (objArgsRawRet != targetType)
-            ad = findAdapter(internalType0 = objArgsRawRet);
-        if (ad == null) {
-            ad = buildAdapterFromBytecodes(internalType0 = targetType);
-        }
-        this.internalType = internalType0;
-        this.adapter = ad;
-        MethodType tepType = targetType.insertParameterTypes(0, adapter.getClass());
-        this.entryPoint = ad.prototypeEntryPoint();
-        this.returnConversion = computeReturnConversion(targetType, internalType0);
-        this.unboxingInvoker = computeUnboxingInvoker(targetType, internalType0);
-    }
-
-    /**
-     * The typed target will be called according to targetType.
-     * The adapter code will in fact see the raw result from internalType,
-     * and must box it into an object.  Produce a converter for this.
-     */
-    private static MethodHandle computeReturnConversion(
-            MethodType targetType, MethodType internalType) {
-        Class<?> tret = targetType.returnType();
-        Class<?> iret = internalType.returnType();
-        Wrapper wrap = Wrapper.forBasicType(tret);
-        if (!iret.isPrimitive()) {
-            assert(iret == Object.class);
-            return ValueConversions.identity();
-        } else if (wrap.primitiveType() == iret) {
-            return ValueConversions.box(wrap, false);
-        } else {
-            assert(tret == double.class ? iret == long.class : iret == int.class);
-            return ValueConversions.boxRaw(wrap, false);
-        }
-    }
-
-    /**
-     * The typed target will need an exact invocation point; provide it here.
-     * The adapter will possibly need to make a slightly different call,
-     * so adapt the invoker.  This way, the logic for making up the
-     * difference between what the adapter can call and what the target
-     * needs can be cached once per type.
-     */
-    private static MethodHandle computeUnboxingInvoker(
-            MethodType targetType, MethodType internalType) {
-        // All the adapters we have here have reference-untyped internal calls.
-        assert(internalType == internalType.erase());
-        MethodHandle invoker = MethodHandles.exactInvoker(targetType);
-        // cast all narrow reference types, unbox all primitive arguments:
-        MethodType fixArgsType = internalType.changeReturnType(targetType.returnType());
-        MethodHandle fixArgs = AdapterMethodHandle.convertArguments(Access.TOKEN,
-                                 invoker, Invokers.invokerType(fixArgsType),
-                                 invoker.type(), null);
-        if (fixArgs == null)
-            throw new InternalError("bad fixArgs");
-        // reinterpret the calling sequence as raw:
-        MethodHandle retyper = AdapterMethodHandle.makeRetypeRaw(Access.TOKEN,
-                                        Invokers.invokerType(internalType), fixArgs);
-        if (retyper == null)
-            throw new InternalError("bad retyper");
-        return retyper;
-    }
-
-    Adapter makeInstance(MethodHandle typedTarget) {
-        MethodType type = typedTarget.type();
-        if (type == targetType) {
-            return adapter.makeInstance(entryPoint, unboxingInvoker, returnConversion, typedTarget);
-        }
-        // my erased-type is not exactly the same as the desired type
-        assert(type.erase() == targetType);  // else we are busted
-        MethodHandle invoker = computeUnboxingInvoker(type, internalType);
-        return adapter.makeInstance(entryPoint, invoker, returnConversion, typedTarget);
-    }
-
-    /** Build an adapter of the given generic type, which invokes typedTarget
-     *  on the incoming arguments, after unboxing as necessary.
-     *  The return value is boxed if necessary.
-     * @param genericType  the required type of the result
-     * @param typedTarget the target
-     * @return an adapter method handle
-     */
-    public static MethodHandle make(MethodHandle typedTarget) {
-        MethodType type = typedTarget.type();
-        if (type == type.generic())  return typedTarget;
-        return FromGeneric.of(type).makeInstance(typedTarget);
-    }
-
-    /** Return the adapter information for this type's erasure. */
-    static FromGeneric of(MethodType type) {
-        MethodTypeImpl form = MethodTypeImpl.of(type);
-        FromGeneric fromGen = form.fromGeneric;
-        if (fromGen == null)
-            form.fromGeneric = fromGen = new FromGeneric(form.erasedType());
-        return fromGen;
-    }
-
-    public String toString() {
-        return "FromGeneric"+targetType;
-    }
-
-    /* Create an adapter that handles spreading calls for the given type. */
-    static Adapter findAdapter(MethodType internalType) {
-        MethodType entryType = internalType.generic();
-        MethodTypeImpl form = MethodTypeImpl.of(internalType);
-        Class<?> rtype = internalType.returnType();
-        int argc = form.parameterCount();
-        int lac = form.longPrimitiveParameterCount();
-        int iac = form.primitiveParameterCount() - lac;
-        String intsAndLongs = (iac > 0 ? "I"+iac : "")+(lac > 0 ? "J"+lac : "");
-        String rawReturn = String.valueOf(Wrapper.forPrimitiveType(rtype).basicTypeChar());
-        String cname0 = rawReturn + argc;
-        String cname1 = "A"       + argc;
-        String[] cnames = { cname0+intsAndLongs, cname0, cname1+intsAndLongs, cname1 };
-        String iname = "invoke_"+cname0+intsAndLongs;
-        // e.g., D5I2, D5, L5I2, L5; invoke_D5
-        for (String cname : cnames) {
-            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
-            if (acls == null)  continue;
-            // see if it has the required invoke method
-            MethodHandle entryPoint = null;
-            try {
-                entryPoint = MethodHandleImpl.IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
-            } catch (NoAccessException ex) {
-            }
-            if (entryPoint == null)  continue;
-            Constructor<? extends Adapter> ctor = null;
-            try {
-                ctor = acls.getDeclaredConstructor(MethodHandle.class);
-            } catch (NoSuchMethodException ex) {
-            } catch (SecurityException ex) {
-            }
-            if (ctor == null)  continue;
-            try {
-                // Produce an instance configured as a prototype.
-                return ctor.newInstance(entryPoint);
-            } catch (IllegalArgumentException ex) {
-            } catch (InvocationTargetException wex) {
-                Throwable ex = wex.getTargetException();
-                if (ex instanceof Error)  throw (Error)ex;
-                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
-            } catch (InstantiationException ex) {
-            } catch (IllegalAccessException ex) {
-            }
-        }
-        return null;
-    }
-
-    static Adapter buildAdapterFromBytecodes(MethodType internalType) {
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    /**
-     * This adapter takes some untyped arguments, and returns an untyped result.
-     * Internally, it applies the invoker to the target, which causes the
-     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
-     * This result is passed to convert, which is responsible for
-     * converting the raw result into a boxed object.
-     * The invoker is kept separate from the target because it can be
-     * generated once per type erasure family, and reused across adapters.
-     */
-    static abstract class Adapter extends BoundMethodHandle {
-        /*
-         * class X<<R,int N>> extends Adapter {
-         *   (MH, Object**N)=>raw(R) invoker;
-         *   (any**N)=>R target;
-         *   raw(R)=>Object convert;
-         *   Object invoke(Object**N a) = convert(invoker(target, a...))
-         * }
-         */
-        protected final MethodHandle invoker;  // (MH, Object**N) => raw(R)
-        protected final MethodHandle convert;  // raw(R) => Object
-        protected final MethodHandle target;   // (any**N) => R
-
-        @Override
-        public String toString() {
-            return MethodHandleImpl.addTypeString(target, this);
-        }
-
-        protected boolean isPrototype() { return target == null; }
-        protected Adapter(MethodHandle entryPoint) {
-            this(entryPoint, null, entryPoint, null);
-            assert(isPrototype());
-        }
-        protected MethodHandle prototypeEntryPoint() {
-            if (!isPrototype())  throw new InternalError();
-            return convert;
-        }
-
-        protected Adapter(MethodHandle entryPoint,
-                          MethodHandle invoker, MethodHandle convert, MethodHandle target) {
-            super(Access.TOKEN, entryPoint);
-            this.invoker = invoker;
-            this.convert = convert;
-            this.target  = target;
-        }
-
-        /** Make a copy of self, with new fields. */
-        protected abstract Adapter makeInstance(MethodHandle entryPoint,
-                MethodHandle invoker, MethodHandle convert, MethodHandle target);
-        // { return new ThisType(entryPoint, convert, target); }
-
-        /// Conversions on the value returned from the target.
-        protected Object convert_L(Object result) throws Throwable { return convert.invokeExact(result); }
-        protected Object convert_I(int    result) throws Throwable { return convert.invokeExact(result); }
-        protected Object convert_J(long   result) throws Throwable { return convert.invokeExact(result); }
-        protected Object convert_F(float  result) throws Throwable { return convert.invokeExact(result); }
-        protected Object convert_D(double result) throws Throwable { return convert.invokeExact(result); }
-
-        static private final String CLASS_PREFIX; // "sun.dyn.FromGeneric$"
-        static {
-            String aname = Adapter.class.getName();
-            String sname = Adapter.class.getSimpleName();
-            if (!aname.endsWith(sname))  throw new InternalError();
-            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
-        }
-        /** Find a sibing class of Adapter. */
-        static Class<? extends Adapter> findSubClass(String name) {
-            String cname = Adapter.CLASS_PREFIX + name;
-            try {
-                return Class.forName(cname).asSubclass(Adapter.class);
-            } catch (ClassNotFoundException ex) {
-                return null;
-            } catch (ClassCastException ex) {
-                return null;
-            }
-        }
-    }
-
-    /* generated classes follow this pattern:
-    static class xA2 extends Adapter {
-        protected xA2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected xA2(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected xA2 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new xA2(e, i, c, t); }
-        protected Object invoke_L2(Object a0, Object a1) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_I2(Object a0, Object a1) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_J2(Object a0, Object a1) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_F2(Object a0, Object a1) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_D2(Object a0, Object a1) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1)); }
-    }
-    // */
-
-/*
-: SHELL; n=FromGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
-//{{{
-import java.util.*;
-class genclasses {
-    static String[] TYPES = { "Object",    "int   ",    "long  ",    "float ",    "double" };
-    static String[] WRAPS = { "         ", "(Integer)", "(Long)   ", "(Float)  ", "(Double) " };
-    static String[] TCHARS = { "L",     "I",      "J",      "F",      "D",     "A" };
-    static String[][] TEMPLATES = { {
-        "@for@ arity=0..10  rcat<=4 nrefs<=99 nints=0   nlongs=0",
-        "    //@each-cat@",
-        "    static class @cat@ extends Adapter {",
-        "        protected @cat@(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype",
-        "        protected @cat@(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)",
-        "                        { super(e, i, c, t); }",
-        "        protected @cat@ makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)",
-        "                        { return new @cat@(e, i, c, t); }",
-        "        //@each-R@",
-        "        protected Object invoke_@catN@(@Tvav@) throws Throwable { return convert_@Rc@((@R@)@W@invoker.invokeExact(target@av@)); }",
-        "        //@end-R@",
-        "    }",
-    } };
-    static final String NEWLINE_INDENT = "\n                ";
-    enum VAR {
-        cat, catN, R, Rc, W, av, Tvav, Ovav;
-        public final String pattern = "@"+toString().replace('_','.')+"@";
-        public String binding;
-        static void makeBindings(boolean topLevel, int rcat, int nrefs, int nints, int nlongs) {
-            int nargs = nrefs + nints + nlongs;
-            if (topLevel)
-                VAR.cat.binding = catstr(ALL_RETURN_TYPES ? TYPES.length : rcat, nrefs, nints, nlongs);
-            VAR.catN.binding = catstr(rcat, nrefs, nints, nlongs);
-            VAR.R.binding = TYPES[rcat];
-            VAR.Rc.binding = TCHARS[rcat];
-            VAR.W.binding = WRAPS[rcat];
-            String[] Tv = new String[nargs];
-            String[] av = new String[nargs];
-            String[] Tvav = new String[nargs];
-            String[] Ovav = new String[nargs];
-            for (int i = 0; i < nargs; i++) {
-                int tcat = (i < nrefs) ? 0 : (i < nrefs + nints) ? 1 : 2;
-                Tv[i] = TYPES[tcat];
-                av[i] = arg(i);
-                Tvav[i] = param(Tv[i], av[i]);
-                Ovav[i] = param("Object", av[i]);
-            }
-            VAR.av.binding = comma(", ", av);
-            VAR.Tvav.binding = comma(Tvav);
-            VAR.Ovav.binding = comma(Ovav);
-        }
-        static String arg(int i) { return "a"+i; }
-        static String param(String t, String a) { return t+" "+a; }
-        static String comma(String[] v) { return comma("", v); }
-        static String comma(String sep, String[] v) {
-            if (v.length == 0)  return "";
-            String res = sep+v[0];
-            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
-            return res;
-        }
-        static String transform(String string) {
-            for (VAR var : values())
-                string = string.replaceAll(var.pattern, var.binding);
-            return string;
-        }
-    }
-    static String[] stringsIn(String[] strings, int beg, int end) {
-        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
-    }
-    static String[] stringsBefore(String[] strings, int pos) {
-        return stringsIn(strings, 0, pos);
-    }
-    static String[] stringsAfter(String[] strings, int pos) {
-        return stringsIn(strings, pos, strings.length);
-    }
-    static int indexAfter(String[] strings, int pos, String tag) {
-        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
-    }
-    static int indexBefore(String[] strings, int pos, String tag) {
-        for (int i = pos, end = strings.length; ; i++) {
-            if (i == end || strings[i].endsWith(tag))  return i;
-        }
-    }
-    static int MIN_ARITY, MAX_ARITY, MAX_RCAT, MAX_REFS, MAX_INTS, MAX_LONGS;
-    static boolean ALL_ARG_TYPES, ALL_RETURN_TYPES;
-    static HashSet<String> done = new HashSet<String>();
-    public static void main(String... av) {
-        for (String[] template : TEMPLATES) {
-            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
-            String[] forLines = stringsBefore(template, forLinesLimit);
-            template = stringsAfter(template, forLinesLimit);
-            for (String forLine : forLines)
-                expandTemplate(forLine, template);
-        }
-    }
-    static void expandTemplate(String forLine, String[] template) {
-        String[] params = forLine.split("[^0-9]+");
-        if (params[0].length() == 0)  params = stringsAfter(params, 1);
-        System.out.println("//params="+Arrays.asList(params));
-        int pcur = 0;
-        MIN_ARITY = Integer.valueOf(params[pcur++]);
-        MAX_ARITY = Integer.valueOf(params[pcur++]);
-        MAX_RCAT  = Integer.valueOf(params[pcur++]);
-        MAX_REFS  = Integer.valueOf(params[pcur++]);
-        MAX_INTS  = Integer.valueOf(params[pcur++]);
-        MAX_LONGS = Integer.valueOf(params[pcur++]);
-        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
-        if (MAX_RCAT >= TYPES.length)  MAX_RCAT = TYPES.length - 1;
-        ALL_ARG_TYPES = (indexBefore(template, 0, "@each-Tv@") < template.length);
-        ALL_RETURN_TYPES = (indexBefore(template, 0, "@each-R@") < template.length);
-        for (int nargs = MIN_ARITY; nargs <= MAX_ARITY; nargs++) {
-            for (int rcat = 0; rcat <= MAX_RCAT; rcat++) {
-                expandTemplate(template, true, rcat, nargs, 0, 0);
-                if (ALL_ARG_TYPES)  break;
-                expandTemplateForPrims(template, true, rcat, nargs, 1, 1);
-                if (ALL_RETURN_TYPES)  break;
-            }
-        }
-    }
-    static String catstr(int rcat, int nrefs, int nints, int nlongs) {
-        int nargs = nrefs + nints + nlongs;
-        String cat = TCHARS[rcat] + nargs;
-        if (!ALL_ARG_TYPES)  cat += (nints==0?"":"I"+nints)+(nlongs==0?"":"J"+nlongs);
-        return cat;
-    }
-    static void expandTemplateForPrims(String[] template, boolean topLevel, int rcat, int nargs, int minints, int minlongs) {
-        for (int isLong = 0; isLong <= 1; isLong++) {
-            for (int nprims = 1; nprims <= nargs; nprims++) {
-                int nrefs = nargs - nprims;
-                int nints = ((1-isLong) * nprims);
-                int nlongs = (isLong * nprims);
-                expandTemplate(template, topLevel, rcat, nrefs, nints, nlongs);
-            }
-        }
-    }
-    static void expandTemplate(String[] template, boolean topLevel,
-                               int rcat, int nrefs, int nints, int nlongs) {
-        int nargs = nrefs + nints + nlongs;
-        if (nrefs > MAX_REFS || nints > MAX_INTS || nlongs > MAX_LONGS)  return;
-        VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
-        if (topLevel && !done.add(VAR.cat.binding)) {
-            System.out.println("    //repeat "+VAR.cat.binding);
-            return;
-        }
-        for (int i = 0; i < template.length; i++) {
-            String line = template[i];
-            if (line.endsWith("@each-cat@")) {
-                // ignore
-            } else if (line.endsWith("@each-R@")) {
-                int blockEnd = indexAfter(template, i, "@end-R@");
-                String[] block = stringsIn(template, i+1, blockEnd-1);
-                for (int rcat1 = rcat; rcat1 <= MAX_RCAT; rcat1++)
-                    expandTemplate(block, false, rcat1, nrefs, nints, nlongs);
-                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
-                i = blockEnd-1; continue;
-            } else if (line.endsWith("@each-Tv@")) {
-                int blockEnd = indexAfter(template, i, "@end-Tv@");
-                String[] block = stringsIn(template, i+1, blockEnd-1);
-                expandTemplate(block, false, rcat, nrefs, nints, nlongs);
-                expandTemplateForPrims(block, false, rcat, nargs, nints+1, nlongs+1);
-                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
-                i = blockEnd-1; continue;
-            } else {
-                System.out.println(VAR.transform(line));
-            }
-        }
-    }
-}
-//}}} */
-//params=[0, 10, 4, 99, 0, 0]
-    static class A0 extends Adapter {
-        protected A0(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A0(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A0 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A0(e, i, c, t); }
-        protected Object invoke_L0() throws Throwable { return convert_L((Object)invoker.invokeExact(target)); }
-        protected Object invoke_I0() throws Throwable { return convert_I((int)   invoker.invokeExact(target)); }
-        protected Object invoke_J0() throws Throwable { return convert_J((long)  invoker.invokeExact(target)); }
-        protected Object invoke_F0() throws Throwable { return convert_F((float) invoker.invokeExact(target)); }
-        protected Object invoke_D0() throws Throwable { return convert_D((double)invoker.invokeExact(target)); }
-    }
-    static class A1 extends Adapter {
-        protected A1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A1(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A1 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A1(e, i, c, t); }
-        protected Object invoke_L1(Object a0) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0)); }
-        protected Object invoke_I1(Object a0) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0)); }
-        protected Object invoke_J1(Object a0) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0)); }
-        protected Object invoke_F1(Object a0) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0)); }
-        protected Object invoke_D1(Object a0) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0)); }
-    }
-    static class A2 extends Adapter {
-        protected A2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A2(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A2 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A2(e, i, c, t); }
-        protected Object invoke_L2(Object a0, Object a1) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_I2(Object a0, Object a1) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_J2(Object a0, Object a1) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_F2(Object a0, Object a1) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1)); }
-        protected Object invoke_D2(Object a0, Object a1) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1)); }
-    }
-    static class A3 extends Adapter {
-        protected A3(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A3(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A3 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A3(e, i, c, t); }
-        protected Object invoke_L3(Object a0, Object a1, Object a2) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2)); }
-        protected Object invoke_I3(Object a0, Object a1, Object a2) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2)); }
-        protected Object invoke_J3(Object a0, Object a1, Object a2) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2)); }
-        protected Object invoke_F3(Object a0, Object a1, Object a2) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2)); }
-        protected Object invoke_D3(Object a0, Object a1, Object a2) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2)); }
-    }
-    static class A4 extends Adapter {
-        protected A4(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A4(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A4 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A4(e, i, c, t); }
-        protected Object invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3)); }
-        protected Object invoke_I4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3)); }
-        protected Object invoke_J4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3)); }
-        protected Object invoke_F4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3)); }
-        protected Object invoke_D4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3)); }
-    }
-    static class A5 extends Adapter {
-        protected A5(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A5(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A5 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A5(e, i, c, t); }
-        protected Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
-        protected Object invoke_I5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
-        protected Object invoke_J5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
-        protected Object invoke_F5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
-        protected Object invoke_D5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4)); }
-    }
-    static class A6 extends Adapter {
-        protected A6(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A6(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A6 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A6(e, i, c, t); }
-        protected Object invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_I6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_J6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_F6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_D6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5)); }
-    }
-    static class A7 extends Adapter {
-        protected A7(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A7(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A7 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A7(e, i, c, t); }
-        protected Object invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_I7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_J7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_F7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_D7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6)); }
-    }
-    static class A8 extends Adapter {
-        protected A8(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A8(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A8 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A8(e, i, c, t); }
-        protected Object invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_I8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_J8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_F8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_D8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7)); }
-    }
-    static class A9 extends Adapter {
-        protected A9(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A9(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A9 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A9(e, i, c, t); }
-        protected Object invoke_L9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_I9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_J9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_F9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_D9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-    }
-    static class A10 extends Adapter {
-        protected A10(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A10(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { super(e, i, c, t); }
-        protected A10 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t)
-                        { return new A10(e, i, c, t); }
-        protected Object invoke_L10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_L((Object)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_I10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_I((int)   invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_J10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_J((long)  invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_F10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_F((float) invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_D10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return convert_D((double)invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-    }
-}
--- a/src/share/classes/sun/dyn/InvokeGeneric.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.lang.reflect.*;
-import sun.dyn.util.*;
-
-/**
- * Adapters which manage MethodHanndle.invokeGeneric calls.
- * The JVM calls one of these when the exact type match fails.
- * @author jrose
- */
-class InvokeGeneric {
-    // erased type for the call, which originates from an invokeGeneric site
-    private final MethodType erasedCallerType;
-    // an invoker of type (MT, MH; A...) -> R
-    private final MethodHandle initialInvoker;
-
-    /** Compute and cache information for this adapter, so that it can
-     *  call out to targets of the erasure-family of the given erased type.
-     */
-    private InvokeGeneric(MethodType erasedCallerType) throws NoAccessException {
-        this.erasedCallerType = erasedCallerType;
-        this.initialInvoker = makeInitialInvoker();
-        assert initialInvoker.type().equals(erasedCallerType
-                                            .insertParameterTypes(0, MethodType.class, MethodHandle.class))
-            : initialInvoker.type();
-    }
-
-    private static MethodHandles.Lookup lookup() {
-        return MethodHandleImpl.IMPL_LOOKUP;
-    }
-
-    /** Return the adapter information for this type's erasure. */
-    static MethodHandle genericInvokerOf(MethodType type) {
-        MethodTypeImpl form = MethodTypeImpl.of(type);
-        MethodHandle genericInvoker = form.genericInvoker;
-        if (genericInvoker == null) {
-            try {
-                InvokeGeneric gen = new InvokeGeneric(form.erasedType());
-                form.genericInvoker = genericInvoker = gen.initialInvoker;
-            } catch (NoAccessException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-        return genericInvoker;
-    }
-
-    private MethodHandle makeInitialInvoker() throws NoAccessException {
-        // postDispatch = #(MH'; MT, MH; A...){MH'(MT, MH; A)}
-        MethodHandle postDispatch = makePostDispatchInvoker();
-        MethodHandle invoker;
-        if (returnConversionPossible()) {
-            invoker = MethodHandles.foldArguments(postDispatch,
-                                                  dispatcher("dispatchWithConversion"));
-        } else {
-            invoker = MethodHandles.foldArguments(postDispatch, dispatcher("dispatch"));
-        }
-        return invoker;
-    }
-
-    private static final Class<?>[] EXTRA_ARGS = { MethodType.class, MethodHandle.class };
-    private MethodHandle makePostDispatchInvoker() {
-        // Take (MH'; MT, MH; A...) and run MH'(MT, MH; A...).
-        MethodType invokerType = erasedCallerType.insertParameterTypes(0, EXTRA_ARGS);
-        return MethodHandles.exactInvoker(invokerType);
-    }
-    private MethodHandle dropDispatchArguments(MethodHandle targetInvoker) {
-        assert(targetInvoker.type().parameterType(0) == MethodHandle.class);
-        return MethodHandles.dropArguments(targetInvoker, 1, EXTRA_ARGS);
-    }
-
-    private MethodHandle dispatcher(String dispatchName) throws NoAccessException {
-        return lookup().bind(this, dispatchName,
-                             MethodType.methodType(MethodHandle.class,
-                                                   MethodType.class, MethodHandle.class));
-    }
-
-    static final boolean USE_AS_TYPE_PATH = true;
-
-    /** Return a method handle to invoke on the callerType, target, and remaining arguments.
-     *  The method handle must finish the call.
-     *  This is the first look at the caller type and target.
-     */
-    private MethodHandle dispatch(MethodType callerType, MethodHandle target) {
-        MethodType targetType = target.type();
-        if (USE_AS_TYPE_PATH || target instanceof AdapterMethodHandle.WithTypeHandler) {
-            MethodHandle newTarget = target.asType(callerType);
-            targetType = callerType;
-            Invokers invokers = MethodTypeImpl.invokers(Access.TOKEN, targetType);
-            MethodHandle invoker = invokers.erasedInvokerWithDrops;
-            if (invoker == null) {
-                invokers.erasedInvokerWithDrops = invoker =
-                    dropDispatchArguments(invokers.erasedInvoker());
-            }
-            return invoker.bindTo(newTarget);
-        }
-        throw new RuntimeException("NYI");
-    }
-
-    private MethodHandle dispatchWithConversion(MethodType callerType, MethodHandle target) {
-        MethodHandle finisher = dispatch(callerType, target);
-        if (returnConversionNeeded(callerType, target))
-            finisher = addReturnConversion(finisher, callerType.returnType());  //FIXME: slow
-        return finisher;
-    }
-
-    private boolean returnConversionPossible() {
-        Class<?> needType = erasedCallerType.returnType();
-        return !needType.isPrimitive();
-    }
-    private boolean returnConversionNeeded(MethodType callerType, MethodHandle target) {
-        Class<?> needType = callerType.returnType();
-        if (needType == erasedCallerType.returnType())
-            return false;  // no conversions possible, since must be primitive or Object
-        Class<?> haveType = target.type().returnType();
-        if (VerifyType.isNullConversion(haveType, needType))
-            return false;
-        return true;
-    }
-    private MethodHandle addReturnConversion(MethodHandle target, Class<?> type) {
-        if (true) throw new RuntimeException("NYI");
-        // FIXME: This is slow because it creates a closure node on every call that requires a return cast.
-        MethodType targetType = target.type();
-        MethodHandle caster = ValueConversions.identity(type);
-        caster = caster.asType(MethodType.methodType(type, targetType.returnType()));
-        // Drop irrelevant arguments, because we only care about the return value:
-        caster = MethodHandles.dropArguments(caster, 1, targetType.parameterList());
-        MethodHandle result = MethodHandles.foldArguments(caster, target);
-        return result.asType(target.type());
-    }
-
-    public String toString() {
-        return "InvokeGeneric"+erasedCallerType;
-    }
-}
--- a/src/share/classes/sun/dyn/Invokers.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import sun.dyn.empty.Empty;
-
-/**
- * Construction and caching of often-used invokers.
- * @author jrose
- */
-public class Invokers {
-    // exact type (sans leading taget MH) for the outgoing call
-    private final MethodType targetType;
-
-    // exact invoker for the outgoing call
-    private /*lazy*/ MethodHandle exactInvoker;
-
-    // erased (partially untyped but with primitives) invoker for the outgoing call
-    private /*lazy*/ MethodHandle erasedInvoker;
-    /*lazy*/ MethodHandle erasedInvokerWithDrops;  // for InvokeGeneric
-
-    // generic (untyped) invoker for the outgoing call
-    private /*lazy*/ MethodHandle genericInvoker;
-
-    // generic (untyped) invoker for the outgoing call; accepts a single Object[]
-    private final /*lazy*/ MethodHandle[] varargsInvokers;
-
-    // invoker for an unbound callsite
-    private /*lazy*/ MethodHandle uninitializedCallSite;
-
-    /** Compute and cache information common to all collecting adapters
-     *  that implement members of the erasure-family of the given erased type.
-     */
-    public Invokers(Access token, MethodType targetType) {
-        Access.check(token);
-        this.targetType = targetType;
-        this.varargsInvokers = new MethodHandle[targetType.parameterCount()+1];
-    }
-
-    public static MethodType invokerType(MethodType targetType) {
-        return targetType.insertParameterTypes(0, MethodHandle.class);
-    }
-
-    public MethodHandle exactInvoker() {
-        MethodHandle invoker = exactInvoker;
-        if (invoker != null)  return invoker;
-        try {
-            invoker = MethodHandleImpl.IMPL_LOOKUP.findVirtual(MethodHandle.class, "invoke", targetType);
-        } catch (NoAccessException ex) {
-            throw new InternalError("JVM cannot find invoker for "+targetType);
-        }
-        assert(invokerType(targetType) == invoker.type());
-        exactInvoker = invoker;
-        return invoker;
-    }
-
-    public MethodHandle genericInvoker() {
-        MethodHandle invoker1 = exactInvoker();
-        MethodHandle invoker = genericInvoker;
-        if (invoker != null)  return invoker;
-        MethodType genericType = targetType.generic();
-        invoker = MethodHandles.convertArguments(invoker1, invokerType(genericType));
-        genericInvoker = invoker;
-        return invoker;
-    }
-
-    public MethodHandle erasedInvoker() {
-        MethodHandle invoker1 = exactInvoker();
-        MethodHandle invoker = erasedInvoker;
-        if (invoker != null)  return invoker;
-        MethodType erasedType = targetType.erase();
-        if (erasedType == targetType.generic())
-            invoker = genericInvoker();
-        else
-            invoker = MethodHandles.convertArguments(invoker1, invokerType(erasedType));
-        erasedInvoker = invoker;
-        return invoker;
-    }
-
-    public MethodHandle varargsInvoker(int objectArgCount) {
-        MethodHandle vaInvoker = varargsInvokers[objectArgCount];
-        if (vaInvoker != null)  return vaInvoker;
-        MethodHandle gInvoker = genericInvoker();
-        MethodType vaType = MethodType.genericMethodType(objectArgCount, true);
-        vaInvoker = MethodHandles.spreadArguments(gInvoker, invokerType(vaType));
-        varargsInvokers[objectArgCount] = vaInvoker;
-        return vaInvoker;
-    }
-
-    private static MethodHandle THROW_UCS = null;
-
-    public MethodHandle uninitializedCallSite() {
-        MethodHandle invoker = uninitializedCallSite;
-        if (invoker != null)  return invoker;
-        if (targetType.parameterCount() > 0) {
-            MethodType type0 = targetType.dropParameterTypes(0, targetType.parameterCount());
-            Invokers invokers0 = MethodTypeImpl.invokers(Access.TOKEN, type0);
-            invoker = MethodHandles.dropArguments(invokers0.uninitializedCallSite(),
-                                                  0, targetType.parameterList());
-            assert(invoker.type().equals(targetType));
-            uninitializedCallSite = invoker;
-            return invoker;
-        }
-        if (THROW_UCS == null) {
-            try {
-                THROW_UCS = MethodHandleImpl.IMPL_LOOKUP
-                    .findStatic(CallSite.class, "uninitializedCallSite",
-                                MethodType.methodType(Empty.class));
-            } catch (NoAccessException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-        invoker = AdapterMethodHandle.makeRetypeRaw(Access.TOKEN, targetType, THROW_UCS);
-        assert(invoker.type().equals(targetType));
-        uninitializedCallSite = invoker;
-        return invoker;
-    }
-
-    public String toString() {
-        return "Invokers"+targetType;
-    }
-}
--- a/src/share/classes/sun/dyn/MemberName.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,725 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import sun.dyn.util.BytecodeDescriptor;
-import java.dyn.*;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Member;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import static sun.dyn.MethodHandleNatives.Constants.*;
-
-/**
- * A {@code MemberName} is a compact symbolic datum which fully characterizes
- * a method or field reference.
- * A member name refers to a field, method, constructor, or member type.
- * Every member name has a simple name (a string) and a type (either a Class or MethodType).
- * A member name may also have a non-null declaring class, or it may be simply
- * a naked name/type pair.
- * A member name may also have non-zero modifier flags.
- * Finally, a member name may be either resolved or unresolved.
- * If it is resolved, the existence of the named
- * <p>
- * Whether resolved or not, a member name provides no access rights or
- * invocation capability to its possessor.  It is merely a compact
- * representation of all symbolic information necessary to link to
- * and properly use the named member.
- * <p>
- * When resolved, a member name's internal implementation may include references to JVM metadata.
- * This representation is stateless and only decriptive.
- * It provides no private information and no capability to use the member.
- * <p>
- * By contrast, a {@linkplain java.lang.reflect.Method} contains fuller information
- * about the internals of a method (except its bytecodes) and also
- * allows invocation.  A MemberName is much lighter than a Method,
- * since it contains about 7 fields to the 16 of Method (plus its sub-arrays),
- * and those seven fields omit much of the information in Method.
- * @author jrose
- */
-public final class MemberName implements Member, Cloneable {
-    private Class<?>   clazz;       // class in which the method is defined
-    private String     name;        // may be null if not yet materialized
-    private Object     type;        // may be null if not yet materialized
-    private int        flags;       // modifier bits; see reflect.Modifier
-
-    private Object     vmtarget;    // VM-specific target value
-    private int        vmindex;     // method index within class or interface
-
-    { vmindex = VM_INDEX_UNINITIALIZED; }
-
-    /** Return the declaring class of this member.
-     *  In the case of a bare name and type, the declaring class will be null.
-     */
-    public Class<?> getDeclaringClass() {
-        if (clazz == null && isResolved()) {
-            expandFromVM();
-        }
-        return clazz;
-    }
-
-    /** Utility method producing the class loader of the declaring class. */
-    public ClassLoader getClassLoader() {
-        return clazz.getClassLoader();
-    }
-
-    /** Return the simple name of this member.
-     *  For a type, it is the same as {@link Class#getSimpleName}.
-     *  For a method or field, it is the simple name of the member.
-     *  For a constructor, it is always {@code "&lt;init&gt;"}.
-     */
-    public String getName() {
-        if (name == null) {
-            expandFromVM();
-            if (name == null)  return null;
-        }
-        return name;
-    }
-
-    /** Return the declared type of this member, which
-     *  must be a method or constructor.
-     */
-    public MethodType getMethodType() {
-        if (type == null) {
-            expandFromVM();
-            if (type == null)  return null;
-        }
-        if (!isInvocable())
-            throw newIllegalArgumentException("not invocable, no method type");
-        if (type instanceof MethodType) {
-            return (MethodType) type;
-        }
-        if (type instanceof String) {
-            String sig = (String) type;
-            MethodType res = MethodType.fromMethodDescriptorString(sig, getClassLoader());
-            this.type = res;
-            return res;
-        }
-        if (type instanceof Object[]) {
-            Object[] typeInfo = (Object[]) type;
-            Class<?>[] ptypes = (Class<?>[]) typeInfo[1];
-            Class<?> rtype = (Class<?>) typeInfo[0];
-            MethodType res = MethodType.methodType(rtype, ptypes);
-            this.type = res;
-            return res;
-        }
-        throw new InternalError("bad method type "+type);
-    }
-
-    /** Return the actual type under which this method or constructor must be invoked.
-     *  For non-static methods or constructors, this is the type with a leading parameter,
-     *  a reference to declaring class.  For static methods, it is the same as the declared type.
-     */
-    public MethodType getInvocationType() {
-        MethodType itype = getMethodType();
-        if (!isStatic())
-            itype = itype.insertParameterTypes(0, clazz);
-        return itype;
-    }
-
-    /** Utility method producing the parameter types of the method type. */
-    public Class<?>[] getParameterTypes() {
-        return getMethodType().parameterArray();
-    }
-
-    /** Utility method producing the return type of the method type. */
-    public Class<?> getReturnType() {
-        return getMethodType().returnType();
-    }
-
-    /** Return the declared type of this member, which
-     *  must be a field or type.
-     *  If it is a type member, that type itself is returned.
-     */
-    public Class<?> getFieldType() {
-        if (type == null) {
-            expandFromVM();
-            if (type == null)  return null;
-        }
-        if (isInvocable())
-            throw newIllegalArgumentException("not a field or nested class, no simple type");
-        if (type instanceof Class<?>) {
-            return (Class<?>) type;
-        }
-        if (type instanceof String) {
-            String sig = (String) type;
-            MethodType mtype = MethodType.fromMethodDescriptorString("()"+sig, getClassLoader());
-            Class<?> res = mtype.returnType();
-            this.type = res;
-            return res;
-        }
-        throw new InternalError("bad field type "+type);
-    }
-
-    /** Utility method to produce either the method type or field type of this member. */
-    public Object getType() {
-        return (isInvocable() ? getMethodType() : getFieldType());
-    }
-
-    /** Utility method to produce the signature of this member,
-     *  used within the class file format to describe its type.
-     */
-    public String getSignature() {
-        if (type == null) {
-            expandFromVM();
-            if (type == null)  return null;
-        }
-        if (type instanceof String)
-            return (String) type;
-        if (isInvocable())
-            return BytecodeDescriptor.unparse(getMethodType());
-        else
-            return BytecodeDescriptor.unparse(getFieldType());
-    }
-
-    /** Return the modifier flags of this member.
-     *  @see java.lang.reflect.Modifier
-     */
-    public int getModifiers() {
-        return (flags & RECOGNIZED_MODIFIERS);
-    }
-
-    private void setFlags(int flags) {
-        this.flags = flags;
-        assert(testAnyFlags(ALL_KINDS));
-    }
-
-    private boolean testFlags(int mask, int value) {
-        return (flags & mask) == value;
-    }
-    private boolean testAllFlags(int mask) {
-        return testFlags(mask, mask);
-    }
-    private boolean testAnyFlags(int mask) {
-        return !testFlags(mask, 0);
-    }
-
-    /** Utility method to query the modifier flags of this member. */
-    public boolean isStatic() {
-        return Modifier.isStatic(flags);
-    }
-    /** Utility method to query the modifier flags of this member. */
-    public boolean isPublic() {
-        return Modifier.isPublic(flags);
-    }
-    /** Utility method to query the modifier flags of this member. */
-    public boolean isPrivate() {
-        return Modifier.isPrivate(flags);
-    }
-    /** Utility method to query the modifier flags of this member. */
-    public boolean isProtected() {
-        return Modifier.isProtected(flags);
-    }
-    /** Utility method to query the modifier flags of this member. */
-    public boolean isFinal() {
-        return Modifier.isFinal(flags);
-    }
-    /** Utility method to query the modifier flags of this member. */
-    public boolean isAbstract() {
-        return Modifier.isAbstract(flags);
-    }
-    // let the rest (native, volatile, transient, etc.) be tested via Modifier.isFoo
-
-    // unofficial modifier flags, used by HotSpot:
-    static final int BRIDGE    = 0x00000040;
-    static final int VARARGS   = 0x00000080;
-    static final int SYNTHETIC = 0x00001000;
-    static final int ANNOTATION= 0x00002000;
-    static final int ENUM      = 0x00004000;
-    /** Utility method to query the modifier flags of this member; returns false if the member is not a method. */
-    public boolean isBridge() {
-        return testAllFlags(IS_METHOD | BRIDGE);
-    }
-    /** Utility method to query the modifier flags of this member; returns false if the member is not a method. */
-    public boolean isVarargs() {
-        return testAllFlags(VARARGS) && isInvocable();
-    }
-    /** Utility method to query the modifier flags of this member; returns false if the member is not a method. */
-    public boolean isSynthetic() {
-        return testAllFlags(SYNTHETIC);
-    }
-
-    static final String CONSTRUCTOR_NAME = "<init>";  // the ever-popular
-
-    // modifiers exported by the JVM:
-    static final int RECOGNIZED_MODIFIERS = 0xFFFF;
-
-    // private flags, not part of RECOGNIZED_MODIFIERS:
-    static final int
-            IS_METHOD      = MN_IS_METHOD,      // method (not constructor)
-            IS_CONSTRUCTOR = MN_IS_CONSTRUCTOR, // constructor
-            IS_FIELD       = MN_IS_FIELD,       // field
-            IS_TYPE        = MN_IS_TYPE;        // nested type
-    static final int  // for MethodHandleNatives.getMembers
-            SEARCH_SUPERCLASSES = MN_SEARCH_SUPERCLASSES,
-            SEARCH_INTERFACES   = MN_SEARCH_INTERFACES;
-
-    static final int ALL_ACCESS = Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED;
-    static final int ALL_KINDS = IS_METHOD | IS_CONSTRUCTOR | IS_FIELD | IS_TYPE;
-    static final int IS_INVOCABLE = IS_METHOD | IS_CONSTRUCTOR;
-    static final int IS_FIELD_OR_METHOD = IS_METHOD | IS_FIELD;
-    static final int SEARCH_ALL_SUPERS = SEARCH_SUPERCLASSES | SEARCH_INTERFACES;
-
-    /** Utility method to query whether this member is a method or constructor. */
-    public boolean isInvocable() {
-        return testAnyFlags(IS_INVOCABLE);
-    }
-    /** Utility method to query whether this member is a method, constructor, or field. */
-    public boolean isFieldOrMethod() {
-        return testAnyFlags(IS_FIELD_OR_METHOD);
-    }
-    /** Query whether this member is a method. */
-    public boolean isMethod() {
-        return testAllFlags(IS_METHOD);
-    }
-    /** Query whether this member is a constructor. */
-    public boolean isConstructor() {
-        return testAllFlags(IS_CONSTRUCTOR);
-    }
-    /** Query whether this member is a field. */
-    public boolean isField() {
-        return testAllFlags(IS_FIELD);
-    }
-    /** Query whether this member is a type. */
-    public boolean isType() {
-        return testAllFlags(IS_TYPE);
-    }
-    /** Utility method to query whether this member is neither public, private, nor protected. */
-    public boolean isPackage() {
-        return !testAnyFlags(ALL_ACCESS);
-    }
-
-    /** Initialize a query.   It is not resolved. */
-    private void init(Class<?> defClass, String name, Object type, int flags) {
-        // defining class is allowed to be null (for a naked name/type pair)
-        //name.toString();  // null check
-        //type.equals(type);  // null check
-        // fill in fields:
-        this.clazz = defClass;
-        this.name = name;
-        this.type = type;
-        setFlags(flags);
-        assert(!isResolved());
-    }
-
-    private void expandFromVM() {
-        if (!isResolved())  return;
-        if (type instanceof Object[])
-            type = null;  // don't saddle JVM w/ typeInfo
-        MethodHandleNatives.expand(this);
-    }
-
-    // Capturing information from the Core Reflection API:
-    private static int flagsMods(int flags, int mods) {
-        assert((flags & RECOGNIZED_MODIFIERS) == 0);
-        assert((mods & ~RECOGNIZED_MODIFIERS) == 0);
-        return flags | mods;
-    }
-    /** Create a name for the given reflected method.  The resulting name will be in a resolved state. */
-    public MemberName(Method m) {
-        Object[] typeInfo = { m.getReturnType(), m.getParameterTypes() };
-        init(m.getDeclaringClass(), m.getName(), typeInfo, flagsMods(IS_METHOD, m.getModifiers()));
-        // fill in vmtarget, vmindex while we have m in hand:
-        MethodHandleNatives.init(this, m);
-        assert(isResolved());
-    }
-    /** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
-    public MemberName(Constructor ctor) {
-        Object[] typeInfo = { void.class, ctor.getParameterTypes() };
-        init(ctor.getDeclaringClass(), CONSTRUCTOR_NAME, typeInfo, flagsMods(IS_CONSTRUCTOR, ctor.getModifiers()));
-        // fill in vmtarget, vmindex while we have ctor in hand:
-        MethodHandleNatives.init(this, ctor);
-        assert(isResolved());
-    }
-    /** Create a name for the given reflected field.  The resulting name will be in a resolved state. */
-    public MemberName(Field fld) {
-        init(fld.getDeclaringClass(), fld.getName(), fld.getType(), flagsMods(IS_FIELD, fld.getModifiers()));
-        // fill in vmtarget, vmindex while we have fld in hand:
-        MethodHandleNatives.init(this, fld);
-        assert(isResolved());
-    }
-    /** Create a name for the given class.  The resulting name will be in a resolved state. */
-    public MemberName(Class<?> type) {
-        init(type.getDeclaringClass(), type.getSimpleName(), type, flagsMods(IS_TYPE, type.getModifiers()));
-        vmindex = 0;  // isResolved
-        assert(isResolved());
-    }
-
-    // bare-bones constructor; the JVM will fill it in
-    MemberName() { }
-
-    // locally useful cloner
-    @Override protected MemberName clone() {
-        try {
-            return (MemberName) super.clone();
-        } catch (CloneNotSupportedException ex) {
-            throw new InternalError();
-        }
-     }
-
-    // %%% define equals/hashcode?
-
-    // Construction from symbolic parts, for queries:
-    /** Create a field or type name from the given components:  Declaring class, name, type, modifiers.
-     *  The declaring class may be supplied as null if this is to be a bare name and type.
-     *  The resulting name will in an unresolved state.
-     */
-    public MemberName(Class<?> defClass, String name, Class<?> type, int modifiers) {
-        init(defClass, name, type, IS_FIELD | (modifiers & RECOGNIZED_MODIFIERS));
-    }
-    /** Create a field or type name from the given components:  Declaring class, name, type.
-     *  The declaring class may be supplied as null if this is to be a bare name and type.
-     *  The modifier flags default to zero.
-     *  The resulting name will in an unresolved state.
-     */
-    public MemberName(Class<?> defClass, String name, Class<?> type) {
-        this(defClass, name, type, 0);
-    }
-    /** Create a method or constructor name from the given components:  Declaring class, name, type, modifiers.
-     *  It will be a constructor if and only if the name is {@code "&lt;init&gt;"}.
-     *  The declaring class may be supplied as null if this is to be a bare name and type.
-     *  The resulting name will in an unresolved state.
-     */
-    public MemberName(Class<?> defClass, String name, MethodType type, int modifiers) {
-        int flagBit = (name.equals(CONSTRUCTOR_NAME) ? IS_CONSTRUCTOR : IS_METHOD);
-        init(defClass, name, type, flagBit | (modifiers & RECOGNIZED_MODIFIERS));
-    }
-    /** Create a method or constructor name from the given components:  Declaring class, name, type, modifiers.
-     *  It will be a constructor if and only if the name is {@code "&lt;init&gt;"}.
-     *  The declaring class may be supplied as null if this is to be a bare name and type.
-     *  The modifier flags default to zero.
-     *  The resulting name will in an unresolved state.
-     */
-    public MemberName(Class<?> defClass, String name, MethodType type) {
-        this(defClass, name, type, 0);
-    }
-
-    /** Query whether this member name is resolved.
-     *  A resolved member name is one for which the JVM has found
-     *  a method, constructor, field, or type binding corresponding exactly to the name.
-     *  (Document?)
-     */
-    public boolean isResolved() {
-        return (vmindex != VM_INDEX_UNINITIALIZED);
-    }
-
-    /** Query whether this member name is resolved to a non-static, non-final method.
-     */
-    public boolean hasReceiverTypeDispatch() {
-        return (isMethod() && getVMIndex(Access.TOKEN) >= 0);
-    }
-
-    /** Produce a string form of this member name.
-     *  For types, it is simply the type's own string (as reported by {@code toString}).
-     *  For fields, it is {@code "DeclaringClass.name/type"}.
-     *  For methods and constructors, it is {@code "DeclaringClass.name(ptype...)rtype"}.
-     *  If the declaring class is null, the prefix {@code "DeclaringClass."} is omitted.
-     *  If the member is unresolved, a prefix {@code "*."} is prepended.
-     */
-    @Override
-    public String toString() {
-        if (isType())
-            return type.toString();  // class java.lang.String
-        // else it is a field, method, or constructor
-        StringBuilder buf = new StringBuilder();
-        if (!isResolved())
-            buf.append("*.");
-        if (getDeclaringClass() != null) {
-            buf.append(getName(clazz));
-            buf.append('.');
-        }
-        String name = getName();
-        buf.append(name == null ? "*" : name);
-        Object type = getType();
-        if (!isInvocable()) {
-            buf.append('/');
-            buf.append(type == null ? "*" : getName(type));
-        } else {
-            buf.append(type == null ? "(*)*" : getName(type));
-        }
-        /*
-        buf.append('/');
-        // key: Public, private, pRotected, sTatic, Final, sYnchronized,
-        // transient/Varargs, native, (interface), abstract, sTrict, sYnthetic,
-        // (annotation), Enum, (unused)
-        final String FIELD_MOD_CHARS  = "PprTF?vt????Y?E?";
-        final String METHOD_MOD_CHARS = "PprTFybVn?atY???";
-        String modChars = (isInvocable() ? METHOD_MOD_CHARS : FIELD_MOD_CHARS);
-        for (int i = 0; i < modChars.length(); i++) {
-            if ((flags & (1 << i)) != 0) {
-                char mc = modChars.charAt(i);
-                if (mc != '?')
-                    buf.append(mc);
-            }
-        }
-         */
-        return buf.toString();
-    }
-    private static String getName(Object obj) {
-        if (obj instanceof Class<?>)
-            return ((Class<?>)obj).getName();
-        return String.valueOf(obj);
-    }
-
-    // Queries to the JVM:
-    /** Document? */
-    public int getVMIndex(Access token) {
-        Access.check(token);
-        if (!isResolved())
-            throw newIllegalStateException("not resolved");
-        return vmindex;
-    }
-//    public Object getVMTarget(Access token) {
-//        Access.check(token);
-//        if (!isResolved())
-//            throw newIllegalStateException("not resolved");
-//        return vmtarget;
-//    }
-    private RuntimeException newIllegalStateException(String message) {
-        return new IllegalStateException(message+": "+this);
-    }
-
-    // handy shared exception makers (they simplify the common case code)
-    public static RuntimeException newIllegalArgumentException(String message) {
-        return new IllegalArgumentException(message);
-    }
-    public static NoAccessException newNoAccessException(MemberName name, Class<?> lookupClass) {
-        return newNoAccessException("cannot access", name, lookupClass);
-    }
-    public static NoAccessException newNoAccessException(String message,
-            MemberName name, Class<?> lookupClass) {
-        message += ": " + name;
-        if (lookupClass != null)  message += ", from " + lookupClass.getName();
-        return new NoAccessException(message);
-    }
-    public static Error uncaughtException(Exception ex) {
-        Error err = new InternalError("uncaught exception");
-        err.initCause(ex);
-        return err;
-    }
-
-    /** Actually making a query requires an access check. */
-    public static Factory getFactory(Access token) {
-        Access.check(token);
-        return Factory.INSTANCE;
-    }
-    public static Factory getFactory() {
-        return getFactory(Access.getToken());
-    }
-    /** A factory type for resolving member names with the help of the VM.
-     *  TBD: Define access-safe public constructors for this factory.
-     */
-    public static class Factory {
-        private Factory() { } // singleton pattern
-        static Factory INSTANCE = new Factory();
-
-        private static int ALLOWED_FLAGS = SEARCH_ALL_SUPERS | ALL_KINDS;
-
-        /// Queries
-        List<MemberName> getMembers(Class<?> defc,
-                String matchName, Object matchType,
-                int matchFlags, Class<?> lookupClass) {
-            matchFlags &= ALLOWED_FLAGS;
-            String matchSig = null;
-            if (matchType != null) {
-                matchSig = BytecodeDescriptor.unparse(matchType);
-                if (matchSig.startsWith("("))
-                    matchFlags &= ~(ALL_KINDS & ~IS_INVOCABLE);
-                else
-                    matchFlags &= ~(ALL_KINDS & ~IS_FIELD);
-            }
-            final int BUF_MAX = 0x2000;
-            int len1 = matchName == null ? 10 : matchType == null ? 4 : 1;
-            MemberName[] buf = newMemberBuffer(len1);
-            int totalCount = 0;
-            ArrayList<MemberName[]> bufs = null;
-            int bufCount = 0;
-            for (;;) {
-                bufCount = MethodHandleNatives.getMembers(defc,
-                        matchName, matchSig, matchFlags,
-                        lookupClass,
-                        totalCount, buf);
-                if (bufCount <= buf.length) {
-                    if (bufCount < 0)  bufCount = 0;
-                    totalCount += bufCount;
-                    break;
-                }
-                // JVM returned to us with an intentional overflow!
-                totalCount += buf.length;
-                int excess = bufCount - buf.length;
-                if (bufs == null)  bufs = new ArrayList<MemberName[]>(1);
-                bufs.add(buf);
-                int len2 = buf.length;
-                len2 = Math.max(len2, excess);
-                len2 = Math.max(len2, totalCount / 4);
-                buf = newMemberBuffer(Math.min(BUF_MAX, len2));
-            }
-            ArrayList<MemberName> result = new ArrayList<MemberName>(totalCount);
-            if (bufs != null) {
-                for (MemberName[] buf0 : bufs) {
-                    Collections.addAll(result, buf0);
-                }
-            }
-            result.addAll(Arrays.asList(buf).subList(0, bufCount));
-            // Signature matching is not the same as type matching, since
-            // one signature might correspond to several types.
-            // So if matchType is a Class or MethodType, refilter the results.
-            if (matchType != null && matchType != matchSig) {
-                for (Iterator<MemberName> it = result.iterator(); it.hasNext();) {
-                    MemberName m = it.next();
-                    if (!matchType.equals(m.getType()))
-                        it.remove();
-                }
-            }
-            return result;
-        }
-        boolean resolveInPlace(MemberName m, boolean searchSupers, Class<?> lookupClass) {
-            if (m.name == null || m.type == null) {  // find unique non-overloaded name
-                Class<?> defc = m.getDeclaringClass();
-                List<MemberName> choices = null;
-                if (m.isMethod())
-                    choices = getMethods(defc, searchSupers, m.name, (MethodType) m.type, lookupClass);
-                else if (m.isConstructor())
-                    choices = getConstructors(defc, lookupClass);
-                else if (m.isField())
-                    choices = getFields(defc, searchSupers, m.name, (Class<?>) m.type, lookupClass);
-                //System.out.println("resolving "+m+" to "+choices);
-                if (choices == null || choices.size() != 1)
-                    return false;
-                if (m.name == null)  m.name = choices.get(0).name;
-                if (m.type == null)  m.type = choices.get(0).type;
-            }
-            MethodHandleNatives.resolve(m, lookupClass);
-            if (m.isResolved())  return true;
-            int matchFlags = m.flags | (searchSupers ? SEARCH_ALL_SUPERS : 0);
-            String matchSig = m.getSignature();
-            MemberName[] buf = { m };
-            int n = MethodHandleNatives.getMembers(m.getDeclaringClass(),
-                    m.getName(), matchSig, matchFlags, lookupClass, 0, buf);
-            if (n != 1)  return false;
-            return m.isResolved();
-        }
-        /** Produce a resolved version of the given member.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  If lookup fails or access is not permitted, null is returned.
-         *  Otherwise a fresh copy of the given member is returned, with modifier bits filled in.
-         */
-        public MemberName resolveOrNull(MemberName m, boolean searchSupers, Class<?> lookupClass) {
-            MemberName result = m.clone();
-            if (resolveInPlace(result, searchSupers, lookupClass))
-                return result;
-            return null;
-        }
-        /** Produce a resolved version of the given member.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  If lookup fails or access is not permitted, a {@linkplain NoAccessException} is thrown.
-         *  Otherwise a fresh copy of the given member is returned, with modifier bits filled in.
-         */
-        public MemberName resolveOrFail(MemberName m, boolean searchSupers, Class<?> lookupClass) throws NoAccessException {
-            MemberName result = resolveOrNull(m, searchSupers, lookupClass);
-            if (result != null)
-                return result;
-            throw newNoAccessException(m, lookupClass);
-        }
-        /** Return a list of all methods defined by the given class.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  Inaccessible members are not added to the last.
-         */
-        public List<MemberName> getMethods(Class<?> defc, boolean searchSupers,
-                Class<?> lookupClass) {
-            return getMethods(defc, searchSupers, null, null, lookupClass);
-        }
-        /** Return a list of matching methods defined by the given class.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Returned methods will match the name (if not null) and the type (if not null).
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  Inaccessible members are not added to the last.
-         */
-        public List<MemberName> getMethods(Class<?> defc, boolean searchSupers,
-                String name, MethodType type, Class<?> lookupClass) {
-            int matchFlags = IS_METHOD | (searchSupers ? SEARCH_ALL_SUPERS : 0);
-            return getMembers(defc, name, type, matchFlags, lookupClass);
-        }
-        /** Return a list of all constructors defined by the given class.
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  Inaccessible members are not added to the last.
-         */
-        public List<MemberName> getConstructors(Class<?> defc, Class<?> lookupClass) {
-            return getMembers(defc, null, null, IS_CONSTRUCTOR, lookupClass);
-        }
-        /** Return a list of all fields defined by the given class.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  Inaccessible members are not added to the last.
-         */
-        public List<MemberName> getFields(Class<?> defc, boolean searchSupers,
-                Class<?> lookupClass) {
-            return getFields(defc, searchSupers, null, null, lookupClass);
-        }
-        /** Return a list of all fields defined by the given class.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Returned fields will match the name (if not null) and the type (if not null).
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  Inaccessible members are not added to the last.
-         */
-        public List<MemberName> getFields(Class<?> defc, boolean searchSupers,
-                String name, Class<?> type, Class<?> lookupClass) {
-            int matchFlags = IS_FIELD | (searchSupers ? SEARCH_ALL_SUPERS : 0);
-            return getMembers(defc, name, type, matchFlags, lookupClass);
-        }
-        /** Return a list of all nested types defined by the given class.
-         *  Super types are searched (for inherited members) if {@code searchSupers} is true.
-         *  Access checking is performed on behalf of the given {@code lookupClass}.
-         *  Inaccessible members are not added to the last.
-         */
-        public List<MemberName> getNestedTypes(Class<?> defc, boolean searchSupers,
-                Class<?> lookupClass) {
-            int matchFlags = IS_TYPE | (searchSupers ? SEARCH_ALL_SUPERS : 0);
-            return getMembers(defc, null, null, matchFlags, lookupClass);
-        }
-        private static MemberName[] newMemberBuffer(int length) {
-            MemberName[] buf = new MemberName[length];
-            // fill the buffer with dummy structs for the JVM to fill in
-            for (int i = 0; i < length; i++)
-                buf[i] = new MemberName();
-            return buf;
-        }
-    }
-
-//    static {
-//        System.out.println("Hello world!  My methods are:");
-//        System.out.println(Factory.INSTANCE.getMethods(MemberName.class, true, null));
-//    }
-}
--- a/src/share/classes/sun/dyn/MethodHandleImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1270 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.dyn.MethodHandles.Lookup;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import sun.dyn.util.VerifyType;
-import java.dyn.NoAccessException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import sun.dyn.empty.Empty;
-import sun.dyn.util.ValueConversions;
-import sun.dyn.util.Wrapper;
-import sun.misc.Unsafe;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-import static sun.dyn.MemberName.newNoAccessException;
-import static sun.dyn.MemberName.uncaughtException;
-
-/**
- * Base class for method handles, containing JVM-specific fields and logic.
- * TO DO:  It should not be a base class.
- * @author jrose
- */
-public abstract class MethodHandleImpl {
-
-    // Fields which really belong in MethodHandle:
-    private byte       vmentry;    // adapter stub or method entry point
-    //private int      vmslots;    // optionally, hoist type.form.vmslots
-    protected Object   vmtarget;   // VM-specific, class-specific target value
-    //MethodType       type;       // defined in MethodHandle
-
-    // TO DO:  vmtarget should be invisible to Java, since the JVM puts internal
-    // managed pointers into it.  Making it visible exposes it to debuggers,
-    // which can cause errors when they treat the pointer as an Object.
-
-    // These two dummy fields are present to force 'I' and 'J' signatures
-    // into this class's constant pool, so they can be transferred
-    // to vmentry when this class is loaded.
-    static final int  INT_FIELD = 0;
-    static final long LONG_FIELD = 0;
-
-    /** Access methods for the internals of MethodHandle, supplied to
-     *  MethodHandleImpl as a trusted agent.
-     */
-    static public interface MethodHandleFriend {
-        void initType(MethodHandle mh, MethodType type);
-    }
-    public static void setMethodHandleFriend(Access token, MethodHandleFriend am) {
-        Access.check(token);
-        if (METHOD_HANDLE_FRIEND != null)
-            throw new InternalError();  // just once
-        METHOD_HANDLE_FRIEND = am;
-    }
-    static private MethodHandleFriend METHOD_HANDLE_FRIEND;
-
-    // NOT public
-    static void initType(MethodHandle mh, MethodType type) {
-        METHOD_HANDLE_FRIEND.initType(mh, type);
-    }
-
-    // type is defined in java.dyn.MethodHandle, which is platform-independent
-
-    // vmentry (a void* field) is used *only* by by the JVM.
-    // The JVM adjusts its type to int or long depending on system wordsize.
-    // Since it is statically typed as neither int nor long, it is impossible
-    // to use this field from Java bytecode.  (Please don't try to, either.)
-
-    // The vmentry is an assembly-language stub which is jumped to
-    // immediately after the method type is verified.
-    // For a direct MH, this stub loads the vmtarget's entry point
-    // and jumps to it.
-
-    /**
-     * VM-based method handles must have a security token.
-     * This security token can only be obtained by trusted code.
-     * Do not create method handles directly; use factory methods.
-     */
-    public MethodHandleImpl(Access token) {
-        Access.check(token);
-    }
-
-    /** Initialize the method type form to participate in JVM calls.
-     *  This is done once for each erased type.
-     */
-    public static void init(Access token, MethodType self) {
-        Access.check(token);
-        if (MethodHandleNatives.JVM_SUPPORT)
-            MethodHandleNatives.init(self);
-    }
-
-    /// Factory methods to create method handles:
-
-    private static final MemberName.Factory LOOKUP = MemberName.Factory.INSTANCE;
-
-    static private Lookup IMPL_LOOKUP_INIT;
-
-    public static void initLookup(Access token, Lookup lookup) {
-        Access.check(token);
-        if (IMPL_LOOKUP_INIT != null)
-            throw new InternalError();
-        IMPL_LOOKUP_INIT = lookup;
-    }
-
-    public static Lookup getLookup(Access token) {
-        Access.check(token);
-        return IMPL_LOOKUP;
-    }
-
-    static {
-        // Force initialization of Lookup, so it calls us back as initLookup:
-        MethodHandles.publicLookup();
-        if (IMPL_LOOKUP_INIT == null)
-            throw new InternalError();
-    }
-
-    public static void initStatics() {
-        // Trigger preceding sequence.
-    }
-
-    /** Shared secret with MethodHandles.Lookup, a copy of Lookup.IMPL_LOOKUP. */
-    static final Lookup IMPL_LOOKUP = IMPL_LOOKUP_INIT;
-
-
-    /** Look up a given method.
-     * Callable only from java.dyn and related packages.
-     * <p>
-     * The resulting method handle type will be of the given type,
-     * with a receiver type {@code rcvc} prepended if the member is not static.
-     * <p>
-     * Access checks are made as of the given lookup class.
-     * In particular, if the method is protected and {@code defc} is in a
-     * different package from the lookup class, then {@code rcvc} must be
-     * the lookup class or a subclass.
-     * @param token Proof that the lookup class has access to this package.
-     * @param member Resolved method or constructor to call.
-     * @param name Name of the desired method.
-     * @param rcvc Receiver type of desired non-static method (else null)
-     * @param doDispatch whether the method handle will test the receiver type
-     * @param lookupClass access-check relative to this class
-     * @return a direct handle to the matching method
-     * @throws NoAccessException if the given method cannot be accessed by the lookup class
-     */
-    public static
-    MethodHandle findMethod(Access token, MemberName method,
-            boolean doDispatch, Class<?> lookupClass) throws NoAccessException {
-        Access.check(token);  // only trusted calls
-        MethodType mtype = method.getMethodType();
-        if (!method.isStatic()) {
-            // adjust the advertised receiver type to be exactly the one requested
-            // (in the case of invokespecial, this will be the calling class)
-            Class<?> recvType = method.getDeclaringClass();
-            mtype = mtype.insertParameterTypes(0, recvType);
-        }
-        DirectMethodHandle mh = new DirectMethodHandle(mtype, method, doDispatch, lookupClass);
-        if (!mh.isValid())
-            throw newNoAccessException(method, lookupClass);
-        assert(mh.type() == mtype);
-        return mh;
-    }
-
-    public static
-    MethodHandle makeAllocator(Access token, MethodHandle rawConstructor) {
-        Access.check(token);
-        MethodType rawConType = rawConstructor.type();
-        // Wrap the raw (unsafe) constructor with the allocation of a suitable object.
-        MethodHandle allocator
-            = AllocateObject.make(token, rawConType.parameterType(0), rawConstructor);
-        assert(allocator.type()
-               .equals(rawConType.dropParameterTypes(0, 1).changeReturnType(rawConType.parameterType(0))));
-        return allocator;
-    }
-
-    static final class AllocateObject<C> extends BoundMethodHandle {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
-
-        private final Class<C> allocateClass;
-        private final MethodHandle rawConstructor;
-
-        private AllocateObject(MethodHandle invoker,
-                               Class<C> allocateClass, MethodHandle rawConstructor) {
-            super(Access.TOKEN, invoker);
-            this.allocateClass = allocateClass;
-            this.rawConstructor = rawConstructor;
-        }
-        static MethodHandle make(Access token,
-                                 Class<?> allocateClass, MethodHandle rawConstructor) {
-            Access.check(token);
-            MethodType rawConType = rawConstructor.type();
-            assert(rawConType.parameterType(0) == allocateClass);
-            MethodType newType = rawConType.dropParameterTypes(0, 1).changeReturnType(allocateClass);
-            int nargs = rawConType.parameterCount() - 1;
-            if (nargs < INVOKES.length) {
-                MethodHandle invoke = INVOKES[nargs];
-                MethodType conType = CON_TYPES[nargs];
-                MethodHandle gcon = convertArguments(token, rawConstructor, conType, rawConType, null);
-                if (gcon == null)  return null;
-                MethodHandle galloc = new AllocateObject(invoke, allocateClass, gcon);
-                assert(galloc.type() == newType.generic());
-                return convertArguments(token, galloc, newType, galloc.type(), null);
-            } else {
-                MethodHandle invoke = VARARGS_INVOKE;
-                MethodType conType = CON_TYPES[nargs];
-                MethodHandle gcon = spreadArguments(token, rawConstructor, conType, 1);
-                if (gcon == null)  return null;
-                MethodHandle galloc = new AllocateObject(invoke, allocateClass, gcon);
-                return collectArguments(token, galloc, newType, 1, null);
-            }
-        }
-        @Override
-        public String toString() {
-            return addTypeString(allocateClass.getSimpleName(), this);
-        }
-        @SuppressWarnings("unchecked")
-        private C allocate() throws InstantiationException {
-            return (C) unsafe.allocateInstance(allocateClass);
-        }
-        private C invoke_V(Object... av) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, av);
-            return obj;
-        }
-        private C invoke_L0() throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj);
-            return obj;
-        }
-        private C invoke_L1(Object a0) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0);
-            return obj;
-        }
-        private C invoke_L2(Object a0, Object a1) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1);
-            return obj;
-        }
-        private C invoke_L3(Object a0, Object a1, Object a2) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1, a2);
-            return obj;
-        }
-        private C invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3);
-            return obj;
-        }
-        private C invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4);
-            return obj;
-        }
-        private C invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4, a5);
-            return obj;
-        }
-        private C invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4, a5, a6);
-            return obj;
-        }
-        private C invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            C obj = allocate();
-            rawConstructor.invokeExact((Object)obj, a0, a1, a2, a3, a4, a5, a6, a7);
-            return obj;
-        }
-        static MethodHandle[] makeInvokes() {
-            ArrayList<MethodHandle> invokes = new ArrayList<MethodHandle>();
-            MethodHandles.Lookup lookup = IMPL_LOOKUP;
-            for (;;) {
-                int nargs = invokes.size();
-                String name = "invoke_L"+nargs;
-                MethodHandle invoke = null;
-                try {
-                    invoke = lookup.findVirtual(AllocateObject.class, name, MethodType.genericMethodType(nargs));
-                } catch (NoAccessException ex) {
-                }
-                if (invoke == null)  break;
-                invokes.add(invoke);
-            }
-            assert(invokes.size() == 9);  // current number of methods
-            return invokes.toArray(new MethodHandle[0]);
-        };
-        static final MethodHandle[] INVOKES = makeInvokes();
-        // For testing use this:
-        //static final MethodHandle[] INVOKES = Arrays.copyOf(makeInvokes(), 2);
-        static final MethodHandle VARARGS_INVOKE;
-        static {
-            try {
-                VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(AllocateObject.class, "invoke_V", MethodType.genericMethodType(0, true));
-            } catch (NoAccessException ex) {
-                throw uncaughtException(ex);
-            }
-        }
-        // Corresponding generic constructor types:
-        static final MethodType[] CON_TYPES = new MethodType[INVOKES.length];
-        static {
-            for (int i = 0; i < INVOKES.length; i++)
-                CON_TYPES[i] = makeConType(INVOKES[i]);
-        }
-        static final MethodType VARARGS_CON_TYPE = makeConType(VARARGS_INVOKE);
-        static MethodType makeConType(MethodHandle invoke) {
-            MethodType invType = invoke.type();
-            return invType.changeParameterType(0, Object.class).changeReturnType(void.class);
-        }
-    }
-
-    public static
-    MethodHandle accessField(Access token,
-                             MemberName member, boolean isSetter,
-                             Class<?> lookupClass) {
-        Access.check(token);
-        // Use sun. misc.Unsafe to dig up the dirt on the field.
-        MethodHandle mh = new FieldAccessor(token, member, isSetter);
-        return mh;
-    }
-
-    public static
-    MethodHandle accessArrayElement(Access token,
-                                    Class<?> arrayClass, boolean isSetter) {
-        Access.check(token);
-        if (!arrayClass.isArray())
-            throw newIllegalArgumentException("not an array: "+arrayClass);
-        Class<?> elemClass = arrayClass.getComponentType();
-        MethodHandle[] mhs = FieldAccessor.ARRAY_CACHE.get(elemClass);
-        if (mhs == null) {
-            if (!FieldAccessor.doCache(elemClass))
-                return FieldAccessor.ahandle(arrayClass, isSetter);
-            mhs = new MethodHandle[] {
-                FieldAccessor.ahandle(arrayClass, false),
-                FieldAccessor.ahandle(arrayClass, true)
-            };
-            if (mhs[0].type().parameterType(0) == Class.class) {
-                mhs[0] = MethodHandles.insertArguments(mhs[0], 0, elemClass);
-                mhs[1] = MethodHandles.insertArguments(mhs[1], 0, elemClass);
-            }
-            synchronized (FieldAccessor.ARRAY_CACHE) {}  // memory barrier
-            FieldAccessor.ARRAY_CACHE.put(elemClass, mhs);
-        }
-        return mhs[isSetter ? 1 : 0];
-    }
-
-    static final class FieldAccessor<C,V> extends BoundMethodHandle {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
-        final Object base;  // for static refs only
-        final long offset;
-        final String name;
-
-        public FieldAccessor(Access token, MemberName field, boolean isSetter) {
-            super(Access.TOKEN, fhandle(field.getDeclaringClass(), field.getFieldType(), isSetter, field.isStatic()));
-            this.offset = (long) field.getVMIndex(token);
-            this.name = field.getName();
-            this.base = staticBase(field);
-        }
-        public String toString() { return addTypeString(name, this); }
-
-        int getFieldI(C obj) { return unsafe.getInt(obj, offset); }
-        void setFieldI(C obj, int x) { unsafe.putInt(obj, offset, x); }
-        long getFieldJ(C obj) { return unsafe.getLong(obj, offset); }
-        void setFieldJ(C obj, long x) { unsafe.putLong(obj, offset, x); }
-        float getFieldF(C obj) { return unsafe.getFloat(obj, offset); }
-        void setFieldF(C obj, float x) { unsafe.putFloat(obj, offset, x); }
-        double getFieldD(C obj) { return unsafe.getDouble(obj, offset); }
-        void setFieldD(C obj, double x) { unsafe.putDouble(obj, offset, x); }
-        boolean getFieldZ(C obj) { return unsafe.getBoolean(obj, offset); }
-        void setFieldZ(C obj, boolean x) { unsafe.putBoolean(obj, offset, x); }
-        byte getFieldB(C obj) { return unsafe.getByte(obj, offset); }
-        void setFieldB(C obj, byte x) { unsafe.putByte(obj, offset, x); }
-        short getFieldS(C obj) { return unsafe.getShort(obj, offset); }
-        void setFieldS(C obj, short x) { unsafe.putShort(obj, offset, x); }
-        char getFieldC(C obj) { return unsafe.getChar(obj, offset); }
-        void setFieldC(C obj, char x) { unsafe.putChar(obj, offset, x); }
-        @SuppressWarnings("unchecked")
-        V getFieldL(C obj) { return (V) unsafe.getObject(obj, offset); }
-        @SuppressWarnings("unchecked")
-        void setFieldL(C obj, V x) { unsafe.putObject(obj, offset, x); }
-        // cast (V) is OK here, since we wrap convertArguments around the MH.
-
-        static Object staticBase(MemberName field) {
-            if (!field.isStatic())  return null;
-            Class c = field.getDeclaringClass();
-            java.lang.reflect.Field f;
-            try {
-                // FIXME:  Should not have to create 'f' to get this value.
-                f = c.getDeclaredField(field.getName());
-                return unsafe.staticFieldBase(f);
-            } catch (Exception ee) {
-                throw uncaughtException(ee);
-            }
-        }
-
-        int getStaticI() { return unsafe.getInt(base, offset); }
-        void setStaticI(int x) { unsafe.putInt(base, offset, x); }
-        long getStaticJ() { return unsafe.getLong(base, offset); }
-        void setStaticJ(long x) { unsafe.putLong(base, offset, x); }
-        float getStaticF() { return unsafe.getFloat(base, offset); }
-        void setStaticF(float x) { unsafe.putFloat(base, offset, x); }
-        double getStaticD() { return unsafe.getDouble(base, offset); }
-        void setStaticD(double x) { unsafe.putDouble(base, offset, x); }
-        boolean getStaticZ() { return unsafe.getBoolean(base, offset); }
-        void setStaticZ(boolean x) { unsafe.putBoolean(base, offset, x); }
-        byte getStaticB() { return unsafe.getByte(base, offset); }
-        void setStaticB(byte x) { unsafe.putByte(base, offset, x); }
-        short getStaticS() { return unsafe.getShort(base, offset); }
-        void setStaticS(short x) { unsafe.putShort(base, offset, x); }
-        char getStaticC() { return unsafe.getChar(base, offset); }
-        void setStaticC(char x) { unsafe.putChar(base, offset, x); }
-        V getStaticL() { return (V) unsafe.getObject(base, offset); }
-        void setStaticL(V x) { unsafe.putObject(base, offset, x); }
-
-        static String fname(Class<?> vclass, boolean isSetter, boolean isStatic) {
-            String stem;
-            if (!isStatic)
-                stem = (!isSetter ? "getField" : "setField");
-            else
-                stem = (!isSetter ? "getStatic" : "setStatic");
-            return stem + Wrapper.basicTypeChar(vclass);
-        }
-        static MethodType ftype(Class<?> cclass, Class<?> vclass, boolean isSetter, boolean isStatic) {
-            MethodType type;
-            if (!isStatic) {
-                if (!isSetter)
-                    return MethodType.methodType(vclass, cclass);
-                else
-                    return MethodType.methodType(void.class, cclass, vclass);
-            } else {
-                if (!isSetter)
-                    return MethodType.methodType(vclass);
-                else
-                    return MethodType.methodType(void.class, vclass);
-            }
-        }
-        static MethodHandle fhandle(Class<?> cclass, Class<?> vclass, boolean isSetter, boolean isStatic) {
-            String name = FieldAccessor.fname(vclass, isSetter, isStatic);
-            if (cclass.isPrimitive())  throw newIllegalArgumentException("primitive "+cclass);
-            Class<?> ecclass = Object.class;  //erase this type
-            Class<?> evclass = vclass;
-            if (!evclass.isPrimitive())  evclass = Object.class;
-            MethodType type = FieldAccessor.ftype(ecclass, evclass, isSetter, isStatic);
-            MethodHandle mh;
-            try {
-                mh = IMPL_LOOKUP.findVirtual(FieldAccessor.class, name, type);
-            } catch (NoAccessException ex) {
-                throw uncaughtException(ex);
-            }
-            if (evclass != vclass || (!isStatic && ecclass != cclass)) {
-                MethodType strongType = FieldAccessor.ftype(cclass, vclass, isSetter, isStatic);
-                strongType = strongType.insertParameterTypes(0, FieldAccessor.class);
-                mh = MethodHandles.convertArguments(mh, strongType);
-            }
-            return mh;
-        }
-
-        /// Support for array element access
-        static final HashMap<Class<?>, MethodHandle[]> ARRAY_CACHE =
-                new HashMap<Class<?>, MethodHandle[]>();
-        // FIXME: Cache on the classes themselves, not here.
-        static boolean doCache(Class<?> elemClass) {
-            if (elemClass.isPrimitive())  return true;
-            ClassLoader cl = elemClass.getClassLoader();
-            return cl == null || cl == ClassLoader.getSystemClassLoader();
-        }
-        static int getElementI(int[] a, int i) { return a[i]; }
-        static void setElementI(int[] a, int i, int x) { a[i] = x; }
-        static long getElementJ(long[] a, int i) { return a[i]; }
-        static void setElementJ(long[] a, int i, long x) { a[i] = x; }
-        static float getElementF(float[] a, int i) { return a[i]; }
-        static void setElementF(float[] a, int i, float x) { a[i] = x; }
-        static double getElementD(double[] a, int i) { return a[i]; }
-        static void setElementD(double[] a, int i, double x) { a[i] = x; }
-        static boolean getElementZ(boolean[] a, int i) { return a[i]; }
-        static void setElementZ(boolean[] a, int i, boolean x) { a[i] = x; }
-        static byte getElementB(byte[] a, int i) { return a[i]; }
-        static void setElementB(byte[] a, int i, byte x) { a[i] = x; }
-        static short getElementS(short[] a, int i) { return a[i]; }
-        static void setElementS(short[] a, int i, short x) { a[i] = x; }
-        static char getElementC(char[] a, int i) { return a[i]; }
-        static void setElementC(char[] a, int i, char x) { a[i] = x; }
-        static Object getElementL(Object[] a, int i) { return a[i]; }
-        static void setElementL(Object[] a, int i, Object x) { a[i] = x; }
-        static <V> V getElementL(Class<V[]> aclass, V[] a, int i) { return aclass.cast(a)[i]; }
-        static <V> void setElementL(Class<V[]> aclass, V[] a, int i, V x) { aclass.cast(a)[i] = x; }
-
-        static String aname(Class<?> aclass, boolean isSetter) {
-            Class<?> vclass = aclass.getComponentType();
-            if (vclass == null)  throw new IllegalArgumentException();
-            return (!isSetter ? "getElement" : "setElement") + Wrapper.basicTypeChar(vclass);
-        }
-        static MethodType atype(Class<?> aclass, boolean isSetter) {
-            Class<?> vclass = aclass.getComponentType();
-            if (!isSetter)
-                return MethodType.methodType(vclass, aclass, int.class);
-            else
-                return MethodType.methodType(void.class, aclass, int.class, vclass);
-        }
-        static MethodHandle ahandle(Class<?> aclass, boolean isSetter) {
-            Class<?> vclass = aclass.getComponentType();
-            String name = FieldAccessor.aname(aclass, isSetter);
-            Class<?> caclass = null;
-            if (!vclass.isPrimitive() && vclass != Object.class) {
-                caclass = aclass;
-                aclass = Object[].class;
-                vclass = Object.class;
-            }
-            MethodType type = FieldAccessor.atype(aclass, isSetter);
-            if (caclass != null)
-                type = type.insertParameterTypes(0, Class.class);
-            MethodHandle mh;
-            try {
-                mh = IMPL_LOOKUP.findStatic(FieldAccessor.class, name, type);
-            } catch (NoAccessException ex) {
-                throw uncaughtException(ex);
-            }
-            if (caclass != null) {
-                MethodType strongType = FieldAccessor.atype(caclass, isSetter);
-                mh = MethodHandles.insertArguments(mh, 0, caclass);
-                mh = MethodHandles.convertArguments(mh, strongType);
-            }
-            return mh;
-        }
-    }
-
-    /** Bind a predetermined first argument to the given direct method handle.
-     * Callable only from MethodHandles.
-     * @param token Proof that the caller has access to this package.
-     * @param target Any direct method handle.
-     * @param receiver Receiver (or first static method argument) to pre-bind.
-     * @return a BoundMethodHandle for the given DirectMethodHandle, or null if it does not exist
-     */
-    public static
-    MethodHandle bindReceiver(Access token,
-                              MethodHandle target, Object receiver) {
-        Access.check(token);
-        if (target instanceof AdapterMethodHandle &&
-            ((AdapterMethodHandle)target).conversionOp() == MethodHandleNatives.Constants.OP_RETYPE_ONLY
-            ) {
-            Object info = MethodHandleNatives.getTargetInfo(target);
-            if (info instanceof DirectMethodHandle) {
-                DirectMethodHandle dmh = (DirectMethodHandle) info;
-                if (receiver == null ||
-                    dmh.type().parameterType(0).isAssignableFrom(receiver.getClass())) {
-                    MethodHandle bmh = new BoundMethodHandle(dmh, receiver, 0);
-                    MethodType newType = target.type().dropParameterTypes(0, 1);
-                    return convertArguments(token, bmh, newType, bmh.type(), null);
-                }
-            }
-        }
-        if (target instanceof DirectMethodHandle)
-            return new BoundMethodHandle((DirectMethodHandle)target, receiver, 0);
-        return null;   // let caller try something else
-    }
-
-    /** Bind a predetermined argument to the given arbitrary method handle.
-     * Callable only from MethodHandles.
-     * @param token Proof that the caller has access to this package.
-     * @param target Any method handle.
-     * @param receiver Argument (which can be a boxed primitive) to pre-bind.
-     * @return a suitable BoundMethodHandle
-     */
-    public static
-    MethodHandle bindArgument(Access token,
-                              MethodHandle target, int argnum, Object receiver) {
-        Access.check(token);
-        return new BoundMethodHandle(target, receiver, argnum);
-    }
-
-    public static MethodHandle convertArguments(Access token,
-                                                MethodHandle target,
-                                                MethodType newType,
-                                                MethodType oldType,
-                                                int[] permutationOrNull) {
-        Access.check(token);
-        assert(oldType.parameterCount() == target.type().parameterCount());
-        if (permutationOrNull != null) {
-            int outargs = oldType.parameterCount(), inargs = newType.parameterCount();
-            if (permutationOrNull.length != outargs)
-                throw newIllegalArgumentException("wrong number of arguments in permutation");
-            // Make the individual outgoing argument types match up first.
-            Class<?>[] callTypeArgs = new Class<?>[outargs];
-            for (int i = 0; i < outargs; i++)
-                callTypeArgs[i] = newType.parameterType(permutationOrNull[i]);
-            MethodType callType = MethodType.methodType(oldType.returnType(), callTypeArgs);
-            target = convertArguments(token, target, callType, oldType, null);
-            assert(target != null);
-            oldType = target.type();
-            List<Integer> goal = new ArrayList<Integer>();  // i*TOKEN
-            List<Integer> state = new ArrayList<Integer>(); // i*TOKEN
-            List<Integer> drops = new ArrayList<Integer>(); // not tokens
-            List<Integer> dups = new ArrayList<Integer>();  // not tokens
-            final int TOKEN = 10; // to mark items which are symbolic only
-            // state represents the argument values coming into target
-            for (int i = 0; i < outargs; i++) {
-                state.add(permutationOrNull[i] * TOKEN);
-            }
-            // goal represents the desired state
-            for (int i = 0; i < inargs; i++) {
-                if (state.contains(i * TOKEN)) {
-                    goal.add(i * TOKEN);
-                } else {
-                    // adapter must initially drop all unused arguments
-                    drops.add(i);
-                }
-            }
-            // detect duplications
-            while (state.size() > goal.size()) {
-                for (int i2 = 0; i2 < state.size(); i2++) {
-                    int arg1 = state.get(i2);
-                    int i1 = state.indexOf(arg1);
-                    if (i1 != i2) {
-                        // found duplicate occurrence at i2
-                        int arg2 = (inargs++) * TOKEN;
-                        state.set(i2, arg2);
-                        dups.add(goal.indexOf(arg1));
-                        goal.add(arg2);
-                    }
-                }
-            }
-            assert(state.size() == goal.size());
-            int size = goal.size();
-            while (!state.equals(goal)) {
-                // Look for a maximal sequence of adjacent misplaced arguments,
-                // and try to rotate them into place.
-                int bestRotArg = -10 * TOKEN, bestRotLen = 0;
-                int thisRotArg = -10 * TOKEN, thisRotLen = 0;
-                for (int i = 0; i < size; i++) {
-                    int arg = state.get(i);
-                    // Does this argument match the current run?
-                    if (arg == thisRotArg + TOKEN) {
-                        thisRotArg = arg;
-                        thisRotLen += 1;
-                        if (bestRotLen < thisRotLen) {
-                            bestRotLen = thisRotLen;
-                            bestRotArg = thisRotArg;
-                        }
-                    } else {
-                        // The old sequence (if any) stops here.
-                        thisRotLen = 0;
-                        thisRotArg = -10 * TOKEN;
-                        // But maybe a new one starts here also.
-                        int wantArg = goal.get(i);
-                        final int MAX_ARG_ROTATION = AdapterMethodHandle.MAX_ARG_ROTATION;
-                        if (arg != wantArg &&
-                            arg >= wantArg - TOKEN * MAX_ARG_ROTATION &&
-                            arg <= wantArg + TOKEN * MAX_ARG_ROTATION) {
-                            thisRotArg = arg;
-                            thisRotLen = 1;
-                        }
-                    }
-                }
-                if (bestRotLen >= 2) {
-                    // Do a rotation if it can improve argument positioning
-                    // by at least 2 arguments.  This is not always optimal,
-                    // but it seems to catch common cases.
-                    int dstEnd = state.indexOf(bestRotArg);
-                    int srcEnd = goal.indexOf(bestRotArg);
-                    int rotBy = dstEnd - srcEnd;
-                    int dstBeg = dstEnd - (bestRotLen - 1);
-                    int srcBeg = srcEnd - (bestRotLen - 1);
-                    assert((dstEnd | dstBeg | srcEnd | srcBeg) >= 0); // no negs
-                    // Make a span which covers both source and destination.
-                    int rotBeg = Math.min(dstBeg, srcBeg);
-                    int rotEnd = Math.max(dstEnd, srcEnd);
-                    int score = 0;
-                    for (int i = rotBeg; i <= rotEnd; i++) {
-                        if ((int)state.get(i) != (int)goal.get(i))
-                            score += 1;
-                    }
-                    List<Integer> rotSpan = state.subList(rotBeg, rotEnd+1);
-                    Collections.rotate(rotSpan, -rotBy);  // reverse direction
-                    for (int i = rotBeg; i <= rotEnd; i++) {
-                        if ((int)state.get(i) != (int)goal.get(i))
-                            score -= 1;
-                    }
-                    if (score >= 2) {
-                        // Improved at least two argument positions.  Do it.
-                        List<Class<?>> ptypes = Arrays.asList(oldType.parameterArray());
-                        Collections.rotate(ptypes.subList(rotBeg, rotEnd+1), -rotBy);
-                        MethodType rotType = MethodType.methodType(oldType.returnType(), ptypes);
-                        MethodHandle nextTarget
-                                = AdapterMethodHandle.makeRotateArguments(token, rotType, target,
-                                        rotBeg, rotSpan.size(), rotBy);
-                        if (nextTarget != null) {
-                            //System.out.println("Rot: "+rotSpan+" by "+rotBy);
-                            target = nextTarget;
-                            oldType = rotType;
-                            continue;
-                        }
-                    }
-                    // Else de-rotate, and drop through to the swap-fest.
-                    Collections.rotate(rotSpan, rotBy);
-                }
-
-                // Now swap like the wind!
-                List<Class<?>> ptypes = Arrays.asList(oldType.parameterArray());
-                for (int i = 0; i < size; i++) {
-                    // What argument do I want here?
-                    int arg = goal.get(i);
-                    if (arg != state.get(i)) {
-                        // Where is it now?
-                        int j = state.indexOf(arg);
-                        Collections.swap(ptypes, i, j);
-                        MethodType swapType = MethodType.methodType(oldType.returnType(), ptypes);
-                        target = AdapterMethodHandle.makeSwapArguments(token, swapType, target, i, j);
-                        if (target == null)  throw newIllegalArgumentException("cannot swap");
-                        assert(target.type() == swapType);
-                        oldType = swapType;
-                        Collections.swap(state, i, j);
-                    }
-                }
-                // One pass of swapping must finish the job.
-                assert(state.equals(goal));
-            }
-            while (!dups.isEmpty()) {
-                // Grab a contiguous trailing sequence of dups.
-                int grab = dups.size() - 1;
-                int dupArgPos = dups.get(grab), dupArgCount = 1;
-                while (grab - 1 >= 0) {
-                    int dup0 = dups.get(grab - 1);
-                    if (dup0 != dupArgPos - 1)  break;
-                    dupArgPos -= 1;
-                    dupArgCount += 1;
-                    grab -= 1;
-                }
-                //if (dupArgCount > 1)  System.out.println("Dup: "+dups.subList(grab, dups.size()));
-                dups.subList(grab, dups.size()).clear();
-                // In the new target type drop that many args from the tail:
-                List<Class<?>> ptypes = oldType.parameterList();
-                ptypes = ptypes.subList(0, ptypes.size() - dupArgCount);
-                MethodType dupType = MethodType.methodType(oldType.returnType(), ptypes);
-                target = AdapterMethodHandle.makeDupArguments(token, dupType, target, dupArgPos, dupArgCount);
-                if (target == null)
-                    throw newIllegalArgumentException("cannot dup");
-                oldType = target.type();
-            }
-            while (!drops.isEmpty()) {
-                // Grab a contiguous initial sequence of drops.
-                int dropArgPos = drops.get(0), dropArgCount = 1;
-                while (dropArgCount < drops.size()) {
-                    int drop1 = drops.get(dropArgCount);
-                    if (drop1 != dropArgPos + dropArgCount)  break;
-                    dropArgCount += 1;
-                }
-                //if (dropArgCount > 1)  System.out.println("Drop: "+drops.subList(0, dropArgCount));
-                drops.subList(0, dropArgCount).clear();
-                List<Class<?>> dropTypes = newType.parameterList()
-                        .subList(dropArgPos, dropArgPos + dropArgCount);
-                MethodType dropType = oldType.insertParameterTypes(dropArgPos, dropTypes);
-                target = AdapterMethodHandle.makeDropArguments(token, dropType, target, dropArgPos, dropArgCount);
-                if (target == null)  throw newIllegalArgumentException("cannot drop");
-                oldType = target.type();
-            }
-        }
-        if (newType == oldType)
-            return target;
-        if (oldType.parameterCount() != newType.parameterCount())
-            throw newIllegalArgumentException("mismatched parameter count");
-        MethodHandle res = AdapterMethodHandle.makePairwiseConvert(token, newType, target);
-        if (res != null)
-            return res;
-        int argc = oldType.parameterCount();
-        // The JVM can't do it directly, so fill in the gap with a Java adapter.
-        // TO DO: figure out what to put here from case-by-case experience
-        // Use a heavier method:  Convert all the arguments to Object,
-        // then back to the desired types.  We might have to use Java-based
-        // method handles to do this.
-        MethodType objType = MethodType.genericMethodType(argc);
-        MethodHandle objTarget = AdapterMethodHandle.makePairwiseConvert(token, objType, target);
-        if (objTarget == null)
-            objTarget = FromGeneric.make(target);
-        res = AdapterMethodHandle.makePairwiseConvert(token, newType, objTarget);
-        if (res != null)
-            return res;
-        return ToGeneric.make(newType, objTarget);
-    }
-
-    public static MethodHandle spreadArguments(Access token,
-                                               MethodHandle target,
-                                               MethodType newType,
-                                               int spreadArg) {
-        Access.check(token);
-        // TO DO: maybe allow the restarg to be Object and implicitly cast to Object[]
-        MethodType oldType = target.type();
-        // spread the last argument of newType to oldType
-        int spreadCount = oldType.parameterCount() - spreadArg;
-        Class<Object[]> spreadArgType = Object[].class;
-        MethodHandle res = AdapterMethodHandle.makeSpreadArguments(token, newType, target, spreadArgType, spreadArg, spreadCount);
-        if (res != null)
-            return res;
-        // try an intermediate adapter
-        Class<?> spreadType = null;
-        if (spreadArg < 0 || spreadArg >= newType.parameterCount()
-            || !VerifyType.isSpreadArgType(spreadType = newType.parameterType(spreadArg)))
-            throw newIllegalArgumentException("no restarg in "+newType);
-        Class<?>[] ptypes = oldType.parameterArray();
-        for (int i = 0; i < spreadCount; i++)
-            ptypes[spreadArg + i] = VerifyType.spreadArgElementType(spreadType, i);
-        MethodType midType = MethodType.methodType(newType.returnType(), ptypes);
-        // after spreading, some arguments may need further conversion
-        MethodHandle target2 = convertArguments(token, target, midType, oldType, null);
-        if (target2 == null)
-            throw new UnsupportedOperationException("NYI: convert "+midType+" =calls=> "+oldType);
-        res = AdapterMethodHandle.makeSpreadArguments(token, newType, target2, spreadArgType, spreadArg, spreadCount);
-        if (res != null)
-            return res;
-        res = SpreadGeneric.make(target2, spreadCount);
-        if (res != null)
-            res = convertArguments(token, res, newType, res.type(), null);
-        return res;
-    }
-
-    public static MethodHandle collectArguments(Access token,
-                                                MethodHandle target,
-                                                MethodType newType,
-                                                int collectArg,
-                                                MethodHandle collector) {
-        MethodType oldType = target.type();     // (a...,c)=>r
-        if (collector == null) {
-            int numCollect = newType.parameterCount() - oldType.parameterCount() + 1;
-            collector = ValueConversions.varargsArray(numCollect);
-        }
-        //         newType                      // (a..., b...)=>r
-        MethodType colType = collector.type();  // (b...)=>c
-        //         oldType                      // (a..., b...)=>r
-        assert(newType.parameterCount() == collectArg + colType.parameterCount());
-        assert(oldType.parameterCount() == collectArg + 1);
-        MethodHandle gtarget = convertArguments(token, target, oldType.generic(), oldType, null);
-        MethodHandle gcollector = convertArguments(token, collector, colType.generic(), colType, null);
-        if (gtarget == null || gcollector == null)  return null;
-        MethodHandle gresult = FilterGeneric.makeArgumentCollector(gcollector, gtarget);
-        MethodHandle result = convertArguments(token, gresult, newType, gresult.type(), null);
-        return result;
-    }
-
-    public static MethodHandle filterArgument(Access token,
-                                              MethodHandle target,
-                                              int pos,
-                                              MethodHandle filter) {
-        Access.check(token);
-        MethodType ttype = target.type(), gttype = ttype.generic();
-        if (ttype != gttype) {
-            target = convertArguments(token, target, gttype, ttype, null);
-            ttype = gttype;
-        }
-        MethodType ftype = filter.type(), gftype = ftype.generic();
-        if (ftype.parameterCount() != 1)
-            throw new InternalError();
-        if (ftype != gftype) {
-            filter = convertArguments(token, filter, gftype, ftype, null);
-            ftype = gftype;
-        }
-        if (ftype == ttype) {
-            // simple unary case
-            return FilterOneArgument.make(filter, target);
-        }
-        return FilterGeneric.makeArgumentFilter(pos, filter, target);
-    }
-
-    public static MethodHandle foldArguments(Access token,
-                                             MethodHandle target,
-                                             MethodType newType,
-                                             MethodHandle combiner) {
-        Access.check(token);
-        MethodType oldType = target.type();
-        MethodType ctype = combiner.type();
-        MethodHandle gtarget = convertArguments(token, target, oldType.generic(), oldType, null);
-        MethodHandle gcombiner = convertArguments(token, combiner, ctype.generic(), ctype, null);
-        if (gtarget == null || gcombiner == null)  return null;
-        MethodHandle gresult = FilterGeneric.makeArgumentFolder(gcombiner, gtarget);
-        MethodHandle result = convertArguments(token, gresult, newType, gresult.type(), null);
-        return result;
-    }
-
-    public static
-    MethodHandle dropArguments(Access token, MethodHandle target,
-                               MethodType newType, int argnum) {
-        Access.check(token);
-        int drops = newType.parameterCount() - target.type().parameterCount();
-        MethodHandle res = AdapterMethodHandle.makeDropArguments(token, newType, target, argnum, drops);
-        if (res != null)
-            return res;
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    private static class GuardWithTest extends BoundMethodHandle {
-        private final MethodHandle test, target, fallback;
-        private GuardWithTest(MethodHandle invoker,
-                              MethodHandle test, MethodHandle target, MethodHandle fallback) {
-            super(Access.TOKEN, invoker);
-            this.test = test;
-            this.target = target;
-            this.fallback = fallback;
-        }
-        static MethodHandle make(Access token,
-                                 MethodHandle test, MethodHandle target, MethodHandle fallback) {
-            Access.check(token);
-            MethodType type = target.type();
-            int nargs = type.parameterCount();
-            if (nargs < INVOKES.length) {
-                MethodHandle invoke = INVOKES[nargs];
-                MethodType gtype = type.generic();
-                assert(invoke.type().dropParameterTypes(0,1) == gtype);
-                MethodHandle gtest = convertArguments(token, test, gtype.changeReturnType(boolean.class), test.type(), null);
-                MethodHandle gtarget = convertArguments(token, target, gtype, type, null);
-                MethodHandle gfallback = convertArguments(token, fallback, gtype, type, null);
-                if (gtest == null || gtarget == null || gfallback == null)  return null;
-                MethodHandle gguard = new GuardWithTest(invoke, gtest, gtarget, gfallback);
-                return convertArguments(token, gguard, type, gtype, null);
-            } else {
-                MethodHandle invoke = VARARGS_INVOKE;
-                MethodType gtype = MethodType.genericMethodType(1);
-                assert(invoke.type().dropParameterTypes(0,1) == gtype);
-                MethodHandle gtest = spreadArguments(token, test, gtype.changeReturnType(boolean.class), 0);
-                MethodHandle gtarget = spreadArguments(token, target, gtype, 0);
-                MethodHandle gfallback = spreadArguments(token, fallback, gtype, 0);
-                MethodHandle gguard = new GuardWithTest(invoke, gtest, gtarget, gfallback);
-                if (gtest == null || gtarget == null || gfallback == null)  return null;
-                return collectArguments(token, gguard, type, 0, null);
-            }
-        }
-        @Override
-        public String toString() {
-            return addTypeString(target, this);
-        }
-        private Object invoke_V(Object... av) throws Throwable {
-            if ((boolean) test.invokeExact(av))
-                return target.invokeExact(av);
-            return fallback.invokeExact(av);
-        }
-        private Object invoke_L0() throws Throwable {
-            if ((boolean) test.invokeExact())
-                return target.invokeExact();
-            return fallback.invokeExact();
-        }
-        private Object invoke_L1(Object a0) throws Throwable {
-            if ((boolean) test.invokeExact(a0))
-                return target.invokeExact(a0);
-            return fallback.invokeExact(a0);
-        }
-        private Object invoke_L2(Object a0, Object a1) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1))
-                return target.invokeExact(a0, a1);
-            return fallback.invokeExact(a0, a1);
-        }
-        private Object invoke_L3(Object a0, Object a1, Object a2) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1, a2))
-                return target.invokeExact(a0, a1, a2);
-            return fallback.invokeExact(a0, a1, a2);
-        }
-        private Object invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1, a2, a3))
-                return target.invokeExact(a0, a1, a2, a3);
-            return fallback.invokeExact(a0, a1, a2, a3);
-        }
-        private Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4))
-                return target.invokeExact(a0, a1, a2, a3, a4);
-            return fallback.invokeExact(a0, a1, a2, a3, a4);
-        }
-        private Object invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4, a5))
-                return target.invokeExact(a0, a1, a2, a3, a4, a5);
-            return fallback.invokeExact(a0, a1, a2, a3, a4, a5);
-        }
-        private Object invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4, a5, a6))
-                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6);
-            return fallback.invokeExact(a0, a1, a2, a3, a4, a5, a6);
-        }
-        private Object invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            if ((boolean) test.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7))
-                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7);
-            return fallback.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7);
-        }
-        static MethodHandle[] makeInvokes() {
-            ArrayList<MethodHandle> invokes = new ArrayList<MethodHandle>();
-            MethodHandles.Lookup lookup = IMPL_LOOKUP;
-            for (;;) {
-                int nargs = invokes.size();
-                String name = "invoke_L"+nargs;
-                MethodHandle invoke = null;
-                try {
-                    invoke = lookup.findVirtual(GuardWithTest.class, name, MethodType.genericMethodType(nargs));
-                } catch (NoAccessException ex) {
-                }
-                if (invoke == null)  break;
-                invokes.add(invoke);
-            }
-            assert(invokes.size() == 9);  // current number of methods
-            return invokes.toArray(new MethodHandle[0]);
-        };
-        static final MethodHandle[] INVOKES = makeInvokes();
-        // For testing use this:
-        //static final MethodHandle[] INVOKES = Arrays.copyOf(makeInvokes(), 2);
-        static final MethodHandle VARARGS_INVOKE;
-        static {
-            try {
-                VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(GuardWithTest.class, "invoke_V", MethodType.genericMethodType(0, true));
-            } catch (NoAccessException ex) {
-                throw uncaughtException(ex);
-            }
-        }
-    }
-
-    public static
-    MethodHandle makeGuardWithTest(Access token,
-                                   MethodHandle test,
-                                   MethodHandle target,
-                                   MethodHandle fallback) {
-        return GuardWithTest.make(token, test, target, fallback);
-    }
-
-    private static class GuardWithCatch extends BoundMethodHandle {
-        private final MethodHandle target;
-        private final Class<? extends Throwable> exType;
-        private final MethodHandle catcher;
-        public GuardWithCatch(MethodHandle target, Class<? extends Throwable> exType, MethodHandle catcher) {
-            this(INVOKES[target.type().parameterCount()], target, exType, catcher);
-        }
-        public GuardWithCatch(MethodHandle invoker,
-                              MethodHandle target, Class<? extends Throwable> exType, MethodHandle catcher) {
-            super(Access.TOKEN, invoker);
-            this.target = target;
-            this.exType = exType;
-            this.catcher = catcher;
-        }
-        @Override
-        public String toString() {
-            return addTypeString(target, this);
-        }
-        private Object invoke_V(Object... av) throws Throwable {
-            try {
-                return target.invokeExact(av);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, av);
-            }
-        }
-        private Object invoke_L0() throws Throwable {
-            try {
-                return target.invokeExact();
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t);
-            }
-        }
-        private Object invoke_L1(Object a0) throws Throwable {
-            try {
-                return target.invokeExact(a0);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0);
-            }
-        }
-        private Object invoke_L2(Object a0, Object a1) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1);
-            }
-        }
-        private Object invoke_L3(Object a0, Object a1, Object a2) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1, a2);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1, a2);
-            }
-        }
-        private Object invoke_L4(Object a0, Object a1, Object a2, Object a3) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1, a2, a3);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1, a2, a3);
-            }
-        }
-        private Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1, a2, a3, a4);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1, a2, a3, a4);
-            }
-        }
-        private Object invoke_L6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1, a2, a3, a4, a5);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1, a2, a3, a4, a5);
-            }
-        }
-        private Object invoke_L7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1, a2, a3, a4, a5, a6);
-            }
-        }
-        private Object invoke_L8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable {
-            try {
-                return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7);
-            } catch (Throwable t) {
-                if (!exType.isInstance(t))  throw t;
-                return catcher.invokeExact(t, a0, a1, a2, a3, a4, a5, a6, a7);
-            }
-        }
-        static MethodHandle[] makeInvokes() {
-            ArrayList<MethodHandle> invokes = new ArrayList<MethodHandle>();
-            MethodHandles.Lookup lookup = IMPL_LOOKUP;
-            for (;;) {
-                int nargs = invokes.size();
-                String name = "invoke_L"+nargs;
-                MethodHandle invoke = null;
-                try {
-                    invoke = lookup.findVirtual(GuardWithCatch.class, name, MethodType.genericMethodType(nargs));
-                } catch (NoAccessException ex) {
-                }
-                if (invoke == null)  break;
-                invokes.add(invoke);
-            }
-            assert(invokes.size() == 9);  // current number of methods
-            return invokes.toArray(new MethodHandle[0]);
-        };
-        static final MethodHandle[] INVOKES = makeInvokes();
-        // For testing use this:
-        //static final MethodHandle[] INVOKES = Arrays.copyOf(makeInvokes(), 2);
-        static final MethodHandle VARARGS_INVOKE;
-        static {
-            try {
-                VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(GuardWithCatch.class, "invoke_V", MethodType.genericMethodType(0, true));
-            } catch (NoAccessException ex) {
-                throw uncaughtException(ex);
-            }
-        }
-    }
-
-
-    public static
-    MethodHandle makeGuardWithCatch(Access token,
-                                    MethodHandle target,
-                                    Class<? extends Throwable> exType,
-                                    MethodHandle catcher) {
-        Access.check(token);
-        MethodType type = target.type();
-        MethodType ctype = catcher.type();
-        int nargs = type.parameterCount();
-        if (nargs < GuardWithCatch.INVOKES.length) {
-            MethodType gtype = type.generic();
-            MethodType gcatchType = gtype.insertParameterTypes(0, Throwable.class);
-            MethodHandle gtarget = convertArguments(token, target, gtype, type, null);
-            MethodHandle gcatcher = convertArguments(token, catcher, gcatchType, ctype, null);
-            MethodHandle gguard = new GuardWithCatch(gtarget, exType, gcatcher);
-            if (gtarget == null || gcatcher == null || gguard == null)  return null;
-            return convertArguments(token, gguard, type, gtype, null);
-        } else {
-            MethodType gtype = MethodType.genericMethodType(0, true);
-            MethodType gcatchType = gtype.insertParameterTypes(0, Throwable.class);
-            MethodHandle gtarget = spreadArguments(token, target, gtype, 0);
-            MethodHandle gcatcher = spreadArguments(token, catcher, gcatchType, 1);
-            MethodHandle gguard = new GuardWithCatch(GuardWithCatch.VARARGS_INVOKE, gtarget, exType, gcatcher);
-            if (gtarget == null || gcatcher == null || gguard == null)  return null;
-            return collectArguments(token, gguard, type, 0, null);
-        }
-    }
-
-    public static
-    MethodHandle throwException(Access token, MethodType type) {
-        Access.check(token);
-        return AdapterMethodHandle.makeRetypeRaw(token, type, THROW_EXCEPTION);
-    }
-
-    static final MethodHandle THROW_EXCEPTION;
-    static {
-        try {
-            THROW_EXCEPTION
-            = IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "throwException",
-                    MethodType.methodType(Empty.class, Throwable.class));
-        } catch (NoAccessException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-    static <T extends Throwable> Empty throwException(T t) throws T { throw t; }
-
-    public static String getNameString(Access token, MethodHandle target) {
-        Access.check(token);
-        MemberName name = null;
-        if (target != null)
-            name = MethodHandleNatives.getMethodName(target);
-        if (name == null)
-            return "invoke" + target.type();
-        return name.getName() + target.type();
-    }
-
-    static String addTypeString(Object obj, MethodHandle target) {
-        String str = String.valueOf(obj);
-        if (target == null)  return str;
-        int paren = str.indexOf('(');
-        if (paren >= 0) str = str.substring(0, paren);
-        return str + target.type();
-    }
-
-    static void checkSpreadArgument(Object av, int n) {
-        if (av == null ? n != 0 : ((Object[])av).length != n)
-            throw newIllegalArgumentException("Array is not of length "+n);
-    }
-
-    static void raiseException(int code, Object actual, Object required) {
-        String message;
-        // disregard the identity of the actual object, if it is not a class:
-        if (!(actual instanceof Class) && !(actual instanceof MethodType))
-            actual = actual.getClass();
-        if (actual != null)
-            message = "required "+required+" but encountered "+actual;
-        else
-            message = "required "+required;
-        switch (code) {
-        case 192: // checkcast
-            throw new ClassCastException(message);
-        default:
-            throw new InternalError("unexpected code "+code+": "+message);
-        }
-    }
-
-    // Linkage support:
-    public static void registerBootstrap(Access token, Class<?> callerClass, MethodHandle bootstrapMethod) {
-        Access.check(token);
-        MethodHandleNatives.registerBootstrap(callerClass, bootstrapMethod);
-    }
-    public static MethodHandle getBootstrap(Access token, Class<?> callerClass) {
-        Access.check(token);
-        return MethodHandleNatives.getBootstrap(callerClass);
-    }
-
-    public static MethodHandle withTypeHandler(Access token, MethodHandle target, MethodHandle typeHandler) {
-        Access.check(token);
-        return AdapterMethodHandle.makeTypeHandler(token, target, typeHandler);
-    }
-}
--- a/src/share/classes/sun/dyn/MethodHandleNatives.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,359 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.dyn.MethodHandles.Lookup;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import static sun.dyn.MethodHandleNatives.Constants.*;
-import static sun.dyn.MethodHandleImpl.IMPL_LOOKUP;
-
-/**
- * The JVM interface for the method handles package is all here.
- * This is an interface internal and private to an implemetantion of JSR 292.
- * <em>This class is not part of the JSR 292 standard.</em>
- * @author jrose
- */
-class MethodHandleNatives {
-
-    private MethodHandleNatives() { } // static only
-
-    /// MethodName support
-
-    static native void init(MemberName self, Object ref);
-    static native void expand(MemberName self);
-    static native void resolve(MemberName self, Class<?> caller);
-    static native int getMembers(Class<?> defc, String matchName, String matchSig,
-            int matchFlags, Class<?> caller, int skip, MemberName[] results);
-
-    /// MethodHandle support
-
-    /** Initialize the method handle to adapt the call. */
-    static native void init(AdapterMethodHandle self, MethodHandle target, int argnum);
-    /** Initialize the method handle to call the correct method, directly. */
-    static native void init(BoundMethodHandle self, Object target, int argnum);
-    /** Initialize the method handle to call as if by an invoke* instruction. */
-    static native void init(DirectMethodHandle self, Object ref, boolean doDispatch, Class<?> caller);
-
-    /** Initialize a method type, once per form. */
-    static native void init(MethodType self);
-
-    /** Tell the JVM about a class's bootstrap method. */
-    static native void registerBootstrap(Class<?> caller, MethodHandle bootstrapMethod);
-
-    /** Ask the JVM about a class's bootstrap method. */
-    static native MethodHandle getBootstrap(Class<?> caller);
-
-    /** Tell the JVM that we need to change the target of an invokedynamic. */
-    static native void setCallSiteTarget(CallSite site, MethodHandle target);
-
-    /** Fetch the vmtarget field.
-     *  It will be sanitized as necessary to avoid exposing non-Java references.
-     *  This routine is for debugging and reflection.
-     */
-    static native Object getTarget(MethodHandle self, int format);
-
-    /** Fetch the name of the handled method, if available.
-     *  This routine is for debugging and reflection.
-     */
-    static MemberName getMethodName(MethodHandle self) {
-        if (!JVM_SUPPORT)  return null;
-        return (MemberName) getTarget(self, ETF_METHOD_NAME);
-    }
-
-    /** Fetch the reflective version of the handled method, if available.
-     */
-    static AccessibleObject getTargetMethod(MethodHandle self) {
-        if (!JVM_SUPPORT)  return null;
-        return (AccessibleObject) getTarget(self, ETF_REFLECT_METHOD);
-    }
-
-    /** Fetch the target of this method handle.
-     *  If it directly targets a method, return a MemberName for the method.
-     *  If it is chained to another method handle, return that handle.
-     */
-    static Object getTargetInfo(MethodHandle self) {
-        if (!JVM_SUPPORT)  return null;
-        return getTarget(self, ETF_HANDLE_OR_METHOD_NAME);
-    }
-
-    static Object[] makeTarget(Class<?> defc, String name, String sig, int mods, Class<?> refc) {
-        return new Object[] { defc, name, sig, mods, refc };
-    }
-
-    /** Fetch MH-related JVM parameter.
-     *  which=0 retrieves MethodHandlePushLimit
-     *  which=1 retrieves stack slot push size (in address units)
-     */
-    static native int getConstant(int which);
-
-    /** True iff this HotSpot JVM has built-in support for method handles.
-     * If false, some test cases might run, but functionality will be missing.
-     */
-    public static final boolean JVM_SUPPORT;
-
-    /** Java copy of MethodHandlePushLimit in range 2..255. */
-    static final int JVM_PUSH_LIMIT;
-    /** JVM stack motion (in words) after one slot is pushed, usually -1.
-     */
-    static final int JVM_STACK_MOVE_UNIT;
-
-    /** Which conv-ops are implemented by the JVM? */
-    static final int CONV_OP_IMPLEMENTED_MASK;
-
-    private static native void registerNatives();
-    static {
-        boolean JVM_SUPPORT_;
-        int     JVM_PUSH_LIMIT_;
-        int     JVM_STACK_MOVE_UNIT_;
-        int     CONV_OP_IMPLEMENTED_MASK_;
-        try {
-            registerNatives();
-            JVM_SUPPORT_ = true;
-            JVM_PUSH_LIMIT_ = getConstant(Constants.GC_JVM_PUSH_LIMIT);
-            JVM_STACK_MOVE_UNIT_ = getConstant(Constants.GC_JVM_STACK_MOVE_UNIT);
-            CONV_OP_IMPLEMENTED_MASK_ = getConstant(Constants.GC_CONV_OP_IMPLEMENTED_MASK);
-            //sun.reflect.Reflection.registerMethodsToFilter(MethodHandleImpl.class, "init");
-        } catch (UnsatisfiedLinkError ee) {
-            // ignore; if we use init() methods later we'll see linkage errors
-            JVM_SUPPORT_ = false;
-            JVM_PUSH_LIMIT_ = 3;  // arbitrary
-            JVM_STACK_MOVE_UNIT_ = -1;  // arbitrary
-            CONV_OP_IMPLEMENTED_MASK_ = 0;
-            //System.out.println("Warning: Running with JVM_SUPPORT=false");
-            //System.out.println(ee);
-            JVM_SUPPORT = JVM_SUPPORT_;
-            JVM_PUSH_LIMIT = JVM_PUSH_LIMIT_;
-            JVM_STACK_MOVE_UNIT = JVM_STACK_MOVE_UNIT_;
-            throw ee;  // just die; hopeless to try to run with an older JVM
-        }
-        JVM_SUPPORT = JVM_SUPPORT_;
-        JVM_PUSH_LIMIT = JVM_PUSH_LIMIT_;
-        JVM_STACK_MOVE_UNIT = JVM_STACK_MOVE_UNIT_;
-        if (CONV_OP_IMPLEMENTED_MASK_ == 0)
-            CONV_OP_IMPLEMENTED_MASK_ = DEFAULT_CONV_OP_IMPLEMENTED_MASK;
-        CONV_OP_IMPLEMENTED_MASK = CONV_OP_IMPLEMENTED_MASK_;
-    }
-
-    // All compile-time constants go here.
-    // There is an opportunity to check them against the JVM's idea of them.
-    static class Constants {
-        Constants() { } // static only
-        // MethodHandleImpl
-        static final int // for getConstant
-                GC_JVM_PUSH_LIMIT = 0,
-                GC_JVM_STACK_MOVE_UNIT = 1,
-                GC_CONV_OP_IMPLEMENTED_MASK = 2;
-        static final int
-                ETF_HANDLE_OR_METHOD_NAME = 0, // all available data (immediate MH or method)
-                ETF_DIRECT_HANDLE         = 1, // ultimate method handle (will be a DMH, may be self)
-                ETF_METHOD_NAME           = 2, // ultimate method as MemberName
-                ETF_REFLECT_METHOD        = 3; // ultimate method as java.lang.reflect object (sans refClass)
-
-        // MemberName
-        // The JVM uses values of -2 and above for vtable indexes.
-        // Field values are simple positive offsets.
-        // Ref: src/share/vm/oops/methodOop.hpp
-        // This value is negative enough to avoid such numbers,
-        // but not too negative.
-        static final int
-                MN_IS_METHOD           = 0x00010000, // method (not constructor)
-                MN_IS_CONSTRUCTOR      = 0x00020000, // constructor
-                MN_IS_FIELD            = 0x00040000, // field
-                MN_IS_TYPE             = 0x00080000, // nested type
-                MN_SEARCH_SUPERCLASSES = 0x00100000, // for MHN.getMembers
-                MN_SEARCH_INTERFACES   = 0x00200000, // for MHN.getMembers
-                VM_INDEX_UNINITIALIZED = -99;
-
-        // AdapterMethodHandle
-        /** Conversions recognized by the JVM.
-         *  They must align with the constants in sun.dyn_AdapterMethodHandle,
-         *  in the JVM file hotspot/src/share/vm/classfile/javaClasses.hpp.
-         */
-        static final int
-            OP_RETYPE_ONLY   = 0x0, // no argument changes; straight retype
-            OP_RETYPE_RAW    = 0x1, // no argument changes; straight retype
-            OP_CHECK_CAST    = 0x2, // ref-to-ref conversion; requires a Class argument
-            OP_PRIM_TO_PRIM  = 0x3, // converts from one primitive to another
-            OP_REF_TO_PRIM   = 0x4, // unboxes a wrapper to produce a primitive
-            OP_PRIM_TO_REF   = 0x5, // boxes a primitive into a wrapper (NYI)
-            OP_SWAP_ARGS     = 0x6, // swap arguments (vminfo is 2nd arg)
-            OP_ROT_ARGS      = 0x7, // rotate arguments (vminfo is displaced arg)
-            OP_DUP_ARGS      = 0x8, // duplicates one or more arguments (at TOS)
-            OP_DROP_ARGS     = 0x9, // remove one or more argument slots
-            OP_COLLECT_ARGS  = 0xA, // combine one or more arguments into a varargs (NYI)
-            OP_SPREAD_ARGS   = 0xB, // expand in place a varargs array (of known size)
-            OP_FLYBY         = 0xC, // operate first on reified argument list (NYI)
-            OP_RICOCHET      = 0xD, // run an adapter chain on the return value (NYI)
-            CONV_OP_LIMIT    = 0xE; // limit of CONV_OP enumeration
-        /** Shift and mask values for decoding the AMH.conversion field.
-         *  These numbers are shared with the JVM for creating AMHs.
-         */
-        static final int
-            CONV_OP_MASK     = 0xF00, // this nybble contains the conversion op field
-            CONV_VMINFO_MASK = 0x0FF, // LSB is reserved for JVM use
-            CONV_VMINFO_SHIFT     =  0, // position of bits in CONV_VMINFO_MASK
-            CONV_OP_SHIFT         =  8, // position of bits in CONV_OP_MASK
-            CONV_DEST_TYPE_SHIFT  = 12, // byte 2 has the adapter BasicType (if needed)
-            CONV_SRC_TYPE_SHIFT   = 16, // byte 2 has the source BasicType (if needed)
-            CONV_STACK_MOVE_SHIFT = 20, // high 12 bits give signed SP change
-            CONV_STACK_MOVE_MASK  = (1 << (32 - CONV_STACK_MOVE_SHIFT)) - 1;
-
-        /** Which conv-ops are implemented by the JVM? */
-        static final int DEFAULT_CONV_OP_IMPLEMENTED_MASK =
-                // Value to use if the corresponding JVM query fails.
-                ((1<<OP_RETYPE_ONLY)
-                |(1<<OP_RETYPE_RAW)
-                |(1<<OP_CHECK_CAST)
-                |(1<<OP_PRIM_TO_PRIM)
-                |(1<<OP_REF_TO_PRIM)
-                |(1<<OP_SWAP_ARGS)
-                |(1<<OP_ROT_ARGS)
-                |(1<<OP_DUP_ARGS)
-                |(1<<OP_DROP_ARGS)
-                //|(1<<OP_SPREAD_ARGS)
-                );
-
-        /**
-         * Basic types as encoded in the JVM.  These code values are not
-         * intended for use outside this class.  They are used as part of
-         * a private interface between the JVM and this class.
-         */
-        static final int
-            T_BOOLEAN  =  4,
-            T_CHAR     =  5,
-            T_FLOAT    =  6,
-            T_DOUBLE   =  7,
-            T_BYTE     =  8,
-            T_SHORT    =  9,
-            T_INT      = 10,
-            T_LONG     = 11,
-            T_OBJECT   = 12,
-            //T_ARRAY    = 13
-            T_VOID     = 14;
-            //T_ADDRESS  = 15
-
-        /**
-         * Constant pool reference-kind codes, as used by CONSTANT_MethodHandle CP entries.
-         */
-        static final int
-            REF_getField                = 1,
-            REF_getStatic               = 2,
-            REF_putField                = 3,
-            REF_putStatic               = 4,
-            REF_invokeVirtual           = 5,
-            REF_invokeStatic            = 6,
-            REF_invokeSpecial           = 7,
-            REF_newInvokeSpecial        = 8,
-            REF_invokeInterface         = 9;
-    }
-
-    private static native int getNamedCon(int which, Object[] name);
-    static boolean verifyConstants() {
-        Object[] box = { null };
-        for (int i = 0; ; i++) {
-            box[0] = null;
-            int vmval = getNamedCon(i, box);
-            if (box[0] == null)  break;
-            String name = (String) box[0];
-            try {
-                Field con = Constants.class.getDeclaredField(name);
-                int jval = con.getInt(null);
-                if (jval != vmval)
-                    throw new InternalError(name+": JVM has "+vmval+" while Java has "+jval);
-            } catch (Exception ex) {
-                throw new InternalError(name+": access failed, got "+ex);
-            }
-        }
-        return true;
-    }
-    static {
-        if (JVM_SUPPORT)  verifyConstants();
-    }
-
-    // Up-calls from the JVM.
-    // These must NOT be public.
-
-    /**
-     * The JVM is linking an invokedynamic instruction.  Create a reified call site for it.
-     */
-    static CallSite makeDynamicCallSite(MethodHandle bootstrapMethod,
-                                        String name, MethodType type,
-                                        Object info,
-                                        MemberName callerMethod, int callerBCI) {
-        return CallSiteImpl.makeSite(bootstrapMethod, name, type, info, callerMethod, callerBCI);
-    }
-
-    /**
-     * The JVM wants a pointer to a MethodType.  Oblige it by finding or creating one.
-     */
-    static MethodType findMethodHandleType(Class<?> rtype, Class<?>[] ptypes) {
-        MethodType.genericMethodType(0);  // trigger initialization
-        return MethodTypeImpl.makeImpl(Access.TOKEN, rtype, ptypes, true);
-    }
-
-    /**
-     * The JVM wants to use a MethodType with invokeGeneric.  Give the runtime fair warning.
-     */
-    static void notifyGenericMethodType(MethodType type) {
-        try {
-            // Trigger adapter creation.
-            InvokeGeneric.genericInvokerOf(type);
-        } catch (Exception ex) {
-            Error err = new InternalError("Exception while resolving invokeGeneric");
-            err.initCause(ex);
-            throw err;
-        }
-    }
-
-    /**
-     * The JVM is resolving a CONSTANT_MethodHandle CP entry.  And it wants our help.
-     * It will make an up-call to this method.  (Do not change the name or signature.)
-     */
-    static MethodHandle linkMethodHandleConstant(Class<?> callerClass, int refKind,
-                                                 Class<?> defc, String name, Object type) {
-        try {
-            Lookup lookup = IMPL_LOOKUP.in(callerClass);
-            switch (refKind) {
-            case REF_getField:          return lookup.findGetter(       defc, name, (Class<?>)   type );
-            case REF_getStatic:         return lookup.findStaticGetter( defc, name, (Class<?>)   type );
-            case REF_putField:          return lookup.findSetter(       defc, name, (Class<?>)   type );
-            case REF_putStatic:         return lookup.findStaticSetter( defc, name, (Class<?>)   type );
-            case REF_invokeVirtual:     return lookup.findVirtual(      defc, name, (MethodType) type );
-            case REF_invokeStatic:      return lookup.findStatic(       defc, name, (MethodType) type );
-            case REF_invokeSpecial:     return lookup.findSpecial(      defc, name, (MethodType) type, callerClass );
-            case REF_newInvokeSpecial:  return lookup.findConstructor(  defc,       (MethodType) type );
-            case REF_invokeInterface:   return lookup.findVirtual(      defc, name, (MethodType) type );
-            }
-            throw new IllegalArgumentException("bad MethodHandle constant "+name+" : "+type);
-        } catch (NoAccessException ex) {
-            Error err = new IncompatibleClassChangeError();
-            err.initCause(ex);
-            throw err;
-        }
-    }
-}
--- a/src/share/classes/sun/dyn/MethodTypeImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,513 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import sun.dyn.util.Wrapper;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * Shared information for a group of method types, which differ
- * only by reference types, and therefore share a common erasure
- * and wrapping.
- * <p>
- * For an empirical discussion of the structure of method types,
- * see <a href="http://groups.google.com/group/jvm-languages/browse_thread/thread/ac9308ae74da9b7e/">
- * the thread "Avoiding Boxing" on jvm-languages</a>.
- * There are approximately 2000 distinct erased method types in the JDK.
- * There are a little over 10 times that number of unerased types.
- * No more than half of these are likely to be loaded at once.
- * @author John Rose
- */
-public class MethodTypeImpl {
-    final int[] argToSlotTable, slotToArgTable;
-    final long argCounts;               // packed slot & value counts
-    final long primCounts;              // packed prim & double counts
-    final int vmslots;                  // total number of parameter slots
-    final MethodType erasedType;        // the canonical erasure
-
-    /*lazy*/ MethodType primsAsBoxes;   // replace prims by wrappers
-    /*lazy*/ MethodType primArgsAsBoxes; // wrap args only; make raw return
-    /*lazy*/ MethodType primsAsInts;    // replace prims by int/long
-    /*lazy*/ MethodType primsAsLongs;   // replace prims by long
-    /*lazy*/ MethodType primsAtEnd;     // reorder primitives to the end
-
-    // Cached adapter information:
-    /*lazy*/ ToGeneric   toGeneric;     // convert cs. with prims to w/o
-    /*lazy*/ FromGeneric fromGeneric;   // convert cs. w/o prims to with
-    /*lazy*/ SpreadGeneric[] spreadGeneric; // expand one argument to many
-    /*lazy*/ FilterGeneric filterGeneric; // convert argument(s) on the fly
-    /*lazy*/ MethodHandle genericInvoker; // hook for invokeGeneric
-
-    public MethodType erasedType() {
-        return erasedType;
-    }
-
-    public static MethodTypeImpl of(MethodType type) {
-        return METHOD_TYPE_FRIEND.form(type);
-    }
-
-    /** Access methods for the internals of MethodType, supplied to
-     *  MethodTypeImpl as a trusted agent.
-     */
-    static public interface MethodTypeFriend {
-        Class<?>[]     ptypes(MethodType mt);
-        MethodTypeImpl form(MethodType mt);
-        void           setForm(MethodType mt, MethodTypeImpl form);
-        MethodType     makeImpl(Class<?> rtype, Class<?>[] ptypes, boolean trusted);
-        MethodTypeImpl newMethodTypeForm(MethodType mt);
-        Invokers       getInvokers(MethodType mt);
-        void           setInvokers(MethodType mt, Invokers inv);
-    }
-    public static void setMethodTypeFriend(Access token, MethodTypeFriend am) {
-        Access.check(token);
-        if (METHOD_TYPE_FRIEND != null)
-            throw new InternalError();  // just once
-        METHOD_TYPE_FRIEND = am;
-    }
-    static private MethodTypeFriend METHOD_TYPE_FRIEND;
-
-    static MethodType makeImpl(Access token, Class<?> rtype, Class<?>[] ptypes, boolean trusted) {
-        Access.check(token);
-        return METHOD_TYPE_FRIEND.makeImpl(rtype, ptypes, trusted);
-    }
-
-    protected MethodTypeImpl(MethodType erasedType) {
-        this.erasedType = erasedType;
-
-        Class<?>[] ptypes = METHOD_TYPE_FRIEND.ptypes(erasedType);
-        int ptypeCount = ptypes.length;
-        int pslotCount = ptypeCount;            // temp. estimate
-        int rtypeCount = 1;                     // temp. estimate
-        int rslotCount = 1;                     // temp. estimate
-
-        int[] argToSlotTab = null, slotToArgTab = null;
-
-        // Walk the argument types, looking for primitives.
-        int pac = 0, lac = 0, prc = 0, lrc = 0;
-        Class<?> epts[] = ptypes;
-        for (int i = 0; i < epts.length; i++) {
-            Class<?> pt = epts[i];
-            if (pt != Object.class) {
-                assert(pt.isPrimitive());
-                ++pac;
-                if (hasTwoArgSlots(pt))  ++lac;
-            }
-        }
-        pslotCount += lac;                  // #slots = #args + #longs
-        Class<?> rt = erasedType.returnType();
-        if (rt != Object.class) {
-            ++prc;          // even void.class counts as a prim here
-            if (hasTwoArgSlots(rt))  ++lrc;
-            // adjust #slots, #args
-            if (rt == void.class)
-                rtypeCount = rslotCount = 0;
-            else
-                rslotCount += lrc;
-        }
-        if (lac != 0) {
-            int slot = ptypeCount + lac;
-            slotToArgTab = new int[slot+1];
-            argToSlotTab = new int[1+ptypeCount];
-            argToSlotTab[0] = slot;  // argument "-1" is past end of slots
-            for (int i = 0; i < epts.length; i++) {
-                Class<?> pt = epts[i];
-                if (hasTwoArgSlots(pt))  --slot;
-                --slot;
-                slotToArgTab[slot] = i+1; // "+1" see argSlotToParameter note
-                argToSlotTab[1+i]  = slot;
-            }
-            assert(slot == 0);  // filled the table
-        }
-        this.primCounts = pack(lrc, prc, lac, pac);
-        this.argCounts = pack(rslotCount, rtypeCount, pslotCount, ptypeCount);
-        if (slotToArgTab == null) {
-            int slot = ptypeCount; // first arg is deepest in stack
-            slotToArgTab = new int[slot+1];
-            argToSlotTab = new int[1+ptypeCount];
-            argToSlotTab[0] = slot;  // argument "-1" is past end of slots
-            for (int i = 0; i < ptypeCount; i++) {
-                --slot;
-                slotToArgTab[slot] = i+1; // "+1" see argSlotToParameter note
-                argToSlotTab[1+i]  = slot;
-            }
-        }
-        this.argToSlotTable = argToSlotTab;
-        this.slotToArgTable = slotToArgTab;
-
-        if (pslotCount >= 256)  throw newIllegalArgumentException("too many arguments");
-
-        // send a few bits down to the JVM:
-        this.vmslots = parameterSlotCount();
-
-        // short circuit some no-op canonicalizations:
-        if (!hasPrimitives()) {
-            primsAsBoxes = erasedType;
-            primArgsAsBoxes = erasedType;
-            primsAsInts  = erasedType;
-            primsAsLongs = erasedType;
-            primsAtEnd   = erasedType;
-        }
-    }
-
-    /** Turn all primitive types to corresponding wrapper types.
-     */
-    public MethodType primsAsBoxes() {
-        MethodType ct = primsAsBoxes;
-        if (ct != null)  return ct;
-        MethodType t = erasedType;
-        ct = canonicalize(erasedType, WRAP, WRAP);
-        if (ct == null)  ct = t;  // no prims to box
-        return primsAsBoxes = ct;
-    }
-
-    /** Turn all primitive argument types to corresponding wrapper types.
-     *  Subword and void return types are promoted to int.
-     */
-    public MethodType primArgsAsBoxes() {
-        MethodType ct = primArgsAsBoxes;
-        if (ct != null)  return ct;
-        MethodType t = erasedType;
-        ct = canonicalize(erasedType, RAW_RETURN, WRAP);
-        if (ct == null)  ct = t;  // no prims to box
-        return primArgsAsBoxes = ct;
-    }
-
-    /** Turn all primitive types to either int or long.
-     *  Floating point return types are not changed, because
-     *  they may require special calling sequences.
-     *  A void return value is turned to int.
-     */
-    public MethodType primsAsInts() {
-        MethodType ct = primsAsInts;
-        if (ct != null)  return ct;
-        MethodType t = erasedType;
-        ct = canonicalize(t, RAW_RETURN, INTS);
-        if (ct == null)  ct = t;  // no prims to int-ify
-        return primsAsInts = ct;
-    }
-
-    /** Turn all primitive types to either int or long.
-     *  Floating point return types are not changed, because
-     *  they may require special calling sequences.
-     *  A void return value is turned to int.
-     */
-    public MethodType primsAsLongs() {
-        MethodType ct = primsAsLongs;
-        if (ct != null)  return ct;
-        MethodType t = erasedType;
-        ct = canonicalize(t, RAW_RETURN, LONGS);
-        if (ct == null)  ct = t;  // no prims to int-ify
-        return primsAsLongs = ct;
-    }
-
-    /** Stably sort parameters into 3 buckets: ref, int, long. */
-    public MethodType primsAtEnd() {
-        MethodType ct = primsAtEnd;
-        if (ct != null)  return ct;
-        MethodType t = erasedType;
-
-        int pac = primitiveParameterCount();
-        if (pac == 0)
-            return primsAtEnd = t;
-
-        int argc = parameterCount();
-        int lac = longPrimitiveParameterCount();
-        if (pac == argc && (lac == 0 || lac == argc))
-            return primsAtEnd = t;
-
-        // known to have a mix of 2 or 3 of ref, int, long
-        int[] reorder = primsAtEndOrder(t);
-        ct = reorderParameters(t, reorder, null);
-        //System.out.println("t="+t+" / reorder="+java.util.Arrays.toString(reorder)+" => "+ct);
-        return primsAtEnd = ct;
-    }
-
-    /** Compute a new ordering of parameters so that all references
-     *  are before all ints or longs, and all ints are before all longs.
-     *  For this ordering, doubles count as longs, and all other primitive
-     *  values count as ints.
-     *  As a special case, if the parameters are already in the specified
-     *  order, this method returns a null reference, rather than an array
-     *  specifying a null permutation.
-     *  <p>
-     *  For example, the type {@code (int,boolean,int,Object,String)void}
-     *  produces the order {@code {3,4,0,1,2}}, the type
-     *  {@code (long,int,String)void} produces {@code {2,1,2}}, and
-     *  the type {@code (Object,int)Object} produces {@code null}.
-     */
-    public static int[] primsAtEndOrder(MethodType mt) {
-        MethodTypeImpl form = METHOD_TYPE_FRIEND.form(mt);
-        if (form.primsAtEnd == form.erasedType)
-            // quick check shows no reordering is necessary
-            return null;
-
-        int argc = form.parameterCount();
-        int[] paramOrder = new int[argc];
-
-        // 3-way bucket sort:
-        int pac = form.primitiveParameterCount();
-        int lac = form.longPrimitiveParameterCount();
-        int rfill = 0, ifill = argc - pac, lfill = argc - lac;
-
-        Class<?>[] ptypes = METHOD_TYPE_FRIEND.ptypes(mt);
-        boolean changed = false;
-        for (int i = 0; i < ptypes.length; i++) {
-            Class<?> pt = ptypes[i];
-            int ord;
-            if (!pt.isPrimitive())             ord = rfill++;
-            else if (!hasTwoArgSlots(pt))      ord = ifill++;
-            else                               ord = lfill++;
-            if (ord != i)  changed = true;
-            assert(paramOrder[ord] == 0);
-            paramOrder[ord] = i;
-        }
-        assert(rfill == argc - pac && ifill == argc - lac && lfill == argc);
-        if (!changed) {
-            form.primsAtEnd = form.erasedType;
-            return null;
-        }
-        return paramOrder;
-    }
-
-    /** Put the existing parameters of mt into a new order, given by newParamOrder.
-     *  The third argument is logically appended to mt.parameterArray,
-     *  so that elements of newParamOrder can index either pre-existing or
-     *  new parameter types.
-     */
-    public static MethodType reorderParameters(MethodType mt, int[] newParamOrder, Class<?>[] moreParams) {
-        if (newParamOrder == null)  return mt;  // no-op reordering
-        Class<?>[] ptypes = METHOD_TYPE_FRIEND.ptypes(mt);
-        Class<?>[] ntypes = new Class<?>[newParamOrder.length];
-        int maxParam = ptypes.length + (moreParams == null ? 0 : moreParams.length);
-        boolean changed = (ntypes.length != ptypes.length);
-        for (int i = 0; i < newParamOrder.length; i++) {
-            int param = newParamOrder[i];
-            if (param != i)  changed = true;
-            Class<?> nt;
-            if (param < ptypes.length)   nt = ptypes[param];
-            else if (param == maxParam)  nt = mt.returnType();
-            else                         nt = moreParams[param - ptypes.length];
-            ntypes[i] = nt;
-        }
-        if (!changed)  return mt;
-        return METHOD_TYPE_FRIEND.makeImpl(mt.returnType(), ntypes, true);
-    }
-
-    private static boolean hasTwoArgSlots(Class<?> type) {
-        return type == long.class || type == double.class;
-    }
-
-    private static long pack(int a, int b, int c, int d) {
-        assert(((a|b|c|d) & ~0xFFFF) == 0);
-        long hw = ((a << 16) | b), lw = ((c << 16) | d);
-        return (hw << 32) | lw;
-    }
-    private static char unpack(long packed, int word) { // word==0 => return a, ==3 => return d
-        assert(word <= 3);
-        return (char)(packed >> ((3-word) * 16));
-    }
-
-    public int parameterCount() {                      // # outgoing values
-        return unpack(argCounts, 3);
-    }
-    public int parameterSlotCount() {                  // # outgoing interpreter slots
-        return unpack(argCounts, 2);
-    }
-    public int returnCount() {                         // = 0 (V), or 1
-        return unpack(argCounts, 1);
-    }
-    public int returnSlotCount() {                     // = 0 (V), 2 (J/D), or 1
-        return unpack(argCounts, 0);
-    }
-    public int primitiveParameterCount() {
-        return unpack(primCounts, 3);
-    }
-    public int longPrimitiveParameterCount() {
-        return unpack(primCounts, 2);
-    }
-    public int primitiveReturnCount() {                // = 0 (obj), or 1
-        return unpack(primCounts, 1);
-    }
-    public int longPrimitiveReturnCount() {            // = 1 (J/D), or 0
-        return unpack(primCounts, 0);
-    }
-    public boolean hasPrimitives() {
-        return primCounts != 0;
-    }
-//    public boolean hasNonVoidPrimitives() {
-//        if (primCounts == 0)  return false;
-//        if (primitiveParameterCount() != 0)  return true;
-//        return (primitiveReturnCount() != 0 && returnCount() != 0);
-//    }
-    public boolean hasLongPrimitives() {
-        return (longPrimitiveParameterCount() | longPrimitiveReturnCount()) != 0;
-    }
-    public int parameterToArgSlot(int i) {
-        return argToSlotTable[1+i];
-    }
-    public int argSlotToParameter(int argSlot) {
-        // Note:  Empty slots are represented by zero in this table.
-        // Valid arguments slots contain incremented entries, so as to be non-zero.
-        // We return -1 the caller to mean an empty slot.
-        return slotToArgTable[argSlot] - 1;
-    }
-
-    public static void initForm(Access token, MethodType mt) {
-        Access.check(token);
-        MethodTypeImpl form = findForm(mt);
-        METHOD_TYPE_FRIEND.setForm(mt, form);
-        if (form.erasedType == mt) {
-            // This is a principal (erased) type; show it to the JVM.
-            MethodHandleImpl.init(token, mt);
-        }
-    }
-
-    static MethodTypeImpl findForm(MethodType mt) {
-        MethodType erased = canonicalize(mt, ERASE, ERASE);
-        if (erased == null) {
-            // It is already erased.  Make a new MethodTypeImpl.
-            return METHOD_TYPE_FRIEND.newMethodTypeForm(mt);
-        } else {
-            // Share the MethodTypeImpl with the erased version.
-            return METHOD_TYPE_FRIEND.form(erased);
-        }
-    }
-
-    /** Codes for {@link #canonicalize(java.lang.Class, int).
-     * ERASE means change every reference to {@code Object}.
-     * WRAP means convert primitives (including {@code void} to their
-     * corresponding wrapper types.  UNWRAP means the reverse of WRAP.
-     * INTS means convert all non-void primitive types to int or long,
-     * according to size.  LONGS means convert all non-void primitives
-     * to long, regardless of size.  RAW_RETURN means convert a type
-     * (assumed to be a return type) to int if it is smaller than an int,
-     * or if it is void.
-     */
-    public static final int NO_CHANGE = 0, ERASE = 1, WRAP = 2, UNWRAP = 3, INTS = 4, LONGS = 5, RAW_RETURN = 6;
-
-    /** Canonicalize the types in the given method type.
-     * If any types change, intern the new type, and return it.
-     * Otherwise return null.
-     */
-    public static MethodType canonicalize(MethodType mt, int howRet, int howArgs) {
-        Class<?>[] ptypes = METHOD_TYPE_FRIEND.ptypes(mt);
-        Class<?>[] ptc = MethodTypeImpl.canonicalizes(ptypes, howArgs);
-        Class<?> rtype = mt.returnType();
-        Class<?> rtc = MethodTypeImpl.canonicalize(rtype, howRet);
-        if (ptc == null && rtc == null) {
-            // It is already canonical.
-            return null;
-        }
-        // Find the erased version of the method type:
-        if (rtc == null)  rtc = rtype;
-        if (ptc == null)  ptc = ptypes;
-        return METHOD_TYPE_FRIEND.makeImpl(rtc, ptc, true);
-    }
-
-    /** Canonicalize the given return or param type.
-     *  Return null if the type is already canonicalized.
-     */
-    static Class<?> canonicalize(Class<?> t, int how) {
-        Class<?> ct;
-        if (t == Object.class) {
-            // no change, ever
-        } else if (!t.isPrimitive()) {
-            switch (how) {
-                case UNWRAP:
-                    ct = Wrapper.asPrimitiveType(t);
-                    if (ct != t)  return ct;
-                    break;
-                case RAW_RETURN:
-                case ERASE:
-                    return Object.class;
-            }
-        } else if (t == void.class) {
-            // no change, usually
-            switch (how) {
-                case RAW_RETURN:
-                    return int.class;
-                case WRAP:
-                    return Void.class;
-            }
-        } else {
-            // non-void primitive
-            switch (how) {
-                case WRAP:
-                    return Wrapper.asWrapperType(t);
-                case INTS:
-                    if (t == int.class || t == long.class)
-                        return null;  // no change
-                    if (t == double.class)
-                        return long.class;
-                    return int.class;
-                case LONGS:
-                    if (t == long.class)
-                        return null;  // no change
-                    return long.class;
-                case RAW_RETURN:
-                    if (t == int.class || t == long.class ||
-                        t == float.class || t == double.class)
-                        return null;  // no change
-                    // everything else returns as an int
-                    return int.class;
-            }
-        }
-        // no change; return null to signify
-        return null;
-    }
-
-    /** Canonicalize each param type in the given array.
-     *  Return null if all types are already canonicalized.
-     */
-    static Class<?>[] canonicalizes(Class<?>[] ts, int how) {
-        Class<?>[] cs = null;
-        for (int imax = ts.length, i = 0; i < imax; i++) {
-            Class<?> c = canonicalize(ts[i], how);
-            if (c != null) {
-                if (cs == null)
-                    cs = ts.clone();
-                cs[i] = c;
-            }
-        }
-        return cs;
-    }
-
-    public static Invokers invokers(Access token, MethodType type) {
-        Access.check(token);
-        Invokers inv = METHOD_TYPE_FRIEND.getInvokers(type);
-        if (inv != null)  return inv;
-        inv = new Invokers(token, type);
-        METHOD_TYPE_FRIEND.setInvokers(type, inv);
-        return inv;
-    }
-
-    @Override
-    public String toString() {
-        return "Form"+erasedType;
-    }
-
-}
--- a/src/share/classes/sun/dyn/SpreadGeneric.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,678 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import sun.dyn.util.ValueConversions;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * Generic spread adapter.
- * Expands a final argument into multiple (zero or more) arguments, keeping the others the same.
- * @author jrose
- */
-class SpreadGeneric {
-    // type for the outgoing call
-    private final MethodType targetType;
-    // number of arguments to spread
-    private final int spreadCount;
-    // prototype adapter (clone and customize for each new target!)
-    private final Adapter adapter;
-    // entry point for adapter (Adapter mh, a...) => ...
-    private final MethodHandle entryPoint;
-
-    /** Compute and cache information common to all spreading adapters
-     *  that accept calls of the given (generic) type.
-     */
-    private SpreadGeneric(MethodType targetType, int spreadCount) {
-        assert(targetType == targetType.generic());
-        this.targetType = targetType;
-        this.spreadCount = spreadCount;
-        // the target invoker will generally need casts on reference arguments
-        MethodHandle[] ep = { null };
-        Adapter ad = findAdapter(this, ep);
-        if (ad != null) {
-            this.adapter = ad;
-            this.entryPoint = ep[0];
-            return;
-        }
-        this.adapter = buildAdapterFromBytecodes(targetType, spreadCount, ep);
-        this.entryPoint = ep[0];
-    }
-
-    /** From targetType remove the last spreadCount arguments, and instead
-     *  append a simple Object argument.
-     */
-    static MethodType preSpreadType(MethodType targetType, int spreadCount) {
-        @SuppressWarnings("unchecked")
-        ArrayList<Class<?>> params = new ArrayList(targetType.parameterList());
-        int outargs = params.size();
-        params.subList(outargs - spreadCount, outargs).clear();
-        params.add(Object.class);
-        return MethodType.methodType(targetType.returnType(), params);
-    }
-
-    MethodHandle makeInstance(MethodHandle target) {
-        MethodType type = target.type();
-        if (type != targetType) {
-            throw new UnsupportedOperationException("NYI type="+type);
-        }
-        return adapter.makeInstance(this, target);
-    }
-
-    /** Build an adapter of the given generic type, which invokes typedTarget
-     *  on the incoming arguments, after unboxing as necessary.
-     *  The return value is boxed if necessary.
-     * @param genericType  the required type of the result
-     * @param typedTarget the target
-     * @return an adapter method handle
-     */
-    public static MethodHandle make(MethodHandle target, int spreadCount) {
-        MethodType type = target.type();
-        MethodType gtype = type.generic();
-        if (type == gtype) {
-            return SpreadGeneric.of(type, spreadCount).makeInstance(target);
-        } else {
-            MethodHandle gtarget = FromGeneric.make(target);
-            assert(gtarget.type() == gtype);
-            MethodHandle gspread = SpreadGeneric.of(gtype, spreadCount).makeInstance(gtarget);
-            return ToGeneric.make(preSpreadType(type, spreadCount), gspread);
-        }
-    }
-
-    /** Return the adapter information for this type's erasure. */
-    static SpreadGeneric of(MethodType targetType, int spreadCount) {
-        if (targetType != targetType.generic())
-            throw new UnsupportedOperationException("NYI type="+targetType);
-        MethodTypeImpl form = MethodTypeImpl.of(targetType);
-        int outcount = form.parameterCount();
-        assert(spreadCount <= outcount);
-        SpreadGeneric[] spreadGens = form.spreadGeneric;
-        if (spreadGens == null)
-            form.spreadGeneric = spreadGens = new SpreadGeneric[outcount+1];
-        SpreadGeneric spreadGen = spreadGens[spreadCount];
-        if (spreadGen == null)
-            spreadGens[spreadCount] = spreadGen = new SpreadGeneric(form.erasedType(), spreadCount);
-        return spreadGen;
-    }
-
-    public String toString() {
-        return getClass().getSimpleName()+targetType+"["+spreadCount+"]";
-    }
-
-    // This mini-api is called from an Adapter to manage the spread.
-    /** A check/coercion that happens once before any selections. */
-    protected Object check(Object av, int n) {
-        MethodHandleImpl.checkSpreadArgument(av, n);
-        return av;
-    }
-
-    /** The selection operator for spreading; note that it takes Object not Object[]. */
-    protected Object select(Object av, int n) {
-        return ((Object[])av)[n];
-    }
-    /*
-    protected int select_I(Object av, int n) {
-        // maybe return ((int[])select)[n]
-        throw new UnsupportedOperationException("subclass resp.");
-    }
-    protected int select_J(Object av, int n) {
-        // maybe return ((long[])select)[n]
-        throw new UnsupportedOperationException("subclass resp.");
-    }
-    // */
-
-    /* Create an adapter that handles spreading calls for the given type. */
-    static Adapter findAdapter(SpreadGeneric outer, MethodHandle[] ep) {
-        MethodType targetType = outer.targetType;
-        int spreadCount = outer.spreadCount;
-        int outargs = targetType.parameterCount();
-        int inargs = outargs - spreadCount;
-        if (inargs < 0)  return null;
-        MethodType entryType = MethodType.genericMethodType(inargs + 1); // 1 for av
-        String cname1 = "S" + outargs;
-        String[] cnames = { cname1 };
-        String iname = "invoke_S"+spreadCount;
-        // e.g., D5I2, D5, L5I2, L5; invoke_D5
-        for (String cname : cnames) {
-            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
-            if (acls == null)  continue;
-            // see if it has the required invoke method
-            MethodHandle entryPoint = null;
-            try {
-                entryPoint = MethodHandleImpl.IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
-            } catch (NoAccessException ex) {
-            }
-            if (entryPoint == null)  continue;
-            Constructor<? extends Adapter> ctor = null;
-            try {
-                ctor = acls.getDeclaredConstructor(SpreadGeneric.class);
-            } catch (NoSuchMethodException ex) {
-            } catch (SecurityException ex) {
-            }
-            if (ctor == null)  continue;
-            try {
-                // Produce an instance configured as a prototype.
-                Adapter ad = ctor.newInstance(outer);
-                ep[0] = entryPoint;
-                return ad;
-            } catch (IllegalArgumentException ex) {
-            } catch (InvocationTargetException wex) {
-                Throwable ex = wex.getTargetException();
-                if (ex instanceof Error)  throw (Error)ex;
-                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
-            } catch (InstantiationException ex) {
-            } catch (IllegalAccessException ex) {
-            }
-        }
-        return null;
-    }
-
-    static Adapter buildAdapterFromBytecodes(MethodType targetType,
-            int spreadCount, MethodHandle[] ep) {
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    /**
-     * This adapter takes some untyped arguments, and returns an untyped result.
-     * Internally, it applies the invoker to the target, which causes the
-     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
-     * This result is passed to convert, which is responsible for
-     * converting the raw result into a boxed object.
-     * The invoker is kept separate from the target because it can be
-     * generated once per type erasure family, and reused across adapters.
-     */
-    static abstract class Adapter extends BoundMethodHandle {
-        /*
-         * class X<<R,int M,int N>> extends Adapter {
-         *   (Object**N)=>R target;
-         *   static int S = N-M;
-         *   Object invoke(Object**M a, Object v) = target(a..., v[0]...v[S-1]);
-         * }
-         */
-        protected final SpreadGeneric outer;
-        protected final MethodHandle target;   // (any**N) => R
-
-        @Override
-        public String toString() {
-            return MethodHandleImpl.addTypeString(target, this);
-        }
-
-        static final MethodHandle NO_ENTRY = ValueConversions.identity();
-
-        protected boolean isPrototype() { return target == null; }
-        protected Adapter(SpreadGeneric outer) {
-            super(Access.TOKEN, NO_ENTRY);
-            this.outer = outer;
-            this.target = null;
-            assert(isPrototype());
-        }
-
-        protected Adapter(SpreadGeneric outer, MethodHandle target) {
-            super(Access.TOKEN, outer.entryPoint);
-            this.outer = outer;
-            this.target = target;
-        }
-
-        /** Make a copy of self, with new fields. */
-        protected abstract Adapter makeInstance(SpreadGeneric outer, MethodHandle target);
-        // { return new ThisType(outer, target); }
-
-        protected Object check(Object av, int n) {
-            return outer.check(av, n);
-        }
-        protected Object select(Object av, int n) {
-            return outer.select(av, n);
-        }
-
-        static private final String CLASS_PREFIX; // "sun.dyn.SpreadGeneric$"
-        static {
-            String aname = Adapter.class.getName();
-            String sname = Adapter.class.getSimpleName();
-            if (!aname.endsWith(sname))  throw new InternalError();
-            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
-        }
-        /** Find a sibing class of Adapter. */
-        static Class<? extends Adapter> findSubClass(String name) {
-            String cname = Adapter.CLASS_PREFIX + name;
-            try {
-                return Class.forName(cname).asSubclass(Adapter.class);
-            } catch (ClassNotFoundException ex) {
-                return null;
-            } catch (ClassCastException ex) {
-                return null;
-            }
-        }
-    }
-
-    /* generated classes follow this pattern:
-    static class xS2 extends Adapter {
-        protected xS2(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected xS2(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected xS2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new xS2(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av,0);
-             return target.invokeExact(a0, a1)); }
-        protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av,1);
-             return target.invokeExact(a0,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av,1);
-             return target.invokeExact(
-                super.select(av,0), super.select(av,1)); }
-    }
-    // */
-
-/*
-: SHELL; n=SpreadGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
-//{{{
-import java.util.*;
-class genclasses {
-    static String[][] TEMPLATES = { {
-        "@for@ N=0..10",
-        "    //@each-cat@",
-        "    static class @cat@ extends Adapter {",
-        "        protected @cat@(SpreadGeneric outer) { super(outer); }  // to build prototype",
-        "        protected @cat@(SpreadGeneric outer, MethodHandle t) { super(outer, t); }",
-        "        protected @cat@ makeInstance(SpreadGeneric outer, MethodHandle t) { return new @cat@(outer, t); }",
-        "        protected Object invoke_S0(@Tvav,@Object av) throws Throwable { av = super.check(av, 0);",
-        "            return target.invokeExact(@av@); }",
-        "        //@each-S@",
-        "        protected Object invoke_S@S@(@Tvav,@Object av) throws Throwable { av = super.check(av, @S@);",
-        "            return target.invokeExact(@av,@@sv@); }",
-        "        //@end-S@",
-        "    }",
-    } };
-    static final String NEWLINE_INDENT = "\n                ";
-    enum VAR {
-        cat, N, S, av, av_, Tvav_, sv;
-        public final String pattern = "@"+toString().replace('_','.')+"@";
-        public String binding = toString();
-        static void makeBindings(boolean topLevel, int outargs, int spread) {
-            int inargs = outargs - spread;
-            VAR.cat.binding = "S"+outargs;
-            VAR.N.binding = String.valueOf(outargs); // outgoing arg count
-            VAR.S.binding = String.valueOf(spread);  // spread count
-            String[] av = new String[inargs];
-            String[] Tvav = new String[inargs];
-            for (int i = 0; i < inargs; i++) {
-                av[i] = arg(i);
-                Tvav[i] = param("Object", av[i]);
-            }
-            VAR.av.binding = comma(av);
-            VAR.av_.binding = comma(av, ", ");
-            VAR.Tvav_.binding = comma(Tvav, ", ");
-            String[] sv = new String[spread];
-            for (int i = 0; i < spread; i++) {
-                String spc = "";
-                if (i % 4 == 0) spc = NEWLINE_INDENT;
-                sv[i] = spc+"super.select(av,"+i+")";
-            }
-            VAR.sv.binding = comma(sv);
-        }
-        static String arg(int i) { return "a"+i; }
-        static String param(String t, String a) { return t+" "+a; }
-        static String comma(String[] v) { return comma(v, ""); }
-        static String comma(String[] v, String sep) {
-            if (v.length == 0)  return "";
-            String res = v[0];
-            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
-            return res + sep;
-        }
-        static String transform(String string) {
-            for (VAR var : values())
-                string = string.replaceAll(var.pattern, var.binding);
-            return string;
-        }
-    }
-    static String[] stringsIn(String[] strings, int beg, int end) {
-        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
-    }
-    static String[] stringsBefore(String[] strings, int pos) {
-        return stringsIn(strings, 0, pos);
-    }
-    static String[] stringsAfter(String[] strings, int pos) {
-        return stringsIn(strings, pos, strings.length);
-    }
-    static int indexAfter(String[] strings, int pos, String tag) {
-        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
-    }
-    static int indexBefore(String[] strings, int pos, String tag) {
-        for (int i = pos, end = strings.length; ; i++) {
-            if (i == end || strings[i].endsWith(tag))  return i;
-        }
-    }
-    static int MIN_ARITY, MAX_ARITY;
-    public static void main(String... av) {
-        for (String[] template : TEMPLATES) {
-            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
-            String[] forLines = stringsBefore(template, forLinesLimit);
-            template = stringsAfter(template, forLinesLimit);
-            for (String forLine : forLines)
-                expandTemplate(forLine, template);
-        }
-    }
-    static void expandTemplate(String forLine, String[] template) {
-        String[] params = forLine.split("[^0-9]+");
-        if (params[0].length() == 0)  params = stringsAfter(params, 1);
-        System.out.println("//params="+Arrays.asList(params));
-        int pcur = 0;
-        MIN_ARITY = Integer.valueOf(params[pcur++]);
-        MAX_ARITY = Integer.valueOf(params[pcur++]);
-        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
-        for (int outargs = MIN_ARITY; outargs <= MAX_ARITY; outargs++) {
-            expandTemplate(template, true, outargs, 0);
-        }
-    }
-    static void expandTemplate(String[] template, boolean topLevel, int outargs, int spread) {
-        VAR.makeBindings(topLevel, outargs, spread);
-        for (int i = 0; i < template.length; i++) {
-            String line = template[i];
-            if (line.endsWith("@each-cat@")) {
-                // ignore
-            } else if (line.endsWith("@each-S@")) {
-                int blockEnd = indexAfter(template, i, "@end-S@");
-                String[] block = stringsIn(template, i+1, blockEnd-1);
-                for (int spread1 = spread+1; spread1 <= outargs; spread1++)
-                    expandTemplate(block, false, outargs, spread1);
-                VAR.makeBindings(topLevel, outargs, spread);
-                i = blockEnd-1; continue;
-            } else {
-                System.out.println(VAR.transform(line));
-            }
-        }
-    }
-}
-//}}} */
-//params=[0, 10]
-    static class S0 extends Adapter {
-        protected S0(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S0(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S0 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S0(outer, t); }
-        protected Object invoke_S0(Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(); }
-    }
-    static class S1 extends Adapter {
-        protected S1(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S1(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S1 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S1(outer, t); }
-        protected Object invoke_S0(Object a0, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0); }
-        protected Object invoke_S1(Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(
-                super.select(av,0)); }
-    }
-    static class S2 extends Adapter {
-        protected S2(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S2(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S2(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1); }
-        protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1)); }
-    }
-    static class S3 extends Adapter {
-        protected S3(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S3(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S3 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S3(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2); }
-        protected Object invoke_S1(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-    }
-    static class S4 extends Adapter {
-        protected S4(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S4(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S4 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S4(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-    }
-    static class S5 extends Adapter {
-        protected S5(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S5(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S5 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S5(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3, a4); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2, a3,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object a0, Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-        protected Object invoke_S5(Object av) throws Throwable { av = super.check(av, 5);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4)); }
-    }
-    static class S6 extends Adapter {
-        protected S6(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S6(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S6 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S6(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2, a3, a4,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1, a2, a3,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-        protected Object invoke_S5(Object a0, Object av) throws Throwable { av = super.check(av, 5);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4)); }
-        protected Object invoke_S6(Object av) throws Throwable { av = super.check(av, 6);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5)); }
-    }
-    static class S7 extends Adapter {
-        protected S7(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S7(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S7 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S7(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1, a2, a3, a4,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0, a1, a2, a3,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-        protected Object invoke_S5(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 5);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4)); }
-        protected Object invoke_S6(Object a0, Object av) throws Throwable { av = super.check(av, 6);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5)); }
-        protected Object invoke_S7(Object av) throws Throwable { av = super.check(av, 7);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6)); }
-    }
-    static class S8 extends Adapter {
-        protected S8(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S8(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S8 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S8(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0, a1, a2, a3, a4,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(a0, a1, a2, a3,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-        protected Object invoke_S5(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 5);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4)); }
-        protected Object invoke_S6(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 6);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5)); }
-        protected Object invoke_S7(Object a0, Object av) throws Throwable { av = super.check(av, 7);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6)); }
-        protected Object invoke_S8(Object av) throws Throwable { av = super.check(av, 8);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
-    }
-    static class S9 extends Adapter {
-        protected S9(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S9(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S9 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S9(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(a0, a1, a2, a3, a4,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-        protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 5);
-            return target.invokeExact(a0, a1, a2, a3,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4)); }
-        protected Object invoke_S6(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 6);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5)); }
-        protected Object invoke_S7(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 7);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6)); }
-        protected Object invoke_S8(Object a0, Object av) throws Throwable { av = super.check(av, 8);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
-        protected Object invoke_S9(Object av) throws Throwable { av = super.check(av, 9);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
-                super.select(av,8)); }
-    }
-    static class S10 extends Adapter {
-        protected S10(SpreadGeneric outer) { super(outer); }  // to build prototype
-        protected S10(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
-        protected S10 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S10(outer, t); }
-        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9, Object av) throws Throwable { av = super.check(av, 0);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 1);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8,
-                super.select(av,0)); }
-        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 2);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7,
-                super.select(av,0), super.select(av,1)); }
-        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 3);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5, a6,
-                super.select(av,0), super.select(av,1), super.select(av,2)); }
-        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 4);
-            return target.invokeExact(a0, a1, a2, a3, a4, a5,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
-        protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 5);
-            return target.invokeExact(a0, a1, a2, a3, a4,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4)); }
-        protected Object invoke_S6(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 6);
-            return target.invokeExact(a0, a1, a2, a3,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5)); }
-        protected Object invoke_S7(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 7);
-            return target.invokeExact(a0, a1, a2,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6)); }
-        protected Object invoke_S8(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 8);
-            return target.invokeExact(a0, a1,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
-        protected Object invoke_S9(Object a0, Object av) throws Throwable { av = super.check(av, 9);
-            return target.invokeExact(a0,
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
-                super.select(av,8)); }
-        protected Object invoke_S10(Object av) throws Throwable { av = super.check(av, 10);
-            return target.invokeExact(
-                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
-                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
-                super.select(av,8), super.select(av,9)); }
-    }
-}
--- a/src/share/classes/sun/dyn/ToGeneric.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1041 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn;
-
-import java.dyn.*;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import sun.dyn.util.ValueConversions;
-import sun.dyn.util.Wrapper;
-import static sun.dyn.MemberName.newIllegalArgumentException;
-
-/**
- * Adapters which mediate between incoming calls which are not generic
- * and outgoing calls which are.  Any call can be represented generically
- * boxing up its arguments, and (on return) unboxing the return value.
- * <p>
- * A call is "generic" (in MethodHandle terms) if its MethodType features
- * only Object arguments.  A non-generic call therefore features
- * primitives and/or reference types other than Object.
- * An adapter has types for its incoming and outgoing calls.
- * The incoming call type is simply determined by the adapter's type
- * (the MethodType it presents to callers).  The outgoing call type
- * is determined by the adapter's target (a MethodHandle that the adapter
- * either binds internally or else takes as a leading argument).
- * (To stretch the term, adapter-like method handles may have multiple
- * targets or be polymorphic across multiple call types.)
- * @author jrose
- */
-class ToGeneric {
-    // type for the incoming call (may be erased)
-    private final MethodType entryType;
-    // incoming type with primitives moved to the end and turned to int/long
-    private final MethodType rawEntryType;
-    // adapter for the erased type
-    private final Adapter adapter;
-    // entry point for adapter (Adapter mh, a...) => ...
-    private final MethodHandle entryPoint;
-    // permutation of arguments for primsAtEndType
-    private final int[] primsAtEndOrder;
-    // optional final argument list conversions (at least, invokes the target)
-    private final MethodHandle invoker;
-    // conversion which unboxes a primitive return value
-    private final MethodHandle returnConversion;
-
-    /** Compute and cache information common to all generifying (boxing) adapters
-     *  that implement members of the erasure-family of the given erased type.
-     */
-    private ToGeneric(MethodType entryType) {
-        assert(entryType.erase() == entryType); // for now
-        // incoming call will first "forget" all reference types except Object
-        this.entryType = entryType;
-        MethodHandle invoker0 = MethodHandles.exactInvoker(entryType.generic());
-        MethodType rawEntryTypeInit;
-        Adapter ad = findAdapter(rawEntryTypeInit = entryType);
-        if (ad != null) {
-            // Immediate hit to exactly the adapter we want,
-            // with no monkeying around with primitive types.
-            this.returnConversion = computeReturnConversion(entryType, rawEntryTypeInit, false);
-            this.rawEntryType = rawEntryTypeInit;
-            this.adapter = ad;
-            this.entryPoint = ad.prototypeEntryPoint();
-            this.primsAtEndOrder = null;
-            this.invoker = invoker0;
-            return;
-        }
-
-        // next, it will reorder primitives after references
-        MethodType primsAtEnd = MethodTypeImpl.of(entryType).primsAtEnd();
-        // at the same time, it will "forget" all primitive types except int/long
-        this.primsAtEndOrder = MethodTypeImpl.primsAtEndOrder(entryType);
-        if (primsAtEndOrder != null) {
-            // reordering is required; build on top of a simpler ToGeneric
-            ToGeneric va2 = ToGeneric.of(primsAtEnd);
-            this.adapter = va2.adapter;
-            if (true) throw new UnsupportedOperationException("NYI: primitive parameters must follow references; entryType = "+entryType);
-            this.entryPoint = MethodHandleImpl.convertArguments(Access.TOKEN,
-                    va2.entryPoint, primsAtEnd, entryType, primsAtEndOrder);
-            // example: for entryType of (int,Object,Object), the reordered
-            // type is (Object,Object,int) and the order is {1,2,0},
-            // and putPAE is (mh,int0,obj1,obj2) => mh.invokeExact(obj1,obj2,int0)
-            return;
-        }
-
-        // after any needed argument reordering, it will reinterpret
-        // primitive arguments according to their "raw" types int/long
-        MethodType intsAtEnd = MethodTypeImpl.of(primsAtEnd).primsAsInts();
-        ad = findAdapter(rawEntryTypeInit = intsAtEnd);
-        MethodHandle rawEntryPoint;
-        if (ad != null) {
-            rawEntryPoint = ad.prototypeEntryPoint();
-        } else {
-            // Perhaps the adapter is available only for longs.
-            // If so, we can use it, but there will have to be a little
-            // more stack motion on each call.
-            MethodType longsAtEnd = MethodTypeImpl.of(primsAtEnd).primsAsLongs();
-            ad = findAdapter(rawEntryTypeInit = longsAtEnd);
-            if (ad != null) {
-                MethodType eptWithLongs = longsAtEnd.insertParameterTypes(0, ad.getClass());
-                MethodType eptWithInts  =  intsAtEnd.insertParameterTypes(0, ad.getClass());
-                rawEntryPoint = ad.prototypeEntryPoint();
-                MethodType midType = eptWithLongs;  // will change longs to ints
-                for (int i = 0, nargs = midType.parameterCount(); i < nargs; i++) {
-                    if (midType.parameterType(i) != eptWithInts.parameterType(i)) {
-                        assert(midType.parameterType(i) == long.class);
-                        assert(eptWithInts.parameterType(i) == int.class);
-                        MethodType nextType = midType.changeParameterType(i, int.class);
-                        rawEntryPoint = MethodHandle.convertArguments(Access.TOKEN,
-                                rawEntryPoint, nextType, midType, null);
-                        midType = nextType;
-                    }
-                }
-                assert(midType == eptWithInts);
-            } else {
-                // If there is no statically compiled adapter,
-                // build one by means of dynamic bytecode generation.
-                ad = buildAdapterFromBytecodes(rawEntryTypeInit = intsAtEnd);
-                rawEntryPoint = ad.prototypeEntryPoint();
-            }
-        }
-        MethodType tepType = entryType.insertParameterTypes(0, ad.getClass());
-        this.entryPoint =
-            AdapterMethodHandle.makeRetypeRaw(Access.TOKEN, tepType, rawEntryPoint);
-        if (this.entryPoint == null)
-            throw new UnsupportedOperationException("cannot retype to "+entryType
-                    +" from "+rawEntryPoint.type().dropParameterTypes(0, 1));
-        this.returnConversion = computeReturnConversion(entryType, rawEntryTypeInit, false);
-        this.rawEntryType = rawEntryTypeInit;
-        this.adapter = ad;
-        this.invoker = makeRawArgumentFilter(invoker0, rawEntryTypeInit, entryType);
-    }
-
-    /** A generic argument list will be created by a call of type 'raw'.
-     *  The values need to be reboxed for to match 'cooked'.
-     *  Do this on the fly.
-     */
-    // TO DO: Use a generic argument converter in a different file
-    static MethodHandle makeRawArgumentFilter(MethodHandle invoker,
-            MethodType raw, MethodType cooked) {
-        MethodHandle filteredInvoker = null;
-        for (int i = 0, nargs = raw.parameterCount(); i < nargs; i++) {
-            Class<?> src = raw.parameterType(i);
-            Class<?> dst = cooked.parameterType(i);
-            if (src == dst)  continue;
-            assert(src.isPrimitive() && dst.isPrimitive());
-            if (filteredInvoker == null) {
-                filteredInvoker =
-                        AdapterMethodHandle.makeCheckCast(Access.TOKEN,
-                            invoker.type().generic(), invoker, 0, MethodHandle.class);
-                if (filteredInvoker == null)  throw new UnsupportedOperationException("NYI");
-            }
-            MethodHandle reboxer = ValueConversions.rebox(dst, false);
-            filteredInvoker = FilterGeneric.makeArgumentFilter(1+i, reboxer, filteredInvoker);
-            if (filteredInvoker == null)  throw new InternalError();
-        }
-        if (filteredInvoker == null)  return invoker;
-        return AdapterMethodHandle.makeRetypeOnly(Access.TOKEN, invoker.type(), filteredInvoker);
-    }
-
-    /**
-     * Caller will be expecting a result from a call to {@code type},
-     * while the internal adapter entry point is rawEntryType.
-     * Also, the internal target method will be returning a boxed value,
-     * as an untyped object.
-     * <p>
-     * Produce a value converter which will be typed to convert from
-     * {@code Object} to the return value of {@code rawEntryType}, and will
-     * in fact ensure that the value is compatible with the return type of
-     * {@code type}.
-     */
-    private static MethodHandle computeReturnConversion(
-            MethodType type, MethodType rawEntryType, boolean mustCast) {
-        Class<?> tret = type.returnType();
-        Class<?> rret = rawEntryType.returnType();
-        if (mustCast || !tret.isPrimitive()) {
-            assert(!tret.isPrimitive());
-            assert(!rret.isPrimitive());
-            if (rret == Object.class && !mustCast)
-                return null;
-            return ValueConversions.cast(tret, false);
-        } else if (tret == rret) {
-            return ValueConversions.unbox(tret, false);
-        } else {
-            assert(rret.isPrimitive());
-            assert(tret == double.class ? rret == long.class : rret == int.class);
-            return ValueConversions.unboxRaw(tret, false);
-        }
-    }
-
-    Adapter makeInstance(MethodType type, MethodHandle genericTarget) {
-        genericTarget.getClass();  // check for NPE
-        MethodHandle convert = returnConversion;
-        if (primsAtEndOrder != null)
-            // reorder arguments passed to genericTarget, if primsAtEndOrder
-            throw new UnsupportedOperationException("NYI");
-        if (type == entryType) {
-            if (convert == null)  convert = ValueConversions.identity();
-            return adapter.makeInstance(entryPoint, invoker, convert, genericTarget);
-        }
-        // my erased-type is not exactly the same as the desired type
-        assert(type.erase() == entryType);  // else we are busted
-        if (convert == null)
-            convert = computeReturnConversion(type, rawEntryType, true);
-        // retype erased reference arguments (the cast makes it safe to do this)
-        MethodType tepType = type.insertParameterTypes(0, adapter.getClass());
-        MethodHandle typedEntryPoint =
-            AdapterMethodHandle.makeRetypeRaw(Access.TOKEN, tepType, entryPoint);
-        return adapter.makeInstance(typedEntryPoint, invoker, convert, genericTarget);
-    }
-
-    /** Build an adapter of the given type, which invokes genericTarget
-     *  on the incoming arguments, after boxing as necessary.
-     *  The return value is unboxed if necessary.
-     * @param type  the required type of the
-     * @param genericTarget the target, which must accept and return only Object values
-     * @return an adapter method handle
-     */
-    public static MethodHandle make(MethodType type, MethodHandle genericTarget) {
-        MethodType gtype = genericTarget.type();
-        if (type.generic() != gtype)
-            throw newIllegalArgumentException("type must be generic");
-        if (type == gtype)  return genericTarget;
-        return ToGeneric.of(type).makeInstance(type, genericTarget);
-    }
-
-    /** Return the adapter information for this type's erasure. */
-    static ToGeneric of(MethodType type) {
-        MethodTypeImpl form = MethodTypeImpl.of(type);
-        ToGeneric toGen = form.toGeneric;
-        if (toGen == null)
-            form.toGeneric = toGen = new ToGeneric(form.erasedType());
-        return toGen;
-    }
-
-    public String toString() {
-        return "ToGeneric"+entryType
-                +(primsAtEndOrder!=null?"[reorder]":"");
-    }
-
-    /* Create an adapter for the given incoming call type. */
-    static Adapter findAdapter(MethodType entryPointType) {
-        MethodTypeImpl form = MethodTypeImpl.of(entryPointType);
-        Class<?> rtype = entryPointType.returnType();
-        int argc = form.parameterCount();
-        int lac = form.longPrimitiveParameterCount();
-        int iac = form.primitiveParameterCount() - lac;
-        String intsAndLongs = (iac > 0 ? "I"+iac : "")+(lac > 0 ? "J"+lac : "");
-        String rawReturn = String.valueOf(Wrapper.forPrimitiveType(rtype).basicTypeChar());
-        String iname0 = "invoke_"+rawReturn;
-        String iname1 = "invoke";
-        String[] inames = { iname0, iname1 };
-        String cname0 = rawReturn + argc;
-        String cname1 = "A"       + argc;
-        String[] cnames = { cname1, cname1+intsAndLongs, cname0, cname0+intsAndLongs };
-        // e.g., D5I2, D5, L5I2, L5
-        for (String cname : cnames) {
-            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
-            if (acls == null)  continue;
-            // see if it has the required invoke method
-            for (String iname : inames) {
-                MethodHandle entryPoint = null;
-                try {
-                    entryPoint = MethodHandleImpl.IMPL_LOOKUP.
-                                    findSpecial(acls, iname, entryPointType, acls);
-                } catch (NoAccessException ex) {
-                }
-                if (entryPoint == null)  continue;
-                Constructor<? extends Adapter> ctor = null;
-                try {
-                    // Prototype builder:
-                    ctor = acls.getDeclaredConstructor(MethodHandle.class);
-                } catch (NoSuchMethodException ex) {
-                } catch (SecurityException ex) {
-                }
-                if (ctor == null)  continue;
-                try {
-                    return ctor.newInstance(entryPoint);
-                } catch (IllegalArgumentException ex) {
-                } catch (InvocationTargetException wex) {
-                    Throwable ex = wex.getTargetException();
-                    if (ex instanceof Error)  throw (Error)ex;
-                    if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
-                } catch (InstantiationException ex) {
-                } catch (IllegalAccessException ex) {
-                }
-            }
-        }
-        return null;
-    }
-
-    static Adapter buildAdapterFromBytecodes(MethodType entryPointType) {
-        throw new UnsupportedOperationException("NYI");
-    }
-
-    /**
-     * The invoke method takes some particular but unconstrained spread
-     * of raw argument types, and returns a raw return type (in L/I/J/F/D).
-     * Internally, it converts the incoming arguments uniformly into objects.
-     * This series of objects is then passed to the {@code target} method,
-     * which returns a result object.  This result is finally converted,
-     * via another method handle {@code convert}, which is responsible for
-     * converting the object result into the raw return value.
-     */
-    static abstract class Adapter extends BoundMethodHandle {
-        /*
-         * class X<<R,A...>> extends Adapter {
-         *   Object...=>Object target;
-         *   Object=>R convert;
-         *   R invoke(A... a...) = convert(invoker(target, a...)))
-         * }
-         */
-        protected final MethodHandle invoker;  // (MH, Object...) -> Object
-        protected final MethodHandle target;   // Object... -> Object
-        protected final MethodHandle convert;  // Object -> R
-
-        @Override
-        public String toString() {
-            return target == null ? "prototype:"+convert : MethodHandleImpl.addTypeString(target, this);
-        }
-
-        protected boolean isPrototype() { return target == null; }
-        /* Prototype constructor. */
-        protected Adapter(MethodHandle entryPoint) {
-            super(Access.TOKEN, entryPoint);
-            this.invoker = null;
-            this.convert = entryPoint;
-            this.target = null;
-            assert(isPrototype());
-        }
-        protected MethodHandle prototypeEntryPoint() {
-            if (!isPrototype())  throw new InternalError();
-            return convert;
-        }
-
-        protected Adapter(MethodHandle entryPoint, MethodHandle invoker, MethodHandle convert, MethodHandle target) {
-            super(Access.TOKEN, entryPoint);
-            this.invoker = invoker;
-            this.convert = convert;
-            this.target = target;
-        }
-
-        /** Make a copy of self, with new fields. */
-        protected abstract Adapter makeInstance(MethodHandle entryPoint,
-                MethodHandle invoker, MethodHandle convert, MethodHandle target);
-        // { return new ThisType(entryPoint, convert, target); }
-
-        // Code to run when the arguments (<= 4) have all been boxed.
-        protected Object target()               throws Throwable { return invoker.invokeExact(target); }
-        protected Object target(Object a0)      throws Throwable { return invoker.invokeExact(target, a0); }
-        protected Object target(Object a0, Object a1)
-                                                throws Throwable { return invoker.invokeExact(target, a0, a1); }
-        protected Object target(Object a0, Object a1, Object a2)
-                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3)
-                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3); }
-        /*
-        protected Object target_0(Object... av) throws Throwable { return invoker.invokeExact(target, av); }
-        protected Object target_1(Object a0, Object... av)
-                                                throws Throwable { return invoker.invokeExact(target, a0, (Object)av); }
-        protected Object target_2(Object a0, Object a1, Object... av)
-                                                throws Throwable { return invoker.invokeExact(target, a0, a1, (Object)av); }
-        protected Object target_3(Object a0, Object a1, Object a2, Object... av)
-                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2, (Object)av); }
-        protected Object target_4(Object a0, Object a1, Object a2, Object a3, Object... av)
-                                                throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, (Object)av); }
-        // */
-        // (For more than 4 arguments, generate the code in the adapter itself.)
-
-        // Code to run when the generic target has finished and produced a value.
-        protected Object return_L(Object res) throws Throwable { return (Object)convert.invokeExact(res); }
-        protected int    return_I(Object res) throws Throwable { return (int)   convert.invokeExact(res); }
-        protected long   return_J(Object res) throws Throwable { return (long)  convert.invokeExact(res); }
-        protected float  return_F(Object res) throws Throwable { return (float) convert.invokeExact(res); }
-        protected double return_D(Object res) throws Throwable { return (double)convert.invokeExact(res); }
-
-        static private final String CLASS_PREFIX; // "sun.dyn.ToGeneric$"
-        static {
-            String aname = Adapter.class.getName();
-            String sname = Adapter.class.getSimpleName();
-            if (!aname.endsWith(sname))  throw new InternalError();
-            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
-        }
-        /** Find a sibing class of Adapter. */
-        static Class<? extends Adapter> findSubClass(String name) {
-            String cname = Adapter.CLASS_PREFIX + name;
-            try {
-                return Class.forName(cname).asSubclass(Adapter.class);
-            } catch (ClassNotFoundException ex) {
-                return null;
-            } catch (ClassCastException ex) {
-                return null;
-            }
-        }
-    }
-
-    /* generated classes follow this pattern:
-    static class A1 extends Adapter {
-        protected A1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A1(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A1 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A1(e, i, c, t); }
-        protected Object target(Object a0)   throws Throwable { return invoker.invokeExact(target, a0); }
-        protected Object targetA1(Object a0) throws Throwable { return target(a0); }
-        protected Object targetA1(int    a0) throws Throwable { return target(a0); }
-        protected Object targetA1(long   a0) throws Throwable { return target(a0); }
-        protected Object invoke_L(Object a0) throws Throwable { return return_L(targetA1(a0)); }
-        protected int    invoke_I(Object a0) throws Throwable { return return_I(targetA1(a0)); }
-        protected long   invoke_J(Object a0) throws Throwable { return return_J(targetA1(a0)); }
-        protected float  invoke_F(Object a0) throws Throwable { return return_F(targetA1(a0)); }
-        protected double invoke_D(Object a0) throws Throwable { return return_D(targetA1(a0)); }
-        protected Object invoke_L(int    a0) throws Throwable { return return_L(targetA1(a0)); }
-        protected int    invoke_I(int    a0) throws Throwable { return return_I(targetA1(a0)); }
-        protected long   invoke_J(int    a0) throws Throwable { return return_J(targetA1(a0)); }
-        protected float  invoke_F(int    a0) throws Throwable { return return_F(targetA1(a0)); }
-        protected double invoke_D(int    a0) throws Throwable { return return_D(targetA1(a0)); }
-        protected Object invoke_L(long   a0) throws Throwable { return return_L(targetA1(a0)); }
-        protected int    invoke_I(long   a0) throws Throwable { return return_I(targetA1(a0)); }
-        protected long   invoke_J(long   a0) throws Throwable { return return_J(targetA1(a0)); }
-        protected float  invoke_F(long   a0) throws Throwable { return return_F(targetA1(a0)); }
-        protected double invoke_D(long   a0) throws Throwable { return return_D(targetA1(a0)); }
-    }
-    // */
-
-/*
-: SHELL; n=ToGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
-//{{{
-import java.util.*;
-class genclasses {
-    static String[] TYPES = { "Object", "int   ", "long  ", "float ", "double" };
-    static String[] TCHARS = { "L",     "I",      "J",      "F",      "D",     "A" };
-    static String[][] TEMPLATES = { {
-        "@for@ arity=0..3   rcat<=4 nrefs<=99 nints<=99 nlongs<=99",
-        "@for@ arity=4..5   rcat<=2 nrefs<=99 nints<=99 nlongs<=99",
-        "@for@ arity=6..10  rcat<=2 nrefs<=99 nints=0   nlongs<=99",
-        "    //@each-cat@",
-        "    static class @cat@ extends Adapter {",
-        "        protected @cat@(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype",
-        "        protected @cat@(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }",
-        "        protected @cat@ makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new @cat@(e, i, c, t); }",
-        "        protected Object target(@Ovav@)   throws Throwable { return invoker.invokeExact(target, @av@); }",
-        "        //@each-Tv@",
-        "        protected Object target@cat@(@Tvav@) throws Throwable { return target(@av@); }",
-        "        //@end-Tv@",
-        "        //@each-Tv@",
-        "        //@each-R@",
-        "        protected @R@ invoke_@Rc@(@Tvav@) throws Throwable { return return_@Rc@(target@cat@(@av@)); }",
-        "        //@end-R@",
-        "        //@end-Tv@",
-        "    }",
-    } };
-    enum VAR {
-        cat, R, Rc, Tv, av, Tvav, Ovav;
-        public final String pattern = "@"+toString().replace('_','.')+"@";
-        public String binding;
-        static void makeBindings(boolean topLevel, int rcat, int nrefs, int nints, int nlongs) {
-            int nargs = nrefs + nints + nlongs;
-            if (topLevel)
-                VAR.cat.binding = catstr(ALL_RETURN_TYPES ? TYPES.length : rcat, nrefs, nints, nlongs);
-            VAR.R.binding = TYPES[rcat];
-            VAR.Rc.binding = TCHARS[rcat];
-            String[] Tv = new String[nargs];
-            String[] av = new String[nargs];
-            String[] Tvav = new String[nargs];
-            String[] Ovav = new String[nargs];
-            for (int i = 0; i < nargs; i++) {
-                int tcat = (i < nrefs) ? 0 : (i < nrefs + nints) ? 1 : 2;
-                Tv[i] = TYPES[tcat];
-                av[i] = arg(i);
-                Tvav[i] = param(Tv[i], av[i]);
-                Ovav[i] = param("Object", av[i]);
-            }
-            VAR.Tv.binding = comma(Tv);
-            VAR.av.binding = comma(av);
-            VAR.Tvav.binding = comma(Tvav);
-            VAR.Ovav.binding = comma(Ovav);
-        }
-        static String arg(int i) { return "a"+i; }
-        static String param(String t, String a) { return t+" "+a; }
-        static String comma(String[] v) { return comma(v, ""); }
-        static String comma(String sep, String[] v) {
-            if (v.length == 0)  return "";
-            String res = sep+v[0];
-            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
-            return res;
-        }
-        static String transform(String string) {
-            for (VAR var : values())
-                string = string.replaceAll(var.pattern, var.binding);
-            return string;
-        }
-    }
-    static String[] stringsIn(String[] strings, int beg, int end) {
-        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
-    }
-    static String[] stringsBefore(String[] strings, int pos) {
-        return stringsIn(strings, 0, pos);
-    }
-    static String[] stringsAfter(String[] strings, int pos) {
-        return stringsIn(strings, pos, strings.length);
-    }
-    static int indexAfter(String[] strings, int pos, String tag) {
-        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
-    }
-    static int indexBefore(String[] strings, int pos, String tag) {
-        for (int i = pos, end = strings.length; ; i++) {
-            if (i == end || strings[i].endsWith(tag))  return i;
-        }
-    }
-    static int MIN_ARITY, MAX_ARITY, MAX_RCAT, MAX_REFS, MAX_INTS, MAX_LONGS;
-    static boolean ALL_ARG_TYPES, ALL_RETURN_TYPES;
-    static HashSet<String> done = new HashSet<String>();
-    public static void main(String... av) {
-        for (String[] template : TEMPLATES) {
-            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
-            String[] forLines = stringsBefore(template, forLinesLimit);
-            template = stringsAfter(template, forLinesLimit);
-            for (String forLine : forLines)
-                expandTemplate(forLine, template);
-        }
-    }
-    static void expandTemplate(String forLine, String[] template) {
-        String[] params = forLine.split("[^0-9]+");
-        if (params[0].length() == 0)  params = stringsAfter(params, 1);
-        System.out.println("//params="+Arrays.asList(params));
-        int pcur = 0;
-        MIN_ARITY = Integer.valueOf(params[pcur++]);
-        MAX_ARITY = Integer.valueOf(params[pcur++]);
-        MAX_RCAT  = Integer.valueOf(params[pcur++]);
-        MAX_REFS  = Integer.valueOf(params[pcur++]);
-        MAX_INTS  = Integer.valueOf(params[pcur++]);
-        MAX_LONGS = Integer.valueOf(params[pcur++]);
-        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
-        if (MAX_RCAT >= TYPES.length)  MAX_RCAT = TYPES.length - 1;
-        ALL_ARG_TYPES = (indexBefore(template, 0, "@each-Tv@") < template.length);
-        ALL_RETURN_TYPES = (indexBefore(template, 0, "@each-R@") < template.length);
-        for (int nargs = MIN_ARITY; nargs <= MAX_ARITY; nargs++) {
-            for (int rcat = 0; rcat <= MAX_RCAT; rcat++) {
-                expandTemplate(template, true, rcat, nargs, 0, 0);
-                if (ALL_ARG_TYPES)  break;
-                expandTemplateForPrims(template, true, rcat, nargs, 1, 1);
-                if (ALL_RETURN_TYPES)  break;
-            }
-        }
-    }
-    static String catstr(int rcat, int nrefs, int nints, int nlongs) {
-        int nargs = nrefs + nints + nlongs;
-        String cat = TCHARS[rcat] + nargs;
-        if (!ALL_ARG_TYPES)  cat += (nints==0?"":"I"+nints)+(nlongs==0?"":"J"+nlongs);
-        return cat;
-    }
-    static void expandTemplateForPrims(String[] template, boolean topLevel, int rcat, int nargs, int minints, int minlongs) {
-        for (int isLong = 0; isLong <= 1; isLong++) {
-            for (int nprims = 1; nprims <= nargs; nprims++) {
-                int nrefs = nargs - nprims;
-                int nints = ((1-isLong) * nprims);
-                int nlongs = (isLong * nprims);
-                expandTemplate(template, topLevel, rcat, nrefs, nints, nlongs);
-            }
-        }
-    }
-    static void expandTemplate(String[] template, boolean topLevel,
-                               int rcat, int nrefs, int nints, int nlongs) {
-        int nargs = nrefs + nints + nlongs;
-        if (nrefs > MAX_REFS || nints > MAX_INTS || nlongs > MAX_LONGS)  return;
-        VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
-        if (topLevel && !done.add(VAR.cat.binding)) {
-            System.out.println("    //repeat "+VAR.cat.binding);
-            return;
-        }
-        for (int i = 0; i < template.length; i++) {
-            String line = template[i];
-            if (line.endsWith("@each-cat@")) {
-                // ignore
-            } else if (line.endsWith("@each-R@")) {
-                int blockEnd = indexAfter(template, i, "@end-R@");
-                String[] block = stringsIn(template, i+1, blockEnd-1);
-                for (int rcat1 = rcat; rcat1 <= MAX_RCAT; rcat1++)
-                    expandTemplate(block, false, rcat1, nrefs, nints, nlongs);
-                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
-                i = blockEnd-1; continue;
-            } else if (line.endsWith("@each-Tv@")) {
-                int blockEnd = indexAfter(template, i, "@end-Tv@");
-                String[] block = stringsIn(template, i+1, blockEnd-1);
-                expandTemplate(block, false, rcat, nrefs, nints, nlongs);
-                expandTemplateForPrims(block, false, rcat, nargs, nints+1, nlongs+1);
-                VAR.makeBindings(topLevel, rcat, nrefs, nints, nlongs);
-                i = blockEnd-1; continue;
-            } else {
-                System.out.println(VAR.transform(line));
-            }
-        }
-    }
-}
-//}}} */
-//params=[0, 3, 4, 99, 99, 99]
-    static class A0 extends Adapter {
-        protected A0(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A0(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A0 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A0(e, i, c, t); }
-        protected Object target()   throws Throwable { return invoker.invokeExact(target); }
-        protected Object targetA0() throws Throwable { return target(); }
-        protected Object invoke_L() throws Throwable { return return_L(targetA0()); }
-        protected int    invoke_I() throws Throwable { return return_I(targetA0()); }
-        protected long   invoke_J() throws Throwable { return return_J(targetA0()); }
-        protected float  invoke_F() throws Throwable { return return_F(targetA0()); }
-        protected double invoke_D() throws Throwable { return return_D(targetA0()); }
-    }
-    static class A1 extends Adapter {
-        protected A1(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A1(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A1 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A1(e, i, c, t); }
-        protected Object target(Object a0)   throws Throwable { return invoker.invokeExact(target, a0); }
-        protected Object targetA1(Object a0) throws Throwable { return target(a0); }
-        protected Object targetA1(int    a0) throws Throwable { return target(a0); }
-        protected Object targetA1(long   a0) throws Throwable { return target(a0); }
-        protected Object invoke_L(Object a0) throws Throwable { return return_L(targetA1(a0)); }
-        protected int    invoke_I(Object a0) throws Throwable { return return_I(targetA1(a0)); }
-        protected long   invoke_J(Object a0) throws Throwable { return return_J(targetA1(a0)); }
-        protected float  invoke_F(Object a0) throws Throwable { return return_F(targetA1(a0)); }
-        protected double invoke_D(Object a0) throws Throwable { return return_D(targetA1(a0)); }
-        protected Object invoke_L(int    a0) throws Throwable { return return_L(targetA1(a0)); }
-        protected int    invoke_I(int    a0) throws Throwable { return return_I(targetA1(a0)); }
-        protected long   invoke_J(int    a0) throws Throwable { return return_J(targetA1(a0)); }
-        protected float  invoke_F(int    a0) throws Throwable { return return_F(targetA1(a0)); }
-        protected double invoke_D(int    a0) throws Throwable { return return_D(targetA1(a0)); }
-        protected Object invoke_L(long   a0) throws Throwable { return return_L(targetA1(a0)); }
-        protected int    invoke_I(long   a0) throws Throwable { return return_I(targetA1(a0)); }
-        protected long   invoke_J(long   a0) throws Throwable { return return_J(targetA1(a0)); }
-        protected float  invoke_F(long   a0) throws Throwable { return return_F(targetA1(a0)); }
-        protected double invoke_D(long   a0) throws Throwable { return return_D(targetA1(a0)); }
-    }
-    static class A2 extends Adapter {
-        protected A2(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A2(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A2 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A2(e, i, c, t); }
-        protected Object target(Object a0, Object a1)   throws Throwable { return invoker.invokeExact(target, a0, a1); }
-        protected Object targetA2(Object a0, Object a1) throws Throwable { return target(a0, a1); }
-        protected Object targetA2(Object a0, int    a1) throws Throwable { return target(a0, a1); }
-        protected Object targetA2(int    a0, int    a1) throws Throwable { return target(a0, a1); }
-        protected Object targetA2(Object a0, long   a1) throws Throwable { return target(a0, a1); }
-        protected Object targetA2(long   a0, long   a1) throws Throwable { return target(a0, a1); }
-        protected Object invoke_L(Object a0, Object a1) throws Throwable { return return_L(targetA2(a0, a1)); }
-        protected int    invoke_I(Object a0, Object a1) throws Throwable { return return_I(targetA2(a0, a1)); }
-        protected long   invoke_J(Object a0, Object a1) throws Throwable { return return_J(targetA2(a0, a1)); }
-        protected float  invoke_F(Object a0, Object a1) throws Throwable { return return_F(targetA2(a0, a1)); }
-        protected double invoke_D(Object a0, Object a1) throws Throwable { return return_D(targetA2(a0, a1)); }
-        protected Object invoke_L(Object a0, int    a1) throws Throwable { return return_L(targetA2(a0, a1)); }
-        protected int    invoke_I(Object a0, int    a1) throws Throwable { return return_I(targetA2(a0, a1)); }
-        protected long   invoke_J(Object a0, int    a1) throws Throwable { return return_J(targetA2(a0, a1)); }
-        protected float  invoke_F(Object a0, int    a1) throws Throwable { return return_F(targetA2(a0, a1)); }
-        protected double invoke_D(Object a0, int    a1) throws Throwable { return return_D(targetA2(a0, a1)); }
-        protected Object invoke_L(int    a0, int    a1) throws Throwable { return return_L(targetA2(a0, a1)); }
-        protected int    invoke_I(int    a0, int    a1) throws Throwable { return return_I(targetA2(a0, a1)); }
-        protected long   invoke_J(int    a0, int    a1) throws Throwable { return return_J(targetA2(a0, a1)); }
-        protected float  invoke_F(int    a0, int    a1) throws Throwable { return return_F(targetA2(a0, a1)); }
-        protected double invoke_D(int    a0, int    a1) throws Throwable { return return_D(targetA2(a0, a1)); }
-        protected Object invoke_L(Object a0, long   a1) throws Throwable { return return_L(targetA2(a0, a1)); }
-        protected int    invoke_I(Object a0, long   a1) throws Throwable { return return_I(targetA2(a0, a1)); }
-        protected long   invoke_J(Object a0, long   a1) throws Throwable { return return_J(targetA2(a0, a1)); }
-        protected float  invoke_F(Object a0, long   a1) throws Throwable { return return_F(targetA2(a0, a1)); }
-        protected double invoke_D(Object a0, long   a1) throws Throwable { return return_D(targetA2(a0, a1)); }
-        protected Object invoke_L(long   a0, long   a1) throws Throwable { return return_L(targetA2(a0, a1)); }
-        protected int    invoke_I(long   a0, long   a1) throws Throwable { return return_I(targetA2(a0, a1)); }
-        protected long   invoke_J(long   a0, long   a1) throws Throwable { return return_J(targetA2(a0, a1)); }
-        protected float  invoke_F(long   a0, long   a1) throws Throwable { return return_F(targetA2(a0, a1)); }
-        protected double invoke_D(long   a0, long   a1) throws Throwable { return return_D(targetA2(a0, a1)); }
-    }
-    static class A3 extends Adapter {
-        protected A3(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A3(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A3 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A3(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2); }
-        protected Object targetA3(Object a0, Object a1, Object a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object targetA3(Object a0, Object a1, int    a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object targetA3(Object a0, int    a1, int    a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object targetA3(int    a0, int    a1, int    a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object targetA3(Object a0, Object a1, long   a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object targetA3(Object a0, long   a1, long   a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object targetA3(long   a0, long   a1, long   a2) throws Throwable { return target(a0, a1, a2); }
-        protected Object invoke_L(Object a0, Object a1, Object a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(Object a0, Object a1, Object a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(Object a0, Object a1, Object a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-        protected Object invoke_L(Object a0, Object a1, int    a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(Object a0, Object a1, int    a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(Object a0, Object a1, int    a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(Object a0, Object a1, int    a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(Object a0, Object a1, int    a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-        protected Object invoke_L(Object a0, int    a1, int    a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(Object a0, int    a1, int    a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(Object a0, int    a1, int    a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(Object a0, int    a1, int    a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(Object a0, int    a1, int    a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-        protected Object invoke_L(int    a0, int    a1, int    a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(int    a0, int    a1, int    a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(int    a0, int    a1, int    a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(int    a0, int    a1, int    a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(int    a0, int    a1, int    a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(Object a0, Object a1, long   a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(Object a0, Object a1, long   a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(Object a0, long   a1, long   a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(Object a0, long   a1, long   a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2) throws Throwable { return return_L(targetA3(a0, a1, a2)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2) throws Throwable { return return_I(targetA3(a0, a1, a2)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2) throws Throwable { return return_J(targetA3(a0, a1, a2)); }
-        protected float  invoke_F(long   a0, long   a1, long   a2) throws Throwable { return return_F(targetA3(a0, a1, a2)); }
-        protected double invoke_D(long   a0, long   a1, long   a2) throws Throwable { return return_D(targetA3(a0, a1, a2)); }
-    }
-//params=[4, 5, 2, 99, 99, 99]
-    static class A4 extends Adapter {
-        protected A4(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A4(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A4 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A4(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, Object a1, Object a2, Object a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, Object a1, Object a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, Object a1, int    a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, int    a1, int    a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(int    a0, int    a1, int    a2, int    a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, Object a1, Object a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, Object a1, long   a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(Object a0, long   a1, long   a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object targetA4(long   a0, long   a1, long   a2, long   a3) throws Throwable { return target(a0, a1, a2, a3); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, Object a1, int    a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, int    a1, int    a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(int    a0, int    a1, int    a2, int    a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_L(targetA4(a0, a1, a2, a3)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_I(targetA4(a0, a1, a2, a3)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3) throws Throwable { return return_J(targetA4(a0, a1, a2, a3)); }
-    }
-    static class A5 extends Adapter {
-        protected A5(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A5(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A5 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A5(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object targetA5(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return target(a0, a1, a2, a3, a4); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, int    a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(int    a0, int    a1, int    a2, int    a3, int    a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_L(targetA5(a0, a1, a2, a3, a4)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_I(targetA5(a0, a1, a2, a3, a4)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4) throws Throwable { return return_J(targetA5(a0, a1, a2, a3, a4)); }
-    }
-//params=[6, 10, 2, 99, 0, 99]
-    static class A6 extends Adapter {
-        protected A6(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A6(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A6 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A6(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object targetA6(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return target(a0, a1, a2, a3, a4, a5); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_L(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_I(targetA6(a0, a1, a2, a3, a4, a5)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5) throws Throwable { return return_J(targetA6(a0, a1, a2, a3, a4, a5)); }
-    }
-    static class A7 extends Adapter {
-        protected A7(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A7(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A7 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A7(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object targetA7(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_L(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_I(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6) throws Throwable { return return_J(targetA7(a0, a1, a2, a3, a4, a5, a6)); }
-    }
-    static class A8 extends Adapter {
-        protected A8(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A8(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A8 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A8(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object targetA8(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_L(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_I(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7) throws Throwable { return return_J(targetA8(a0, a1, a2, a3, a4, a5, a6, a7)); }
-    }
-    static class A9 extends Adapter {
-        protected A9(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A9(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A9 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A9(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object targetA9(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_L(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_I(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8) throws Throwable { return return_J(targetA9(a0, a1, a2, a3, a4, a5, a6, a7, a8)); }
-    }
-    static class A10 extends Adapter {
-        protected A10(MethodHandle entryPoint) { super(entryPoint); }  // to build prototype
-        protected A10(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { super(e, i, c, t); }
-        protected A10 makeInstance(MethodHandle e, MethodHandle i, MethodHandle c, MethodHandle t) { return new A10(e, i, c, t); }
-        protected Object target(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9)   throws Throwable { return invoker.invokeExact(target, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object targetA10(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return target(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, Object a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, Object a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, Object a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, Object a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(Object a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected Object invoke_L(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_L(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected int    invoke_I(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_I(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-        protected long   invoke_J(long   a0, long   a1, long   a2, long   a3, long   a4, long   a5, long   a6, long   a7, long   a8, long   a9) throws Throwable { return return_J(targetA10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); }
-    }
-}
--- a/src/share/classes/sun/dyn/anon/AnonymousClassLoader.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn.anon;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import sun.misc.IOUtils;
-
-/**
- * Anonymous class loader.  Will load any valid classfile, producing
- * a {@link Class} metaobject, without installing that class in the
- * system dictionary.  Therefore, {@link Class#forName(String)} will never
- * produce a reference to an anonymous class.
- * <p>
- * The access permissions of the anonymous class are borrowed from
- * a <em>host class</em>.  The new class behaves as if it were an
- * inner class of the host class.  It can access the host's private
- * members, if the creator of the class loader has permission to
- * do so (or to create accessible reflective objects).
- * <p>
- * When the anonymous class is loaded, elements of its constant pool
- * can be patched to new values.  This provides a hook to pre-resolve
- * named classes in the constant pool to other classes, including
- * anonymous ones.  Also, string constants can be pre-resolved to
- * any reference.  (The verifier treats non-string, non-class reference
- * constants as plain objects.)
- *  <p>
- * Why include the patching function?  It makes some use cases much easier.
- * Second, the constant pool needed some internal patching anyway,
- * to anonymize the loaded class itself.  Finally, if you are going
- * to use this seriously, you'll want to build anonymous classes
- * on top of pre-existing anonymous classes, and that requires patching.
- *
- * <p>%%% TO-DO:
- * <ul>
- * <li>needs better documentation</li>
- * <li>needs more security work (for safe delegation)</li>
- * <li>needs a clearer story about error processing</li>
- * <li>patch member references also (use ';' as delimiter char)</li>
- * <li>patch method references to (conforming) method handles</li>
- * </ul>
- *
- * @author jrose
- * @author Remi Forax
- * @see <a href="http://blogs.sun.com/jrose/entry/anonymous_classes_in_the_vm">
- *      http://blogs.sun.com/jrose/entry/anonymous_classes_in_the_vm</a>
- */
-
-public class AnonymousClassLoader {
-    final Class<?> hostClass;
-
-    // Note: Do not refactor the calls to checkHostClass unless you
-    //       also adjust this constant:
-    private static int CHC_CALLERS = 3;
-
-    public AnonymousClassLoader() {
-        this.hostClass = checkHostClass(null);
-    }
-    public AnonymousClassLoader(Class<?> hostClass) {
-        this.hostClass = checkHostClass(hostClass);
-    }
-
-    private static Class<?> getTopLevelClass(Class<?> clazz) {
-      for(Class<?> outer = clazz.getDeclaringClass(); outer != null;
-          outer = outer.getDeclaringClass()) {
-        clazz = outer;
-      }
-      return clazz;
-    }
-
-    private static Class<?> checkHostClass(Class<?> hostClass) {
-        // called only from the constructor
-        // does a context-sensitive check on caller class
-        // CC[0..3] = {Reflection, this.checkHostClass, this.<init>, caller}
-        Class<?> caller = sun.reflect.Reflection.getCallerClass(CHC_CALLERS);
-
-        if (caller == null) {
-            // called from the JVM directly
-            if (hostClass == null)
-                return AnonymousClassLoader.class; // anything central will do
-            return hostClass;
-        }
-
-        if (hostClass == null)
-            hostClass = caller; // default value is caller itself
-
-        // anonymous class will access hostClass on behalf of caller
-        Class<?> callee = hostClass;
-
-        if (caller == callee)
-            // caller can always nominate itself to grant caller's own access rights
-            return hostClass;
-
-        // normalize caller and callee to their top-level classes:
-        caller = getTopLevelClass(caller);
-        callee = getTopLevelClass(callee);
-        if (caller == callee)
-            return caller;
-
-        ClassLoader callerCL = caller.getClassLoader();
-        if (callerCL == null) {
-            // caller is trusted code, so accept the proposed hostClass
-            return hostClass;
-        }
-
-        // %%% should do something with doPrivileged, because trusted
-        // code should have a way to execute on behalf of
-        // partially-trusted clients
-
-        // Does the caller have the right to access the private
-        // members of the callee?  If not, raise an error.
-        final int ACC_PRIVATE = 2;
-        try {
-            sun.reflect.Reflection.ensureMemberAccess(caller, callee, null, ACC_PRIVATE);
-        } catch (IllegalAccessException ee) {
-            throw new IllegalArgumentException(ee);
-        }
-
-        return hostClass;
-    }
-
-    public Class<?> loadClass(byte[] classFile) {
-        if (defineAnonymousClass == null) {
-            // no JVM support; try to fake an approximation
-            try {
-                return fakeLoadClass(new ConstantPoolParser(classFile).createPatch());
-            } catch (InvalidConstantPoolFormatException ee) {
-                throw new IllegalArgumentException(ee);
-            }
-        }
-        return loadClass(classFile, null);
-    }
-
-    public Class<?> loadClass(ConstantPoolPatch classPatch) {
-        if (defineAnonymousClass == null) {
-            // no JVM support; try to fake an approximation
-            return fakeLoadClass(classPatch);
-        }
-        Object[] patches = classPatch.patchArray;
-        // Convert class names (this late in the game)
-        // to use slash '/' instead of dot '.'.
-        // Java likes dots, but the JVM likes slashes.
-        for (int i = 0; i < patches.length; i++) {
-            Object value = patches[i];
-            if (value != null) {
-                byte tag = classPatch.getTag(i);
-                switch (tag) {
-                case ConstantPoolVisitor.CONSTANT_Class:
-                    if (value instanceof String) {
-                        if (patches == classPatch.patchArray)
-                            patches = patches.clone();
-                        patches[i] = ((String)value).replace('.', '/');
-                    }
-                    break;
-                case ConstantPoolVisitor.CONSTANT_Fieldref:
-                case ConstantPoolVisitor.CONSTANT_Methodref:
-                case ConstantPoolVisitor.CONSTANT_InterfaceMethodref:
-                case ConstantPoolVisitor.CONSTANT_NameAndType:
-                    // When/if the JVM supports these patches,
-                    // we'll probably need to reformat them also.
-                    // Meanwhile, let the class loader create the error.
-                    break;
-                }
-            }
-        }
-        return loadClass(classPatch.outer.classFile, classPatch.patchArray);
-    }
-
-    private Class<?> loadClass(byte[] classFile, Object[] patchArray) {
-        try {
-            return (Class<?>)
-                defineAnonymousClass.invoke(unsafe,
-                                            hostClass, classFile, patchArray);
-        } catch (Exception ex) {
-            throwReflectedException(ex);
-            throw new RuntimeException("error loading into "+hostClass, ex);
-        }
-    }
-
-    private static void throwReflectedException(Exception ex) {
-        if (ex instanceof InvocationTargetException) {
-            Throwable tex = ((InvocationTargetException)ex).getTargetException();
-            if (tex instanceof Error)
-                throw (Error) tex;
-            ex = (Exception) tex;
-        }
-        if (ex instanceof RuntimeException) {
-            throw (RuntimeException) ex;
-        }
-    }
-
-    private Class<?> fakeLoadClass(ConstantPoolPatch classPatch) {
-        // Implementation:
-        // 1. Make up a new name nobody has used yet.
-        // 2. Inspect the tail-header of the class to find the this_class index.
-        // 3. Patch the CONSTANT_Class for this_class to the new name.
-        // 4. Add other CP entries required by (e.g.) string patches.
-        // 5. Flatten Class constants down to their names, making sure that
-        //    the host class loader can pick them up again accurately.
-        // 6. Generate the edited class file bytes.
-        //
-        // Potential limitations:
-        // * The class won't be truly anonymous, and may interfere with others.
-        // * Flattened class constants might not work, because of loader issues.
-        // * Pseudo-string constants will not flatten down to real strings.
-        // * Method handles will (of course) fail to flatten to linkage strings.
-        if (true)  throw new UnsupportedOperationException("NYI");
-        Object[] cpArray;
-        try {
-            cpArray = classPatch.getOriginalCP();
-        } catch (InvalidConstantPoolFormatException ex) {
-            throw new RuntimeException(ex);
-        }
-        int thisClassIndex = classPatch.getParser().getThisClassIndex();
-        String thisClassName = (String) cpArray[thisClassIndex];
-        synchronized (AnonymousClassLoader.class) {
-            thisClassName = thisClassName+"\\|"+(++fakeNameCounter);
-        }
-        classPatch.putUTF8(thisClassIndex, thisClassName);
-        byte[] classFile = null;
-        return unsafe.defineClass(null, classFile, 0, classFile.length,
-                                  hostClass.getClassLoader(),
-                                  hostClass.getProtectionDomain());
-    }
-    private static int fakeNameCounter = 99999;
-
-    // ignore two warnings on this line:
-    static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
-    // preceding line requires that this class be on the boot class path
-
-    static private final Method defineAnonymousClass;
-    static {
-        Method dac = null;
-        Class<? extends sun.misc.Unsafe> unsafeClass = unsafe.getClass();
-        try {
-            dac = unsafeClass.getMethod("defineAnonymousClass",
-                                        Class.class,
-                                        byte[].class,
-                                        Object[].class);
-        } catch (Exception ee) {
-            dac = null;
-        }
-        defineAnonymousClass = dac;
-    }
-
-    private static void noJVMSupport() {
-        throw new UnsupportedOperationException("no JVM support for anonymous classes");
-    }
-
-
-    private static native Class<?> loadClassInternal(Class<?> hostClass,
-                                                     byte[] classFile,
-                                                     Object[] patchArray);
-
-    public static byte[] readClassFile(Class<?> templateClass) throws IOException {
-        String templateName = templateClass.getName();
-        int lastDot = templateName.lastIndexOf('.');
-        java.net.URL url = templateClass.getResource(templateName.substring(lastDot+1)+".class");
-        java.net.URLConnection connection = url.openConnection();
-        int contentLength = connection.getContentLength();
-        if (contentLength < 0)
-            throw new IOException("invalid content length "+contentLength);
-
-        return IOUtils.readFully(connection.getInputStream(), contentLength, true);
-    }
-}
--- a/src/share/classes/sun/dyn/anon/ConstantPoolParser.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,368 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn.anon;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.BufferUnderflowException;
-import java.nio.ByteBuffer;
-
-import static sun.dyn.anon.ConstantPoolVisitor.*;
-
-/** A constant pool parser.
- */
-public class ConstantPoolParser {
-    final byte[] classFile;
-    final byte[] tags;
-    final char[] firstHeader;  // maghi, maglo, minor, major, cplen
-
-    // these are filled in on first parse:
-    int endOffset;
-    char[] secondHeader;       // flags, this_class, super_class, intlen
-
-    // used to decode UTF8 array
-    private char[] charArray = new char[80];
-
-    /** Creates a constant pool parser.
-     * @param classFile an array of bytes containing a class.
-     * @throws InvalidConstantPoolFormatException if the header of the class has errors.
-     */
-    public ConstantPoolParser(byte[] classFile) throws InvalidConstantPoolFormatException {
-        this.classFile = classFile;
-        this.firstHeader = parseHeader(classFile);
-        this.tags = new byte[firstHeader[4]];
-    }
-
-    /** Create a constant pool parser by loading the bytecodes of the
-     *  class taken as argument.
-     *
-     * @param templateClass the class to parse.
-     *
-     * @throws IOException raised if an I/O occurs when loading
-     *  the bytecode of the template class.
-     * @throws InvalidConstantPoolFormatException if the header of the class has errors.
-     *
-     * @see #ConstantPoolParser(byte[])
-     * @see AnonymousClassLoader#readClassFile(Class)
-     */
-    public ConstantPoolParser(Class<?> templateClass) throws IOException, InvalidConstantPoolFormatException {
-        this(AnonymousClassLoader.readClassFile(templateClass));
-    }
-
-    /** Creates an empty patch to patch the class file
-     *  used by the current parser.
-     * @return a new class patch.
-     */
-    public ConstantPoolPatch createPatch() {
-        return new ConstantPoolPatch(this);
-    }
-
-    /** Report the tag of the indicated CP entry.
-     * @param index
-     * @return one of {@link ConstantPoolVisitor#CONSTANT_Utf8}, etc.
-     */
-    public byte getTag(int index) {
-        getEndOffset();  // trigger an exception if we haven't parsed yet
-        return tags[index];
-    }
-
-    /** Report the length of the constant pool. */
-    public int getLength() {
-        return firstHeader[4];
-    }
-
-    /** Report the offset, within the class file, of the start of the constant pool. */
-    public int getStartOffset() {
-        return firstHeader.length * 2;
-    }
-
-    /** Report the offset, within the class file, of the end of the constant pool. */
-    public int getEndOffset() {
-        if (endOffset == 0)
-            throw new IllegalStateException("class file has not yet been parsed");
-        return endOffset;
-    }
-
-    /** Report the CP index of this class's own name. */
-    public int getThisClassIndex() {
-        getEndOffset();   // provoke exception if not yet parsed
-        return secondHeader[1];
-    }
-
-    /** Report the total size of the class file. */
-    public int getTailLength() {
-        return classFile.length - getEndOffset();
-    }
-
-    /** Write the head (header plus constant pool)
-     *  of the class file to the indicated stream.
-     */
-    public void writeHead(OutputStream out) throws IOException {
-        out.write(classFile, 0, getEndOffset());
-    }
-
-    /** Write the head (header plus constant pool)
-     *  of the class file to the indicated stream,
-     *  incorporating the non-null entries of the given array
-     *  as patches.
-     */
-    void writePatchedHead(OutputStream out, Object[] patchArray) {
-        // this will be useful to partially emulate the class loader on old JVMs
-        throw new UnsupportedOperationException("Not yet implemented");
-    }
-
-    /** Write the tail (everything after the constant pool)
-     *  of the class file to the indicated stream.
-     */
-    public void writeTail(OutputStream out) throws IOException {
-        out.write(classFile, getEndOffset(), getTailLength());
-    }
-
-    private static char[] parseHeader(byte[] classFile) throws InvalidConstantPoolFormatException {
-        char[] result = new char[5];
-        ByteBuffer buffer = ByteBuffer.wrap(classFile);
-        for (int i = 0; i < result.length; i++)
-            result[i] = (char) getUnsignedShort(buffer);
-        int magic = result[0] << 16 | result[1] << 0;
-        if (magic != 0xCAFEBABE)
-            throw new InvalidConstantPoolFormatException("invalid magic number "+magic);
-        // skip major, minor version
-        int len = result[4];
-        if (len < 1)
-            throw new InvalidConstantPoolFormatException("constant pool length < 1");
-        return result;
-    }
-
-    /** Parse the constant pool of the class
-     *  calling a method visit* each time a constant pool entry is parsed.
-     *
-     *  The order of the calls to visit* is not guaranteed to be the same
-     *  than the order of the constant pool entry in the bytecode array.
-     *
-     * @param visitor
-     * @throws InvalidConstantPoolFormatException
-     */
-    public void parse(ConstantPoolVisitor visitor) throws InvalidConstantPoolFormatException {
-        ByteBuffer buffer = ByteBuffer.wrap(classFile);
-        buffer.position(getStartOffset()); //skip header
-
-        Object[] values = new Object[getLength()];
-        try {
-            parseConstantPool(buffer, values, visitor);
-        } catch(BufferUnderflowException e) {
-            throw new InvalidConstantPoolFormatException(e);
-        }
-        if (endOffset == 0) {
-            endOffset = buffer.position();
-            secondHeader = new char[4];
-            for (int i = 0; i < secondHeader.length; i++) {
-                secondHeader[i] = (char) getUnsignedShort(buffer);
-            }
-        }
-        resolveConstantPool(values, visitor);
-    }
-
-    private char[] getCharArray(int utfLength) {
-        if (utfLength <= charArray.length)
-            return charArray;
-        return charArray = new char[utfLength];
-    }
-
-    private void parseConstantPool(ByteBuffer buffer, Object[] values, ConstantPoolVisitor visitor) throws InvalidConstantPoolFormatException {
-        for (int i = 1; i < tags.length; ) {
-            byte tag = (byte) getUnsignedByte(buffer);
-            assert(tags[i] == 0 || tags[i] == tag);
-            tags[i] = tag;
-            switch (tag) {
-                case CONSTANT_Utf8:
-                    int utfLen = getUnsignedShort(buffer);
-                    String value = getUTF8(buffer, utfLen, getCharArray(utfLen));
-                    visitor.visitUTF8(i, CONSTANT_Utf8, value);
-                    tags[i] = tag;
-                    values[i++] = value;
-                    break;
-                case CONSTANT_Integer:
-                    visitor.visitConstantValue(i, tag, buffer.getInt());
-                    i++;
-                    break;
-                case CONSTANT_Float:
-                    visitor.visitConstantValue(i, tag, buffer.getFloat());
-                    i++;
-                    break;
-                case CONSTANT_Long:
-                    visitor.visitConstantValue(i, tag, buffer.getLong());
-                    i+=2;
-                    break;
-                case CONSTANT_Double:
-                    visitor.visitConstantValue(i, tag, buffer.getDouble());
-                    i+=2;
-                    break;
-
-                case CONSTANT_Class:    // fall through:
-                case CONSTANT_String:
-                    tags[i] = tag;
-                    values[i++] = new int[] { getUnsignedShort(buffer) };
-                    break;
-
-                case CONSTANT_Fieldref:           // fall through:
-                case CONSTANT_Methodref:          // fall through:
-                case CONSTANT_InterfaceMethodref: // fall through:
-                case CONSTANT_NameAndType:
-                    tags[i] = tag;
-                    values[i++] = new int[] { getUnsignedShort(buffer), getUnsignedShort(buffer) };
-                    break;
-                default:
-                    throw new AssertionError("invalid constant "+tag);
-            }
-        }
-    }
-
-    private void resolveConstantPool(Object[] values, ConstantPoolVisitor visitor) {
-        // clean out the int[] values, which are temporary
-        for (int beg = 1, end = values.length-1, beg2, end2;
-             beg <= end;
-             beg = beg2, end = end2) {
-             beg2 = end; end2 = beg-1;
-             //System.out.println("CP resolve pass: "+beg+".."+end);
-             for (int i = beg; i <= end; i++) {
-                  Object value = values[i];
-                  if (!(value instanceof int[]))
-                      continue;
-                  int[] array = (int[]) value;
-                  byte tag = tags[i];
-                  switch (tag) {
-                      case CONSTANT_String:
-                          String stringBody = (String) values[array[0]];
-                          visitor.visitConstantString(i, tag, stringBody, array[0]);
-                          values[i] = null;
-                          break;
-                      case CONSTANT_Class: {
-                          String className = (String) values[array[0]];
-                          // use the external form favored by Class.forName:
-                          className = className.replace('/', '.');
-                          visitor.visitConstantString(i, tag, className, array[0]);
-                          values[i] = className;
-                          break;
-                      }
-                      case CONSTANT_NameAndType: {
-                          String memberName = (String) values[array[0]];
-                          String signature  = (String) values[array[1]];
-                          visitor.visitDescriptor(i, tag, memberName, signature,
-                                                  array[0], array[1]);
-                          values[i] = new String[] {memberName, signature};
-                          break;
-                      }
-                      case CONSTANT_Fieldref:           // fall through:
-                      case CONSTANT_Methodref:          // fall through:
-                      case CONSTANT_InterfaceMethodref: {
-                              Object className   = values[array[0]];
-                              Object nameAndType = values[array[1]];
-                              if (!(className instanceof String) ||
-                                  !(nameAndType instanceof String[])) {
-                                   // one more pass is needed
-                                   if (beg2 > i)  beg2 = i;
-                                   if (end2 < i)  end2 = i;
-                                   continue;
-                              }
-                              String[] nameAndTypeArray = (String[]) nameAndType;
-                              visitor.visitMemberRef(i, tag,
-                                  (String)className,
-                                  nameAndTypeArray[0],
-                                  nameAndTypeArray[1],
-                                  array[0], array[1]);
-                              values[i] = null;
-                          }
-                          break;
-                      default:
-                          continue;
-                }
-            }
-        }
-    }
-
-    private static int getUnsignedByte(ByteBuffer buffer) {
-        return buffer.get() & 0xFF;
-    }
-
-    private static int getUnsignedShort(ByteBuffer buffer) {
-        int b1 = getUnsignedByte(buffer);
-        int b2 = getUnsignedByte(buffer);
-        return (b1 << 8) + (b2 << 0);
-    }
-
-    private static String getUTF8(ByteBuffer buffer, int utfLen, char[] charArray) throws InvalidConstantPoolFormatException {
-      int utfLimit = buffer.position() + utfLen;
-      int index = 0;
-      while (buffer.position() < utfLimit) {
-          int c = buffer.get() & 0xff;
-          if (c > 127) {
-              buffer.position(buffer.position() - 1);
-              return getUTF8Extended(buffer, utfLimit, charArray, index);
-          }
-          charArray[index++] = (char)c;
-      }
-      return new String(charArray, 0, index);
-    }
-
-    private static String getUTF8Extended(ByteBuffer buffer, int utfLimit, char[] charArray, int index) throws InvalidConstantPoolFormatException {
-        int c, c2, c3;
-        while (buffer.position() < utfLimit) {
-            c = buffer.get() & 0xff;
-            switch (c >> 4) {
-                case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
-                    /* 0xxxxxxx*/
-                    charArray[index++] = (char)c;
-                    break;
-                case 12: case 13:
-                    /* 110x xxxx   10xx xxxx*/
-                    c2 = buffer.get();
-                    if ((c2 & 0xC0) != 0x80)
-                        throw new InvalidConstantPoolFormatException(
-                            "malformed input around byte " + buffer.position());
-                     charArray[index++] = (char)(((c  & 0x1F) << 6) |
-                                                  (c2 & 0x3F));
-                    break;
-                case 14:
-                    /* 1110 xxxx  10xx xxxx  10xx xxxx */
-                    c2 = buffer.get();
-                    c3 = buffer.get();
-                    if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80))
-                       throw new InvalidConstantPoolFormatException(
-                          "malformed input around byte " + (buffer.position()));
-                    charArray[index++] = (char)(((c  & 0x0F) << 12) |
-                                                ((c2 & 0x3F) << 6)  |
-                                                ((c3 & 0x3F) << 0));
-                    break;
-                default:
-                    /* 10xx xxxx,  1111 xxxx */
-                    throw new InvalidConstantPoolFormatException(
-                        "malformed input around byte " + buffer.position());
-            }
-        }
-        // The number of chars produced may be less than utflen
-        return new String(charArray, 0, index);
-    }
-}
--- a/src/share/classes/sun/dyn/anon/ConstantPoolPatch.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn.anon;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Map;
-
-import static sun.dyn.anon.ConstantPoolVisitor.*;
-
-/** A class and its patched constant pool.
- *
- *  This class allow to modify (patch) a constant pool
- *  by changing the value of its entry.
- *  Entry are referenced using index that can be get
- *  by parsing the constant pool using
- *  {@link ConstantPoolParser#parse(ConstantPoolVisitor)}.
- *
- * @see ConstantPoolVisitor
- * @see ConstantPoolParser#createPatch()
- */
-public class ConstantPoolPatch {
-    final ConstantPoolParser outer;
-    final Object[] patchArray;
-
-    ConstantPoolPatch(ConstantPoolParser outer) {
-        this.outer      = outer;
-        this.patchArray = new Object[outer.getLength()];
-    }
-
-    /** Create a {@link ConstantPoolParser} and
-     *  a {@link ConstantPoolPatch} in one step.
-     *  Equivalent to {@code new ConstantPoolParser(classFile).createPatch()}.
-     *
-     * @param classFile an array of bytes containing a class.
-     * @see #ConstantPoolParser(Class)
-     */
-    public ConstantPoolPatch(byte[] classFile) throws InvalidConstantPoolFormatException {
-        this(new ConstantPoolParser(classFile));
-    }
-
-    /** Create a {@link ConstantPoolParser} and
-     *  a {@link ConstantPoolPatch} in one step.
-     *  Equivalent to {@code new ConstantPoolParser(templateClass).createPatch()}.
-     *
-     * @param templateClass the class to parse.
-     * @see #ConstantPoolParser(Class)
-     */
-    public ConstantPoolPatch(Class<?> templateClass) throws IOException, InvalidConstantPoolFormatException {
-        this(new ConstantPoolParser(templateClass));
-    }
-
-
-    /** Creates a patch from an existing patch.
-     *  All changes are copied from that patch.
-     * @param patch a patch
-     *
-     * @see ConstantPoolParser#createPatch()
-     */
-    public ConstantPoolPatch(ConstantPoolPatch patch) {
-        outer      = patch.outer;
-        patchArray = patch.patchArray.clone();
-    }
-
-    /** Which parser built this patch? */
-    public ConstantPoolParser getParser() {
-        return outer;
-    }
-
-    /** Report the tag at the given index in the constant pool. */
-    public byte getTag(int index) {
-        return outer.getTag(index);
-    }
-
-    /** Report the current patch at the given index of the constant pool.
-     *  Null means no patch will be made.
-     *  To observe the unpatched entry at the given index, use
-     *  {@link #getParser()}{@code .}@link ConstantPoolParser#parse(ConstantPoolVisitor)}
-     */
-    public Object getPatch(int index) {
-        Object value = patchArray[index];
-        if (value == null)  return null;
-        switch (getTag(index)) {
-        case CONSTANT_Fieldref:
-        case CONSTANT_Methodref:
-        case CONSTANT_InterfaceMethodref:
-            if (value instanceof String)
-                value = stripSemis(2, (String) value);
-            break;
-        case CONSTANT_NameAndType:
-            if (value instanceof String)
-                value = stripSemis(1, (String) value);
-            break;
-        }
-        return value;
-    }
-
-    /** Clear all patches. */
-    public void clear() {
-        Arrays.fill(patchArray, null);
-    }
-
-    /** Clear one patch. */
-    public void clear(int index) {
-        patchArray[index] = null;
-    }
-
-    /** Produce the patches as an array. */
-    public Object[] getPatches() {
-        return patchArray.clone();
-    }
-
-    /** Produce the original constant pool as an array. */
-    public Object[] getOriginalCP() throws InvalidConstantPoolFormatException {
-        return getOriginalCP(0, patchArray.length, -1);
-    }
-
-    /** Walk the constant pool, applying patches using the given map.
-     *
-     * @param utf8Map Utf8 strings to modify, if encountered
-     * @param classMap Classes (or their names) to modify, if encountered
-     * @param valueMap Constant values to modify, if encountered
-     * @param deleteUsedEntries if true, delete map entries that are used
-     */
-    public void putPatches(final Map<String,String> utf8Map,
-                           final Map<String,Object> classMap,
-                           final Map<Object,Object> valueMap,
-                           boolean deleteUsedEntries) throws InvalidConstantPoolFormatException {
-        final HashSet<String> usedUtf8Keys;
-        final HashSet<String> usedClassKeys;
-        final HashSet<Object> usedValueKeys;
-        if (deleteUsedEntries) {
-            usedUtf8Keys  = (utf8Map  == null) ? null : new HashSet<String>();
-            usedClassKeys = (classMap == null) ? null : new HashSet<String>();
-            usedValueKeys = (valueMap == null) ? null : new HashSet<Object>();
-        } else {
-            usedUtf8Keys = null;
-            usedClassKeys = null;
-            usedValueKeys = null;
-        }
-
-        outer.parse(new ConstantPoolVisitor() {
-
-            @Override
-            public void visitUTF8(int index, byte tag, String utf8) {
-                putUTF8(index, utf8Map.get(utf8));
-                if (usedUtf8Keys != null)  usedUtf8Keys.add(utf8);
-            }
-
-            @Override
-            public void visitConstantValue(int index, byte tag, Object value) {
-                putConstantValue(index, tag, valueMap.get(value));
-                if (usedValueKeys != null)  usedValueKeys.add(value);
-            }
-
-            @Override
-            public void visitConstantString(int index, byte tag, String name, int nameIndex) {
-                if (tag == CONSTANT_Class) {
-                    putConstantValue(index, tag, classMap.get(name));
-                    if (usedClassKeys != null)  usedClassKeys.add(name);
-                } else {
-                    assert(tag == CONSTANT_String);
-                    visitConstantValue(index, tag, name);
-                }
-            }
-        });
-        if (usedUtf8Keys != null)   utf8Map.keySet().removeAll(usedUtf8Keys);
-        if (usedClassKeys != null)  classMap.keySet().removeAll(usedClassKeys);
-        if (usedValueKeys != null)  valueMap.keySet().removeAll(usedValueKeys);
-    }
-
-    Object[] getOriginalCP(final int startIndex,
-                           final int endIndex,
-                           final int tagMask) throws InvalidConstantPoolFormatException {
-        final Object[] cpArray = new Object[endIndex - startIndex];
-        outer.parse(new ConstantPoolVisitor() {
-
-            void show(int index, byte tag, Object value) {
-                if (index < startIndex || index >= endIndex)  return;
-                if (((1 << tag) & tagMask) == 0)  return;
-                cpArray[index - startIndex] = value;
-            }
-
-            @Override
-            public void visitUTF8(int index, byte tag, String utf8) {
-                show(index, tag, utf8);
-            }
-
-            @Override
-            public void visitConstantValue(int index, byte tag, Object value) {
-                assert(tag != CONSTANT_String);
-                show(index, tag, value);
-            }
-
-            @Override
-            public void visitConstantString(int index, byte tag,
-                                            String value, int j) {
-                show(index, tag, value);
-            }
-
-            @Override
-            public void visitMemberRef(int index, byte tag,
-                    String className, String memberName,
-                    String signature,
-                    int j, int k) {
-                show(index, tag, new String[]{ className, memberName, signature });
-            }
-
-            @Override
-            public void visitDescriptor(int index, byte tag,
-                    String memberName, String signature,
-                    int j, int k) {
-                show(index, tag, new String[]{ memberName, signature });
-            }
-        });
-        return cpArray;
-    }
-
-    /** Write the head (header plus constant pool)
-     *  of the patched class file to the indicated stream.
-     */
-    void writeHead(OutputStream out) throws IOException {
-        outer.writePatchedHead(out, patchArray);
-    }
-
-    /** Write the tail (everything after the constant pool)
-     *  of the patched class file to the indicated stream.
-     */
-    void writeTail(OutputStream out) throws IOException {
-        outer.writeTail(out);
-    }
-
-    private void checkConstantTag(byte tag, Object value) {
-        if (value == null)
-            throw new IllegalArgumentException(
-                    "invalid null constant value");
-        if (classForTag(tag) != value.getClass())
-            throw new IllegalArgumentException(
-                    "invalid constant value"
-                    + (tag == CONSTANT_None ? ""
-                        : " for tag "+tagName(tag))
-                    + " of class "+value.getClass());
-    }
-
-    private void checkTag(int index, byte putTag) {
-        byte tag = outer.tags[index];
-        if (tag != putTag)
-            throw new IllegalArgumentException(
-                "invalid put operation"
-                + " for " + tagName(putTag)
-                + " at index " + index + " found " + tagName(tag));
-    }
-
-    private void checkTagMask(int index, int tagBitMask) {
-        byte tag = outer.tags[index];
-        int tagBit = ((tag & 0x1F) == tag) ? (1 << tag) : 0;
-        if ((tagBit & tagBitMask) == 0)
-            throw new IllegalArgumentException(
-                "invalid put operation"
-                + " at index " + index + " found " + tagName(tag));
-    }
-
-    private static void checkMemberName(String memberName) {
-        if (memberName.indexOf(';') >= 0)
-            throw new IllegalArgumentException("memberName " + memberName + " contains a ';'");
-    }
-
-    /** Set the entry of the constant pool indexed by index to
-     *  a new string.
-     *
-     * @param index an index to a constant pool entry containing a
-     *        {@link ConstantPoolVisitor#CONSTANT_Utf8} value.
-     * @param utf8 a string
-     *
-     * @see ConstantPoolVisitor#visitUTF8(int, byte, String)
-     */
-    public void putUTF8(int index, String utf8) {
-        if (utf8 == null) { clear(index); return; }
-        checkTag(index, CONSTANT_Utf8);
-        patchArray[index] = utf8;
-    }
-
-    /** Set the entry of the constant pool indexed by index to
-     *  a new value, depending on its dynamic type.
-     *
-     * @param index an index to a constant pool entry containing a
-     *        one of the following structures:
-     *        {@link ConstantPoolVisitor#CONSTANT_Integer},
-     *        {@link ConstantPoolVisitor#CONSTANT_Float},
-     *        {@link ConstantPoolVisitor#CONSTANT_Long},
-     *        {@link ConstantPoolVisitor#CONSTANT_Double},
-     *        {@link ConstantPoolVisitor#CONSTANT_String}, or
-     *        {@link ConstantPoolVisitor#CONSTANT_Class}
-     * @param value a boxed int, float, long or double; or a string or class object
-     * @throws IllegalArgumentException if the type of the constant does not
-     *         match the constant pool entry type,
-     *         as reported by {@link #getTag(int)}
-     *
-     * @see #putConstantValue(int, byte, Object)
-     * @see ConstantPoolVisitor#visitConstantValue(int, byte, Object)
-     * @see ConstantPoolVisitor#visitConstantString(int, byte, String, int)
-     */
-    public void putConstantValue(int index, Object value) {
-        if (value == null) { clear(index); return; }
-        byte tag = tagForConstant(value.getClass());
-        checkConstantTag(tag, value);
-        checkTag(index, tag);
-        patchArray[index] = value;
-    }
-
-    /** Set the entry of the constant pool indexed by index to
-     *  a new value.
-     *
-     * @param index an index to a constant pool entry matching the given tag
-     * @param tag one of the following values:
-     *        {@link ConstantPoolVisitor#CONSTANT_Integer},
-     *        {@link ConstantPoolVisitor#CONSTANT_Float},
-     *        {@link ConstantPoolVisitor#CONSTANT_Long},
-     *        {@link ConstantPoolVisitor#CONSTANT_Double},
-     *        {@link ConstantPoolVisitor#CONSTANT_String}, or
-     *        {@link ConstantPoolVisitor#CONSTANT_Class}
-     * @param value a boxed number, string, or class object
-     * @throws IllegalArgumentException if the type of the constant does not
-     *         match the constant pool entry type, or if a class name contains
-     *         '/' or ';'
-     *
-     * @see #putConstantValue(int, Object)
-     * @see ConstantPoolVisitor#visitConstantValue(int, byte, Object)
-     * @see ConstantPoolVisitor#visitConstantString(int, byte, String, int)
-     */
-    public void putConstantValue(int index, byte tag, Object value) {
-        if (value == null) { clear(index); return; }
-        checkTag(index, tag);
-        if (tag == CONSTANT_Class && value instanceof String) {
-            checkClassName((String) value);
-        } else if (tag == CONSTANT_String) {
-            // the JVM accepts any object as a patch for a string
-        } else {
-            // make sure the incoming value is the right type
-            checkConstantTag(tag, value);
-        }
-        checkTag(index, tag);
-        patchArray[index] = value;
-    }
-
-    /** Set the entry of the constant pool indexed by index to
-     *  a new {@link ConstantPoolVisitor#CONSTANT_NameAndType} value.
-     *
-     * @param index an index to a constant pool entry containing a
-     *        {@link ConstantPoolVisitor#CONSTANT_NameAndType} value.
-     * @param memberName a memberName
-     * @param signature a signature
-     * @throws IllegalArgumentException if memberName contains the character ';'
-     *
-     * @see ConstantPoolVisitor#visitDescriptor(int, byte, String, String, int, int)
-     */
-    public void putDescriptor(int index, String memberName, String signature) {
-        checkTag(index, CONSTANT_NameAndType);
-        checkMemberName(memberName);
-        patchArray[index] = addSemis(memberName, signature);
-    }
-
-    /** Set the entry of the constant pool indexed by index to
-     *  a new {@link ConstantPoolVisitor#CONSTANT_Fieldref},
-     *  {@link ConstantPoolVisitor#CONSTANT_Methodref}, or
-     *  {@link ConstantPoolVisitor#CONSTANT_InterfaceMethodref} value.
-     *
-     * @param index an index to a constant pool entry containing a member reference
-     * @param className a class name
-     * @param memberName a field or method name
-     * @param signature a field or method signature
-     * @throws IllegalArgumentException if memberName contains the character ';'
-     *             or signature is not a correct signature
-     *
-     * @see ConstantPoolVisitor#visitMemberRef(int, byte, String, String, String, int, int)
-     */
-    public void putMemberRef(int index, byte tag,
-                    String className, String memberName, String signature) {
-        checkTagMask(tag, CONSTANT_MemberRef_MASK);
-        checkTag(index, tag);
-        checkClassName(className);
-        checkMemberName(memberName);
-        if (signature.startsWith("(") == (tag == CONSTANT_Fieldref))
-            throw new IllegalArgumentException("bad signature: "+signature);
-        patchArray[index] = addSemis(className, memberName, signature);
-    }
-
-    static private final int CONSTANT_MemberRef_MASK =
-              CONSTANT_Fieldref
-            | CONSTANT_Methodref
-            | CONSTANT_InterfaceMethodref;
-
-    private static final Map<Class<?>, Byte> CONSTANT_VALUE_CLASS_TAG
-        = new IdentityHashMap<Class<?>, Byte>();
-    private static final Class[] CONSTANT_VALUE_CLASS = new Class[16];
-    static {
-        Object[][] values = {
-            {Integer.class, CONSTANT_Integer},
-            {Long.class, CONSTANT_Long},
-            {Float.class, CONSTANT_Float},
-            {Double.class, CONSTANT_Double},
-            {String.class, CONSTANT_String},
-            {Class.class, CONSTANT_Class}
-        };
-        for (Object[] value : values) {
-            Class<?> cls = (Class<?>)value[0];
-            Byte     tag = (Byte) value[1];
-            CONSTANT_VALUE_CLASS_TAG.put(cls, tag);
-            CONSTANT_VALUE_CLASS[(byte)tag] = cls;
-        }
-    }
-
-    static Class<?> classForTag(byte tag) {
-        if ((tag & 0xFF) >= CONSTANT_VALUE_CLASS.length)
-            return null;
-        return CONSTANT_VALUE_CLASS[tag];
-    }
-
-    static byte tagForConstant(Class<?> cls) {
-        Byte tag = CONSTANT_VALUE_CLASS_TAG.get(cls);
-        return (tag == null) ? CONSTANT_None : (byte)tag;
-    }
-
-    private static void checkClassName(String className) {
-        if (className.indexOf('/') >= 0 || className.indexOf(';') >= 0)
-            throw new IllegalArgumentException("invalid class name " + className);
-    }
-
-    static String addSemis(String name, String... names) {
-        StringBuilder buf = new StringBuilder(name.length() * 5);
-        buf.append(name);
-        for (String name2 : names) {
-            buf.append(';').append(name2);
-        }
-        String res = buf.toString();
-        assert(stripSemis(names.length, res)[0].equals(name));
-        assert(stripSemis(names.length, res)[1].equals(names[0]));
-        assert(names.length == 1 ||
-               stripSemis(names.length, res)[2].equals(names[1]));
-        return res;
-    }
-
-    static String[] stripSemis(int count, String string) {
-        String[] res = new String[count+1];
-        int pos = 0;
-        for (int i = 0; i < count; i++) {
-            int pos2 = string.indexOf(';', pos);
-            if (pos2 < 0)  pos2 = string.length();  // yuck
-            res[i] = string.substring(pos, pos2);
-            pos = pos2;
-        }
-        res[count] = string.substring(pos);
-        return res;
-    }
-
-    public String toString() {
-        StringBuilder buf = new StringBuilder(this.getClass().getName());
-        buf.append("{");
-        Object[] origCP = null;
-        for (int i = 0; i < patchArray.length; i++) {
-            if (patchArray[i] == null)  continue;
-            if (origCP != null) {
-                buf.append(", ");
-            } else {
-                try {
-                    origCP = getOriginalCP();
-                } catch (InvalidConstantPoolFormatException ee) {
-                    origCP = new Object[0];
-                }
-            }
-            Object orig = (i < origCP.length) ? origCP[i] : "?";
-            buf.append(orig).append("=").append(patchArray[i]);
-        }
-        buf.append("}");
-        return buf.toString();
-    }
-}
--- a/src/share/classes/sun/dyn/anon/ConstantPoolVisitor.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn.anon;
-
-/**
- * A visitor called by {@link ConstantPoolParser#parse(ConstantPoolVisitor)}
- * when a constant pool entry is parsed.
- * <p>
- * A visit* method is called when a constant pool entry is parsed.
- * The first argument is always the constant pool index.
- * The second argument is always the constant pool tag,
- * even for methods like {@link #visitUTF8(int, byte, String)} which only apply to one tag.
- * String arguments refer to Utf8 or NameAndType entries declared elsewhere,
- * and are always accompanied by the indexes of those entries.
- * <p>
- * The order of the calls to the visit* methods is not necessarily related
- * to the order of the entries in the constant pool.
- * If one entry has a reference to another entry, the latter (lower-level)
- * entry will be visited first.
- * <p>
- * The following table shows the relation between constant pool entry
- * types and the corresponding visit* methods:
- *
- * <table border=1 cellpadding=5 summary="constant pool visitor methods">
- * <tr><th>Tag(s)</th><th>Method</th></tr>
- * <tr>
- *   <td>{@link #CONSTANT_Utf8}</td>
- *   <td>{@link #visitUTF8(int, byte, String)}</td>
- * </tr><tr>
- *   <td>{@link #CONSTANT_Integer}, {@link #CONSTANT_Float},
- *       {@link #CONSTANT_Long}, {@link #CONSTANT_Double}</td>
- *   <td>{@link #visitConstantValue(int, byte, Object)}</td>
- * </tr><tr>
- *   <td>{@link #CONSTANT_String}, {@link #CONSTANT_Class}</td>
- *   <td>{@link #visitConstantString(int, byte, String, int)}</td>
- * </tr><tr>
- *   <td>{@link #CONSTANT_NameAndType}</td>
- *   <td>{@link #visitDescriptor(int, byte, String, String, int, int)}</td>
- * </tr><tr>
- *   <td>{@link #CONSTANT_Fieldref},
- *       {@link #CONSTANT_Methodref},
- *       {@link #CONSTANT_InterfaceMethodref}</td>
- *   <td>{@link #visitMemberRef(int, byte, String, String, String, int, int)}</td>
- * </tr>
- * </table>
- *
- * @see ConstantPoolPatch
- * @author Remi Forax
- * @author jrose
- */
-public class ConstantPoolVisitor {
-  /** Called each time an UTF8 constant pool entry is found.
-   * @param index the constant pool index
-   * @param tag always {@link #CONSTANT_Utf8}
-   * @param utf8 string encoded in modified UTF-8 format passed as a {@code String}
-   *
-   * @see ConstantPoolPatch#putUTF8(int, String)
-   */
-  public void visitUTF8(int index, byte tag, String utf8) {
-    // do nothing
-  }
-
-  /** Called for each constant pool entry that encodes an integer,
-   *  a float, a long, or a double.
-   *  Constant strings and classes are not managed by this method but
-   *  by {@link #visitConstantString(int, byte, String, int)}.
-   *
-   * @param index the constant pool index
-   * @param tag one of {@link #CONSTANT_Integer},
-   *            {@link #CONSTANT_Float},
-   *            {@link #CONSTANT_Long},
-   *            or {@link #CONSTANT_Double}
-   * @param value encoded value
-   *
-   * @see ConstantPoolPatch#putConstantValue(int, Object)
-   */
-  public void visitConstantValue(int index, byte tag, Object value) {
-    // do nothing
-  }
-
-  /** Called for each constant pool entry that encodes a string or a class.
-   * @param index the constant pool index
-   * @param tag one of {@link #CONSTANT_String},
-   *            {@link #CONSTANT_Class},
-   * @param name string body or class name (using dot separator)
-   * @param nameIndex the index of the Utf8 string for the name
-   *
-   * @see ConstantPoolPatch#putConstantValue(int, byte, Object)
-   */
-  public void visitConstantString(int index, byte tag,
-                                  String name, int nameIndex) {
-    // do nothing
-  }
-
-  /** Called for each constant pool entry that encodes a name and type.
-   * @param index the constant pool index
-   * @param tag always {@link #CONSTANT_NameAndType}
-   * @param memberName a field or method name
-   * @param signature the member signature
-   * @param memberNameIndex index of the Utf8 string for the member name
-   * @param signatureIndex index of the Utf8 string for the signature
-   *
-   * @see ConstantPoolPatch#putDescriptor(int, String, String)
-   */
-  public void visitDescriptor(int index, byte tag,
-                              String memberName, String signature,
-                              int memberNameIndex, int signatureIndex) {
-    // do nothing
-  }
-
-  /** Called for each constant pool entry that encodes a field or method.
-   * @param index the constant pool index
-   * @param tag one of {@link #CONSTANT_Fieldref},
-   *            or {@link #CONSTANT_Methodref},
-   *            or {@link #CONSTANT_InterfaceMethodref}
-   * @param className the class name (using dot separator)
-   * @param memberName name of the field or method
-   * @param signature the field or method signature
-   * @param classNameIndex index of the Utf8 string for the class name
-   * @param descriptorIndex index of the NameAndType descriptor constant
-   *
-   * @see ConstantPoolPatch#putMemberRef(int, byte, String, String, String)
-   */
-  public void visitMemberRef(int index, byte tag,
-                             String className, String memberName, String signature,
-                             int classNameIndex, int descriptorIndex) {
-    // do nothing
-  }
-
-    public static final byte
-      CONSTANT_None = 0,
-      CONSTANT_Utf8 = 1,
-      //CONSTANT_Unicode = 2,               /* unused */
-      CONSTANT_Integer = 3,
-      CONSTANT_Float = 4,
-      CONSTANT_Long = 5,
-      CONSTANT_Double = 6,
-      CONSTANT_Class = 7,
-      CONSTANT_String = 8,
-      CONSTANT_Fieldref = 9,
-      CONSTANT_Methodref = 10,
-      CONSTANT_InterfaceMethodref = 11,
-      CONSTANT_NameAndType = 12;
-
-    private static String[] TAG_NAMES = {
-        "Empty",
-        "Utf8",
-        null, //"Unicode",
-        "Integer",
-        "Float",
-        "Long",
-        "Double",
-        "Class",
-        "String",
-        "Fieldref",
-        "Methodref",
-        "InterfaceMethodref",
-        "NameAndType"
-    };
-
-    public static String tagName(byte tag) {
-        String name = null;
-        if ((tag & 0xFF) < TAG_NAMES.length)
-            name = TAG_NAMES[tag];
-        if (name == null)
-            name = "Unknown#"+(tag&0xFF);
-        return name;
-    }
-}
--- a/src/share/classes/sun/dyn/anon/InvalidConstantPoolFormatException.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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 sun.dyn.anon;
-
-/** Exception used when there is an error in the constant pool
- *  format.
- */
-public class InvalidConstantPoolFormatException extends Exception {
-    private static final long serialVersionUID=-6103888330523770949L;
-
-    public InvalidConstantPoolFormatException(String message,Throwable cause) {
-        super(message,cause);
-    }
-
-    public InvalidConstantPoolFormatException(String message) {
-        super(message);
-    }
-
-    public InvalidConstantPoolFormatException(Throwable cause) {
-        super(cause);
-    }
-}
--- a/src/share/classes/sun/dyn/empty/Empty.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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 sun.dyn.empty;
-
-/**
- * An empty class in an empty package.
- * Used as a proxy for unprivileged code, since making access checks
- * against it will only succeed against public methods in public types.
- * <p>
- * This class also stands (internally to sun.dyn) for the type of a
- * value that cannot be produced, because the expression of this type
- * always returns abnormally.  (Cf. Nothing in the closures proposal.)
- * @author jrose
- */
-public class Empty {
-    private Empty() { throw new InternalError(); }
-}
--- a/src/share/classes/sun/dyn/package-info.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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.
- */
-
-/**
- * Implementation details for JSR 292 RI, package java.dyn.
- * @author jrose
- */
-
-package sun.dyn;
--- a/src/share/classes/sun/dyn/util/BytecodeDescriptor.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn.util;
-
-import java.dyn.MethodType;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Utility routines for dealing with bytecode-level signatures.
- * @author jrose
- */
-public class BytecodeDescriptor {
-
-    private BytecodeDescriptor() { }  // cannot instantiate
-
-    public static List<Class<?>> parseMethod(String bytecodeSignature, ClassLoader loader) {
-        return parseMethod(bytecodeSignature, 0, bytecodeSignature.length(), loader);
-    }
-
-    static List<Class<?>> parseMethod(String bytecodeSignature,
-            int start, int end, ClassLoader loader) {
-        if (loader == null)
-            loader = ClassLoader.getSystemClassLoader();
-        String str = bytecodeSignature;
-        int[] i = {start};
-        ArrayList<Class<?>> ptypes = new ArrayList<Class<?>>();
-        if (i[0] < end && str.charAt(i[0]) == '(') {
-            ++i[0];  // skip '('
-            while (i[0] < end && str.charAt(i[0]) != ')') {
-                Class<?> pt = parseSig(str, i, end, loader);
-                if (pt == null || pt == void.class)
-                    parseError(str, "bad argument type");
-                ptypes.add(pt);
-            }
-            ++i[0];  // skip ')'
-        } else {
-            parseError(str, "not a method type");
-        }
-        Class<?> rtype = parseSig(str, i, end, loader);
-        if (rtype == null || i[0] != end)
-            parseError(str, "bad return type");
-        ptypes.add(rtype);
-        return ptypes;
-    }
-
-    static private void parseError(String str, String msg) {
-        throw new IllegalArgumentException("bad signature: "+str+": "+msg);
-    }
-
-    static private Class<?> parseSig(String str, int[] i, int end, ClassLoader loader) {
-        if (i[0] == end)  return null;
-        char c = str.charAt(i[0]++);
-        if (c == 'L') {
-            int begc = i[0], endc = str.indexOf(';', begc);
-            if (endc < 0)  return null;
-            i[0] = endc+1;
-            String name = str.substring(begc, endc).replace('/', '.');
-            try {
-                return loader.loadClass(name);
-            } catch (ClassNotFoundException ex) {
-                throw new TypeNotPresentException(name, ex);
-            }
-        } else if (c == '[') {
-            Class<?> t = parseSig(str, i, end, loader);
-            if (t != null)
-                t = java.lang.reflect.Array.newInstance(t, 0).getClass();
-            return t;
-        } else {
-            return Wrapper.forBasicType(c).primitiveType();
-        }
-    }
-
-    public static String unparse(Class<?> type) {
-        StringBuilder sb = new StringBuilder();
-        unparseSig(type, sb);
-        return sb.toString();
-    }
-
-    public static String unparse(MethodType type) {
-        return unparseMethod(type.returnType(), type.parameterList());
-    }
-
-    public static String unparse(Object type) {
-        if (type instanceof Class<?>)
-            return unparse((Class<?>) type);
-        if (type instanceof MethodType)
-            return unparse((MethodType) type);
-        return (String) type;
-    }
-
-    public static String unparseMethod(Class<?> rtype, List<Class<?>> ptypes) {
-        StringBuilder sb = new StringBuilder();
-        sb.append('(');
-        for (Class<?> pt : ptypes)
-            unparseSig(pt, sb);
-        sb.append(')');
-        unparseSig(rtype, sb);
-        return sb.toString();
-    }
-
-    static private void unparseSig(Class<?> t, StringBuilder sb) {
-        char c = Wrapper.forBasicType(t).basicTypeChar();
-        if (c != 'L') {
-            sb.append(c);
-        } else {
-            boolean lsemi = (!t.isArray());
-            if (lsemi)  sb.append('L');
-            sb.append(t.getName().replace('.', '/'));
-            if (lsemi)  sb.append(';');
-        }
-    }
-
-}
--- a/src/share/classes/sun/dyn/util/BytecodeName.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,627 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, 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 sun.dyn.util;
-
-/**
- * Utility routines for dealing with bytecode-level names.
- * Includes universal mangling rules for the JVM.
- *
- * <h3>Avoiding Dangerous Characters </h3>
- *
- * <p>
- * The JVM defines a very small set of characters which are illegal
- * in name spellings.  We will slightly extend and regularize this set
- * into a group of <cite>dangerous characters</cite>.
- * These characters will then be replaced, in mangled names, by escape sequences.
- * In addition, accidental escape sequences must be further escaped.
- * Finally, a special prefix will be applied if and only if
- * the mangling would otherwise fail to begin with the escape character.
- * This happens to cover the corner case of the null string,
- * and also clearly marks symbols which need demangling.
- * </p>
- * <p>
- * Dangerous characters are the union of all characters forbidden
- * or otherwise restricted by the JVM specification,
- * plus their mates, if they are brackets
- * (<code><big><b>[</b></big></code> and <code><big><b>]</b></big></code>,
- * <code><big><b>&lt;</b></big></code> and <code><big><b>&gt;</b></big></code>),
- * plus, arbitrarily, the colon character <code><big><b>:</b></big></code>.
- * There is no distinction between type, method, and field names.
- * This makes it easier to convert between mangled names of different
- * types, since they do not need to be decoded (demangled).
- * </p>
- * <p>
- * The escape character is backslash <code><big><b>\</b></big></code>
- * (also known as reverse solidus).
- * This character is, until now, unheard of in bytecode names,
- * but traditional in the proposed role.
- *
- * </p>
- * <h3> Replacement Characters </h3>
- *
- *
- * <p>
- * Every escape sequence is two characters
- * (in fact, two UTF8 bytes) beginning with
- * the escape character and followed by a
- * <cite>replacement character</cite>.
- * (Since the replacement character is never a backslash,
- * iterated manglings do not double in size.)
- * </p>
- * <p>
- * Each dangerous character has some rough visual similarity
- * to its corresponding replacement character.
- * This makes mangled symbols easier to recognize by sight.
- * </p>
- * <p>
- * The dangerous characters are
- * <code><big><b>/</b></big></code> (forward slash, used to delimit package components),
- * <code><big><b>.</b></big></code> (dot, also a package delimiter),
- * <code><big><b>;</b></big></code> (semicolon, used in signatures),
- * <code><big><b>$</b></big></code> (dollar, used in inner classes and synthetic members),
- * <code><big><b>&lt;</b></big></code> (left angle),
- * <code><big><b>&gt;</b></big></code> (right angle),
- * <code><big><b>[</b></big></code> (left square bracket, used in array types),
- * <code><big><b>]</b></big></code> (right square bracket, reserved in this scheme for language use),
- * and <code><big><b>:</b></big></code> (colon, reserved in this scheme for language use).
- * Their replacements are, respectively,
- * <code><big><b>|</b></big></code> (vertical bar),
- * <code><big><b>,</b></big></code> (comma),
- * <code><big><b>?</b></big></code> (question mark),
- * <code><big><b>%</b></big></code> (percent),
- * <code><big><b>^</b></big></code> (caret),
- * <code><big><b>_</b></big></code> (underscore), and
- * <code><big><b>{</b></big></code> (left curly bracket),
- * <code><big><b>}</b></big></code> (right curly bracket),
- * <code><big><b>!</b></big></code> (exclamation mark).
- * In addition, the replacement character for the escape character itself is
- * <code><big><b>-</b></big></code> (hyphen),
- * and the replacement character for the null prefix is
- * <code><big><b>=</b></big></code> (equal sign).
- * </p>
- * <p>
- * An escape character <code><big><b>\</b></big></code>
- * followed by any of these replacement characters
- * is an escape sequence, and there are no other escape sequences.
- * An equal sign is only part of an escape sequence
- * if it is the second character in the whole string, following a backslash.
- * Two consecutive backslashes do <em>not</em> form an escape sequence.
- * </p>
- * <p>
- * Each escape sequence replaces a so-called <cite>original character</cite>
- * which is either one of the dangerous characters or the escape character.
- * A null prefix replaces an initial null string, not a character.
- * </p>
- * <p>
- * All this implies that escape sequences cannot overlap and may be
- * determined all at once for a whole string.  Note that a spelling
- * string can contain <cite>accidental escapes</cite>, apparent escape
- * sequences which must not be interpreted as manglings.
- * These are disabled by replacing their leading backslash with an
- * escape sequence (<code><big><b>\-</b></big></code>).  To mangle a string, three logical steps
- * are required, though they may be carried out in one pass:
- * </p>
- * <ol>
- *   <li>In each accidental escape, replace the backslash with an escape sequence
- * (<code><big><b>\-</b></big></code>).</li>
- *   <li>Replace each dangerous character with an escape sequence
- * (<code><big><b>\|</b></big></code> for <code><big><b>/</b></big></code>, etc.).</li>
- *   <li>If the first two steps introduced any change, <em>and</em>
- * if the string does not already begin with a backslash, prepend a null prefix (<code><big><b>\=</b></big></code>).</li>
- * </ol>
- *
- * To demangle a mangled string that begins with an escape,
- * remove any null prefix, and then replace (in parallel)
- * each escape sequence by its original character.
- * <p>Spelling strings which contain accidental
- * escapes <em>must</em> have them replaced, even if those
- * strings do not contain dangerous characters.
- * This restriction means that mangling a string always
- * requires a scan of the string for escapes.
- * But then, a scan would be required anyway,
- * to check for dangerous characters.
- *
- * </p>
- * <h3> Nice Properties </h3>
- *
- * <p>
- * If a bytecode name does not contain any escape sequence,
- * demangling is a no-op:  The string demangles to itself.
- * Such a string is called <cite>self-mangling</cite>.
- * Almost all strings are self-mangling.
- * In practice, to demangle almost any name &ldquo;found in nature&rdquo;,
- * simply verify that it does not begin with a backslash.
- * </p>
- * <p>
- * Mangling is a one-to-one function, while demangling
- * is a many-to-one function.
- * A mangled string is defined as <cite>validly mangled</cite> if
- * it is in fact the unique mangling of its spelling string.
- * Three examples of invalidly mangled strings are <code><big><b>\=foo</b></big></code>,
- * <code><big><b>\-bar</b></big></code>, and <code><big><b>baz\!</b></big></code>, which demangle to <code><big><b>foo</b></big></code>, <code><big><b>\bar</b></big></code>, and
- * <code><big><b>baz\!</b></big></code>, but then remangle to <code><big><b>foo</b></big></code>, <code><big><b>\bar</b></big></code>, and <code><big><b>\=baz\-!</b></big></code>.
- * If a language back-end or runtime is using mangled names,
- * it should never present an invalidly mangled bytecode
- * name to the JVM.  If the runtime encounters one,
- * it should also report an error, since such an occurrence
- * probably indicates a bug in name encoding which
- * will lead to errors in linkage.
- * However, this note does not propose that the JVM verifier
- * detect invalidly mangled names.
- * </p>
- * <p>
- * As a result of these rules, it is a simple matter to
- * compute validly mangled substrings and concatenations
- * of validly mangled strings, and (with a little care)
- * these correspond to corresponding operations on their
- * spelling strings.
- * </p>
- * <ul>
- *   <li>Any prefix of a validly mangled string is also validly mangled,
- * although a null prefix may need to be removed.</li>
- *   <li>Any suffix of a validly mangled string is also validly mangled,
- * although a null prefix may need to be added.</li>
- *   <li>Two validly mangled strings, when concatenated,
- * are also validly mangled, although any null prefix
- * must be removed from the second string,
- * and a trailing backslash on the first string may need escaping,
- * if it would participate in an accidental escape when followed
- * by the first character of the second string.</li>
- * </ul>
- * <p>If languages that include non-Java symbol spellings use this
- * mangling convention, they will enjoy the following advantages:
- * </p>
- * <ul>
- *   <li>They can interoperate via symbols they share in common.</li>
- *   <li>Low-level tools, such as backtrace printers, will have readable displays.</li>
- *   <li>Future JVM and language extensions can safely use the dangerous characters
- * for structuring symbols, but will never interfere with valid spellings.</li>
- *   <li>Runtimes and compilers can use standard libraries for mangling and demangling.</li>
- *   <li>Occasional transliterations and name composition will be simple and regular,
- * for classes, methods, and fields.</li>
- *   <li>Bytecode names will continue to be compact.
- * When mangled, spellings will at most double in length, either in
- * UTF8 or UTF16 format, and most will not change at all.</li>
- * </ul>
- *
- *
- * <h3> Suggestions for Human Readable Presentations </h3>
- *
- *
- * <p>
- * For human readable displays of symbols,
- * it will be better to present a string-like quoted
- * representation of the spelling, because JVM users
- * are generally familiar with such tokens.
- * We suggest using single or double quotes before and after
- * mangled symbols which are not valid Java identifiers,
- * with quotes, backslashes, and non-printing characters
- * escaped as if for literals in the Java language.
- * </p>
- * <p>
- * For example, an HTML-like spelling
- * <code><big><b>&lt;pre&gt;</b></big></code> mangles to
- * <code><big><b>\^pre\_</b></big></code> and could
- * display more cleanly as
- * <code><big><b>'&lt;pre&gt;'</b></big></code>,
- * with the quotes included.
- * Such string-like conventions are <em>not</em> suitable
- * for mangled bytecode names, in part because
- * dangerous characters must be eliminated, rather
- * than just quoted.  Otherwise internally structured
- * strings like package prefixes and method signatures
- * could not be reliably parsed.
- * </p>
- * <p>
- * In such human-readable displays, invalidly mangled
- * names should <em>not</em> be demangled and quoted,
- * for this would be misleading.  Likewise, JVM symbols
- * which contain dangerous characters (like dots in field
- * names or brackets in method names) should not be
- * simply quoted.  The bytecode names
- * <code><big><b>\=phase\,1</b></big></code> and
- * <code><big><b>phase.1</b></big></code> are distinct,
- * and in demangled displays they should be presented as
- * <code><big><b>'phase.1'</b></big></code> and something like
- * <code><big><b>'phase'.1</b></big></code>, respectively.
- * </p>
- *
- * @author John Rose
- * @version 1.2, 02/06/2008
- * @see http://blogs.sun.com/jrose/entry/symbolic_freedom_in_the_vm
- */
-public class BytecodeName {
-    private BytecodeName() { }  // static only class
-
-    /** Given a source name, produce the corresponding bytecode name.
-     * The source name should not be qualified, because any syntactic
-     * markers (dots, slashes, dollar signs, colons, etc.) will be mangled.
-     * @param s the source name
-     * @return a valid bytecode name which represents the source name
-     */
-    public static String toBytecodeName(String s) {
-        String bn = mangle(s);
-        assert((Object)bn == s || looksMangled(bn)) : bn;
-        assert(s.equals(toSourceName(bn))) : s;
-        return bn;
-    }
-
-    /** Given an unqualified bytecode name, produce the corresponding source name.
-     * The bytecode name must not contain dangerous characters.
-     * In particular, it must not be qualified or segmented by colon {@code ':'}.
-     * @param s the bytecode name
-     * @return the source name, which may possibly have unsafe characters
-     * @throws IllegalArgumentException if the bytecode name is not {@link #isSafeBytecodeName safe}
-     * @see #isSafeBytecodeName(java.lang.String)
-     */
-    public static String toSourceName(String s) {
-        checkSafeBytecodeName(s);
-        String sn = s;
-        if (looksMangled(s)) {
-            sn = demangle(s);
-            assert(s.equals(mangle(sn))) : s+" => "+sn+" => "+mangle(sn);
-        }
-        return sn;
-    }
-
-    /**
-     * Given a bytecode name from a classfile, separate it into
-     * components delimited by dangerous characters.
-     * Each resulting array element will be either a dangerous character,
-     * or else a safe bytecode name.
-     * (The safe name might possibly be mangled to hide further dangerous characters.)
-     * For example, the qualified class name {@code java/lang/String}
-     * will be parsed into the array {@code {"java", '/', "lang", '/', "String"}}.
-     * The name {@code &lt;init&gt;} will be parsed into { '&lt;', "init", '&gt;'}}
-     * The name {@code foo/bar$:baz} will be parsed into
-     * {@code {"foo", '/', "bar", '$', ':', "baz"}}.
-     * The name {@code ::\=:foo:\=bar\!baz} will be parsed into
-     * {@code {':', ':', "", ':', "foo", ':', "bar:baz"}}.
-     */
-    public static Object[] parseBytecodeName(String s) {
-        int slen = s.length();
-        Object[] res = null;
-        for (int pass = 0; pass <= 1; pass++) {
-            int fillp = 0;
-            int lasti = 0;
-            for (int i = 0; i <= slen; i++) {
-                int whichDC = -1;
-                if (i < slen) {
-                    whichDC = DANGEROUS_CHARS.indexOf(s.charAt(i));
-                    if (whichDC < DANGEROUS_CHAR_FIRST_INDEX)  continue;
-                }
-                // got to end of string or next dangerous char
-                if (lasti < i) {
-                    // normal component
-                    if (pass != 0)
-                        res[fillp] = toSourceName(s.substring(lasti, i));
-                    fillp++;
-                    lasti = i+1;
-                }
-                if (whichDC >= DANGEROUS_CHAR_FIRST_INDEX) {
-                    if (pass != 0)
-                        res[fillp] = DANGEROUS_CHARS_CA[whichDC];
-                    fillp++;
-                    lasti = i+1;
-                }
-            }
-            if (pass != 0)  break;
-            // between passes, build the result array
-            res = new Object[fillp];
-            if (fillp <= 1 && lasti == 0) {
-                if (fillp != 0)  res[0] = toSourceName(s);
-                break;
-            }
-        }
-        return res;
-    }
-
-    /**
-     * Given a series of components, create a bytecode name for a classfile.
-     * This is the inverse of {@link #parseBytecodeName(java.lang.String)}.
-     * Each component must either be an interned one-character string of
-     * a dangerous character, or else a safe bytecode name.
-     * @param components a series of name components
-     * @return the concatenation of all components
-     * @throws IllegalArgumentException if any component contains an unsafe
-     *          character, and is not an interned one-character string
-     * @throws NullPointerException if any component is null
-     */
-    public static String unparseBytecodeName(Object[] components) {
-        Object[] components0 = components;
-        for (int i = 0; i < components.length; i++) {
-            Object c = components[i];
-            if (c instanceof String) {
-                String mc = toBytecodeName((String) c);
-                if (i == 0 && components.length == 1)
-                    return mc;  // usual case
-                if ((Object)mc != c) {
-                    if (components == components0)
-                        components = components.clone();
-                    components[i] = c = mc;
-                }
-            }
-        }
-        return appendAll(components);
-    }
-    private static String appendAll(Object[] components) {
-        if (components.length <= 1) {
-            if (components.length == 1) {
-                return String.valueOf(components[0]);
-            }
-            return "";
-        }
-        int slen = 0;
-        for (Object c : components) {
-            if (c instanceof String)
-                slen += String.valueOf(c).length();
-            else
-                slen += 1;
-        }
-        StringBuilder sb = new StringBuilder(slen);
-        for (Object c : components) {
-            sb.append(c);
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Given a bytecode name, produce the corresponding display name.
-     * This is the source name, plus quotes if needed.
-     * If the bytecode name contains dangerous characters,
-     * assume that they are being used as punctuation,
-     * and pass them through unchanged.
-     * Non-empty runs of non-dangerous characters are demangled
-     * if necessary, and the resulting names are quoted if
-     * they are not already valid Java identifiers, or if
-     * they contain a dangerous character (i.e., dollar sign "$").
-     * Single quotes are used when quoting.
-     * Within quoted names, embedded single quotes and backslashes
-     * are further escaped by prepended backslashes.
-     *
-     * @param s the original bytecode name (which may be qualified)
-     * @return a human-readable presentation
-     */
-    public static String toDisplayName(String s) {
-        Object[] components = parseBytecodeName(s);
-        for (int i = 0; i < components.length; i++) {
-            if (!(components[i] instanceof String))
-                continue;
-            String sn = (String) components[i];
-            // note that the name is already demangled!
-            //sn = toSourceName(sn);
-            if (!isJavaIdent(sn) || sn.indexOf('$') >=0 ) {
-                components[i] = quoteDisplay(sn);
-            }
-        }
-        return appendAll(components);
-    }
-    private static boolean isJavaIdent(String s) {
-        int slen = s.length();
-        if (slen == 0)  return false;
-        if (!Character.isJavaIdentifierStart(s.charAt(0)))
-            return false;
-        for (int i = 1; i < slen; i++) {
-            if (!Character.isJavaIdentifierPart(s.charAt(i)))
-                return false;
-        }
-        return true;
-    }
-    private static String quoteDisplay(String s) {
-        // TO DO:  Replace wierd characters in s by C-style escapes.
-        return "'"+s.replaceAll("['\\\\]", "\\\\$0")+"'";
-    }
-
-    private static void checkSafeBytecodeName(String s)
-            throws IllegalArgumentException {
-        if (!isSafeBytecodeName(s)) {
-            throw new IllegalArgumentException(s);
-        }
-    }
-
-    /**
-     * Report whether a simple name is safe as a bytecode name.
-     * Such names are acceptable in class files as class, method, and field names.
-     * Additionally, they are free of "dangerous" characters, even if those
-     * characters are legal in some (or all) names in class files.
-     * @param s the proposed bytecode name
-     * @return true if the name is non-empty and all of its characters are safe
-     */
-    public static boolean isSafeBytecodeName(String s) {
-        if (s.length() == 0)  return false;
-        // check occurrences of each DANGEROUS char
-        for (char xc : DANGEROUS_CHARS_A) {
-            if (xc == ESCAPE_C)  continue;  // not really that dangerous
-            if (s.indexOf(xc) >= 0)  return false;
-        }
-        return true;
-    }
-
-    /**
-     * Report whether a character is safe in a bytecode name.
-     * This is true of any unicode character except the following
-     * <em>dangerous characters</em>: {@code ".;:$[]<>/"}.
-     * @param s the proposed character
-     * @return true if the character is safe to use in classfiles
-     */
-    public static boolean isSafeBytecodeChar(char c) {
-        return DANGEROUS_CHARS.indexOf(c) < DANGEROUS_CHAR_FIRST_INDEX;
-    }
-
-    private static boolean looksMangled(String s) {
-        return s.charAt(0) == ESCAPE_C;
-    }
-
-    private static String mangle(String s) {
-        if (s.length() == 0)
-            return NULL_ESCAPE;
-
-        // build this lazily, when we first need an escape:
-        StringBuilder sb = null;
-
-        for (int i = 0, slen = s.length(); i < slen; i++) {
-            char c = s.charAt(i);
-
-            boolean needEscape = false;
-            if (c == ESCAPE_C) {
-                if (i+1 < slen) {
-                    char c1 = s.charAt(i+1);
-                    if ((i == 0 && c1 == NULL_ESCAPE_C)
-                        || c1 != originalOfReplacement(c1)) {
-                        // an accidental escape
-                        needEscape = true;
-                    }
-                }
-            } else {
-                needEscape = isDangerous(c);
-            }
-
-            if (!needEscape) {
-                if (sb != null)  sb.append(c);
-                continue;
-            }
-
-            // build sb if this is the first escape
-            if (sb == null) {
-                sb = new StringBuilder(s.length()+10);
-                // mangled names must begin with a backslash:
-                if (s.charAt(0) != ESCAPE_C && i > 0)
-                    sb.append(NULL_ESCAPE);
-                // append the string so far, which is unremarkable:
-                sb.append(s.substring(0, i));
-            }
-
-            // rewrite \ to \-, / to \|, etc.
-            sb.append(ESCAPE_C);
-            sb.append(replacementOf(c));
-        }
-
-        if (sb != null)   return sb.toString();
-
-        return s;
-    }
-
-    private static String demangle(String s) {
-        // build this lazily, when we first meet an escape:
-        StringBuilder sb = null;
-
-        int stringStart = 0;
-        if (s.startsWith(NULL_ESCAPE))
-            stringStart = 2;
-
-        for (int i = stringStart, slen = s.length(); i < slen; i++) {
-            char c = s.charAt(i);
-
-            if (c == ESCAPE_C && i+1 < slen) {
-                // might be an escape sequence
-                char rc = s.charAt(i+1);
-                char oc = originalOfReplacement(rc);
-                if (oc != rc) {
-                    // build sb if this is the first escape
-                    if (sb == null) {
-                        sb = new StringBuilder(s.length());
-                        // append the string so far, which is unremarkable:
-                        sb.append(s.substring(stringStart, i));
-                    }
-                    ++i;  // skip both characters
-                    c = oc;
-                }
-            }
-
-            if (sb != null)
-                sb.append(c);
-        }
-
-        if (sb != null)   return sb.toString();
-
-        return s.substring(stringStart);
-    }
-
-    static char ESCAPE_C = '\\';
-    // empty escape sequence to avoid a null name or illegal prefix
-    static char NULL_ESCAPE_C = '=';
-    static String NULL_ESCAPE = ESCAPE_C+""+NULL_ESCAPE_C;
-
-    static final String DANGEROUS_CHARS   = "\\/.;:$[]<>"; // \\ must be first
-    static final String REPLACEMENT_CHARS =  "-|,?!%{}^_";
-    static final int DANGEROUS_CHAR_FIRST_INDEX = 1; // index after \\
-    static char[] DANGEROUS_CHARS_A   = DANGEROUS_CHARS.toCharArray();
-    static char[] REPLACEMENT_CHARS_A = REPLACEMENT_CHARS.toCharArray();
-    static final Character[] DANGEROUS_CHARS_CA;
-    static {
-        Character[] dcca = new Character[DANGEROUS_CHARS.length()];
-        for (int i = 0; i < dcca.length; i++)
-            dcca[i] = Character.valueOf(DANGEROUS_CHARS.charAt(i));
-        DANGEROUS_CHARS_CA = dcca;
-    }
-
-    static final long[] SPECIAL_BITMAP = new long[2];  // 128 bits
-    static {
-        String SPECIAL = DANGEROUS_CHARS + REPLACEMENT_CHARS;
-        //System.out.println("SPECIAL = "+SPECIAL);
-        for (char c : SPECIAL.toCharArray()) {
-            SPECIAL_BITMAP[c >>> 6] |= 1L << c;
-        }
-    }
-    static boolean isSpecial(char c) {
-        if ((c >>> 6) < SPECIAL_BITMAP.length)
-            return ((SPECIAL_BITMAP[c >>> 6] >> c) & 1) != 0;
-        else
-            return false;
-    }
-    static char replacementOf(char c) {
-        if (!isSpecial(c))  return c;
-        int i = DANGEROUS_CHARS.indexOf(c);
-        if (i < 0)  return c;
-        return REPLACEMENT_CHARS.charAt(i);
-    }
-    static char originalOfReplacement(char c) {
-        if (!isSpecial(c))  return c;
-        int i = REPLACEMENT_CHARS.indexOf(c);
-        if (i < 0)  return c;
-        return DANGEROUS_CHARS.charAt(i);
-    }
-    static boolean isDangerous(char c) {
-        if (!isSpecial(c))  return false;
-        return (DANGEROUS_CHARS.indexOf(c) >= DANGEROUS_CHAR_FIRST_INDEX);
-    }
-    static int indexOfDangerousChar(String s, int from) {
-        for (int i = from, slen = s.length(); i < slen; i++) {
-            if (isDangerous(s.charAt(i)))
-                return i;
-        }
-        return -1;
-    }
-    static int lastIndexOfDangerousChar(String s, int from) {
-        for (int i = Math.min(from, s.length()-1); i >= 0; i--) {
-            if (isDangerous(s.charAt(i)))
-                return i;
-        }
-        return -1;
-    }
-
-
-}
--- a/src/share/classes/sun/dyn/util/ValueConversions.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,807 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn.util;
-
-import java.dyn.*;
-import java.dyn.MethodHandles.Lookup;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.EnumMap;
-import java.util.List;
-import sun.dyn.Access;
-import sun.dyn.AdapterMethodHandle;
-import sun.dyn.MethodHandleImpl;
-import static sun.dyn.MemberName.uncaughtException;
-
-public class ValueConversions {
-    private static final Access IMPL_TOKEN = Access.getToken();
-    private static final Lookup IMPL_LOOKUP = MethodHandleImpl.getLookup(IMPL_TOKEN);
-
-    private static EnumMap<Wrapper, MethodHandle>[] newWrapperCaches(int n) {
-        @SuppressWarnings("unchecked")
-        EnumMap<Wrapper, MethodHandle>[] caches
-                = (EnumMap<Wrapper, MethodHandle>[]) new EnumMap[n];  // unchecked warning expected here
-        for (int i = 0; i < n; i++)
-            caches[i] = new EnumMap<Wrapper, MethodHandle>(Wrapper.class);
-        return caches;
-    }
-
-    /// Converting references to values.
-
-    static int unboxInteger(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Integer) x).intValue();
-    }
-
-    static byte unboxByte(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Byte) x).byteValue();
-    }
-
-    static short unboxShort(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Short) x).shortValue();
-    }
-
-    static boolean unboxBoolean(Object x) {
-        if (x == null)  return false;  // never NPE
-        return ((Boolean) x).booleanValue();
-    }
-
-    static char unboxCharacter(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Character) x).charValue();
-    }
-
-    static long unboxLong(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Long) x).longValue();
-    }
-
-    static float unboxFloat(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Float) x).floatValue();
-    }
-
-    static double unboxDouble(Object x) {
-        if (x == null)  return 0;  // never NPE
-        return ((Double) x).doubleValue();
-    }
-
-    /// Converting references to "raw" values.
-    /// A raw primitive value is always an int or long.
-
-    static int unboxByteRaw(Object x) {
-        return unboxByte(x);
-    }
-
-    static int unboxShortRaw(Object x) {
-        return unboxShort(x);
-    }
-
-    static int unboxBooleanRaw(Object x) {
-        return unboxBoolean(x) ? 1 : 0;
-    }
-
-    static int unboxCharacterRaw(Object x) {
-        return unboxCharacter(x);
-    }
-
-    static int unboxFloatRaw(Object x) {
-        return Float.floatToIntBits(unboxFloat(x));
-    }
-
-    static long unboxDoubleRaw(Object x) {
-        return Double.doubleToRawLongBits(unboxDouble(x));
-    }
-
-    private static MethodType unboxType(Wrapper wrap, boolean raw) {
-        return MethodType.methodType(rawWrapper(wrap, raw).primitiveType(), wrap.wrapperType());
-    }
-
-    private static final EnumMap<Wrapper, MethodHandle>[]
-            UNBOX_CONVERSIONS = newWrapperCaches(4);
-
-    private static MethodHandle unbox(Wrapper wrap, boolean exact, boolean raw) {
-        EnumMap<Wrapper, MethodHandle> cache = UNBOX_CONVERSIONS[(exact?1:0)+(raw?2:0)];
-        MethodHandle mh = cache.get(wrap);
-        if (mh != null) {
-            return mh;
-        }
-        // slow path
-        switch (wrap) {
-            case OBJECT:
-                mh = IDENTITY; break;
-            case VOID:
-                mh = raw ? ALWAYS_ZERO : IGNORE; break;
-            case INT: case LONG:
-                // these guys don't need separate raw channels
-                if (raw)  mh = unbox(wrap, exact, false);
-                break;
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        // look up the method
-        String name = "unbox" + wrap.simpleName() + (raw ? "Raw" : "");
-        MethodType type = unboxType(wrap, raw);
-        if (!exact) {
-            try {
-                // actually, type is wrong; the Java method takes Object
-                mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type.erase());
-            } catch (NoAccessException ex) {
-                mh = null;
-            }
-        } else {
-            mh = retype(type, unbox(wrap, !exact, raw));
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        throw new IllegalArgumentException("cannot find unbox adapter for " + wrap + (raw ? " (raw)" : ""));
-    }
-
-    public static MethodHandle unbox(Wrapper type, boolean exact) {
-        return unbox(type, exact, false);
-    }
-
-    public static MethodHandle unboxRaw(Wrapper type, boolean exact) {
-        return unbox(type, exact, true);
-    }
-
-    public static MethodHandle unbox(Class<?> type, boolean exact) {
-        return unbox(Wrapper.forPrimitiveType(type), exact, false);
-    }
-
-    public static MethodHandle unboxRaw(Class<?> type, boolean exact) {
-        return unbox(Wrapper.forPrimitiveType(type), exact, true);
-    }
-
-    /// Converting primitives to references
-
-    static Integer boxInteger(int x) {
-        return x;
-    }
-
-    static Byte boxByte(byte x) {
-        return x;
-    }
-
-    static Short boxShort(short x) {
-        return x;
-    }
-
-    static Boolean boxBoolean(boolean x) {
-        return x;
-    }
-
-    static Character boxCharacter(char x) {
-        return x;
-    }
-
-    static Long boxLong(long x) {
-        return x;
-    }
-
-    static Float boxFloat(float x) {
-        return x;
-    }
-
-    static Double boxDouble(double x) {
-        return x;
-    }
-
-    /// Converting raw primitives to references
-
-    static Byte boxByteRaw(int x) {
-        return boxByte((byte)x);
-    }
-
-    static Short boxShortRaw(int x) {
-        return boxShort((short)x);
-    }
-
-    static Boolean boxBooleanRaw(int x) {
-        return boxBoolean(x != 0);
-    }
-
-    static Character boxCharacterRaw(int x) {
-        return boxCharacter((char)x);
-    }
-
-    static Float boxFloatRaw(int x) {
-        return boxFloat(Float.intBitsToFloat(x));
-    }
-
-    static Double boxDoubleRaw(long x) {
-        return boxDouble(Double.longBitsToDouble(x));
-    }
-
-    // a raw void value is (arbitrarily) a garbage int
-    static Void boxVoidRaw(int x) {
-        return null;
-    }
-
-    private static MethodType boxType(Wrapper wrap, boolean raw) {
-        // be exact, since return casts are hard to compose
-        Class<?> boxType = wrap.wrapperType();
-        return MethodType.methodType(boxType, rawWrapper(wrap, raw).primitiveType());
-    }
-
-    private static Wrapper rawWrapper(Wrapper wrap, boolean raw) {
-        if (raw)  return wrap.isDoubleWord() ? Wrapper.LONG : Wrapper.INT;
-        return wrap;
-    }
-
-    private static final EnumMap<Wrapper, MethodHandle>[]
-            BOX_CONVERSIONS = newWrapperCaches(4);
-
-    private static MethodHandle box(Wrapper wrap, boolean exact, boolean raw) {
-        EnumMap<Wrapper, MethodHandle> cache = BOX_CONVERSIONS[(exact?1:0)+(raw?2:0)];
-        MethodHandle mh = cache.get(wrap);
-        if (mh != null) {
-            return mh;
-        }
-        // slow path
-        switch (wrap) {
-            case OBJECT:
-                mh = IDENTITY; break;
-            case VOID:
-                if (!raw)  mh = ZERO_OBJECT;
-                break;
-            case INT: case LONG:
-                // these guys don't need separate raw channels
-                if (raw)  mh = box(wrap, exact, false);
-                break;
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        // look up the method
-        String name = "box" + wrap.simpleName() + (raw ? "Raw" : "");
-        MethodType type = boxType(wrap, raw);
-        if (exact) {
-            try {
-                mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type);
-            } catch (NoAccessException ex) {
-                mh = null;
-            }
-        } else {
-            mh = retype(type.erase(), box(wrap, !exact, raw));
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        throw new IllegalArgumentException("cannot find box adapter for " + wrap + (raw ? " (raw)" : ""));
-    }
-
-    public static MethodHandle box(Class<?> type, boolean exact) {
-        return box(Wrapper.forPrimitiveType(type), exact, false);
-    }
-
-    public static MethodHandle boxRaw(Class<?> type, boolean exact) {
-        return box(Wrapper.forPrimitiveType(type), exact, true);
-    }
-
-    public static MethodHandle box(Wrapper type, boolean exact) {
-        return box(type, exact, false);
-    }
-
-    public static MethodHandle boxRaw(Wrapper type, boolean exact) {
-        return box(type, exact, true);
-    }
-
-    /// Kludges for when raw values get accidentally boxed.
-
-    static int unboxRawInteger(Object x) {
-        if (x instanceof Integer)
-            return unboxInteger(x);
-        else
-            return (int) unboxLong(x);
-    }
-
-    static Integer reboxRawInteger(Object x) {
-        if (x instanceof Integer)
-            return (Integer) x;
-        else
-            return (int) unboxLong(x);
-    }
-
-    static Byte reboxRawByte(Object x) {
-        if (x instanceof Byte)  return (Byte) x;
-        return boxByteRaw(unboxRawInteger(x));
-    }
-
-    static Short reboxRawShort(Object x) {
-        if (x instanceof Short)  return (Short) x;
-        return boxShortRaw(unboxRawInteger(x));
-    }
-
-    static Boolean reboxRawBoolean(Object x) {
-        if (x instanceof Boolean)  return (Boolean) x;
-        return boxBooleanRaw(unboxRawInteger(x));
-    }
-
-    static Character reboxRawCharacter(Object x) {
-        if (x instanceof Character)  return (Character) x;
-        return boxCharacterRaw(unboxRawInteger(x));
-    }
-
-    static Float reboxRawFloat(Object x) {
-        if (x instanceof Float)  return (Float) x;
-        return boxFloatRaw(unboxRawInteger(x));
-    }
-
-    static Long reboxRawLong(Object x) {
-        return (Long) x;  //never a rebox
-    }
-
-    static Double reboxRawDouble(Object x) {
-        if (x instanceof Double)  return (Double) x;
-        return boxDoubleRaw(unboxLong(x));
-    }
-
-    private static MethodType reboxType(Wrapper wrap) {
-        Class<?> boxType = wrap.wrapperType();
-        return MethodType.methodType(boxType, Object.class);
-    }
-
-    private static final EnumMap<Wrapper, MethodHandle>[]
-            REBOX_CONVERSIONS = newWrapperCaches(2);
-
-    /**
-     * Because we normalize primitive types to reduce the number of signatures,
-     * primitives are sometimes manipulated under an "erased" type,
-     * either int (for types other than long/double) or long (for all types).
-     * When the erased primitive value is then boxed into an Integer or Long,
-     * the final boxed primitive is sometimes required.  This transformation
-     * is called a "rebox".  It takes an Integer or Long and produces some
-     * other boxed value.
-     */
-    public static MethodHandle rebox(Wrapper wrap, boolean exact) {
-        EnumMap<Wrapper, MethodHandle> cache = REBOX_CONVERSIONS[exact?1:0];
-        MethodHandle mh = cache.get(wrap);
-        if (mh != null) {
-            return mh;
-        }
-        // slow path
-        switch (wrap) {
-            case OBJECT:
-                mh = IDENTITY; break;
-            case VOID:
-                throw new IllegalArgumentException("cannot rebox a void");
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        // look up the method
-        String name = "reboxRaw" + wrap.simpleName();
-        MethodType type = reboxType(wrap);
-        if (exact) {
-            try {
-                mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type);
-            } catch (NoAccessException ex) {
-                mh = null;
-            }
-        } else {
-            mh = retype(IDENTITY.type(), rebox(wrap, !exact));
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        throw new IllegalArgumentException("cannot find rebox adapter for " + wrap);
-    }
-
-    public static MethodHandle rebox(Class<?> type, boolean exact) {
-        return rebox(Wrapper.forPrimitiveType(type), exact);
-    }
-
-    /// Width-changing conversions between int and long.
-
-    static long widenInt(int x) {
-        return (long) x;
-    }
-
-    static Long widenBoxedInt(Integer x) {
-        return (long)(int)x;
-    }
-
-    static int narrowLong(long x) {
-        return (int) x;
-    }
-
-    static Integer narrowBoxedLong(Long x) {
-        return (int)(long) x;
-    }
-
-    /// Constant functions
-
-    static void ignore(Object x) {
-        // no value to return; this is an unbox of null
-        return;
-    }
-
-    static void empty() {
-        return;
-    }
-
-    static Object zeroObject() {
-        return null;
-    }
-
-    static int zeroInteger() {
-        return 0;
-    }
-
-    static long zeroLong() {
-        return 0;
-    }
-
-    static float zeroFloat() {
-        return 0;
-    }
-
-    static double zeroDouble() {
-        return 0;
-    }
-
-    private static final EnumMap<Wrapper, MethodHandle>[]
-            CONSTANT_FUNCTIONS = newWrapperCaches(2);
-
-    public static MethodHandle zeroConstantFunction(Wrapper wrap) {
-        EnumMap<Wrapper, MethodHandle> cache = CONSTANT_FUNCTIONS[0];
-        MethodHandle mh = cache.get(wrap);
-        if (mh != null) {
-            return mh;
-        }
-        // slow path
-        MethodType type = MethodType.methodType(wrap.primitiveType());
-        switch (wrap) {
-            case VOID:
-                mh = EMPTY;
-                break;
-            case INT: case LONG: case FLOAT: case DOUBLE:
-                try {
-                    mh = IMPL_LOOKUP.findStatic(ValueConversions.class, "zero"+wrap.simpleName(), type);
-                } catch (NoAccessException ex) {
-                    mh = null;
-                }
-                break;
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-
-        // use the raw method
-        Wrapper rawWrap = wrap.rawPrimitive();
-        if (rawWrap != wrap) {
-            mh = retype(type, zeroConstantFunction(rawWrap));
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        throw new IllegalArgumentException("cannot find zero constant for " + wrap);
-    }
-
-    /// Converting references to references.
-
-    /**
-     * Value-killing function.
-     * @param x an arbitrary reference value
-     * @return a null
-     */
-    static Object alwaysNull(Object x) {
-        return null;
-    }
-
-    /**
-     * Value-killing function.
-     * @param x an arbitrary reference value
-     * @return a zero
-     */
-    static int alwaysZero(Object x) {
-        return 0;
-    }
-
-    /**
-     * Identity function.
-     * @param x an arbitrary reference value
-     * @return the same value x
-     */
-    static <T> T identity(T x) {
-        return x;
-    }
-
-    /**
-     * Identity function on ints.
-     * @param x an arbitrary int value
-     * @return the same value x
-     */
-    static int identity(int x) {
-        return x;
-    }
-
-    /**
-     * Identity function on longs.
-     * @param x an arbitrary long value
-     * @return the same value x
-     */
-    static long identity(long x) {
-        return x;
-    }
-
-    /**
-     * Identity function, with reference cast.
-     * @param t an arbitrary reference type
-     * @param x an arbitrary reference value
-     * @return the same value x
-     */
-    static <T,U> T castReference(Class<? extends T> t, U x) {
-        return t.cast(x);
-    }
-
-    private static final MethodHandle IDENTITY, IDENTITY_I, IDENTITY_J, CAST_REFERENCE, ALWAYS_NULL, ALWAYS_ZERO, ZERO_OBJECT, IGNORE, EMPTY;
-    static {
-        try {
-            MethodType idType = MethodType.genericMethodType(1);
-            MethodType castType = idType.insertParameterTypes(0, Class.class);
-            MethodType alwaysZeroType = idType.changeReturnType(int.class);
-            MethodType ignoreType = idType.changeReturnType(void.class);
-            MethodType zeroObjectType = MethodType.genericMethodType(0);
-            IDENTITY = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", idType);
-            IDENTITY_I = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", MethodType.methodType(int.class, int.class));
-            IDENTITY_J = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", MethodType.methodType(long.class, long.class));
-            //CAST_REFERENCE = IMPL_LOOKUP.findVirtual(Class.class, "cast", idType);
-            CAST_REFERENCE = IMPL_LOOKUP.findStatic(ValueConversions.class, "castReference", castType);
-            ALWAYS_NULL = IMPL_LOOKUP.findStatic(ValueConversions.class, "alwaysNull", idType);
-            ALWAYS_ZERO = IMPL_LOOKUP.findStatic(ValueConversions.class, "alwaysZero", alwaysZeroType);
-            ZERO_OBJECT = IMPL_LOOKUP.findStatic(ValueConversions.class, "zeroObject", zeroObjectType);
-            IGNORE = IMPL_LOOKUP.findStatic(ValueConversions.class, "ignore", ignoreType);
-            EMPTY = IMPL_LOOKUP.findStatic(ValueConversions.class, "empty", ignoreType.dropParameterTypes(0, 1));
-        } catch (Exception ex) {
-            throw uncaughtException(ex);
-        }
-    }
-
-    private static final EnumMap<Wrapper, MethodHandle> WRAPPER_CASTS
-            = new EnumMap<Wrapper, MethodHandle>(Wrapper.class);
-
-    private static final EnumMap<Wrapper, MethodHandle> EXACT_WRAPPER_CASTS
-            = new EnumMap<Wrapper, MethodHandle>(Wrapper.class);
-
-    /** Return a method that casts its sole argument (an Object) to the given type
-     *  and returns it as the given type (if exact is true), or as plain Object (if erase is true).
-     */
-    public static MethodHandle cast(Class<?> type, boolean exact) {
-        if (type.isPrimitive())  throw new IllegalArgumentException("cannot cast primitive type "+type);
-        MethodHandle mh = null;
-        Wrapper wrap = null;
-        EnumMap<Wrapper, MethodHandle> cache = null;
-        if (Wrapper.isWrapperType(type)) {
-            wrap = Wrapper.forWrapperType(type);
-            cache = (exact ? EXACT_WRAPPER_CASTS : WRAPPER_CASTS);
-            mh = cache.get(wrap);
-            if (mh != null)  return mh;
-        }
-        if (VerifyType.isNullReferenceConversion(Object.class, type))
-            mh = IDENTITY;
-        else if (VerifyType.isNullType(type))
-            mh = ALWAYS_NULL;
-        else
-            mh = MethodHandles.insertArguments(CAST_REFERENCE, 0, type);
-        if (exact) {
-            MethodType xmt = MethodType.methodType(type, Object.class);
-            mh = AdapterMethodHandle.makeRetypeRaw(IMPL_TOKEN, xmt, mh);
-        }
-        if (cache != null)
-            cache.put(wrap, mh);
-        return mh;
-    }
-
-    public static MethodHandle identity() {
-        return IDENTITY;
-    }
-
-    public static MethodHandle identity(Class<?> type) {
-        if (type == Object.class)
-            return IDENTITY;
-        else if (!type.isPrimitive())
-            return retype(MethodType.methodType(type, type), IDENTITY);
-        else
-            return identity(Wrapper.forPrimitiveType(type));
-    }
-
-    static MethodHandle identity(Wrapper wrap) {
-        EnumMap<Wrapper, MethodHandle> cache = CONSTANT_FUNCTIONS[1];
-        MethodHandle mh = cache.get(wrap);
-        if (mh != null) {
-            return mh;
-        }
-        // slow path
-        MethodType type = MethodType.methodType(wrap.primitiveType());
-        if (wrap != Wrapper.VOID)
-            type = type.appendParameterTypes(wrap.primitiveType());
-        try {
-            mh = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", type);
-        } catch (NoAccessException ex) {
-            mh = null;
-        }
-        if (mh == null && wrap == Wrapper.VOID) {
-            mh = EMPTY;  // #(){} : #()void
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-
-        // use a raw conversion
-        if (wrap.isSingleWord() && wrap != Wrapper.INT) {
-            mh = retype(type, identity(Wrapper.INT));
-        } else if (wrap.isDoubleWord() && wrap != Wrapper.LONG) {
-            mh = retype(type, identity(Wrapper.LONG));
-        }
-        if (mh != null) {
-            cache.put(wrap, mh);
-            return mh;
-        }
-        throw new IllegalArgumentException("cannot find identity for " + wrap);
-    }
-
-    private static MethodHandle retype(MethodType type, MethodHandle mh) {
-        return AdapterMethodHandle.makeRetypeRaw(IMPL_TOKEN, type, mh);
-    }
-
-    private static final Object[] NO_ARGS_ARRAY = {};
-    private static Object[] makeArray(Object... args) { return args; }
-    private static Object[] array() { return NO_ARGS_ARRAY; }
-    private static Object[] array(Object a0)
-                { return makeArray(a0); }
-    private static Object[] array(Object a0, Object a1)
-                { return makeArray(a0, a1); }
-    private static Object[] array(Object a0, Object a1, Object a2)
-                { return makeArray(a0, a1, a2); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3)
-                { return makeArray(a0, a1, a2, a3); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4)
-                { return makeArray(a0, a1, a2, a3, a4); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5)
-                { return makeArray(a0, a1, a2, a3, a4, a5); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6, Object a7)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6, Object a7,
-                                  Object a8)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6, Object a7,
-                                  Object a8, Object a9)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-    static MethodHandle[] makeArrays() {
-        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
-        MethodHandles.Lookup lookup = IMPL_LOOKUP;
-        for (;;) {
-            int nargs = arrays.size();
-            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(Object[].class);
-            String name = "array";
-            MethodHandle array = null;
-            try {
-                array = lookup.findStatic(ValueConversions.class, name, type);
-            } catch (NoAccessException ex) {
-            }
-            if (array == null)  break;
-            arrays.add(array);
-        }
-        assert(arrays.size() == 11);  // current number of methods
-        return arrays.toArray(new MethodHandle[0]);
-    }
-    static final MethodHandle[] ARRAYS = makeArrays();
-
-    /** Return a method handle that takes the indicated number of Object
-     *  arguments and returns an Object array of them, as if for varargs.
-     */
-    public static MethodHandle varargsArray(int nargs) {
-        if (nargs < ARRAYS.length)
-            return ARRAYS[nargs];
-        // else need to spin bytecode or do something else fancy
-        throw new UnsupportedOperationException("NYI: cannot form a varargs array of length "+nargs);
-    }
-
-    private static final List<Object> NO_ARGS_LIST = Arrays.asList(NO_ARGS_ARRAY);
-    private static List<Object> makeList(Object... args) { return Arrays.asList(args); }
-    private static List<Object> list() { return NO_ARGS_LIST; }
-    private static List<Object> list(Object a0)
-                { return makeList(a0); }
-    private static List<Object> list(Object a0, Object a1)
-                { return makeList(a0, a1); }
-    private static List<Object> list(Object a0, Object a1, Object a2)
-                { return makeList(a0, a1, a2); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3)
-                { return makeList(a0, a1, a2, a3); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4)
-                { return makeList(a0, a1, a2, a3, a4); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5)
-                { return makeList(a0, a1, a2, a3, a4, a5); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6, Object a7)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6, Object a7,
-                                     Object a8)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6, Object a7,
-                                     Object a8, Object a9)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-    static MethodHandle[] makeLists() {
-        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
-        MethodHandles.Lookup lookup = IMPL_LOOKUP;
-        for (;;) {
-            int nargs = arrays.size();
-            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(List.class);
-            String name = "list";
-            MethodHandle array = null;
-            try {
-                array = lookup.findStatic(ValueConversions.class, name, type);
-            } catch (NoAccessException ex) {
-            }
-            if (array == null)  break;
-            arrays.add(array);
-        }
-        assert(arrays.size() == 11);  // current number of methods
-        return arrays.toArray(new MethodHandle[0]);
-    }
-    static final MethodHandle[] LISTS = makeLists();
-
-    /** Return a method handle that takes the indicated number of Object
-     *  arguments and returns List.
-     */
-    public static MethodHandle varargsList(int nargs) {
-        if (nargs < LISTS.length)
-            return LISTS[nargs];
-        // else need to spin bytecode or do something else fancy
-        throw new UnsupportedOperationException("NYI");
-    }
-}
-
--- a/src/share/classes/sun/dyn/util/VerifyAccess.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn.util;
-
-import java.dyn.NoAccessException;
-import java.lang.reflect.Modifier;
-import sun.dyn.MemberName;
-import sun.dyn.MethodHandleImpl;
-import sun.dyn.empty.Empty;
-import static java.lang.reflect.Modifier.*;
-
-/**
- * This class centralizes information about the JVM's linkage access control.
- * @author jrose
- */
-public class VerifyAccess {
-
-    private VerifyAccess() { }  // cannot instantiate
-
-    private static final int PACKAGE_ONLY = 0;
-    private static final int ALL_ACCESS_MODES = (PUBLIC|PRIVATE|PROTECTED|PACKAGE_ONLY);
-    private static final boolean ALLOW_NESTMATE_ACCESS = false;
-
-    /**
-     * Evaluate the JVM linkage rules for access to the given method
-     * on behalf of a caller class which proposes to perform the access.
-     * Return true if the caller class has privileges to invoke a method
-     * or access a field with the given properties.
-     * This requires an accessibility check of the referencing class,
-     * plus an accessibility check of the member within the class,
-     * which depends on the member's modifier flags.
-     * <p>
-     * The relevant properties include the defining class ({@code defc})
-     * of the member, and its modifier flags ({@code mods}).
-     * Also relevant is the class used to make the initial symbolic reference
-     * to the member ({@code refc}).  If this latter class is not distinguished,
-     * the defining class should be passed for both arguments ({@code defc == refc}).
-     * <h3>JVM Specification, 5.4.4 "Access Control"</h3>
-     * A field or method R is accessible to a class or interface D if
-     * and only if any of the following conditions is true:<ul>
-     * <li>R is public.
-     * <li>R is protected and is declared in a class C, and D is either
-     *     a subclass of C or C itself.  Furthermore, if R is not
-     *     static, then the symbolic reference to R must contain a
-     *     symbolic reference to a class T, such that T is either a
-     *     subclass of D, a superclass of D or D itself.
-     * <li>R is either protected or has default access (that is,
-     *     neither public nor protected nor private), and is declared
-     *     by a class in the same runtime package as D.
-     * <li>R is private and is declared in D.
-     * </ul>
-     * This discussion of access control omits a related restriction
-     * on the target of a protected field access or method invocation
-     * (the target must be of class D or a subtype of D). That
-     * requirement is checked as part of the verification process
-     * (5.4.1); it is not part of link-time access control.
-     * @param refc the class used in the symbolic reference to the proposed member
-     * @param defc the class in which the proposed member is actually defined
-     * @param mods modifier flags for the proposed member
-     * @param lookupClass the class for which the access check is being made
-     * @return true iff the the accessing class can access such a member
-     */
-    public static boolean isMemberAccessible(Class<?> refc,  // symbolic ref class
-                                             Class<?> defc,  // actual def class
-                                             int      mods,  // actual member mods
-                                             Class<?> lookupClass) {
-        // Usually refc and defc are the same, but if they differ, verify them both.
-        if (refc != defc) {
-            if (!isClassAccessible(refc, lookupClass)) {
-                // Note that defc is verified in the switch below.
-                return false;
-            }
-            if ((mods & (ALL_ACCESS_MODES|STATIC)) == (PROTECTED|STATIC)) {
-                // Apply the special rules for refc here.
-                if (!isRelatedClass(refc, lookupClass))
-                    return isSamePackage(defc, lookupClass);
-                // If refc == defc, the call to isPublicSuperClass will do
-                // the whole job, since in that case refc (as defc) will be
-                // a superclass of the lookup class.
-            }
-        }
-        if (defc == lookupClass)
-            return true;        // easy check; all self-access is OK
-        switch (mods & ALL_ACCESS_MODES) {
-        case PUBLIC:
-            if (refc != defc)  return true;  // already checked above
-            return isClassAccessible(refc, lookupClass);
-        case PROTECTED:
-            return isSamePackage(defc, lookupClass) || isPublicSuperClass(defc, lookupClass);
-        case PACKAGE_ONLY:
-            return isSamePackage(defc, lookupClass);
-        case PRIVATE:
-            // Loosened rules for privates follows access rules for inner classes.
-            return (ALLOW_NESTMATE_ACCESS &&
-                    isSamePackageMember(defc, lookupClass));
-        default:
-            throw new IllegalArgumentException("bad modifiers: "+Modifier.toString(mods));
-        }
-    }
-
-    static boolean isRelatedClass(Class<?> refc, Class<?> lookupClass) {
-        return (refc == lookupClass ||
-                refc.isAssignableFrom(lookupClass) ||
-                lookupClass.isAssignableFrom(refc));
-    }
-
-    static boolean isPublicSuperClass(Class<?> defc, Class<?> lookupClass) {
-        return isPublic(defc.getModifiers()) && defc.isAssignableFrom(lookupClass);
-    }
-
-    /**
-     * Evaluate the JVM linkage rules for access to the given class on behalf of caller.
-     * <h3>JVM Specification, 5.4.4 "Access Control"</h3>
-     * A class or interface C is accessible to a class or interface D
-     * if and only if either of the following conditions are true:<ul>
-     * <li>C is public.
-     * <li>C and D are members of the same runtime package.
-     * </ul>
-     */
-    public static boolean isClassAccessible(Class<?> refc, Class<?> lookupClass) {
-        int mods = refc.getModifiers();
-        if (isPublic(mods))
-            return true;
-        if (isSamePackage(lookupClass, refc))
-            return true;
-        return false;
-    }
-
-    /**
-     * Test if two classes have the same class loader and package qualifier.
-     * @param class1
-     * @param class2
-     * @return whether they are in the same package
-     */
-    public static boolean isSamePackage(Class<?> class1, Class<?> class2) {
-        if (class1 == class2)
-            return true;
-        if (!loadersAreRelated(class1.getClassLoader(), class2.getClassLoader()))
-            return false;
-        String name1 = class1.getName(), name2 = class2.getName();
-        int dot = name1.lastIndexOf('.');
-        if (dot != name2.lastIndexOf('.'))
-            return false;
-        for (int i = 0; i < dot; i++) {
-            if (name1.charAt(i) != name2.charAt(i))
-                return false;
-        }
-        return true;
-    }
-
-    /**
-     * Test if two classes are defined as part of the same package member (top-level class).
-     * If this is true, they can share private access with each other.
-     * @param class1
-     * @param class2
-     * @return whether they are identical or nested together
-     */
-    public static boolean isSamePackageMember(Class<?> class1, Class<?> class2) {
-        if (class1 == class2)
-            return true;
-        if (!isSamePackage(class1, class2))
-            return false;
-        if (getOutermostEnclosingClass(class1) != getOutermostEnclosingClass(class2))
-            return false;
-        return true;
-    }
-
-    private static Class<?> getOutermostEnclosingClass(Class<?> c) {
-        Class<?> pkgmem = c;
-        for (Class<?> enc = c; (enc = enc.getEnclosingClass()) != null; )
-            pkgmem = enc;
-        return pkgmem;
-    }
-
-    private static boolean loadersAreRelated(ClassLoader loader1, ClassLoader loader2) {
-        if (loader1 == loader2 || loader1 == null || loader2 == null) {
-            return true;
-        }
-        for (ClassLoader scan1 = loader1;
-                scan1 != null; scan1 = scan1.getParent()) {
-            if (scan1 == loader2)  return true;
-        }
-        for (ClassLoader scan2 = loader2;
-                scan2 != null; scan2 = scan2.getParent()) {
-            if (scan2 == loader1)  return true;
-        }
-        return false;
-    }
-}
--- a/src/share/classes/sun/dyn/util/VerifyType.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn.util;
-
-import java.dyn.MethodType;
-import sun.dyn.empty.Empty;
-
-/**
- * This class centralizes information about the JVM verifier
- * and its requirements about type correctness.
- * @author jrose
- */
-public class VerifyType {
-
-    private VerifyType() { }  // cannot instantiate
-
-    /**
-     * True if a value can be stacked as the source type and unstacked as the
-     * destination type, without violating the JVM's type consistency.
-     *
-     * @param call the type of a stacked value
-     * @param recv the type by which we'd like to treat it
-     * @return whether the retyping can be done without motion or reformatting
-     */
-    public static boolean isNullConversion(Class<?> src, Class<?> dst) {
-        if (src == dst)            return true;
-        // Verifier allows any interface to be treated as Object:
-        if (dst.isInterface())     dst = Object.class;
-        if (src.isInterface())     src = Object.class;
-        if (src == dst)            return true;  // check again
-        if (dst == void.class)     return true;  // drop any return value
-        if (isNullType(src))       return !dst.isPrimitive();
-        if (!src.isPrimitive())    return dst.isAssignableFrom(src);
-        // Verifier allows an int to carry byte, short, char, or even boolean:
-        if (dst == int.class)      return Wrapper.forPrimitiveType(src).isSubwordOrInt();
-        return false;
-    }
-
-    /**
-     * Specialization of isNullConversion to reference types.
-
-     * @param call the type of a stacked value
-     * @param recv the reference type by which we'd like to treat it
-     * @return whether the retyping can be done without a cast
-     */
-    public static boolean isNullReferenceConversion(Class<?> src, Class<?> dst) {
-        assert(!dst.isPrimitive());
-        if (dst.isInterface())  return true;   // verifier allows this
-        if (isNullType(src))    return true;
-        return dst.isAssignableFrom(src);
-    }
-
-    /**
-     * Is the given type java.lang.Null or an equivalent null-only type?
-     */
-    public static boolean isNullType(Class<?> type) {
-        if (type == null)  return false;
-        return type == NULL_CLASS
-            // This one may also be used as a null type.
-            // TO DO: Decide if we really want to legitimize it here.
-            // Probably we do, unless java.lang.Null really makes it into Java 7
-            //|| type == Void.class
-            // Locally known null-only class:
-            || type == Empty.class
-            ;
-    }
-    private static final Class<?> NULL_CLASS;
-    static {
-        Class<?> nullClass = null;
-        try {
-            nullClass = Class.forName("java.lang.Null");
-        } catch (ClassNotFoundException ex) {
-            // OK, we'll cope
-        }
-        NULL_CLASS = nullClass;
-    }
-
-    /**
-     * True if a method handle can receive a call under a slightly different
-     * method type, without moving or reformatting any stack elements.
-     *
-     * @param call the type of call being made
-     * @param recv the type of the method handle receiving the call
-     * @return whether the retyping can be done without motion or reformatting
-     */
-    public static boolean isNullConversion(MethodType call, MethodType recv) {
-        if (call == recv)  return true;
-        int len = call.parameterCount();
-        if (len != recv.parameterCount())  return false;
-        for (int i = 0; i < len; i++)
-            if (!isNullConversion(call.parameterType(i), recv.parameterType(i)))
-                return false;
-        return isNullConversion(recv.returnType(), call.returnType());
-    }
-
-    //TO DO: isRawConversion
-
-    /**
-     * Determine if the JVM verifier allows a value of type call to be
-     * passed to a formal parameter (or return variable) of type recv.
-     * Returns 1 if the verifier allows the types to match without conversion.
-     * Returns -1 if the types can be made to match by a JVM-supported adapter.
-     * Cases supported are:
-     * <ul><li>checkcast
-     * </li><li>conversion between any two integral types (but not floats)
-     * </li><li>unboxing from a wrapper to its corresponding primitive type
-     * </li><li>conversion in either direction between float and double
-     * </li></ul>
-     * (Autoboxing is not supported here; it must be done via Java code.)
-     * Returns 0 otherwise.
-     */
-    public static int canPassUnchecked(Class<?> src, Class<?> dst) {
-        if (src == dst)
-            return 1;
-
-        if (dst.isPrimitive()) {
-            if (dst == void.class)
-                // Return anything to a caller expecting void.
-                // This is a property of the implementation, which links
-                // return values via a register rather than via a stack push.
-                // This makes it possible to ignore cleanly.
-                return 1;
-            if (src == void.class)
-                return 0;  // void-to-something?
-            if (!src.isPrimitive())
-                // Cannot pass a reference to any primitive type (exc. void).
-                return 0;
-            Wrapper sw = Wrapper.forPrimitiveType(src);
-            Wrapper dw = Wrapper.forPrimitiveType(dst);
-            if (sw.isSubwordOrInt() && dw.isSubwordOrInt()) {
-                if (sw.bitWidth() >= dw.bitWidth())
-                    return -1;   // truncation may be required
-                if (!dw.isSigned() && sw.isSigned())
-                    return -1;   // sign elimination may be required
-            }
-            if (src == float.class || dst == float.class) {
-                if (src == double.class || dst == double.class)
-                    return -1;   // floating conversion may be required
-                else
-                    return 0;    // other primitive conversions NYI
-            } else {
-                // all fixed-point conversions are supported
-                return 0;
-            }
-        } else if (src.isPrimitive()) {
-            // Cannot pass a primitive to any reference type.
-            // (Maybe allow null.class?)
-            return 0;
-        }
-
-        // Handle reference types in the rest of the block:
-
-        // The verifier treats interfaces exactly like Object.
-        if (isNullReferenceConversion(src, dst))
-            // pass any reference to object or an arb. interface
-            return 1;
-        // else it's a definite "maybe" (cast is required)
-        return -1;
-    }
-
-    public static int canPassRaw(Class<?> src, Class<?> dst) {
-        if (dst.isPrimitive()) {
-            if (dst == void.class)
-                // As above, return anything to a caller expecting void.
-                return 1;
-            if (src == void.class)
-                // Special permission for raw conversions: allow a void
-                // to be captured as a garbage int.
-                // Caller promises that the actual value will be disregarded.
-                return dst == int.class ? 1 : 0;
-            if (isNullType(src))
-                // Special permission for raw conversions: allow a null
-                // to be reinterpreted as anything.  For objects, it is safe,
-                // and for primitives you get a garbage value (probably zero).
-                return 1;
-            if (!src.isPrimitive())
-                return 0;
-            Wrapper sw = Wrapper.forPrimitiveType(src);
-            Wrapper dw = Wrapper.forPrimitiveType(dst);
-            if (sw.stackSlots() == dw.stackSlots())
-                return 1;  // can do a reinterpret-cast on a stacked primitive
-            if (sw.isSubwordOrInt() && dw == Wrapper.VOID)
-                return 1;  // can drop an outgoing int value
-            return 0;
-        } else if (src.isPrimitive()) {
-            return 0;
-        }
-
-        // Both references.
-        if (isNullReferenceConversion(src, dst))
-            return 1;
-        return -1;
-    }
-
-    public static boolean isSpreadArgType(Class<?> spreadArg) {
-        return spreadArg.isArray();
-    }
-    public static Class<?> spreadArgElementType(Class<?> spreadArg, int i) {
-        return spreadArg.getComponentType();
-    }
-}
--- a/src/share/classes/sun/dyn/util/Wrapper.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,562 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, 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 sun.dyn.util;
-
-public enum Wrapper {
-    BOOLEAN(Boolean.class, boolean.class, 'Z', (Boolean)false, Format.unsigned(1)),
-    // These must be in the order defined for widening primitive conversions in JLS 5.1.2
-    BYTE(Byte.class, byte.class, 'B', (Byte)(byte)0, Format.signed(8)),
-    SHORT(Short.class, short.class, 'S', (Short)(short)0, Format.signed(16)),
-    CHAR(Character.class, char.class, 'C', (Character)(char)0, Format.unsigned(16)),
-    INT(Integer.class, int.class, 'I', (Integer)(int)0, Format.signed(32)),
-    LONG(Long.class, long.class, 'J', (Long)(long)0, Format.signed(64)),
-    FLOAT(Float.class, float.class, 'F', (Float)(float)0, Format.floating(32)),
-    DOUBLE(Double.class, double.class, 'D', (Double)(double)0, Format.floating(64)),
-    //NULL(Null.class, null.class, 'N', null, Format.other(1)),
-    OBJECT(Object.class, Object.class, 'L', null, Format.other(1)),
-    // VOID must be the last type, since it is "assignable" from any other type:
-    VOID(Void.class, void.class, 'V', null, Format.other(0)),
-    ;
-
-    private final Class<?> wrapperType;
-    private final Class<?> primitiveType;
-    private final char     basicTypeChar;
-    private final Object   zero;
-    private final int      format;
-    private final String   simpleName;
-
-    private Wrapper(Class<?> wtype, Class<?> ptype, char tchar, Object zero, int format) {
-        this.wrapperType = wtype;
-        this.primitiveType = ptype;
-        this.basicTypeChar = tchar;
-        this.zero = zero;
-        this.format = format;
-        this.simpleName = wtype.getSimpleName();
-    }
-
-    private static abstract class Format {
-        static final int SLOT_SHIFT = 0, SIZE_SHIFT = 2, KIND_SHIFT = 12;
-        static final int
-                SIGNED   = (-1) << KIND_SHIFT,
-                UNSIGNED = 0    << KIND_SHIFT,
-                FLOATING = 1    << KIND_SHIFT;
-        static final int
-                SLOT_MASK = ((1<<(SIZE_SHIFT-SLOT_SHIFT))-1),
-                SIZE_MASK = ((1<<(KIND_SHIFT-SIZE_SHIFT))-1);
-        static int format(int kind, int size, int slots) {
-            assert(((kind >> KIND_SHIFT) << KIND_SHIFT) == kind);
-            assert((size & (size-1)) == 0); // power of two
-            assert((kind == SIGNED)   ? (size > 0) :
-                   (kind == UNSIGNED) ? (size > 0) :
-                   (kind == FLOATING) ? (size == 32 || size == 64)  :
-                   false);
-            assert((slots == 2) ? (size == 64) :
-                   (slots == 1) ? (size <= 32) :
-                   false);
-            return kind | (size << SIZE_SHIFT) | (slots << SLOT_SHIFT);
-        }
-        static final int
-                INT      = SIGNED   | (32 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
-                SHORT    = SIGNED   | (16 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
-                BOOLEAN  = UNSIGNED | (1  << SIZE_SHIFT) | (1 << SLOT_SHIFT),
-                CHAR     = UNSIGNED | (16 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
-                FLOAT    = FLOATING | (32 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
-                VOID     = UNSIGNED | (0  << SIZE_SHIFT) | (0 << SLOT_SHIFT),
-                NUM_MASK = (-1) << SIZE_SHIFT;
-        static int signed(int size)   { return format(SIGNED,   size, (size > 32 ? 2 : 1)); }
-        static int unsigned(int size) { return format(UNSIGNED, size, (size > 32 ? 2 : 1)); }
-        static int floating(int size) { return format(FLOATING, size, (size > 32 ? 2 : 1)); }
-        static int other(int slots)   { return slots << SLOT_SHIFT; }
-    }
-
-    /// format queries:
-
-    /** How many bits are in the wrapped value?  Returns 0 for OBJECT or VOID. */
-    public int     bitWidth()      { return (format >> Format.SIZE_SHIFT) & Format.SIZE_MASK; }
-    /** How many JVM stack slots occupied by the wrapped value?  Returns 0 for VOID. */
-    public int     stackSlots()    { return (format >> Format.SLOT_SHIFT) & Format.SLOT_MASK; }
-    /** Does the wrapped value occupy a single JVM stack slot? */
-    public boolean isSingleWord()  { return (format & (1 << Format.SLOT_SHIFT)) != 0; }
-    /** Does the wrapped value occupy two JVM stack slots? */
-    public boolean isDoubleWord()  { return (format & (2 << Format.SLOT_SHIFT)) != 0; }
-    /** Is the wrapped type numeric (not void or object)? */
-    public boolean isNumeric()     { return (format & Format.NUM_MASK) != 0; }
-    /** Is the wrapped type a primitive other than float, double, or void? */
-    public boolean isIntegral()    { return isNumeric() && format < Format.FLOAT; }
-    /** Is the wrapped type one of int, boolean, byte, char, or short? */
-    public boolean isSubwordOrInt() { return isIntegral() && isSingleWord(); }
-    /* Is the wrapped value a signed integral type (one of byte, short, int, or long)? */
-    public boolean isSigned()      { return format < Format.VOID; }
-    /* Is the wrapped value an unsigned integral type (one of boolean or char)? */
-    public boolean isUnsigned()    { return format >= Format.BOOLEAN && format < Format.FLOAT; }
-    /** Is the wrapped type either float or double? */
-    public boolean isFloating()    { return format >= Format.FLOAT; }
-
-    /** Does the JVM verifier allow a variable of this wrapper's
-     *  primitive type to be assigned from a value of the given wrapper's primitive type?
-     *  Cases:
-     *  <ul>
-     *  <li>unboxing followed by widening primitive conversion
-     *  <li>any type converted to {@code void}
-     *  <li>boxing conversion followed by widening reference conversion to {@code Object}
-     *  <li>conversion of {@code boolean} to any type
-     *  </ul>
-     */
-    public boolean isConvertibleFrom(Wrapper source) {
-        if (this == source)  return true;
-        if (this.compareTo(source) < 0) {
-            // At best, this is a narrowing conversion.
-            return false;
-        }
-        if ((this.format ^ source.format) == (Format.SHORT ^ Format.CHAR)) {
-            assert (this == SHORT && source == CHAR) || (this == CHAR && source == SHORT);
-            return false;
-        }
-        return true;
-    }
-
-    /** Produce a zero value for the given wrapper type.
-     *  This will be a numeric zero for a number or character,
-     *  false for a boolean, and null for a reference or void.
-     *  The common thread is that this is what is contained
-     *  in a default-initialized variable of the given primitive
-     *  type.  (For void, it is what a reflective method returns
-     *  instead of no value at all.)
-     */
-    public Object zero() { return zero; }
-
-    /** Produce a zero value for the given wrapper type T.
-     *  The optional argument must a type compatible with this wrapper.
-     *  Equivalent to {@code this.cast(this.zero(), type)}.
-     */
-    public <T> T zero(Class<T> type) { return convert(zero, type); }
-
-//    /** Produce a wrapper for the given wrapper or primitive type. */
-//    public static Wrapper valueOf(Class<?> type) {
-//        if (isPrimitiveType(type))
-//            return forPrimitiveType(type);
-//        else
-//            return forWrapperType(type);
-//    }
-
-    /** Return the wrapper that wraps values of the given type.
-     *  The type may be {@code Object}, meaning the {@code OBJECT} wrapper.
-     *  Otherwise, the type must be a primitive.
-     *  @throws IllegalArgumentException for unexpected types
-     */
-    public static Wrapper forPrimitiveType(Class<?> type) {
-        Wrapper w = findPrimitiveType(type);
-        if (w != null)  return w;
-        if (type.isPrimitive())
-            throw new InternalError(); // redo hash function
-        throw newIllegalArgumentException("not primitive: "+type);
-    }
-
-    static Wrapper findPrimitiveType(Class<?> type) {
-        Wrapper w = FROM_PRIM[hashPrim(type)];
-        if (w != null && w.primitiveType == type) {
-            return w;
-        }
-        return null;
-    }
-
-    /** Return the wrapper that wraps values into the given wrapper type.
-     *  If it is {@code Object} or an interface, return {@code OBJECT}.
-     *  Otherwise, it must be a wrapper type.
-     *  The type must not be a primitive type.
-     *  @throws IllegalArgumentException for unexpected types
-     */
-    public static Wrapper forWrapperType(Class<?> type) {
-        Wrapper w = findWrapperType(type);
-        if (w != null)  return w;
-        for (Wrapper x : values())
-            if (x.wrapperType == type)
-                throw new InternalError(); // redo hash function
-        throw newIllegalArgumentException("not wrapper: "+type);
-    }
-
-    static Wrapper findWrapperType(Class<?> type) {
-        Wrapper w = FROM_WRAP[hashWrap(type)];
-        if (w != null && w.wrapperType == type) {
-            return w;
-        }
-        if (type.isInterface())
-            return OBJECT;
-        return null;
-    }
-
-    /** Return the wrapper that corresponds to the given bytecode
-     *  signature character.  Return {@code OBJECT} for the character 'L'.
-     *  @throws IllegalArgumentException for any non-signature character or {@code '['}.
-     */
-    public static Wrapper forBasicType(char type) {
-        Wrapper w = FROM_CHAR[hashChar(type)];
-        if (w != null && w.basicTypeChar == type) {
-            return w;
-        }
-        for (Wrapper x : values())
-            if (w.basicTypeChar == type)
-                throw new InternalError(); // redo hash function
-        throw newIllegalArgumentException("not basic type char: "+type);
-    }
-
-    /** Return the wrapper for the given type, if it is
-     *  a primitive type, else return {@code OBJECT}.
-     */
-    public static Wrapper forBasicType(Class<?> type) {
-        if (type.isPrimitive())
-            return forPrimitiveType(type);
-        return OBJECT;  // any reference, including wrappers or arrays
-    }
-
-    // Note on perfect hashes:
-    //   for signature chars c, do (c + (c >> 1)) % 16
-    //   for primitive type names n, do (n[0] + n[2]) % 16
-    // The type name hash works for both primitive and wrapper names.
-    // You can add "java/lang/Object" to the primitive names.
-    // But you add the wrapper name Object, use (n[2] + (3*n[1])) % 16.
-    private static final Wrapper[] FROM_PRIM = new Wrapper[16];
-    private static final Wrapper[] FROM_WRAP = new Wrapper[16];
-    private static final Wrapper[] FROM_CHAR = new Wrapper[16];
-    private static int hashPrim(Class<?> x) {
-        String xn = x.getName();
-        if (xn.length() < 3)  return 0;
-        return (xn.charAt(0) + xn.charAt(2)) % 16;
-    }
-    private static int hashWrap(Class<?> x) {
-        String xn = x.getName();
-        final int offset = 10; assert(offset == "java.lang.".length());
-        if (xn.length() < offset+3)  return 0;
-        return (3*xn.charAt(offset+1) + xn.charAt(offset+2)) % 16;
-    }
-    private static int hashChar(char x) {
-        return (x + (x >> 1)) % 16;
-    }
-    static {
-        for (Wrapper w : values()) {
-            int pi = hashPrim(w.primitiveType);
-            int wi = hashWrap(w.wrapperType);
-            int ci = hashChar(w.basicTypeChar);
-            assert(FROM_PRIM[pi] == null);
-            assert(FROM_WRAP[wi] == null);
-            assert(FROM_CHAR[ci] == null);
-            FROM_PRIM[pi] = w;
-            FROM_WRAP[wi] = w;
-            FROM_CHAR[ci] = w;
-        }
-        //assert(jdk.sun.dyn.util.WrapperTest.test(false));
-    }
-
-    /** What is the primitive type wrapped by this wrapper? */
-    public Class<?> primitiveType() { return primitiveType; }
-
-    /** What is the wrapper type for this wrapper? */
-    public Class<?> wrapperType() { return wrapperType; }
-
-    /** What is the wrapper type for this wrapper?
-     * Otherwise, the example type must be the wrapper type,
-     * or the corresponding primitive type.
-     * (For {@code OBJECT}, the example type can be any non-primitive,
-     * and is normalized to {@code Object.class}.)
-     * The resulting class type has the same type parameter.
-     */
-    public <T> Class<T> wrapperType(Class<T> exampleType) {
-        if (exampleType == wrapperType) {
-            return exampleType;
-        } else if (exampleType == primitiveType ||
-                   wrapperType == Object.class ||
-                   exampleType.isInterface()) {
-            return forceType(wrapperType, exampleType);
-        }
-        throw newClassCastException(exampleType, primitiveType);
-    }
-
-    private static ClassCastException newClassCastException(Class<?> actual, Class<?> expected) {
-        return new ClassCastException(actual + " is not compatible with " + expected);
-    }
-
-    /** If {@code type} is a primitive type, return the corresponding
-     *  wrapper type, else return {@code type} unchanged.
-     */
-    public static <T> Class<T> asWrapperType(Class<T> type) {
-        if (type.isPrimitive()) {
-            return forPrimitiveType(type).wrapperType(type);
-        }
-        return type;
-    }
-
-    /** If {@code type} is a wrapper type, return the corresponding
-     *  primitive type, else return {@code type} unchanged.
-     */
-    public static <T> Class<T> asPrimitiveType(Class<T> type) {
-        Wrapper w = findWrapperType(type);
-        if (w != null) {
-            return forceType(w.primitiveType(), type);
-        }
-        return type;
-    }
-
-    /** Query:  Is the given type a wrapper, such as {@code Integer} or {@code Void}? */
-    public static boolean isWrapperType(Class<?> type) {
-        return findWrapperType(type) != null;
-    }
-
-    /** Query:  Is the given type a primitive, such as {@code int} or {@code void}? */
-    public static boolean isPrimitiveType(Class<?> type) {
-        return type.isPrimitive();
-    }
-
-    /** What is the bytecode signature character for this type?
-     *  All non-primitives, including array types, report as 'L', the signature character for references.
-     */
-    public static char basicTypeChar(Class<?> type) {
-        if (!type.isPrimitive())
-            return 'L';
-        else
-            return forPrimitiveType(type).basicTypeChar();
-    }
-
-    /** What is the bytecode signature character for this wrapper's
-     *  primitive type?
-     */
-    public char basicTypeChar() { return basicTypeChar; }
-
-    /** What is the simple name of the wrapper type?
-     */
-    public String simpleName() { return simpleName; }
-
-//    /** Wrap a value in the given type, which may be either a primitive or wrapper type.
-//     *  Performs standard primitive conversions, including truncation and float conversions.
-//     */
-//    public static <T> T wrap(Object x, Class<T> type) {
-//        return Wrapper.valueOf(type).cast(x, type);
-//    }
-
-    /** Cast a wrapped value to the given type, which may be either a primitive or wrapper type.
-     *  The given target type must be this wrapper's primitive or wrapper type.
-     *  If this wrapper is OBJECT, the target type may also be an interface, perform no runtime check.
-     *  Performs standard primitive conversions, including truncation and float conversions.
-     *  The given type must be compatible with this wrapper.  That is, it must either
-     *  be the wrapper type (or a subtype, in the case of {@code OBJECT}) or else
-     *  it must be the wrapper's primitive type.
-     *  Primitive conversions are only performed if the given type is itself a primitive.
-     *  @throws ClassCastException if the given type is not compatible with this wrapper
-     */
-    public <T> T cast(Object x, Class<T> type) {
-        return convert(x, type, true);
-    }
-
-    /** Convert a wrapped value to the given type.
-     *  The given target type must be this wrapper's primitive or wrapper type.
-     *  This is equivalent to {@link #cast}, except that it refuses to perform
-     *  narrowing primitive conversions.
-     */
-    public <T> T convert(Object x, Class<T> type) {
-        return convert(x, type, false);
-    }
-
-    private <T> T convert(Object x, Class<T> type, boolean isCast) {
-        if (this == OBJECT) {
-            // If the target wrapper is OBJECT, just do a reference cast.
-            // If the target type is an interface, perform no runtime check.
-            // (This loophole is safe, and is allowed by the JVM verifier.)
-            // If the target type is a primitive, change it to a wrapper.
-            @SuppressWarnings("unchecked")
-            T result = (T) x;  // unchecked warning is expected here
-            return result;
-        }
-        Class<T> wtype = wrapperType(type);
-        if (wtype.isInstance(x)) {
-            @SuppressWarnings("unchecked")
-            T result = (T) x;  // unchecked warning is expected here
-            return result;
-        }
-        Class<?> sourceType = x.getClass();  // throw NPE if x is null
-        if (!isCast) {
-            Wrapper source = findWrapperType(sourceType);
-            if (source == null || !this.isConvertibleFrom(source)) {
-                throw newClassCastException(wtype, sourceType);
-            }
-        }
-        @SuppressWarnings("unchecked")
-        T result = (T) wrap(x);  // unchecked warning is expected here
-        assert result.getClass() == wtype;
-        return result;
-    }
-
-    /** Cast a reference type to another reference type.
-     * If the target type is an interface, perform no runtime check.
-     * (This loophole is safe, and is allowed by the JVM verifier.)
-     * If the target type is a primitive, change it to a wrapper.
-     */
-    static <T> Class<T> forceType(Class<?> type, Class<T> exampleType) {
-        boolean z = (type == exampleType ||
-               type.isPrimitive() && forPrimitiveType(type) == findWrapperType(exampleType) ||
-               exampleType.isPrimitive() && forPrimitiveType(exampleType) == findWrapperType(type) ||
-               type == Object.class && !exampleType.isPrimitive());
-        if (!z)
-            System.out.println(type+" <= "+exampleType);
-        assert(type == exampleType ||
-               type.isPrimitive() && forPrimitiveType(type) == findWrapperType(exampleType) ||
-               exampleType.isPrimitive() && forPrimitiveType(exampleType) == findWrapperType(type) ||
-               type == Object.class && !exampleType.isPrimitive());
-        @SuppressWarnings("unchecked")
-        Class<T> result = (Class<T>) type;  // unchecked warning is expected here
-        return result;
-    }
-
-    /** Wrap a value in this wrapper's type.
-     * Performs standard primitive conversions, including truncation and float conversions.
-     * Performs returns the unchanged reference for {@code OBJECT}.
-     * Returns null for {@code VOID}.
-     * Returns a zero value for a null input.
-     * @throws ClassCastException if this wrapper is numeric and the operand
-     *                            is not a number, character, boolean, or null
-     */
-    public Object wrap(Object x) {
-        // do non-numeric wrappers first
-        switch (basicTypeChar) {
-            case 'L': return x;
-            case 'V': return null;
-        }
-        Number xn = numberValue(x);
-        switch (basicTypeChar) {
-            case 'I': return Integer.valueOf(xn.intValue());
-            case 'J': return Long.valueOf(xn.longValue());
-            case 'F': return Float.valueOf(xn.floatValue());
-            case 'D': return Double.valueOf(xn.doubleValue());
-            case 'S': return Short.valueOf((short) xn.intValue());
-            case 'B': return Byte.valueOf((byte) xn.intValue());
-            case 'C': return Character.valueOf((char) xn.intValue());
-            case 'Z': return Boolean.valueOf(boolValue(xn.longValue()));
-        }
-        throw new InternalError("bad wrapper");
-    }
-
-    /** Wrap a value (an int or smaller value) in this wrapper's type.
-     * Performs standard primitive conversions, including truncation and float conversions.
-     * Produces an {@code Integer} for {@code OBJECT}, although the exact type
-     * of the operand is not known.
-     * Returns null for {@code VOID}.
-     */
-    public Object wrap(int x) {
-        if (basicTypeChar == 'L')  return (Integer)x;
-        switch (basicTypeChar) {
-            case 'L': throw newIllegalArgumentException("cannot wrap to object type");
-            case 'V': return null;
-            case 'I': return Integer.valueOf((int)x);
-            case 'J': return Long.valueOf(x);
-            case 'F': return Float.valueOf(x);
-            case 'D': return Double.valueOf(x);
-            case 'S': return Short.valueOf((short) x);
-            case 'B': return Byte.valueOf((byte) x);
-            case 'C': return Character.valueOf((char) x);
-            case 'Z': return Boolean.valueOf(boolValue(x));
-        }
-        throw new InternalError("bad wrapper");
-    }
-
-    /** Wrap a value (a long or smaller value) in this wrapper's type.
-     * Does not perform floating point conversion.
-     * Produces a {@code Long} for {@code OBJECT}, although the exact type
-     * of the operand is not known.
-     * Returns null for {@code VOID}.
-     */
-    public Object wrapRaw(long x) {
-        switch (basicTypeChar) {
-            case 'F':  return Float.valueOf(Float.intBitsToFloat((int)x));
-            case 'D':  return Double.valueOf(Double.longBitsToDouble(x));
-            case 'L':  // same as 'J':
-            case 'J':  return (Long) x;
-        }
-        // Other wrapping operations are just the same, given that the
-        // operand is already promoted to an int.
-        return wrap((int)x);
-    }
-
-    /** Produce bitwise value which encodes the given wrapped value.
-     * Does not perform floating point conversion.
-     * Returns zero for {@code VOID}.
-     */
-    public long unwrapRaw(Object x) {
-        switch (basicTypeChar) {
-            case 'F':  return Float.floatToRawIntBits((Float) x);
-            case 'D':  return Double.doubleToRawLongBits((Double) x);
-
-            case 'L': throw newIllegalArgumentException("cannot unwrap from sobject type");
-            case 'V': return 0;
-            case 'I': return (int)(Integer) x;
-            case 'J': return (long)(Long) x;
-            case 'S': return (short)(Short) x;
-            case 'B': return (byte)(Byte) x;
-            case 'C': return (char)(Character) x;
-            case 'Z': return (boolean)(Boolean) x ? 1 : 0;
-        }
-        throw new InternalError("bad wrapper");
-    }
-
-    /** Report what primitive type holds this guy's raw value. */
-    public Class<?> rawPrimitiveType() {
-        return rawPrimitive().primitiveType();
-    }
-
-    /** Report, as a wrapper, what primitive type holds this guy's raw value.
-     *  Returns self for INT, LONG, OBJECT; returns LONG for DOUBLE,
-     *  else returns INT.
-     */
-    public Wrapper rawPrimitive() {
-        switch (basicTypeChar) {
-            case 'S': case 'B':
-            case 'C': case 'Z':
-            case 'V':
-            case 'F':
-                return INT;
-            case 'D':
-                return LONG;
-        }
-        return this;
-    }
-
-    private static Number numberValue(Object x) {
-        if (x instanceof Number)     return (Number)x;
-        if (x instanceof Character)  return (int)(Character)x;
-        if (x instanceof Boolean)    return (Boolean)x ? 1 : 0;
-        // Remaining allowed case of void:  Must be a null reference.
-        return (Number)x;
-    }
-
-    private static boolean boolValue(long bits) {
-        //bits &= 1;  // simple 31-bit zero extension
-        return (bits != 0);
-    }
-
-    private static RuntimeException newIllegalArgumentException(String message, Object x) {
-        return newIllegalArgumentException(message + x);
-    }
-    private static RuntimeException newIllegalArgumentException(String message) {
-        return new IllegalArgumentException(message);
-    }
-}
--- a/src/share/classes/sun/dyn/util/package-info.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 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.
- */
-
-/**
- * Extra support for using JSR 292 RI, package java.dyn.
- * @author jrose
- */
-
-package sun.dyn.util;
--- a/src/share/classes/sun/font/FontUtilities.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/font/FontUtilities.java	Wed Apr 20 04:38:36 2011 +0100
@@ -30,6 +30,8 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStreamReader;
+import java.lang.ref.SoftReference;
+import java.util.concurrent.ConcurrentHashMap;
 import java.security.AccessController;
 
 import java.security.PrivilegedAction;
@@ -383,6 +385,10 @@
      * }
      * return fuir;
      */
+    private static volatile
+        SoftReference<ConcurrentHashMap<PhysicalFont, CompositeFont>>
+        compMapRef = new SoftReference(null);
+
     public static FontUIResource getCompositeFontUIResource(Font font) {
 
         FontUIResource fuir = new FontUIResource(font);
@@ -402,12 +408,22 @@
 
         FontManager fm = FontManagerFactory.getInstance();
         CompositeFont dialog2D =
-          (CompositeFont) fm.findFont2D("dialog", font.getStyle(), FontManager.NO_FALLBACK);
+          (CompositeFont) fm.findFont2D("dialog", font.getStyle(),
+                                        FontManager.NO_FALLBACK);
         if (dialog2D == null) { /* shouldn't happen */
             return fuir;
         }
         PhysicalFont physicalFont = (PhysicalFont)font2D;
-        CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
+        ConcurrentHashMap<PhysicalFont, CompositeFont> compMap = compMapRef.get();
+        if (compMap == null) { // Its been collected.
+            compMap = new ConcurrentHashMap<PhysicalFont, CompositeFont>();
+            compMapRef = new SoftReference(compMap);
+        }
+        CompositeFont compFont = compMap.get(physicalFont);
+        if (compFont == null) {
+            compFont = new CompositeFont(physicalFont, dialog2D);
+            compMap.put(physicalFont, compFont);
+        }
         FontAccess.getFontAccess().setFont2D(fuir, compFont.handle);
         /* marking this as a created font is needed as only created fonts
          * copy their creator's handles.
--- a/src/share/classes/sun/font/StrikeCache.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/font/StrikeCache.java	Wed Apr 20 04:38:36 2011 +0100
@@ -319,8 +319,7 @@
                 ArrayList<Long> gids = null;
 
                 for (int i = 0; i < glyphPtrs.length; i++) {
-                    if (glyphPtrs[i] != 0 && unsafe.getByte(glyphPtrs[i] + managedOffset) == 0
-                            && unsafe.getInt(glyphPtrs[i] + cacheCellOffset) != 0) {
+                    if (glyphPtrs[i] != 0 && unsafe.getByte(glyphPtrs[i] + managedOffset) == 0) {
 
                         if (gids == null) {
                             gids = new ArrayList<Long>();
@@ -330,6 +329,8 @@
                 }
 
                 if (gids != null) {
+                    // Any reference by the disposers to the native glyph ptrs
+                    // must be done before this returns.
                     notifyDisposeListeners(gids);
                 }
             }
@@ -345,8 +346,7 @@
 
                 for (int i=0; i < glyphPtrs.length; i++) {
                     if (glyphPtrs[i] != 0
-                            && unsafe.getByte(glyphPtrs[i] + managedOffset) == 0
-                            && unsafe.getInt(glyphPtrs[i] + cacheCellOffset) != 0) {
+                            && unsafe.getByte(glyphPtrs[i] + managedOffset) == 0) {
 
                         if (gids == null) {
                             gids = new ArrayList<Long>();
@@ -356,6 +356,8 @@
                 }
 
                 if (gids != null) {
+                    // Any reference by the disposers to the native glyph ptrs
+                    // must be done before this returns.
                     notifyDisposeListeners(gids);
                 }
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/WrapperInstance.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2011, 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 sun.invoke;
+
+import java.lang.invoke.MethodHandle;
+
+/**
+ * Private API used inside of java.lang.invoke.MethodHandles.
+ * Interface implemented by every object which is produced by
+ * {@link java.lang.invoke.MethodHandles#asInstance MethodHandles.asInstance}.
+ * The methods of this interface allow a caller to recover the parameters
+ * to {@code asInstance}.
+ * This allows applications to repeatedly convert between method handles
+ * and SAM objects, without the risk of creating unbounded delegation chains.
+ */
+public interface WrapperInstance {
+    /** Produce or recover a target method handle which is behaviorally
+     *  equivalent to the SAM method of this object.
+     */
+    public MethodHandle getWrapperInstanceTarget();
+    /** Recover the SAM type for which this object was created.
+     */
+    public Class<?> getWrapperInstanceType();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.anon;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import sun.misc.IOUtils;
+
+/**
+ * Anonymous class loader.  Will load any valid classfile, producing
+ * a {@link Class} metaobject, without installing that class in the
+ * system dictionary.  Therefore, {@link Class#forName(String)} will never
+ * produce a reference to an anonymous class.
+ * <p>
+ * The access permissions of the anonymous class are borrowed from
+ * a <em>host class</em>.  The new class behaves as if it were an
+ * inner class of the host class.  It can access the host's private
+ * members, if the creator of the class loader has permission to
+ * do so (or to create accessible reflective objects).
+ * <p>
+ * When the anonymous class is loaded, elements of its constant pool
+ * can be patched to new values.  This provides a hook to pre-resolve
+ * named classes in the constant pool to other classes, including
+ * anonymous ones.  Also, string constants can be pre-resolved to
+ * any reference.  (The verifier treats non-string, non-class reference
+ * constants as plain objects.)
+ *  <p>
+ * Why include the patching function?  It makes some use cases much easier.
+ * Second, the constant pool needed some internal patching anyway,
+ * to anonymize the loaded class itself.  Finally, if you are going
+ * to use this seriously, you'll want to build anonymous classes
+ * on top of pre-existing anonymous classes, and that requires patching.
+ *
+ * <p>%%% TO-DO:
+ * <ul>
+ * <li>needs better documentation</li>
+ * <li>needs more security work (for safe delegation)</li>
+ * <li>needs a clearer story about error processing</li>
+ * <li>patch member references also (use ';' as delimiter char)</li>
+ * <li>patch method references to (conforming) method handles</li>
+ * </ul>
+ *
+ * @author jrose
+ * @author Remi Forax
+ * @see <a href="http://blogs.sun.com/jrose/entry/anonymous_classes_in_the_vm">
+ *      http://blogs.sun.com/jrose/entry/anonymous_classes_in_the_vm</a>
+ */
+
+public class AnonymousClassLoader {
+    final Class<?> hostClass;
+
+    // Note: Do not refactor the calls to checkHostClass unless you
+    //       also adjust this constant:
+    private static int CHC_CALLERS = 3;
+
+    public AnonymousClassLoader() {
+        this.hostClass = checkHostClass(null);
+    }
+    public AnonymousClassLoader(Class<?> hostClass) {
+        this.hostClass = checkHostClass(hostClass);
+    }
+
+    private static Class<?> getTopLevelClass(Class<?> clazz) {
+      for(Class<?> outer = clazz.getDeclaringClass(); outer != null;
+          outer = outer.getDeclaringClass()) {
+        clazz = outer;
+      }
+      return clazz;
+    }
+
+    private static Class<?> checkHostClass(Class<?> hostClass) {
+        // called only from the constructor
+        // does a context-sensitive check on caller class
+        // CC[0..3] = {Reflection, this.checkHostClass, this.<init>, caller}
+        Class<?> caller = sun.reflect.Reflection.getCallerClass(CHC_CALLERS);
+
+        if (caller == null) {
+            // called from the JVM directly
+            if (hostClass == null)
+                return AnonymousClassLoader.class; // anything central will do
+            return hostClass;
+        }
+
+        if (hostClass == null)
+            hostClass = caller; // default value is caller itself
+
+        // anonymous class will access hostClass on behalf of caller
+        Class<?> callee = hostClass;
+
+        if (caller == callee)
+            // caller can always nominate itself to grant caller's own access rights
+            return hostClass;
+
+        // normalize caller and callee to their top-level classes:
+        caller = getTopLevelClass(caller);
+        callee = getTopLevelClass(callee);
+        if (caller == callee)
+            return caller;
+
+        ClassLoader callerCL = caller.getClassLoader();
+        if (callerCL == null) {
+            // caller is trusted code, so accept the proposed hostClass
+            return hostClass;
+        }
+
+        // %%% should do something with doPrivileged, because trusted
+        // code should have a way to execute on behalf of
+        // partially-trusted clients
+
+        // Does the caller have the right to access the private
+        // members of the callee?  If not, raise an error.
+        final int ACC_PRIVATE = 2;
+        try {
+            sun.reflect.Reflection.ensureMemberAccess(caller, callee, null, ACC_PRIVATE);
+        } catch (IllegalAccessException ee) {
+            throw new IllegalArgumentException(ee);
+        }
+
+        return hostClass;
+    }
+
+    public Class<?> loadClass(byte[] classFile) {
+        if (defineAnonymousClass == null) {
+            // no JVM support; try to fake an approximation
+            try {
+                return fakeLoadClass(new ConstantPoolParser(classFile).createPatch());
+            } catch (InvalidConstantPoolFormatException ee) {
+                throw new IllegalArgumentException(ee);
+            }
+        }
+        return loadClass(classFile, null);
+    }
+
+    public Class<?> loadClass(ConstantPoolPatch classPatch) {
+        if (defineAnonymousClass == null) {
+            // no JVM support; try to fake an approximation
+            return fakeLoadClass(classPatch);
+        }
+        Object[] patches = classPatch.patchArray;
+        // Convert class names (this late in the game)
+        // to use slash '/' instead of dot '.'.
+        // Java likes dots, but the JVM likes slashes.
+        for (int i = 0; i < patches.length; i++) {
+            Object value = patches[i];
+            if (value != null) {
+                byte tag = classPatch.getTag(i);
+                switch (tag) {
+                case ConstantPoolVisitor.CONSTANT_Class:
+                    if (value instanceof String) {
+                        if (patches == classPatch.patchArray)
+                            patches = patches.clone();
+                        patches[i] = ((String)value).replace('.', '/');
+                    }
+                    break;
+                case ConstantPoolVisitor.CONSTANT_Fieldref:
+                case ConstantPoolVisitor.CONSTANT_Methodref:
+                case ConstantPoolVisitor.CONSTANT_InterfaceMethodref:
+                case ConstantPoolVisitor.CONSTANT_NameAndType:
+                    // When/if the JVM supports these patches,
+                    // we'll probably need to reformat them also.
+                    // Meanwhile, let the class loader create the error.
+                    break;
+                }
+            }
+        }
+        return loadClass(classPatch.outer.classFile, classPatch.patchArray);
+    }
+
+    private Class<?> loadClass(byte[] classFile, Object[] patchArray) {
+        try {
+            return (Class<?>)
+                defineAnonymousClass.invoke(unsafe,
+                                            hostClass, classFile, patchArray);
+        } catch (Exception ex) {
+            throwReflectedException(ex);
+            throw new RuntimeException("error loading into "+hostClass, ex);
+        }
+    }
+
+    private static void throwReflectedException(Exception ex) {
+        if (ex instanceof InvocationTargetException) {
+            Throwable tex = ((InvocationTargetException)ex).getTargetException();
+            if (tex instanceof Error)
+                throw (Error) tex;
+            ex = (Exception) tex;
+        }
+        if (ex instanceof RuntimeException) {
+            throw (RuntimeException) ex;
+        }
+    }
+
+    private Class<?> fakeLoadClass(ConstantPoolPatch classPatch) {
+        // Implementation:
+        // 1. Make up a new name nobody has used yet.
+        // 2. Inspect the tail-header of the class to find the this_class index.
+        // 3. Patch the CONSTANT_Class for this_class to the new name.
+        // 4. Add other CP entries required by (e.g.) string patches.
+        // 5. Flatten Class constants down to their names, making sure that
+        //    the host class loader can pick them up again accurately.
+        // 6. Generate the edited class file bytes.
+        //
+        // Potential limitations:
+        // * The class won't be truly anonymous, and may interfere with others.
+        // * Flattened class constants might not work, because of loader issues.
+        // * Pseudo-string constants will not flatten down to real strings.
+        // * Method handles will (of course) fail to flatten to linkage strings.
+        if (true)  throw new UnsupportedOperationException("NYI");
+        Object[] cpArray;
+        try {
+            cpArray = classPatch.getOriginalCP();
+        } catch (InvalidConstantPoolFormatException ex) {
+            throw new RuntimeException(ex);
+        }
+        int thisClassIndex = classPatch.getParser().getThisClassIndex();
+        String thisClassName = (String) cpArray[thisClassIndex];
+        synchronized (AnonymousClassLoader.class) {
+            thisClassName = thisClassName+"\\|"+(++fakeNameCounter);
+        }
+        classPatch.putUTF8(thisClassIndex, thisClassName);
+        byte[] classFile = null;
+        return unsafe.defineClass(null, classFile, 0, classFile.length,
+                                  hostClass.getClassLoader(),
+                                  hostClass.getProtectionDomain());
+    }
+    private static int fakeNameCounter = 99999;
+
+    // ignore two warnings on this line:
+    static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
+    // preceding line requires that this class be on the boot class path
+
+    static private final Method defineAnonymousClass;
+    static {
+        Method dac = null;
+        Class<? extends sun.misc.Unsafe> unsafeClass = unsafe.getClass();
+        try {
+            dac = unsafeClass.getMethod("defineAnonymousClass",
+                                        Class.class,
+                                        byte[].class,
+                                        Object[].class);
+        } catch (Exception ee) {
+            dac = null;
+        }
+        defineAnonymousClass = dac;
+    }
+
+    private static void noJVMSupport() {
+        throw new UnsupportedOperationException("no JVM support for anonymous classes");
+    }
+
+
+    private static native Class<?> loadClassInternal(Class<?> hostClass,
+                                                     byte[] classFile,
+                                                     Object[] patchArray);
+
+    public static byte[] readClassFile(Class<?> templateClass) throws IOException {
+        String templateName = templateClass.getName();
+        int lastDot = templateName.lastIndexOf('.');
+        java.net.URL url = templateClass.getResource(templateName.substring(lastDot+1)+".class");
+        java.net.URLConnection connection = url.openConnection();
+        int contentLength = connection.getContentLength();
+        if (contentLength < 0)
+            throw new IOException("invalid content length "+contentLength);
+
+        return IOUtils.readFully(connection.getInputStream(), contentLength, true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/anon/ConstantPoolParser.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,368 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.anon;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.BufferUnderflowException;
+import java.nio.ByteBuffer;
+
+import static sun.invoke.anon.ConstantPoolVisitor.*;
+
+/** A constant pool parser.
+ */
+public class ConstantPoolParser {
+    final byte[] classFile;
+    final byte[] tags;
+    final char[] firstHeader;  // maghi, maglo, minor, major, cplen
+
+    // these are filled in on first parse:
+    int endOffset;
+    char[] secondHeader;       // flags, this_class, super_class, intlen
+
+    // used to decode UTF8 array
+    private char[] charArray = new char[80];
+
+    /** Creates a constant pool parser.
+     * @param classFile an array of bytes containing a class.
+     * @throws InvalidConstantPoolFormatException if the header of the class has errors.
+     */
+    public ConstantPoolParser(byte[] classFile) throws InvalidConstantPoolFormatException {
+        this.classFile = classFile;
+        this.firstHeader = parseHeader(classFile);
+        this.tags = new byte[firstHeader[4]];
+    }
+
+    /** Create a constant pool parser by loading the bytecodes of the
+     *  class taken as argument.
+     *
+     * @param templateClass the class to parse.
+     *
+     * @throws IOException raised if an I/O occurs when loading
+     *  the bytecode of the template class.
+     * @throws InvalidConstantPoolFormatException if the header of the class has errors.
+     *
+     * @see #ConstantPoolParser(byte[])
+     * @see AnonymousClassLoader#readClassFile(Class)
+     */
+    public ConstantPoolParser(Class<?> templateClass) throws IOException, InvalidConstantPoolFormatException {
+        this(AnonymousClassLoader.readClassFile(templateClass));
+    }
+
+    /** Creates an empty patch to patch the class file
+     *  used by the current parser.
+     * @return a new class patch.
+     */
+    public ConstantPoolPatch createPatch() {
+        return new ConstantPoolPatch(this);
+    }
+
+    /** Report the tag of the indicated CP entry.
+     * @param index
+     * @return one of {@link ConstantPoolVisitor#CONSTANT_Utf8}, etc.
+     */
+    public byte getTag(int index) {
+        getEndOffset();  // trigger an exception if we haven't parsed yet
+        return tags[index];
+    }
+
+    /** Report the length of the constant pool. */
+    public int getLength() {
+        return firstHeader[4];
+    }
+
+    /** Report the offset, within the class file, of the start of the constant pool. */
+    public int getStartOffset() {
+        return firstHeader.length * 2;
+    }
+
+    /** Report the offset, within the class file, of the end of the constant pool. */
+    public int getEndOffset() {
+        if (endOffset == 0)
+            throw new IllegalStateException("class file has not yet been parsed");
+        return endOffset;
+    }
+
+    /** Report the CP index of this class's own name. */
+    public int getThisClassIndex() {
+        getEndOffset();   // provoke exception if not yet parsed
+        return secondHeader[1];
+    }
+
+    /** Report the total size of the class file. */
+    public int getTailLength() {
+        return classFile.length - getEndOffset();
+    }
+
+    /** Write the head (header plus constant pool)
+     *  of the class file to the indicated stream.
+     */
+    public void writeHead(OutputStream out) throws IOException {
+        out.write(classFile, 0, getEndOffset());
+    }
+
+    /** Write the head (header plus constant pool)
+     *  of the class file to the indicated stream,
+     *  incorporating the non-null entries of the given array
+     *  as patches.
+     */
+    void writePatchedHead(OutputStream out, Object[] patchArray) {
+        // this will be useful to partially emulate the class loader on old JVMs
+        throw new UnsupportedOperationException("Not yet implemented");
+    }
+
+    /** Write the tail (everything after the constant pool)
+     *  of the class file to the indicated stream.
+     */
+    public void writeTail(OutputStream out) throws IOException {
+        out.write(classFile, getEndOffset(), getTailLength());
+    }
+
+    private static char[] parseHeader(byte[] classFile) throws InvalidConstantPoolFormatException {
+        char[] result = new char[5];
+        ByteBuffer buffer = ByteBuffer.wrap(classFile);
+        for (int i = 0; i < result.length; i++)
+            result[i] = (char) getUnsignedShort(buffer);
+        int magic = result[0] << 16 | result[1] << 0;
+        if (magic != 0xCAFEBABE)
+            throw new InvalidConstantPoolFormatException("invalid magic number "+magic);
+        // skip major, minor version
+        int len = result[4];
+        if (len < 1)
+            throw new InvalidConstantPoolFormatException("constant pool length < 1");
+        return result;
+    }
+
+    /** Parse the constant pool of the class
+     *  calling a method visit* each time a constant pool entry is parsed.
+     *
+     *  The order of the calls to visit* is not guaranteed to be the same
+     *  than the order of the constant pool entry in the bytecode array.
+     *
+     * @param visitor
+     * @throws InvalidConstantPoolFormatException
+     */
+    public void parse(ConstantPoolVisitor visitor) throws InvalidConstantPoolFormatException {
+        ByteBuffer buffer = ByteBuffer.wrap(classFile);
+        buffer.position(getStartOffset()); //skip header
+
+        Object[] values = new Object[getLength()];
+        try {
+            parseConstantPool(buffer, values, visitor);
+        } catch(BufferUnderflowException e) {
+            throw new InvalidConstantPoolFormatException(e);
+        }
+        if (endOffset == 0) {
+            endOffset = buffer.position();
+            secondHeader = new char[4];
+            for (int i = 0; i < secondHeader.length; i++) {
+                secondHeader[i] = (char) getUnsignedShort(buffer);
+            }
+        }
+        resolveConstantPool(values, visitor);
+    }
+
+    private char[] getCharArray(int utfLength) {
+        if (utfLength <= charArray.length)
+            return charArray;
+        return charArray = new char[utfLength];
+    }
+
+    private void parseConstantPool(ByteBuffer buffer, Object[] values, ConstantPoolVisitor visitor) throws InvalidConstantPoolFormatException {
+        for (int i = 1; i < tags.length; ) {
+            byte tag = (byte) getUnsignedByte(buffer);
+            assert(tags[i] == 0 || tags[i] == tag);
+            tags[i] = tag;
+            switch (tag) {
+                case CONSTANT_Utf8:
+                    int utfLen = getUnsignedShort(buffer);
+                    String value = getUTF8(buffer, utfLen, getCharArray(utfLen));
+                    visitor.visitUTF8(i, CONSTANT_Utf8, value);
+                    tags[i] = tag;
+                    values[i++] = value;
+                    break;
+                case CONSTANT_Integer:
+                    visitor.visitConstantValue(i, tag, buffer.getInt());
+                    i++;
+                    break;
+                case CONSTANT_Float:
+                    visitor.visitConstantValue(i, tag, buffer.getFloat());
+                    i++;
+                    break;
+                case CONSTANT_Long:
+                    visitor.visitConstantValue(i, tag, buffer.getLong());
+                    i+=2;
+                    break;
+                case CONSTANT_Double:
+                    visitor.visitConstantValue(i, tag, buffer.getDouble());
+                    i+=2;
+                    break;
+
+                case CONSTANT_Class:    // fall through:
+                case CONSTANT_String:
+                    tags[i] = tag;
+                    values[i++] = new int[] { getUnsignedShort(buffer) };
+                    break;
+
+                case CONSTANT_Fieldref:           // fall through:
+                case CONSTANT_Methodref:          // fall through:
+                case CONSTANT_InterfaceMethodref: // fall through:
+                case CONSTANT_NameAndType:
+                    tags[i] = tag;
+                    values[i++] = new int[] { getUnsignedShort(buffer), getUnsignedShort(buffer) };
+                    break;
+                default:
+                    throw new AssertionError("invalid constant "+tag);
+            }
+        }
+    }
+
+    private void resolveConstantPool(Object[] values, ConstantPoolVisitor visitor) {
+        // clean out the int[] values, which are temporary
+        for (int beg = 1, end = values.length-1, beg2, end2;
+             beg <= end;
+             beg = beg2, end = end2) {
+             beg2 = end; end2 = beg-1;
+             //System.out.println("CP resolve pass: "+beg+".."+end);
+             for (int i = beg; i <= end; i++) {
+                  Object value = values[i];
+                  if (!(value instanceof int[]))
+                      continue;
+                  int[] array = (int[]) value;
+                  byte tag = tags[i];
+                  switch (tag) {
+                      case CONSTANT_String:
+                          String stringBody = (String) values[array[0]];
+                          visitor.visitConstantString(i, tag, stringBody, array[0]);
+                          values[i] = null;
+                          break;
+                      case CONSTANT_Class: {
+                          String className = (String) values[array[0]];
+                          // use the external form favored by Class.forName:
+                          className = className.replace('/', '.');
+                          visitor.visitConstantString(i, tag, className, array[0]);
+                          values[i] = className;
+                          break;
+                      }
+                      case CONSTANT_NameAndType: {
+                          String memberName = (String) values[array[0]];
+                          String signature  = (String) values[array[1]];
+                          visitor.visitDescriptor(i, tag, memberName, signature,
+                                                  array[0], array[1]);
+                          values[i] = new String[] {memberName, signature};
+                          break;
+                      }
+                      case CONSTANT_Fieldref:           // fall through:
+                      case CONSTANT_Methodref:          // fall through:
+                      case CONSTANT_InterfaceMethodref: {
+                              Object className   = values[array[0]];
+                              Object nameAndType = values[array[1]];
+                              if (!(className instanceof String) ||
+                                  !(nameAndType instanceof String[])) {
+                                   // one more pass is needed
+                                   if (beg2 > i)  beg2 = i;
+                                   if (end2 < i)  end2 = i;
+                                   continue;
+                              }
+                              String[] nameAndTypeArray = (String[]) nameAndType;
+                              visitor.visitMemberRef(i, tag,
+                                  (String)className,
+                                  nameAndTypeArray[0],
+                                  nameAndTypeArray[1],
+                                  array[0], array[1]);
+                              values[i] = null;
+                          }
+                          break;
+                      default:
+                          continue;
+                }
+            }
+        }
+    }
+
+    private static int getUnsignedByte(ByteBuffer buffer) {
+        return buffer.get() & 0xFF;
+    }
+
+    private static int getUnsignedShort(ByteBuffer buffer) {
+        int b1 = getUnsignedByte(buffer);
+        int b2 = getUnsignedByte(buffer);
+        return (b1 << 8) + (b2 << 0);
+    }
+
+    private static String getUTF8(ByteBuffer buffer, int utfLen, char[] charArray) throws InvalidConstantPoolFormatException {
+      int utfLimit = buffer.position() + utfLen;
+      int index = 0;
+      while (buffer.position() < utfLimit) {
+          int c = buffer.get() & 0xff;
+          if (c > 127) {
+              buffer.position(buffer.position() - 1);
+              return getUTF8Extended(buffer, utfLimit, charArray, index);
+          }
+          charArray[index++] = (char)c;
+      }
+      return new String(charArray, 0, index);
+    }
+
+    private static String getUTF8Extended(ByteBuffer buffer, int utfLimit, char[] charArray, int index) throws InvalidConstantPoolFormatException {
+        int c, c2, c3;
+        while (buffer.position() < utfLimit) {
+            c = buffer.get() & 0xff;
+            switch (c >> 4) {
+                case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
+                    /* 0xxxxxxx*/
+                    charArray[index++] = (char)c;
+                    break;
+                case 12: case 13:
+                    /* 110x xxxx   10xx xxxx*/
+                    c2 = buffer.get();
+                    if ((c2 & 0xC0) != 0x80)
+                        throw new InvalidConstantPoolFormatException(
+                            "malformed input around byte " + buffer.position());
+                     charArray[index++] = (char)(((c  & 0x1F) << 6) |
+                                                  (c2 & 0x3F));
+                    break;
+                case 14:
+                    /* 1110 xxxx  10xx xxxx  10xx xxxx */
+                    c2 = buffer.get();
+                    c3 = buffer.get();
+                    if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80))
+                       throw new InvalidConstantPoolFormatException(
+                          "malformed input around byte " + (buffer.position()));
+                    charArray[index++] = (char)(((c  & 0x0F) << 12) |
+                                                ((c2 & 0x3F) << 6)  |
+                                                ((c3 & 0x3F) << 0));
+                    break;
+                default:
+                    /* 10xx xxxx,  1111 xxxx */
+                    throw new InvalidConstantPoolFormatException(
+                        "malformed input around byte " + buffer.position());
+            }
+        }
+        // The number of chars produced may be less than utflen
+        return new String(charArray, 0, index);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/anon/ConstantPoolPatch.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,503 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.anon;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.Map;
+
+import static sun.invoke.anon.ConstantPoolVisitor.*;
+
+/** A class and its patched constant pool.
+ *
+ *  This class allow to modify (patch) a constant pool
+ *  by changing the value of its entry.
+ *  Entry are referenced using index that can be get
+ *  by parsing the constant pool using
+ *  {@link ConstantPoolParser#parse(ConstantPoolVisitor)}.
+ *
+ * @see ConstantPoolVisitor
+ * @see ConstantPoolParser#createPatch()
+ */
+public class ConstantPoolPatch {
+    final ConstantPoolParser outer;
+    final Object[] patchArray;
+
+    ConstantPoolPatch(ConstantPoolParser outer) {
+        this.outer      = outer;
+        this.patchArray = new Object[outer.getLength()];
+    }
+
+    /** Create a {@link ConstantPoolParser} and
+     *  a {@link ConstantPoolPatch} in one step.
+     *  Equivalent to {@code new ConstantPoolParser(classFile).createPatch()}.
+     *
+     * @param classFile an array of bytes containing a class.
+     * @see #ConstantPoolParser(Class)
+     */
+    public ConstantPoolPatch(byte[] classFile) throws InvalidConstantPoolFormatException {
+        this(new ConstantPoolParser(classFile));
+    }
+
+    /** Create a {@link ConstantPoolParser} and
+     *  a {@link ConstantPoolPatch} in one step.
+     *  Equivalent to {@code new ConstantPoolParser(templateClass).createPatch()}.
+     *
+     * @param templateClass the class to parse.
+     * @see #ConstantPoolParser(Class)
+     */
+    public ConstantPoolPatch(Class<?> templateClass) throws IOException, InvalidConstantPoolFormatException {
+        this(new ConstantPoolParser(templateClass));
+    }
+
+
+    /** Creates a patch from an existing patch.
+     *  All changes are copied from that patch.
+     * @param patch a patch
+     *
+     * @see ConstantPoolParser#createPatch()
+     */
+    public ConstantPoolPatch(ConstantPoolPatch patch) {
+        outer      = patch.outer;
+        patchArray = patch.patchArray.clone();
+    }
+
+    /** Which parser built this patch? */
+    public ConstantPoolParser getParser() {
+        return outer;
+    }
+
+    /** Report the tag at the given index in the constant pool. */
+    public byte getTag(int index) {
+        return outer.getTag(index);
+    }
+
+    /** Report the current patch at the given index of the constant pool.
+     *  Null means no patch will be made.
+     *  To observe the unpatched entry at the given index, use
+     *  {@link #getParser()}{@code .}@link ConstantPoolParser#parse(ConstantPoolVisitor)}
+     */
+    public Object getPatch(int index) {
+        Object value = patchArray[index];
+        if (value == null)  return null;
+        switch (getTag(index)) {
+        case CONSTANT_Fieldref:
+        case CONSTANT_Methodref:
+        case CONSTANT_InterfaceMethodref:
+            if (value instanceof String)
+                value = stripSemis(2, (String) value);
+            break;
+        case CONSTANT_NameAndType:
+            if (value instanceof String)
+                value = stripSemis(1, (String) value);
+            break;
+        }
+        return value;
+    }
+
+    /** Clear all patches. */
+    public void clear() {
+        Arrays.fill(patchArray, null);
+    }
+
+    /** Clear one patch. */
+    public void clear(int index) {
+        patchArray[index] = null;
+    }
+
+    /** Produce the patches as an array. */
+    public Object[] getPatches() {
+        return patchArray.clone();
+    }
+
+    /** Produce the original constant pool as an array. */
+    public Object[] getOriginalCP() throws InvalidConstantPoolFormatException {
+        return getOriginalCP(0, patchArray.length, -1);
+    }
+
+    /** Walk the constant pool, applying patches using the given map.
+     *
+     * @param utf8Map Utf8 strings to modify, if encountered
+     * @param classMap Classes (or their names) to modify, if encountered
+     * @param valueMap Constant values to modify, if encountered
+     * @param deleteUsedEntries if true, delete map entries that are used
+     */
+    public void putPatches(final Map<String,String> utf8Map,
+                           final Map<String,Object> classMap,
+                           final Map<Object,Object> valueMap,
+                           boolean deleteUsedEntries) throws InvalidConstantPoolFormatException {
+        final HashSet<String> usedUtf8Keys;
+        final HashSet<String> usedClassKeys;
+        final HashSet<Object> usedValueKeys;
+        if (deleteUsedEntries) {
+            usedUtf8Keys  = (utf8Map  == null) ? null : new HashSet<String>();
+            usedClassKeys = (classMap == null) ? null : new HashSet<String>();
+            usedValueKeys = (valueMap == null) ? null : new HashSet<Object>();
+        } else {
+            usedUtf8Keys = null;
+            usedClassKeys = null;
+            usedValueKeys = null;
+        }
+
+        outer.parse(new ConstantPoolVisitor() {
+
+            @Override
+            public void visitUTF8(int index, byte tag, String utf8) {
+                putUTF8(index, utf8Map.get(utf8));
+                if (usedUtf8Keys != null)  usedUtf8Keys.add(utf8);
+            }
+
+            @Override
+            public void visitConstantValue(int index, byte tag, Object value) {
+                putConstantValue(index, tag, valueMap.get(value));
+                if (usedValueKeys != null)  usedValueKeys.add(value);
+            }
+
+            @Override
+            public void visitConstantString(int index, byte tag, String name, int nameIndex) {
+                if (tag == CONSTANT_Class) {
+                    putConstantValue(index, tag, classMap.get(name));
+                    if (usedClassKeys != null)  usedClassKeys.add(name);
+                } else {
+                    assert(tag == CONSTANT_String);
+                    visitConstantValue(index, tag, name);
+                }
+            }
+        });
+        if (usedUtf8Keys != null)   utf8Map.keySet().removeAll(usedUtf8Keys);
+        if (usedClassKeys != null)  classMap.keySet().removeAll(usedClassKeys);
+        if (usedValueKeys != null)  valueMap.keySet().removeAll(usedValueKeys);
+    }
+
+    Object[] getOriginalCP(final int startIndex,
+                           final int endIndex,
+                           final int tagMask) throws InvalidConstantPoolFormatException {
+        final Object[] cpArray = new Object[endIndex - startIndex];
+        outer.parse(new ConstantPoolVisitor() {
+
+            void show(int index, byte tag, Object value) {
+                if (index < startIndex || index >= endIndex)  return;
+                if (((1 << tag) & tagMask) == 0)  return;
+                cpArray[index - startIndex] = value;
+            }
+
+            @Override
+            public void visitUTF8(int index, byte tag, String utf8) {
+                show(index, tag, utf8);
+            }
+
+            @Override
+            public void visitConstantValue(int index, byte tag, Object value) {
+                assert(tag != CONSTANT_String);
+                show(index, tag, value);
+            }
+
+            @Override
+            public void visitConstantString(int index, byte tag,
+                                            String value, int j) {
+                show(index, tag, value);
+            }
+
+            @Override
+            public void visitMemberRef(int index, byte tag,
+                    String className, String memberName,
+                    String signature,
+                    int j, int k) {
+                show(index, tag, new String[]{ className, memberName, signature });
+            }
+
+            @Override
+            public void visitDescriptor(int index, byte tag,
+                    String memberName, String signature,
+                    int j, int k) {
+                show(index, tag, new String[]{ memberName, signature });
+            }
+        });
+        return cpArray;
+    }
+
+    /** Write the head (header plus constant pool)
+     *  of the patched class file to the indicated stream.
+     */
+    void writeHead(OutputStream out) throws IOException {
+        outer.writePatchedHead(out, patchArray);
+    }
+
+    /** Write the tail (everything after the constant pool)
+     *  of the patched class file to the indicated stream.
+     */
+    void writeTail(OutputStream out) throws IOException {
+        outer.writeTail(out);
+    }
+
+    private void checkConstantTag(byte tag, Object value) {
+        if (value == null)
+            throw new IllegalArgumentException(
+                    "invalid null constant value");
+        if (classForTag(tag) != value.getClass())
+            throw new IllegalArgumentException(
+                    "invalid constant value"
+                    + (tag == CONSTANT_None ? ""
+                        : " for tag "+tagName(tag))
+                    + " of class "+value.getClass());
+    }
+
+    private void checkTag(int index, byte putTag) {
+        byte tag = outer.tags[index];
+        if (tag != putTag)
+            throw new IllegalArgumentException(
+                "invalid put operation"
+                + " for " + tagName(putTag)
+                + " at index " + index + " found " + tagName(tag));
+    }
+
+    private void checkTagMask(int index, int tagBitMask) {
+        byte tag = outer.tags[index];
+        int tagBit = ((tag & 0x1F) == tag) ? (1 << tag) : 0;
+        if ((tagBit & tagBitMask) == 0)
+            throw new IllegalArgumentException(
+                "invalid put operation"
+                + " at index " + index + " found " + tagName(tag));
+    }
+
+    private static void checkMemberName(String memberName) {
+        if (memberName.indexOf(';') >= 0)
+            throw new IllegalArgumentException("memberName " + memberName + " contains a ';'");
+    }
+
+    /** Set the entry of the constant pool indexed by index to
+     *  a new string.
+     *
+     * @param index an index to a constant pool entry containing a
+     *        {@link ConstantPoolVisitor#CONSTANT_Utf8} value.
+     * @param utf8 a string
+     *
+     * @see ConstantPoolVisitor#visitUTF8(int, byte, String)
+     */
+    public void putUTF8(int index, String utf8) {
+        if (utf8 == null) { clear(index); return; }
+        checkTag(index, CONSTANT_Utf8);
+        patchArray[index] = utf8;
+    }
+
+    /** Set the entry of the constant pool indexed by index to
+     *  a new value, depending on its dynamic type.
+     *
+     * @param index an index to a constant pool entry containing a
+     *        one of the following structures:
+     *        {@link ConstantPoolVisitor#CONSTANT_Integer},
+     *        {@link ConstantPoolVisitor#CONSTANT_Float},
+     *        {@link ConstantPoolVisitor#CONSTANT_Long},
+     *        {@link ConstantPoolVisitor#CONSTANT_Double},
+     *        {@link ConstantPoolVisitor#CONSTANT_String}, or
+     *        {@link ConstantPoolVisitor#CONSTANT_Class}
+     * @param value a boxed int, float, long or double; or a string or class object
+     * @throws IllegalArgumentException if the type of the constant does not
+     *         match the constant pool entry type,
+     *         as reported by {@link #getTag(int)}
+     *
+     * @see #putConstantValue(int, byte, Object)
+     * @see ConstantPoolVisitor#visitConstantValue(int, byte, Object)
+     * @see ConstantPoolVisitor#visitConstantString(int, byte, String, int)
+     */
+    public void putConstantValue(int index, Object value) {
+        if (value == null) { clear(index); return; }
+        byte tag = tagForConstant(value.getClass());
+        checkConstantTag(tag, value);
+        checkTag(index, tag);
+        patchArray[index] = value;
+    }
+
+    /** Set the entry of the constant pool indexed by index to
+     *  a new value.
+     *
+     * @param index an index to a constant pool entry matching the given tag
+     * @param tag one of the following values:
+     *        {@link ConstantPoolVisitor#CONSTANT_Integer},
+     *        {@link ConstantPoolVisitor#CONSTANT_Float},
+     *        {@link ConstantPoolVisitor#CONSTANT_Long},
+     *        {@link ConstantPoolVisitor#CONSTANT_Double},
+     *        {@link ConstantPoolVisitor#CONSTANT_String}, or
+     *        {@link ConstantPoolVisitor#CONSTANT_Class}
+     * @param value a boxed number, string, or class object
+     * @throws IllegalArgumentException if the type of the constant does not
+     *         match the constant pool entry type, or if a class name contains
+     *         '/' or ';'
+     *
+     * @see #putConstantValue(int, Object)
+     * @see ConstantPoolVisitor#visitConstantValue(int, byte, Object)
+     * @see ConstantPoolVisitor#visitConstantString(int, byte, String, int)
+     */
+    public void putConstantValue(int index, byte tag, Object value) {
+        if (value == null) { clear(index); return; }
+        checkTag(index, tag);
+        if (tag == CONSTANT_Class && value instanceof String) {
+            checkClassName((String) value);
+        } else if (tag == CONSTANT_String) {
+            // the JVM accepts any object as a patch for a string
+        } else {
+            // make sure the incoming value is the right type
+            checkConstantTag(tag, value);
+        }
+        checkTag(index, tag);
+        patchArray[index] = value;
+    }
+
+    /** Set the entry of the constant pool indexed by index to
+     *  a new {@link ConstantPoolVisitor#CONSTANT_NameAndType} value.
+     *
+     * @param index an index to a constant pool entry containing a
+     *        {@link ConstantPoolVisitor#CONSTANT_NameAndType} value.
+     * @param memberName a memberName
+     * @param signature a signature
+     * @throws IllegalArgumentException if memberName contains the character ';'
+     *
+     * @see ConstantPoolVisitor#visitDescriptor(int, byte, String, String, int, int)
+     */
+    public void putDescriptor(int index, String memberName, String signature) {
+        checkTag(index, CONSTANT_NameAndType);
+        checkMemberName(memberName);
+        patchArray[index] = addSemis(memberName, signature);
+    }
+
+    /** Set the entry of the constant pool indexed by index to
+     *  a new {@link ConstantPoolVisitor#CONSTANT_Fieldref},
+     *  {@link ConstantPoolVisitor#CONSTANT_Methodref}, or
+     *  {@link ConstantPoolVisitor#CONSTANT_InterfaceMethodref} value.
+     *
+     * @param index an index to a constant pool entry containing a member reference
+     * @param className a class name
+     * @param memberName a field or method name
+     * @param signature a field or method signature
+     * @throws IllegalArgumentException if memberName contains the character ';'
+     *             or signature is not a correct signature
+     *
+     * @see ConstantPoolVisitor#visitMemberRef(int, byte, String, String, String, int, int)
+     */
+    public void putMemberRef(int index, byte tag,
+                    String className, String memberName, String signature) {
+        checkTagMask(tag, CONSTANT_MemberRef_MASK);
+        checkTag(index, tag);
+        checkClassName(className);
+        checkMemberName(memberName);
+        if (signature.startsWith("(") == (tag == CONSTANT_Fieldref))
+            throw new IllegalArgumentException("bad signature: "+signature);
+        patchArray[index] = addSemis(className, memberName, signature);
+    }
+
+    static private final int CONSTANT_MemberRef_MASK =
+              CONSTANT_Fieldref
+            | CONSTANT_Methodref
+            | CONSTANT_InterfaceMethodref;
+
+    private static final Map<Class<?>, Byte> CONSTANT_VALUE_CLASS_TAG
+        = new IdentityHashMap<Class<?>, Byte>();
+    private static final Class[] CONSTANT_VALUE_CLASS = new Class[16];
+    static {
+        Object[][] values = {
+            {Integer.class, CONSTANT_Integer},
+            {Long.class, CONSTANT_Long},
+            {Float.class, CONSTANT_Float},
+            {Double.class, CONSTANT_Double},
+            {String.class, CONSTANT_String},
+            {Class.class, CONSTANT_Class}
+        };
+        for (Object[] value : values) {
+            Class<?> cls = (Class<?>)value[0];
+            Byte     tag = (Byte) value[1];
+            CONSTANT_VALUE_CLASS_TAG.put(cls, tag);
+            CONSTANT_VALUE_CLASS[(byte)tag] = cls;
+        }
+    }
+
+    static Class<?> classForTag(byte tag) {
+        if ((tag & 0xFF) >= CONSTANT_VALUE_CLASS.length)
+            return null;
+        return CONSTANT_VALUE_CLASS[tag];
+    }
+
+    static byte tagForConstant(Class<?> cls) {
+        Byte tag = CONSTANT_VALUE_CLASS_TAG.get(cls);
+        return (tag == null) ? CONSTANT_None : (byte)tag;
+    }
+
+    private static void checkClassName(String className) {
+        if (className.indexOf('/') >= 0 || className.indexOf(';') >= 0)
+            throw new IllegalArgumentException("invalid class name " + className);
+    }
+
+    static String addSemis(String name, String... names) {
+        StringBuilder buf = new StringBuilder(name.length() * 5);
+        buf.append(name);
+        for (String name2 : names) {
+            buf.append(';').append(name2);
+        }
+        String res = buf.toString();
+        assert(stripSemis(names.length, res)[0].equals(name));
+        assert(stripSemis(names.length, res)[1].equals(names[0]));
+        assert(names.length == 1 ||
+               stripSemis(names.length, res)[2].equals(names[1]));
+        return res;
+    }
+
+    static String[] stripSemis(int count, String string) {
+        String[] res = new String[count+1];
+        int pos = 0;
+        for (int i = 0; i < count; i++) {
+            int pos2 = string.indexOf(';', pos);
+            if (pos2 < 0)  pos2 = string.length();  // yuck
+            res[i] = string.substring(pos, pos2);
+            pos = pos2;
+        }
+        res[count] = string.substring(pos);
+        return res;
+    }
+
+    public String toString() {
+        StringBuilder buf = new StringBuilder(this.getClass().getName());
+        buf.append("{");
+        Object[] origCP = null;
+        for (int i = 0; i < patchArray.length; i++) {
+            if (patchArray[i] == null)  continue;
+            if (origCP != null) {
+                buf.append(", ");
+            } else {
+                try {
+                    origCP = getOriginalCP();
+                } catch (InvalidConstantPoolFormatException ee) {
+                    origCP = new Object[0];
+                }
+            }
+            Object orig = (i < origCP.length) ? origCP[i] : "?";
+            buf.append(orig).append("=").append(patchArray[i]);
+        }
+        buf.append("}");
+        return buf.toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/anon/ConstantPoolVisitor.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.anon;
+
+/**
+ * A visitor called by {@link ConstantPoolParser#parse(ConstantPoolVisitor)}
+ * when a constant pool entry is parsed.
+ * <p>
+ * A visit* method is called when a constant pool entry is parsed.
+ * The first argument is always the constant pool index.
+ * The second argument is always the constant pool tag,
+ * even for methods like {@link #visitUTF8(int, byte, String)} which only apply to one tag.
+ * String arguments refer to Utf8 or NameAndType entries declared elsewhere,
+ * and are always accompanied by the indexes of those entries.
+ * <p>
+ * The order of the calls to the visit* methods is not necessarily related
+ * to the order of the entries in the constant pool.
+ * If one entry has a reference to another entry, the latter (lower-level)
+ * entry will be visited first.
+ * <p>
+ * The following table shows the relation between constant pool entry
+ * types and the corresponding visit* methods:
+ *
+ * <table border=1 cellpadding=5 summary="constant pool visitor methods">
+ * <tr><th>Tag(s)</th><th>Method</th></tr>
+ * <tr>
+ *   <td>{@link #CONSTANT_Utf8}</td>
+ *   <td>{@link #visitUTF8(int, byte, String)}</td>
+ * </tr><tr>
+ *   <td>{@link #CONSTANT_Integer}, {@link #CONSTANT_Float},
+ *       {@link #CONSTANT_Long}, {@link #CONSTANT_Double}</td>
+ *   <td>{@link #visitConstantValue(int, byte, Object)}</td>
+ * </tr><tr>
+ *   <td>{@link #CONSTANT_String}, {@link #CONSTANT_Class}</td>
+ *   <td>{@link #visitConstantString(int, byte, String, int)}</td>
+ * </tr><tr>
+ *   <td>{@link #CONSTANT_NameAndType}</td>
+ *   <td>{@link #visitDescriptor(int, byte, String, String, int, int)}</td>
+ * </tr><tr>
+ *   <td>{@link #CONSTANT_Fieldref},
+ *       {@link #CONSTANT_Methodref},
+ *       {@link #CONSTANT_InterfaceMethodref}</td>
+ *   <td>{@link #visitMemberRef(int, byte, String, String, String, int, int)}</td>
+ * </tr>
+ * </table>
+ *
+ * @see ConstantPoolPatch
+ * @author Remi Forax
+ * @author jrose
+ */
+public class ConstantPoolVisitor {
+  /** Called each time an UTF8 constant pool entry is found.
+   * @param index the constant pool index
+   * @param tag always {@link #CONSTANT_Utf8}
+   * @param utf8 string encoded in modified UTF-8 format passed as a {@code String}
+   *
+   * @see ConstantPoolPatch#putUTF8(int, String)
+   */
+  public void visitUTF8(int index, byte tag, String utf8) {
+    // do nothing
+  }
+
+  /** Called for each constant pool entry that encodes an integer,
+   *  a float, a long, or a double.
+   *  Constant strings and classes are not managed by this method but
+   *  by {@link #visitConstantString(int, byte, String, int)}.
+   *
+   * @param index the constant pool index
+   * @param tag one of {@link #CONSTANT_Integer},
+   *            {@link #CONSTANT_Float},
+   *            {@link #CONSTANT_Long},
+   *            or {@link #CONSTANT_Double}
+   * @param value encoded value
+   *
+   * @see ConstantPoolPatch#putConstantValue(int, Object)
+   */
+  public void visitConstantValue(int index, byte tag, Object value) {
+    // do nothing
+  }
+
+  /** Called for each constant pool entry that encodes a string or a class.
+   * @param index the constant pool index
+   * @param tag one of {@link #CONSTANT_String},
+   *            {@link #CONSTANT_Class},
+   * @param name string body or class name (using dot separator)
+   * @param nameIndex the index of the Utf8 string for the name
+   *
+   * @see ConstantPoolPatch#putConstantValue(int, byte, Object)
+   */
+  public void visitConstantString(int index, byte tag,
+                                  String name, int nameIndex) {
+    // do nothing
+  }
+
+  /** Called for each constant pool entry that encodes a name and type.
+   * @param index the constant pool index
+   * @param tag always {@link #CONSTANT_NameAndType}
+   * @param memberName a field or method name
+   * @param signature the member signature
+   * @param memberNameIndex index of the Utf8 string for the member name
+   * @param signatureIndex index of the Utf8 string for the signature
+   *
+   * @see ConstantPoolPatch#putDescriptor(int, String, String)
+   */
+  public void visitDescriptor(int index, byte tag,
+                              String memberName, String signature,
+                              int memberNameIndex, int signatureIndex) {
+    // do nothing
+  }
+
+  /** Called for each constant pool entry that encodes a field or method.
+   * @param index the constant pool index
+   * @param tag one of {@link #CONSTANT_Fieldref},
+   *            or {@link #CONSTANT_Methodref},
+   *            or {@link #CONSTANT_InterfaceMethodref}
+   * @param className the class name (using dot separator)
+   * @param memberName name of the field or method
+   * @param signature the field or method signature
+   * @param classNameIndex index of the Utf8 string for the class name
+   * @param descriptorIndex index of the NameAndType descriptor constant
+   *
+   * @see ConstantPoolPatch#putMemberRef(int, byte, String, String, String)
+   */
+  public void visitMemberRef(int index, byte tag,
+                             String className, String memberName, String signature,
+                             int classNameIndex, int descriptorIndex) {
+    // do nothing
+  }
+
+    public static final byte
+      CONSTANT_None = 0,
+      CONSTANT_Utf8 = 1,
+      //CONSTANT_Unicode = 2,               /* unused */
+      CONSTANT_Integer = 3,
+      CONSTANT_Float = 4,
+      CONSTANT_Long = 5,
+      CONSTANT_Double = 6,
+      CONSTANT_Class = 7,
+      CONSTANT_String = 8,
+      CONSTANT_Fieldref = 9,
+      CONSTANT_Methodref = 10,
+      CONSTANT_InterfaceMethodref = 11,
+      CONSTANT_NameAndType = 12;
+
+    private static String[] TAG_NAMES = {
+        "Empty",
+        "Utf8",
+        null, //"Unicode",
+        "Integer",
+        "Float",
+        "Long",
+        "Double",
+        "Class",
+        "String",
+        "Fieldref",
+        "Methodref",
+        "InterfaceMethodref",
+        "NameAndType"
+    };
+
+    public static String tagName(byte tag) {
+        String name = null;
+        if ((tag & 0xFF) < TAG_NAMES.length)
+            name = TAG_NAMES[tag];
+        if (name == null)
+            name = "Unknown#"+(tag&0xFF);
+        return name;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/anon/InvalidConstantPoolFormatException.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.anon;
+
+/** Exception used when there is an error in the constant pool
+ *  format.
+ */
+public class InvalidConstantPoolFormatException extends Exception {
+    private static final long serialVersionUID=-6103888330523770949L;
+
+    public InvalidConstantPoolFormatException(String message,Throwable cause) {
+        super(message,cause);
+    }
+
+    public InvalidConstantPoolFormatException(String message) {
+        super(message);
+    }
+
+    public InvalidConstantPoolFormatException(Throwable cause) {
+        super(cause);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/empty/Empty.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2009, 2011, 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 sun.invoke.empty;
+
+/**
+ * An empty class in an empty package.
+ * Used as a proxy for unprivileged code, since making access checks
+ * against it will only succeed against public methods in public types.
+ * <p>
+ * This class also stands (internally to sun.invoke) for the type of a
+ * value that cannot be produced, because the expression of this type
+ * always returns abnormally.  (Cf. Nothing in the closures proposal.)
+ * @author jrose
+ */
+public class Empty {
+    private Empty() { throw new InternalError(); }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/package-info.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2008, 2010, 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.
+ */
+
+/**
+ * Implementation details for JSR 292 RI, package java.lang.invoke.
+ * @author jrose
+ */
+
+package sun.invoke;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/BytecodeDescriptor.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.util;
+
+import java.lang.invoke.MethodType;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Utility routines for dealing with bytecode-level signatures.
+ * @author jrose
+ */
+public class BytecodeDescriptor {
+
+    private BytecodeDescriptor() { }  // cannot instantiate
+
+    public static List<Class<?>> parseMethod(String bytecodeSignature, ClassLoader loader) {
+        return parseMethod(bytecodeSignature, 0, bytecodeSignature.length(), loader);
+    }
+
+    static List<Class<?>> parseMethod(String bytecodeSignature,
+            int start, int end, ClassLoader loader) {
+        if (loader == null)
+            loader = ClassLoader.getSystemClassLoader();
+        String str = bytecodeSignature;
+        int[] i = {start};
+        ArrayList<Class<?>> ptypes = new ArrayList<Class<?>>();
+        if (i[0] < end && str.charAt(i[0]) == '(') {
+            ++i[0];  // skip '('
+            while (i[0] < end && str.charAt(i[0]) != ')') {
+                Class<?> pt = parseSig(str, i, end, loader);
+                if (pt == null || pt == void.class)
+                    parseError(str, "bad argument type");
+                ptypes.add(pt);
+            }
+            ++i[0];  // skip ')'
+        } else {
+            parseError(str, "not a method type");
+        }
+        Class<?> rtype = parseSig(str, i, end, loader);
+        if (rtype == null || i[0] != end)
+            parseError(str, "bad return type");
+        ptypes.add(rtype);
+        return ptypes;
+    }
+
+    static private void parseError(String str, String msg) {
+        throw new IllegalArgumentException("bad signature: "+str+": "+msg);
+    }
+
+    static private Class<?> parseSig(String str, int[] i, int end, ClassLoader loader) {
+        if (i[0] == end)  return null;
+        char c = str.charAt(i[0]++);
+        if (c == 'L') {
+            int begc = i[0], endc = str.indexOf(';', begc);
+            if (endc < 0)  return null;
+            i[0] = endc+1;
+            String name = str.substring(begc, endc).replace('/', '.');
+            try {
+                return loader.loadClass(name);
+            } catch (ClassNotFoundException ex) {
+                throw new TypeNotPresentException(name, ex);
+            }
+        } else if (c == '[') {
+            Class<?> t = parseSig(str, i, end, loader);
+            if (t != null)
+                t = java.lang.reflect.Array.newInstance(t, 0).getClass();
+            return t;
+        } else {
+            return Wrapper.forBasicType(c).primitiveType();
+        }
+    }
+
+    public static String unparse(Class<?> type) {
+        StringBuilder sb = new StringBuilder();
+        unparseSig(type, sb);
+        return sb.toString();
+    }
+
+    public static String unparse(MethodType type) {
+        return unparseMethod(type.returnType(), type.parameterList());
+    }
+
+    public static String unparse(Object type) {
+        if (type instanceof Class<?>)
+            return unparse((Class<?>) type);
+        if (type instanceof MethodType)
+            return unparse((MethodType) type);
+        return (String) type;
+    }
+
+    public static String unparseMethod(Class<?> rtype, List<Class<?>> ptypes) {
+        StringBuilder sb = new StringBuilder();
+        sb.append('(');
+        for (Class<?> pt : ptypes)
+            unparseSig(pt, sb);
+        sb.append(')');
+        unparseSig(rtype, sb);
+        return sb.toString();
+    }
+
+    static private void unparseSig(Class<?> t, StringBuilder sb) {
+        char c = Wrapper.forBasicType(t).basicTypeChar();
+        if (c != 'L') {
+            sb.append(c);
+        } else {
+            boolean lsemi = (!t.isArray());
+            if (lsemi)  sb.append('L');
+            sb.append(t.getName().replace('.', '/'));
+            if (lsemi)  sb.append(';');
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/BytecodeName.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,627 @@
+/*
+ * Copyright (c) 2007, 2011, 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 sun.invoke.util;
+
+/**
+ * Utility routines for dealing with bytecode-level names.
+ * Includes universal mangling rules for the JVM.
+ *
+ * <h3>Avoiding Dangerous Characters </h3>
+ *
+ * <p>
+ * The JVM defines a very small set of characters which are illegal
+ * in name spellings.  We will slightly extend and regularize this set
+ * into a group of <cite>dangerous characters</cite>.
+ * These characters will then be replaced, in mangled names, by escape sequences.
+ * In addition, accidental escape sequences must be further escaped.
+ * Finally, a special prefix will be applied if and only if
+ * the mangling would otherwise fail to begin with the escape character.
+ * This happens to cover the corner case of the null string,
+ * and also clearly marks symbols which need demangling.
+ * </p>
+ * <p>
+ * Dangerous characters are the union of all characters forbidden
+ * or otherwise restricted by the JVM specification,
+ * plus their mates, if they are brackets
+ * (<code><big><b>[</b></big></code> and <code><big><b>]</b></big></code>,
+ * <code><big><b>&lt;</b></big></code> and <code><big><b>&gt;</b></big></code>),
+ * plus, arbitrarily, the colon character <code><big><b>:</b></big></code>.
+ * There is no distinction between type, method, and field names.
+ * This makes it easier to convert between mangled names of different
+ * types, since they do not need to be decoded (demangled).
+ * </p>
+ * <p>
+ * The escape character is backslash <code><big><b>\</b></big></code>
+ * (also known as reverse solidus).
+ * This character is, until now, unheard of in bytecode names,
+ * but traditional in the proposed role.
+ *
+ * </p>
+ * <h3> Replacement Characters </h3>
+ *
+ *
+ * <p>
+ * Every escape sequence is two characters
+ * (in fact, two UTF8 bytes) beginning with
+ * the escape character and followed by a
+ * <cite>replacement character</cite>.
+ * (Since the replacement character is never a backslash,
+ * iterated manglings do not double in size.)
+ * </p>
+ * <p>
+ * Each dangerous character has some rough visual similarity
+ * to its corresponding replacement character.
+ * This makes mangled symbols easier to recognize by sight.
+ * </p>
+ * <p>
+ * The dangerous characters are
+ * <code><big><b>/</b></big></code> (forward slash, used to delimit package components),
+ * <code><big><b>.</b></big></code> (dot, also a package delimiter),
+ * <code><big><b>;</b></big></code> (semicolon, used in signatures),
+ * <code><big><b>$</b></big></code> (dollar, used in inner classes and synthetic members),
+ * <code><big><b>&lt;</b></big></code> (left angle),
+ * <code><big><b>&gt;</b></big></code> (right angle),
+ * <code><big><b>[</b></big></code> (left square bracket, used in array types),
+ * <code><big><b>]</b></big></code> (right square bracket, reserved in this scheme for language use),
+ * and <code><big><b>:</b></big></code> (colon, reserved in this scheme for language use).
+ * Their replacements are, respectively,
+ * <code><big><b>|</b></big></code> (vertical bar),
+ * <code><big><b>,</b></big></code> (comma),
+ * <code><big><b>?</b></big></code> (question mark),
+ * <code><big><b>%</b></big></code> (percent),
+ * <code><big><b>^</b></big></code> (caret),
+ * <code><big><b>_</b></big></code> (underscore), and
+ * <code><big><b>{</b></big></code> (left curly bracket),
+ * <code><big><b>}</b></big></code> (right curly bracket),
+ * <code><big><b>!</b></big></code> (exclamation mark).
+ * In addition, the replacement character for the escape character itself is
+ * <code><big><b>-</b></big></code> (hyphen),
+ * and the replacement character for the null prefix is
+ * <code><big><b>=</b></big></code> (equal sign).
+ * </p>
+ * <p>
+ * An escape character <code><big><b>\</b></big></code>
+ * followed by any of these replacement characters
+ * is an escape sequence, and there are no other escape sequences.
+ * An equal sign is only part of an escape sequence
+ * if it is the second character in the whole string, following a backslash.
+ * Two consecutive backslashes do <em>not</em> form an escape sequence.
+ * </p>
+ * <p>
+ * Each escape sequence replaces a so-called <cite>original character</cite>
+ * which is either one of the dangerous characters or the escape character.
+ * A null prefix replaces an initial null string, not a character.
+ * </p>
+ * <p>
+ * All this implies that escape sequences cannot overlap and may be
+ * determined all at once for a whole string.  Note that a spelling
+ * string can contain <cite>accidental escapes</cite>, apparent escape
+ * sequences which must not be interpreted as manglings.
+ * These are disabled by replacing their leading backslash with an
+ * escape sequence (<code><big><b>\-</b></big></code>).  To mangle a string, three logical steps
+ * are required, though they may be carried out in one pass:
+ * </p>
+ * <ol>
+ *   <li>In each accidental escape, replace the backslash with an escape sequence
+ * (<code><big><b>\-</b></big></code>).</li>
+ *   <li>Replace each dangerous character with an escape sequence
+ * (<code><big><b>\|</b></big></code> for <code><big><b>/</b></big></code>, etc.).</li>
+ *   <li>If the first two steps introduced any change, <em>and</em>
+ * if the string does not already begin with a backslash, prepend a null prefix (<code><big><b>\=</b></big></code>).</li>
+ * </ol>
+ *
+ * To demangle a mangled string that begins with an escape,
+ * remove any null prefix, and then replace (in parallel)
+ * each escape sequence by its original character.
+ * <p>Spelling strings which contain accidental
+ * escapes <em>must</em> have them replaced, even if those
+ * strings do not contain dangerous characters.
+ * This restriction means that mangling a string always
+ * requires a scan of the string for escapes.
+ * But then, a scan would be required anyway,
+ * to check for dangerous characters.
+ *
+ * </p>
+ * <h3> Nice Properties </h3>
+ *
+ * <p>
+ * If a bytecode name does not contain any escape sequence,
+ * demangling is a no-op:  The string demangles to itself.
+ * Such a string is called <cite>self-mangling</cite>.
+ * Almost all strings are self-mangling.
+ * In practice, to demangle almost any name &ldquo;found in nature&rdquo;,
+ * simply verify that it does not begin with a backslash.
+ * </p>
+ * <p>
+ * Mangling is a one-to-one function, while demangling
+ * is a many-to-one function.
+ * A mangled string is defined as <cite>validly mangled</cite> if
+ * it is in fact the unique mangling of its spelling string.
+ * Three examples of invalidly mangled strings are <code><big><b>\=foo</b></big></code>,
+ * <code><big><b>\-bar</b></big></code>, and <code><big><b>baz\!</b></big></code>, which demangle to <code><big><b>foo</b></big></code>, <code><big><b>\bar</b></big></code>, and
+ * <code><big><b>baz\!</b></big></code>, but then remangle to <code><big><b>foo</b></big></code>, <code><big><b>\bar</b></big></code>, and <code><big><b>\=baz\-!</b></big></code>.
+ * If a language back-end or runtime is using mangled names,
+ * it should never present an invalidly mangled bytecode
+ * name to the JVM.  If the runtime encounters one,
+ * it should also report an error, since such an occurrence
+ * probably indicates a bug in name encoding which
+ * will lead to errors in linkage.
+ * However, this note does not propose that the JVM verifier
+ * detect invalidly mangled names.
+ * </p>
+ * <p>
+ * As a result of these rules, it is a simple matter to
+ * compute validly mangled substrings and concatenations
+ * of validly mangled strings, and (with a little care)
+ * these correspond to corresponding operations on their
+ * spelling strings.
+ * </p>
+ * <ul>
+ *   <li>Any prefix of a validly mangled string is also validly mangled,
+ * although a null prefix may need to be removed.</li>
+ *   <li>Any suffix of a validly mangled string is also validly mangled,
+ * although a null prefix may need to be added.</li>
+ *   <li>Two validly mangled strings, when concatenated,
+ * are also validly mangled, although any null prefix
+ * must be removed from the second string,
+ * and a trailing backslash on the first string may need escaping,
+ * if it would participate in an accidental escape when followed
+ * by the first character of the second string.</li>
+ * </ul>
+ * <p>If languages that include non-Java symbol spellings use this
+ * mangling convention, they will enjoy the following advantages:
+ * </p>
+ * <ul>
+ *   <li>They can interoperate via symbols they share in common.</li>
+ *   <li>Low-level tools, such as backtrace printers, will have readable displays.</li>
+ *   <li>Future JVM and language extensions can safely use the dangerous characters
+ * for structuring symbols, but will never interfere with valid spellings.</li>
+ *   <li>Runtimes and compilers can use standard libraries for mangling and demangling.</li>
+ *   <li>Occasional transliterations and name composition will be simple and regular,
+ * for classes, methods, and fields.</li>
+ *   <li>Bytecode names will continue to be compact.
+ * When mangled, spellings will at most double in length, either in
+ * UTF8 or UTF16 format, and most will not change at all.</li>
+ * </ul>
+ *
+ *
+ * <h3> Suggestions for Human Readable Presentations </h3>
+ *
+ *
+ * <p>
+ * For human readable displays of symbols,
+ * it will be better to present a string-like quoted
+ * representation of the spelling, because JVM users
+ * are generally familiar with such tokens.
+ * We suggest using single or double quotes before and after
+ * mangled symbols which are not valid Java identifiers,
+ * with quotes, backslashes, and non-printing characters
+ * escaped as if for literals in the Java language.
+ * </p>
+ * <p>
+ * For example, an HTML-like spelling
+ * <code><big><b>&lt;pre&gt;</b></big></code> mangles to
+ * <code><big><b>\^pre\_</b></big></code> and could
+ * display more cleanly as
+ * <code><big><b>'&lt;pre&gt;'</b></big></code>,
+ * with the quotes included.
+ * Such string-like conventions are <em>not</em> suitable
+ * for mangled bytecode names, in part because
+ * dangerous characters must be eliminated, rather
+ * than just quoted.  Otherwise internally structured
+ * strings like package prefixes and method signatures
+ * could not be reliably parsed.
+ * </p>
+ * <p>
+ * In such human-readable displays, invalidly mangled
+ * names should <em>not</em> be demangled and quoted,
+ * for this would be misleading.  Likewise, JVM symbols
+ * which contain dangerous characters (like dots in field
+ * names or brackets in method names) should not be
+ * simply quoted.  The bytecode names
+ * <code><big><b>\=phase\,1</b></big></code> and
+ * <code><big><b>phase.1</b></big></code> are distinct,
+ * and in demangled displays they should be presented as
+ * <code><big><b>'phase.1'</b></big></code> and something like
+ * <code><big><b>'phase'.1</b></big></code>, respectively.
+ * </p>
+ *
+ * @author John Rose
+ * @version 1.2, 02/06/2008
+ * @see http://blogs.sun.com/jrose/entry/symbolic_freedom_in_the_vm
+ */
+public class BytecodeName {
+    private BytecodeName() { }  // static only class
+
+    /** Given a source name, produce the corresponding bytecode name.
+     * The source name should not be qualified, because any syntactic
+     * markers (dots, slashes, dollar signs, colons, etc.) will be mangled.
+     * @param s the source name
+     * @return a valid bytecode name which represents the source name
+     */
+    public static String toBytecodeName(String s) {
+        String bn = mangle(s);
+        assert((Object)bn == s || looksMangled(bn)) : bn;
+        assert(s.equals(toSourceName(bn))) : s;
+        return bn;
+    }
+
+    /** Given an unqualified bytecode name, produce the corresponding source name.
+     * The bytecode name must not contain dangerous characters.
+     * In particular, it must not be qualified or segmented by colon {@code ':'}.
+     * @param s the bytecode name
+     * @return the source name, which may possibly have unsafe characters
+     * @throws IllegalArgumentException if the bytecode name is not {@link #isSafeBytecodeName safe}
+     * @see #isSafeBytecodeName(java.lang.String)
+     */
+    public static String toSourceName(String s) {
+        checkSafeBytecodeName(s);
+        String sn = s;
+        if (looksMangled(s)) {
+            sn = demangle(s);
+            assert(s.equals(mangle(sn))) : s+" => "+sn+" => "+mangle(sn);
+        }
+        return sn;
+    }
+
+    /**
+     * Given a bytecode name from a classfile, separate it into
+     * components delimited by dangerous characters.
+     * Each resulting array element will be either a dangerous character,
+     * or else a safe bytecode name.
+     * (The safe name might possibly be mangled to hide further dangerous characters.)
+     * For example, the qualified class name {@code java/lang/String}
+     * will be parsed into the array {@code {"java", '/', "lang", '/', "String"}}.
+     * The name {@code &lt;init&gt;} will be parsed into { '&lt;', "init", '&gt;'}}
+     * The name {@code foo/bar$:baz} will be parsed into
+     * {@code {"foo", '/', "bar", '$', ':', "baz"}}.
+     * The name {@code ::\=:foo:\=bar\!baz} will be parsed into
+     * {@code {':', ':', "", ':', "foo", ':', "bar:baz"}}.
+     */
+    public static Object[] parseBytecodeName(String s) {
+        int slen = s.length();
+        Object[] res = null;
+        for (int pass = 0; pass <= 1; pass++) {
+            int fillp = 0;
+            int lasti = 0;
+            for (int i = 0; i <= slen; i++) {
+                int whichDC = -1;
+                if (i < slen) {
+                    whichDC = DANGEROUS_CHARS.indexOf(s.charAt(i));
+                    if (whichDC < DANGEROUS_CHAR_FIRST_INDEX)  continue;
+                }
+                // got to end of string or next dangerous char
+                if (lasti < i) {
+                    // normal component
+                    if (pass != 0)
+                        res[fillp] = toSourceName(s.substring(lasti, i));
+                    fillp++;
+                    lasti = i+1;
+                }
+                if (whichDC >= DANGEROUS_CHAR_FIRST_INDEX) {
+                    if (pass != 0)
+                        res[fillp] = DANGEROUS_CHARS_CA[whichDC];
+                    fillp++;
+                    lasti = i+1;
+                }
+            }
+            if (pass != 0)  break;
+            // between passes, build the result array
+            res = new Object[fillp];
+            if (fillp <= 1 && lasti == 0) {
+                if (fillp != 0)  res[0] = toSourceName(s);
+                break;
+            }
+        }
+        return res;
+    }
+
+    /**
+     * Given a series of components, create a bytecode name for a classfile.
+     * This is the inverse of {@link #parseBytecodeName(java.lang.String)}.
+     * Each component must either be an interned one-character string of
+     * a dangerous character, or else a safe bytecode name.
+     * @param components a series of name components
+     * @return the concatenation of all components
+     * @throws IllegalArgumentException if any component contains an unsafe
+     *          character, and is not an interned one-character string
+     * @throws NullPointerException if any component is null
+     */
+    public static String unparseBytecodeName(Object[] components) {
+        Object[] components0 = components;
+        for (int i = 0; i < components.length; i++) {
+            Object c = components[i];
+            if (c instanceof String) {
+                String mc = toBytecodeName((String) c);
+                if (i == 0 && components.length == 1)
+                    return mc;  // usual case
+                if ((Object)mc != c) {
+                    if (components == components0)
+                        components = components.clone();
+                    components[i] = c = mc;
+                }
+            }
+        }
+        return appendAll(components);
+    }
+    private static String appendAll(Object[] components) {
+        if (components.length <= 1) {
+            if (components.length == 1) {
+                return String.valueOf(components[0]);
+            }
+            return "";
+        }
+        int slen = 0;
+        for (Object c : components) {
+            if (c instanceof String)
+                slen += String.valueOf(c).length();
+            else
+                slen += 1;
+        }
+        StringBuilder sb = new StringBuilder(slen);
+        for (Object c : components) {
+            sb.append(c);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Given a bytecode name, produce the corresponding display name.
+     * This is the source name, plus quotes if needed.
+     * If the bytecode name contains dangerous characters,
+     * assume that they are being used as punctuation,
+     * and pass them through unchanged.
+     * Non-empty runs of non-dangerous characters are demangled
+     * if necessary, and the resulting names are quoted if
+     * they are not already valid Java identifiers, or if
+     * they contain a dangerous character (i.e., dollar sign "$").
+     * Single quotes are used when quoting.
+     * Within quoted names, embedded single quotes and backslashes
+     * are further escaped by prepended backslashes.
+     *
+     * @param s the original bytecode name (which may be qualified)
+     * @return a human-readable presentation
+     */
+    public static String toDisplayName(String s) {
+        Object[] components = parseBytecodeName(s);
+        for (int i = 0; i < components.length; i++) {
+            if (!(components[i] instanceof String))
+                continue;
+            String sn = (String) components[i];
+            // note that the name is already demangled!
+            //sn = toSourceName(sn);
+            if (!isJavaIdent(sn) || sn.indexOf('$') >=0 ) {
+                components[i] = quoteDisplay(sn);
+            }
+        }
+        return appendAll(components);
+    }
+    private static boolean isJavaIdent(String s) {
+        int slen = s.length();
+        if (slen == 0)  return false;
+        if (!Character.isJavaIdentifierStart(s.charAt(0)))
+            return false;
+        for (int i = 1; i < slen; i++) {
+            if (!Character.isJavaIdentifierPart(s.charAt(i)))
+                return false;
+        }
+        return true;
+    }
+    private static String quoteDisplay(String s) {
+        // TO DO:  Replace wierd characters in s by C-style escapes.
+        return "'"+s.replaceAll("['\\\\]", "\\\\$0")+"'";
+    }
+
+    private static void checkSafeBytecodeName(String s)
+            throws IllegalArgumentException {
+        if (!isSafeBytecodeName(s)) {
+            throw new IllegalArgumentException(s);
+        }
+    }
+
+    /**
+     * Report whether a simple name is safe as a bytecode name.
+     * Such names are acceptable in class files as class, method, and field names.
+     * Additionally, they are free of "dangerous" characters, even if those
+     * characters are legal in some (or all) names in class files.
+     * @param s the proposed bytecode name
+     * @return true if the name is non-empty and all of its characters are safe
+     */
+    public static boolean isSafeBytecodeName(String s) {
+        if (s.length() == 0)  return false;
+        // check occurrences of each DANGEROUS char
+        for (char xc : DANGEROUS_CHARS_A) {
+            if (xc == ESCAPE_C)  continue;  // not really that dangerous
+            if (s.indexOf(xc) >= 0)  return false;
+        }
+        return true;
+    }
+
+    /**
+     * Report whether a character is safe in a bytecode name.
+     * This is true of any unicode character except the following
+     * <em>dangerous characters</em>: {@code ".;:$[]<>/"}.
+     * @param s the proposed character
+     * @return true if the character is safe to use in classfiles
+     */
+    public static boolean isSafeBytecodeChar(char c) {
+        return DANGEROUS_CHARS.indexOf(c) < DANGEROUS_CHAR_FIRST_INDEX;
+    }
+
+    private static boolean looksMangled(String s) {
+        return s.charAt(0) == ESCAPE_C;
+    }
+
+    private static String mangle(String s) {
+        if (s.length() == 0)
+            return NULL_ESCAPE;
+
+        // build this lazily, when we first need an escape:
+        StringBuilder sb = null;
+
+        for (int i = 0, slen = s.length(); i < slen; i++) {
+            char c = s.charAt(i);
+
+            boolean needEscape = false;
+            if (c == ESCAPE_C) {
+                if (i+1 < slen) {
+                    char c1 = s.charAt(i+1);
+                    if ((i == 0 && c1 == NULL_ESCAPE_C)
+                        || c1 != originalOfReplacement(c1)) {
+                        // an accidental escape
+                        needEscape = true;
+                    }
+                }
+            } else {
+                needEscape = isDangerous(c);
+            }
+
+            if (!needEscape) {
+                if (sb != null)  sb.append(c);
+                continue;
+            }
+
+            // build sb if this is the first escape
+            if (sb == null) {
+                sb = new StringBuilder(s.length()+10);
+                // mangled names must begin with a backslash:
+                if (s.charAt(0) != ESCAPE_C && i > 0)
+                    sb.append(NULL_ESCAPE);
+                // append the string so far, which is unremarkable:
+                sb.append(s.substring(0, i));
+            }
+
+            // rewrite \ to \-, / to \|, etc.
+            sb.append(ESCAPE_C);
+            sb.append(replacementOf(c));
+        }
+
+        if (sb != null)   return sb.toString();
+
+        return s;
+    }
+
+    private static String demangle(String s) {
+        // build this lazily, when we first meet an escape:
+        StringBuilder sb = null;
+
+        int stringStart = 0;
+        if (s.startsWith(NULL_ESCAPE))
+            stringStart = 2;
+
+        for (int i = stringStart, slen = s.length(); i < slen; i++) {
+            char c = s.charAt(i);
+
+            if (c == ESCAPE_C && i+1 < slen) {
+                // might be an escape sequence
+                char rc = s.charAt(i+1);
+                char oc = originalOfReplacement(rc);
+                if (oc != rc) {
+                    // build sb if this is the first escape
+                    if (sb == null) {
+                        sb = new StringBuilder(s.length());
+                        // append the string so far, which is unremarkable:
+                        sb.append(s.substring(stringStart, i));
+                    }
+                    ++i;  // skip both characters
+                    c = oc;
+                }
+            }
+
+            if (sb != null)
+                sb.append(c);
+        }
+
+        if (sb != null)   return sb.toString();
+
+        return s.substring(stringStart);
+    }
+
+    static char ESCAPE_C = '\\';
+    // empty escape sequence to avoid a null name or illegal prefix
+    static char NULL_ESCAPE_C = '=';
+    static String NULL_ESCAPE = ESCAPE_C+""+NULL_ESCAPE_C;
+
+    static final String DANGEROUS_CHARS   = "\\/.;:$[]<>"; // \\ must be first
+    static final String REPLACEMENT_CHARS =  "-|,?!%{}^_";
+    static final int DANGEROUS_CHAR_FIRST_INDEX = 1; // index after \\
+    static char[] DANGEROUS_CHARS_A   = DANGEROUS_CHARS.toCharArray();
+    static char[] REPLACEMENT_CHARS_A = REPLACEMENT_CHARS.toCharArray();
+    static final Character[] DANGEROUS_CHARS_CA;
+    static {
+        Character[] dcca = new Character[DANGEROUS_CHARS.length()];
+        for (int i = 0; i < dcca.length; i++)
+            dcca[i] = Character.valueOf(DANGEROUS_CHARS.charAt(i));
+        DANGEROUS_CHARS_CA = dcca;
+    }
+
+    static final long[] SPECIAL_BITMAP = new long[2];  // 128 bits
+    static {
+        String SPECIAL = DANGEROUS_CHARS + REPLACEMENT_CHARS;
+        //System.out.println("SPECIAL = "+SPECIAL);
+        for (char c : SPECIAL.toCharArray()) {
+            SPECIAL_BITMAP[c >>> 6] |= 1L << c;
+        }
+    }
+    static boolean isSpecial(char c) {
+        if ((c >>> 6) < SPECIAL_BITMAP.length)
+            return ((SPECIAL_BITMAP[c >>> 6] >> c) & 1) != 0;
+        else
+            return false;
+    }
+    static char replacementOf(char c) {
+        if (!isSpecial(c))  return c;
+        int i = DANGEROUS_CHARS.indexOf(c);
+        if (i < 0)  return c;
+        return REPLACEMENT_CHARS.charAt(i);
+    }
+    static char originalOfReplacement(char c) {
+        if (!isSpecial(c))  return c;
+        int i = REPLACEMENT_CHARS.indexOf(c);
+        if (i < 0)  return c;
+        return DANGEROUS_CHARS.charAt(i);
+    }
+    static boolean isDangerous(char c) {
+        if (!isSpecial(c))  return false;
+        return (DANGEROUS_CHARS.indexOf(c) >= DANGEROUS_CHAR_FIRST_INDEX);
+    }
+    static int indexOfDangerousChar(String s, int from) {
+        for (int i = from, slen = s.length(); i < slen; i++) {
+            if (isDangerous(s.charAt(i)))
+                return i;
+        }
+        return -1;
+    }
+    static int lastIndexOfDangerousChar(String s, int from) {
+        for (int i = Math.min(from, s.length()-1); i >= 0; i--) {
+            if (isDangerous(s.charAt(i)))
+                return i;
+        }
+        return -1;
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/ValueConversions.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,817 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.util;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.invoke.MethodType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.EnumMap;
+import java.util.List;
+
+public class ValueConversions {
+    private static final Lookup IMPL_LOOKUP = MethodHandles.lookup();
+
+    private static EnumMap<Wrapper, MethodHandle>[] newWrapperCaches(int n) {
+        @SuppressWarnings("unchecked")
+        EnumMap<Wrapper, MethodHandle>[] caches
+                = (EnumMap<Wrapper, MethodHandle>[]) new EnumMap[n];  // unchecked warning expected here
+        for (int i = 0; i < n; i++)
+            caches[i] = new EnumMap<Wrapper, MethodHandle>(Wrapper.class);
+        return caches;
+    }
+
+    /// Converting references to values.
+
+    static int unboxInteger(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Integer) x).intValue();
+    }
+
+    static byte unboxByte(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Byte) x).byteValue();
+    }
+
+    static short unboxShort(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Short) x).shortValue();
+    }
+
+    static boolean unboxBoolean(Object x) {
+        if (x == null)  return false;  // never NPE
+        return ((Boolean) x).booleanValue();
+    }
+
+    static char unboxCharacter(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Character) x).charValue();
+    }
+
+    static long unboxLong(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Long) x).longValue();
+    }
+
+    static float unboxFloat(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Float) x).floatValue();
+    }
+
+    static double unboxDouble(Object x) {
+        if (x == null)  return 0;  // never NPE
+        return ((Double) x).doubleValue();
+    }
+
+    /// Converting references to "raw" values.
+    /// A raw primitive value is always an int or long.
+
+    static int unboxByteRaw(Object x) {
+        return unboxByte(x);
+    }
+
+    static int unboxShortRaw(Object x) {
+        return unboxShort(x);
+    }
+
+    static int unboxBooleanRaw(Object x) {
+        return unboxBoolean(x) ? 1 : 0;
+    }
+
+    static int unboxCharacterRaw(Object x) {
+        return unboxCharacter(x);
+    }
+
+    static int unboxFloatRaw(Object x) {
+        return Float.floatToIntBits(unboxFloat(x));
+    }
+
+    static long unboxDoubleRaw(Object x) {
+        return Double.doubleToRawLongBits(unboxDouble(x));
+    }
+
+    private static MethodType unboxType(Wrapper wrap, boolean raw) {
+        return MethodType.methodType(rawWrapper(wrap, raw).primitiveType(), wrap.wrapperType());
+    }
+
+    private static final EnumMap<Wrapper, MethodHandle>[]
+            UNBOX_CONVERSIONS = newWrapperCaches(4);
+
+    private static MethodHandle unbox(Wrapper wrap, boolean exact, boolean raw) {
+        EnumMap<Wrapper, MethodHandle> cache = UNBOX_CONVERSIONS[(exact?1:0)+(raw?2:0)];
+        MethodHandle mh = cache.get(wrap);
+        if (mh != null) {
+            return mh;
+        }
+        // slow path
+        switch (wrap) {
+            case OBJECT:
+                mh = IDENTITY; break;
+            case VOID:
+                mh = raw ? ALWAYS_ZERO : IGNORE; break;
+            case INT: case LONG:
+                // these guys don't need separate raw channels
+                if (raw)  mh = unbox(wrap, exact, false);
+                break;
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        // look up the method
+        String name = "unbox" + wrap.simpleName() + (raw ? "Raw" : "");
+        MethodType type = unboxType(wrap, raw);
+        if (!exact) {
+            try {
+                // actually, type is wrong; the Java method takes Object
+                mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type.erase());
+            } catch (ReflectiveOperationException ex) {
+                mh = null;
+            }
+        } else {
+            mh = unbox(wrap, !exact, raw).asType(type);
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        throw new IllegalArgumentException("cannot find unbox adapter for " + wrap + (raw ? " (raw)" : ""));
+    }
+
+    public static MethodHandle unbox(Wrapper type, boolean exact) {
+        return unbox(type, exact, false);
+    }
+
+    public static MethodHandle unboxRaw(Wrapper type, boolean exact) {
+        return unbox(type, exact, true);
+    }
+
+    public static MethodHandle unbox(Class<?> type, boolean exact) {
+        return unbox(Wrapper.forPrimitiveType(type), exact, false);
+    }
+
+    public static MethodHandle unboxRaw(Class<?> type, boolean exact) {
+        return unbox(Wrapper.forPrimitiveType(type), exact, true);
+    }
+
+    /// Converting primitives to references
+
+    static Integer boxInteger(int x) {
+        return x;
+    }
+
+    static Byte boxByte(byte x) {
+        return x;
+    }
+
+    static Short boxShort(short x) {
+        return x;
+    }
+
+    static Boolean boxBoolean(boolean x) {
+        return x;
+    }
+
+    static Character boxCharacter(char x) {
+        return x;
+    }
+
+    static Long boxLong(long x) {
+        return x;
+    }
+
+    static Float boxFloat(float x) {
+        return x;
+    }
+
+    static Double boxDouble(double x) {
+        return x;
+    }
+
+    /// Converting raw primitives to references
+
+    static Byte boxByteRaw(int x) {
+        return boxByte((byte)x);
+    }
+
+    static Short boxShortRaw(int x) {
+        return boxShort((short)x);
+    }
+
+    static Boolean boxBooleanRaw(int x) {
+        return boxBoolean(x != 0);
+    }
+
+    static Character boxCharacterRaw(int x) {
+        return boxCharacter((char)x);
+    }
+
+    static Float boxFloatRaw(int x) {
+        return boxFloat(Float.intBitsToFloat(x));
+    }
+
+    static Double boxDoubleRaw(long x) {
+        return boxDouble(Double.longBitsToDouble(x));
+    }
+
+    // a raw void value is (arbitrarily) a garbage int
+    static Void boxVoidRaw(int x) {
+        return null;
+    }
+
+    private static MethodType boxType(Wrapper wrap, boolean raw) {
+        // be exact, since return casts are hard to compose
+        Class<?> boxType = wrap.wrapperType();
+        return MethodType.methodType(boxType, rawWrapper(wrap, raw).primitiveType());
+    }
+
+    private static Wrapper rawWrapper(Wrapper wrap, boolean raw) {
+        if (raw)  return wrap.isDoubleWord() ? Wrapper.LONG : Wrapper.INT;
+        return wrap;
+    }
+
+    private static final EnumMap<Wrapper, MethodHandle>[]
+            BOX_CONVERSIONS = newWrapperCaches(4);
+
+    private static MethodHandle box(Wrapper wrap, boolean exact, boolean raw) {
+        EnumMap<Wrapper, MethodHandle> cache = BOX_CONVERSIONS[(exact?1:0)+(raw?2:0)];
+        MethodHandle mh = cache.get(wrap);
+        if (mh != null) {
+            return mh;
+        }
+        // slow path
+        switch (wrap) {
+            case OBJECT:
+                mh = IDENTITY; break;
+            case VOID:
+                if (!raw)  mh = ZERO_OBJECT;
+                break;
+            case INT: case LONG:
+                // these guys don't need separate raw channels
+                if (raw)  mh = box(wrap, exact, false);
+                break;
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        // look up the method
+        String name = "box" + wrap.simpleName() + (raw ? "Raw" : "");
+        MethodType type = boxType(wrap, raw);
+        if (exact) {
+            try {
+                mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+                mh = null;
+            }
+        } else {
+            mh = box(wrap, !exact, raw).asType(type.erase());
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        throw new IllegalArgumentException("cannot find box adapter for " + wrap + (raw ? " (raw)" : ""));
+    }
+
+    public static MethodHandle box(Class<?> type, boolean exact) {
+        return box(Wrapper.forPrimitiveType(type), exact, false);
+    }
+
+    public static MethodHandle boxRaw(Class<?> type, boolean exact) {
+        return box(Wrapper.forPrimitiveType(type), exact, true);
+    }
+
+    public static MethodHandle box(Wrapper type, boolean exact) {
+        return box(type, exact, false);
+    }
+
+    public static MethodHandle boxRaw(Wrapper type, boolean exact) {
+        return box(type, exact, true);
+    }
+
+    /// Kludges for when raw values get accidentally boxed.
+
+    static int unboxRawInteger(Object x) {
+        if (x instanceof Integer)
+            return unboxInteger(x);
+        else
+            return (int) unboxLong(x);
+    }
+
+    static Integer reboxRawInteger(Object x) {
+        if (x instanceof Integer)
+            return (Integer) x;
+        else
+            return (int) unboxLong(x);
+    }
+
+    static Byte reboxRawByte(Object x) {
+        if (x instanceof Byte)  return (Byte) x;
+        return boxByteRaw(unboxRawInteger(x));
+    }
+
+    static Short reboxRawShort(Object x) {
+        if (x instanceof Short)  return (Short) x;
+        return boxShortRaw(unboxRawInteger(x));
+    }
+
+    static Boolean reboxRawBoolean(Object x) {
+        if (x instanceof Boolean)  return (Boolean) x;
+        return boxBooleanRaw(unboxRawInteger(x));
+    }
+
+    static Character reboxRawCharacter(Object x) {
+        if (x instanceof Character)  return (Character) x;
+        return boxCharacterRaw(unboxRawInteger(x));
+    }
+
+    static Float reboxRawFloat(Object x) {
+        if (x instanceof Float)  return (Float) x;
+        return boxFloatRaw(unboxRawInteger(x));
+    }
+
+    static Long reboxRawLong(Object x) {
+        return (Long) x;  //never a rebox
+    }
+
+    static Double reboxRawDouble(Object x) {
+        if (x instanceof Double)  return (Double) x;
+        return boxDoubleRaw(unboxLong(x));
+    }
+
+    private static MethodType reboxType(Wrapper wrap) {
+        Class<?> boxType = wrap.wrapperType();
+        return MethodType.methodType(boxType, Object.class);
+    }
+
+    private static final EnumMap<Wrapper, MethodHandle>[]
+            REBOX_CONVERSIONS = newWrapperCaches(2);
+
+    /**
+     * Because we normalize primitive types to reduce the number of signatures,
+     * primitives are sometimes manipulated under an "erased" type,
+     * either int (for types other than long/double) or long (for all types).
+     * When the erased primitive value is then boxed into an Integer or Long,
+     * the final boxed primitive is sometimes required.  This transformation
+     * is called a "rebox".  It takes an Integer or Long and produces some
+     * other boxed value.
+     */
+    public static MethodHandle rebox(Wrapper wrap, boolean exact) {
+        EnumMap<Wrapper, MethodHandle> cache = REBOX_CONVERSIONS[exact?1:0];
+        MethodHandle mh = cache.get(wrap);
+        if (mh != null) {
+            return mh;
+        }
+        // slow path
+        switch (wrap) {
+            case OBJECT:
+                mh = IDENTITY; break;
+            case VOID:
+                throw new IllegalArgumentException("cannot rebox a void");
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        // look up the method
+        String name = "reboxRaw" + wrap.simpleName();
+        MethodType type = reboxType(wrap);
+        if (exact) {
+            try {
+                mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+                mh = null;
+            }
+        } else {
+            mh = rebox(wrap, !exact).asType(IDENTITY.type());
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        throw new IllegalArgumentException("cannot find rebox adapter for " + wrap);
+    }
+
+    public static MethodHandle rebox(Class<?> type, boolean exact) {
+        return rebox(Wrapper.forPrimitiveType(type), exact);
+    }
+
+    /// Width-changing conversions between int and long.
+
+    static long widenInt(int x) {
+        return (long) x;
+    }
+
+    static Long widenBoxedInt(Integer x) {
+        return (long)(int)x;
+    }
+
+    static int narrowLong(long x) {
+        return (int) x;
+    }
+
+    static Integer narrowBoxedLong(Long x) {
+        return (int)(long) x;
+    }
+
+    /// Constant functions
+
+    static void ignore(Object x) {
+        // no value to return; this is an unbox of null
+        return;
+    }
+
+    static void empty() {
+        return;
+    }
+
+    static Object zeroObject() {
+        return null;
+    }
+
+    static int zeroInteger() {
+        return 0;
+    }
+
+    static long zeroLong() {
+        return 0;
+    }
+
+    static float zeroFloat() {
+        return 0;
+    }
+
+    static double zeroDouble() {
+        return 0;
+    }
+
+    private static final EnumMap<Wrapper, MethodHandle>[]
+            CONSTANT_FUNCTIONS = newWrapperCaches(2);
+
+    public static MethodHandle zeroConstantFunction(Wrapper wrap) {
+        EnumMap<Wrapper, MethodHandle> cache = CONSTANT_FUNCTIONS[0];
+        MethodHandle mh = cache.get(wrap);
+        if (mh != null) {
+            return mh;
+        }
+        // slow path
+        MethodType type = MethodType.methodType(wrap.primitiveType());
+        switch (wrap) {
+            case VOID:
+                mh = EMPTY;
+                break;
+            case INT: case LONG: case FLOAT: case DOUBLE:
+                try {
+                    mh = IMPL_LOOKUP.findStatic(ValueConversions.class, "zero"+wrap.simpleName(), type);
+                } catch (ReflectiveOperationException ex) {
+                    mh = null;
+                }
+                break;
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+
+        // use the raw method
+        Wrapper rawWrap = wrap.rawPrimitive();
+        if (mh == null && rawWrap != wrap) {
+            mh = MethodHandles.explicitCastArguments(zeroConstantFunction(rawWrap), type);
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        throw new IllegalArgumentException("cannot find zero constant for " + wrap);
+    }
+
+    /// Converting references to references.
+
+    /**
+     * Value-killing function.
+     * @param x an arbitrary reference value
+     * @return a null
+     */
+    static Object alwaysNull(Object x) {
+        return null;
+    }
+
+    /**
+     * Value-killing function.
+     * @param x an arbitrary reference value
+     * @return a zero
+     */
+    static int alwaysZero(Object x) {
+        return 0;
+    }
+
+    /**
+     * Identity function.
+     * @param x an arbitrary reference value
+     * @return the same value x
+     */
+    static <T> T identity(T x) {
+        return x;
+    }
+
+    /**
+     * Identity function on ints.
+     * @param x an arbitrary int value
+     * @return the same value x
+     */
+    static int identity(int x) {
+        return x;
+    }
+
+    static byte identity(byte x) {
+        return x;
+    }
+
+    static short identity(short x) {
+        return x;
+    }
+
+    static boolean identity(boolean x) {
+        return x;
+    }
+
+    static char identity(char x) {
+        return x;
+    }
+
+    /**
+     * Identity function on longs.
+     * @param x an arbitrary long value
+     * @return the same value x
+     */
+    static long identity(long x) {
+        return x;
+    }
+
+    static float identity(float x) {
+        return x;
+    }
+
+    static double identity(double x) {
+        return x;
+    }
+
+    /**
+     * Identity function, with reference cast.
+     * @param t an arbitrary reference type
+     * @param x an arbitrary reference value
+     * @return the same value x
+     */
+    static <T,U> T castReference(Class<? extends T> t, U x) {
+        return t.cast(x);
+    }
+
+    private static final MethodHandle IDENTITY, IDENTITY_I, IDENTITY_J, CAST_REFERENCE, ALWAYS_NULL, ALWAYS_ZERO, ZERO_OBJECT, IGNORE, EMPTY;
+    static {
+        try {
+            MethodType idType = MethodType.genericMethodType(1);
+            MethodType castType = idType.insertParameterTypes(0, Class.class);
+            MethodType alwaysZeroType = idType.changeReturnType(int.class);
+            MethodType ignoreType = idType.changeReturnType(void.class);
+            MethodType zeroObjectType = MethodType.genericMethodType(0);
+            IDENTITY = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", idType);
+            IDENTITY_I = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", MethodType.methodType(int.class, int.class));
+            IDENTITY_J = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", MethodType.methodType(long.class, long.class));
+            //CAST_REFERENCE = IMPL_LOOKUP.findVirtual(Class.class, "cast", idType);
+            CAST_REFERENCE = IMPL_LOOKUP.findStatic(ValueConversions.class, "castReference", castType);
+            ALWAYS_NULL = IMPL_LOOKUP.findStatic(ValueConversions.class, "alwaysNull", idType);
+            ALWAYS_ZERO = IMPL_LOOKUP.findStatic(ValueConversions.class, "alwaysZero", alwaysZeroType);
+            ZERO_OBJECT = IMPL_LOOKUP.findStatic(ValueConversions.class, "zeroObject", zeroObjectType);
+            IGNORE = IMPL_LOOKUP.findStatic(ValueConversions.class, "ignore", ignoreType);
+            EMPTY = IMPL_LOOKUP.findStatic(ValueConversions.class, "empty", ignoreType.dropParameterTypes(0, 1));
+        } catch (Exception ex) {
+            Error err = new InternalError("uncaught exception");
+            err.initCause(ex);
+            throw err;
+        }
+    }
+
+    private static final EnumMap<Wrapper, MethodHandle> WRAPPER_CASTS
+            = new EnumMap<Wrapper, MethodHandle>(Wrapper.class);
+
+    private static final EnumMap<Wrapper, MethodHandle> EXACT_WRAPPER_CASTS
+            = new EnumMap<Wrapper, MethodHandle>(Wrapper.class);
+
+    /** Return a method that casts its sole argument (an Object) to the given type
+     *  and returns it as the given type (if exact is true), or as plain Object (if erase is true).
+     */
+    public static MethodHandle cast(Class<?> type, boolean exact) {
+        if (type.isPrimitive())  throw new IllegalArgumentException("cannot cast primitive type "+type);
+        MethodHandle mh = null;
+        Wrapper wrap = null;
+        EnumMap<Wrapper, MethodHandle> cache = null;
+        if (Wrapper.isWrapperType(type)) {
+            wrap = Wrapper.forWrapperType(type);
+            cache = (exact ? EXACT_WRAPPER_CASTS : WRAPPER_CASTS);
+            mh = cache.get(wrap);
+            if (mh != null)  return mh;
+        }
+        if (VerifyType.isNullReferenceConversion(Object.class, type))
+            mh = IDENTITY;
+        else if (VerifyType.isNullType(type))
+            mh = ALWAYS_NULL;
+        else
+            mh = MethodHandles.insertArguments(CAST_REFERENCE, 0, type);
+        if (exact) {
+            MethodType xmt = MethodType.methodType(type, Object.class);
+            mh = MethodHandles.explicitCastArguments(mh, xmt);
+            //mh = AdapterMethodHandle.makeRetypeRaw(IMPL_TOKEN, xmt, mh);
+        }
+        if (cache != null)
+            cache.put(wrap, mh);
+        return mh;
+    }
+
+    public static MethodHandle identity() {
+        return IDENTITY;
+    }
+
+    public static MethodHandle identity(Class<?> type) {
+        // This stuff has been moved into MethodHandles:
+        return MethodHandles.identity(type);
+    }
+
+    public static MethodHandle identity(Wrapper wrap) {
+        EnumMap<Wrapper, MethodHandle> cache = CONSTANT_FUNCTIONS[1];
+        MethodHandle mh = cache.get(wrap);
+        if (mh != null) {
+            return mh;
+        }
+        // slow path
+        MethodType type = MethodType.methodType(wrap.primitiveType());
+        if (wrap != Wrapper.VOID)
+            type = type.appendParameterTypes(wrap.primitiveType());
+        try {
+            mh = IMPL_LOOKUP.findStatic(ValueConversions.class, "identity", type);
+        } catch (ReflectiveOperationException ex) {
+            mh = null;
+        }
+        if (mh == null && wrap == Wrapper.VOID) {
+            mh = EMPTY;  // #(){} : #()void
+        }
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+
+        if (mh != null) {
+            cache.put(wrap, mh);
+            return mh;
+        }
+        throw new IllegalArgumentException("cannot find identity for " + wrap);
+    }
+
+    private static final Object[] NO_ARGS_ARRAY = {};
+    private static Object[] makeArray(Object... args) { return args; }
+    private static Object[] array() { return NO_ARGS_ARRAY; }
+    private static Object[] array(Object a0)
+                { return makeArray(a0); }
+    private static Object[] array(Object a0, Object a1)
+                { return makeArray(a0, a1); }
+    private static Object[] array(Object a0, Object a1, Object a2)
+                { return makeArray(a0, a1, a2); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3)
+                { return makeArray(a0, a1, a2, a3); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4)
+                { return makeArray(a0, a1, a2, a3, a4); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5)
+                { return makeArray(a0, a1, a2, a3, a4, a5); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6, Object a7)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6, Object a7,
+                                  Object a8)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6, Object a7,
+                                  Object a8, Object a9)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+    static MethodHandle[] makeArrays() {
+        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
+        MethodHandles.Lookup lookup = IMPL_LOOKUP;
+        for (;;) {
+            int nargs = arrays.size();
+            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(Object[].class);
+            String name = "array";
+            MethodHandle array = null;
+            try {
+                array = lookup.findStatic(ValueConversions.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+            }
+            if (array == null)  break;
+            arrays.add(array);
+        }
+        assert(arrays.size() == 11);  // current number of methods
+        return arrays.toArray(new MethodHandle[0]);
+    }
+    static final MethodHandle[] ARRAYS = makeArrays();
+
+    /** Return a method handle that takes the indicated number of Object
+     *  arguments and returns an Object array of them, as if for varargs.
+     */
+    public static MethodHandle varargsArray(int nargs) {
+        if (nargs < ARRAYS.length)
+            return ARRAYS[nargs];
+        // else need to spin bytecode or do something else fancy
+        throw new UnsupportedOperationException("NYI: cannot form a varargs array of length "+nargs);
+    }
+
+    private static final List<Object> NO_ARGS_LIST = Arrays.asList(NO_ARGS_ARRAY);
+    private static List<Object> makeList(Object... args) { return Arrays.asList(args); }
+    private static List<Object> list() { return NO_ARGS_LIST; }
+    private static List<Object> list(Object a0)
+                { return makeList(a0); }
+    private static List<Object> list(Object a0, Object a1)
+                { return makeList(a0, a1); }
+    private static List<Object> list(Object a0, Object a1, Object a2)
+                { return makeList(a0, a1, a2); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3)
+                { return makeList(a0, a1, a2, a3); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4)
+                { return makeList(a0, a1, a2, a3, a4); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5)
+                { return makeList(a0, a1, a2, a3, a4, a5); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6, Object a7)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6, Object a7,
+                                     Object a8)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6, Object a7,
+                                     Object a8, Object a9)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+    static MethodHandle[] makeLists() {
+        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
+        MethodHandles.Lookup lookup = IMPL_LOOKUP;
+        for (;;) {
+            int nargs = arrays.size();
+            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(List.class);
+            String name = "list";
+            MethodHandle array = null;
+            try {
+                array = lookup.findStatic(ValueConversions.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+            }
+            if (array == null)  break;
+            arrays.add(array);
+        }
+        assert(arrays.size() == 11);  // current number of methods
+        return arrays.toArray(new MethodHandle[0]);
+    }
+    static final MethodHandle[] LISTS = makeLists();
+
+    /** Return a method handle that takes the indicated number of Object
+     *  arguments and returns List.
+     */
+    public static MethodHandle varargsList(int nargs) {
+        if (nargs < LISTS.length)
+            return LISTS[nargs];
+        // else need to spin bytecode or do something else fancy
+        throw new UnsupportedOperationException("NYI");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/VerifyAccess.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.util;
+
+import java.lang.reflect.Modifier;
+import static java.lang.reflect.Modifier.*;
+
+/**
+ * This class centralizes information about the JVM's linkage access control.
+ * @author jrose
+ */
+public class VerifyAccess {
+
+    private VerifyAccess() { }  // cannot instantiate
+
+    private static final int PACKAGE_ONLY = 0;
+    private static final int ALL_ACCESS_MODES = (PUBLIC|PRIVATE|PROTECTED|PACKAGE_ONLY);
+    private static final boolean ALLOW_NESTMATE_ACCESS = false;
+
+    /**
+     * Evaluate the JVM linkage rules for access to the given method
+     * on behalf of a caller class which proposes to perform the access.
+     * Return true if the caller class has privileges to invoke a method
+     * or access a field with the given properties.
+     * This requires an accessibility check of the referencing class,
+     * plus an accessibility check of the member within the class,
+     * which depends on the member's modifier flags.
+     * <p>
+     * The relevant properties include the defining class ({@code defc})
+     * of the member, and its modifier flags ({@code mods}).
+     * Also relevant is the class used to make the initial symbolic reference
+     * to the member ({@code refc}).  If this latter class is not distinguished,
+     * the defining class should be passed for both arguments ({@code defc == refc}).
+     * <h3>JVM Specification, 5.4.4 "Access Control"</h3>
+     * A field or method R is accessible to a class or interface D if
+     * and only if any of the following conditions is true:<ul>
+     * <li>R is public.
+     * <li>R is protected and is declared in a class C, and D is either
+     *     a subclass of C or C itself.  Furthermore, if R is not
+     *     static, then the symbolic reference to R must contain a
+     *     symbolic reference to a class T, such that T is either a
+     *     subclass of D, a superclass of D or D itself.
+     * <li>R is either protected or has default access (that is,
+     *     neither public nor protected nor private), and is declared
+     *     by a class in the same runtime package as D.
+     * <li>R is private and is declared in D.
+     * </ul>
+     * This discussion of access control omits a related restriction
+     * on the target of a protected field access or method invocation
+     * (the target must be of class D or a subtype of D). That
+     * requirement is checked as part of the verification process
+     * (5.4.1); it is not part of link-time access control.
+     * @param refc the class used in the symbolic reference to the proposed member
+     * @param defc the class in which the proposed member is actually defined
+     * @param mods modifier flags for the proposed member
+     * @param lookupClass the class for which the access check is being made
+     * @return true iff the the accessing class can access such a member
+     */
+    public static boolean isMemberAccessible(Class<?> refc,  // symbolic ref class
+                                             Class<?> defc,  // actual def class
+                                             int      mods,  // actual member mods
+                                             Class<?> lookupClass) {
+        // Usually refc and defc are the same, but if they differ, verify them both.
+        if (refc != defc) {
+            if (!isClassAccessible(refc, lookupClass)) {
+                // Note that defc is verified in the switch below.
+                return false;
+            }
+            if ((mods & (ALL_ACCESS_MODES|STATIC)) == (PROTECTED|STATIC)) {
+                // Apply the special rules for refc here.
+                if (!isRelatedClass(refc, lookupClass))
+                    return isSamePackage(defc, lookupClass);
+                // If refc == defc, the call to isPublicSuperClass will do
+                // the whole job, since in that case refc (as defc) will be
+                // a superclass of the lookup class.
+            }
+        }
+        if (defc == lookupClass)
+            return true;        // easy check; all self-access is OK
+        switch (mods & ALL_ACCESS_MODES) {
+        case PUBLIC:
+            if (refc != defc)  return true;  // already checked above
+            return isClassAccessible(refc, lookupClass);
+        case PROTECTED:
+            return isSamePackage(defc, lookupClass) || isPublicSuperClass(defc, lookupClass);
+        case PACKAGE_ONLY:
+            return isSamePackage(defc, lookupClass);
+        case PRIVATE:
+            // Loosened rules for privates follows access rules for inner classes.
+            return (ALLOW_NESTMATE_ACCESS &&
+                    isSamePackageMember(defc, lookupClass));
+        default:
+            throw new IllegalArgumentException("bad modifiers: "+Modifier.toString(mods));
+        }
+    }
+
+    static boolean isRelatedClass(Class<?> refc, Class<?> lookupClass) {
+        return (refc == lookupClass ||
+                refc.isAssignableFrom(lookupClass) ||
+                lookupClass.isAssignableFrom(refc));
+    }
+
+    static boolean isPublicSuperClass(Class<?> defc, Class<?> lookupClass) {
+        return isPublic(defc.getModifiers()) && defc.isAssignableFrom(lookupClass);
+    }
+
+    /**
+     * Evaluate the JVM linkage rules for access to the given class on behalf of caller.
+     * <h3>JVM Specification, 5.4.4 "Access Control"</h3>
+     * A class or interface C is accessible to a class or interface D
+     * if and only if either of the following conditions are true:<ul>
+     * <li>C is public.
+     * <li>C and D are members of the same runtime package.
+     * </ul>
+     * @param refc the symbolic reference class to which access is being checked (C)
+     * @param lookupClass the class performing the lookup (D)
+     */
+    public static boolean isClassAccessible(Class<?> refc, Class<?> lookupClass) {
+        int mods = refc.getModifiers();
+        if (isPublic(mods))
+            return true;
+        if (isSamePackage(lookupClass, refc))
+            return true;
+        return false;
+    }
+
+    /**
+     * Test if two classes have the same class loader and package qualifier.
+     * @param class1
+     * @param class2
+     * @return whether they are in the same package
+     */
+    public static boolean isSamePackage(Class<?> class1, Class<?> class2) {
+        if (class1 == class2)
+            return true;
+        if (!loadersAreRelated(class1.getClassLoader(), class2.getClassLoader()))
+            return false;
+        String name1 = class1.getName(), name2 = class2.getName();
+        int dot = name1.lastIndexOf('.');
+        if (dot != name2.lastIndexOf('.'))
+            return false;
+        for (int i = 0; i < dot; i++) {
+            if (name1.charAt(i) != name2.charAt(i))
+                return false;
+        }
+        return true;
+    }
+
+    /**
+     * Test if two classes are defined as part of the same package member (top-level class).
+     * If this is true, they can share private access with each other.
+     * @param class1
+     * @param class2
+     * @return whether they are identical or nested together
+     */
+    public static boolean isSamePackageMember(Class<?> class1, Class<?> class2) {
+        if (class1 == class2)
+            return true;
+        if (!isSamePackage(class1, class2))
+            return false;
+        if (getOutermostEnclosingClass(class1) != getOutermostEnclosingClass(class2))
+            return false;
+        return true;
+    }
+
+    private static Class<?> getOutermostEnclosingClass(Class<?> c) {
+        Class<?> pkgmem = c;
+        for (Class<?> enc = c; (enc = enc.getEnclosingClass()) != null; )
+            pkgmem = enc;
+        return pkgmem;
+    }
+
+    private static boolean loadersAreRelated(ClassLoader loader1, ClassLoader loader2) {
+        if (loader1 == loader2 || loader1 == null || loader2 == null) {
+            return true;
+        }
+        for (ClassLoader scan1 = loader1;
+                scan1 != null; scan1 = scan1.getParent()) {
+            if (scan1 == loader2)  return true;
+        }
+        for (ClassLoader scan2 = loader2;
+                scan2 != null; scan2 = scan2.getParent()) {
+            if (scan2 == loader1)  return true;
+        }
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/VerifyType.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.util;
+
+import java.lang.invoke.MethodType;
+import sun.invoke.empty.Empty;
+
+/**
+ * This class centralizes information about the JVM verifier
+ * and its requirements about type correctness.
+ * @author jrose
+ */
+public class VerifyType {
+
+    private VerifyType() { }  // cannot instantiate
+
+    /**
+     * True if a value can be stacked as the source type and unstacked as the
+     * destination type, without violating the JVM's type consistency.
+     *
+     * @param call the type of a stacked value
+     * @param recv the type by which we'd like to treat it
+     * @return whether the retyping can be done without motion or reformatting
+     */
+    public static boolean isNullConversion(Class<?> src, Class<?> dst) {
+        if (src == dst)            return true;
+        // Verifier allows any interface to be treated as Object:
+        if (dst.isInterface())     dst = Object.class;
+        if (src.isInterface())     src = Object.class;
+        if (src == dst)            return true;  // check again
+        if (dst == void.class)     return true;  // drop any return value
+        if (isNullType(src))       return !dst.isPrimitive();
+        if (!src.isPrimitive())    return dst.isAssignableFrom(src);
+        // Verifier allows an int to carry byte, short, char, or even boolean:
+        if (dst == int.class)      return Wrapper.forPrimitiveType(src).isSubwordOrInt();
+        return false;
+    }
+
+    /**
+     * Specialization of isNullConversion to reference types.
+
+     * @param call the type of a stacked value
+     * @param recv the reference type by which we'd like to treat it
+     * @return whether the retyping can be done without a cast
+     */
+    public static boolean isNullReferenceConversion(Class<?> src, Class<?> dst) {
+        assert(!dst.isPrimitive());
+        if (dst.isInterface())  return true;   // verifier allows this
+        if (isNullType(src))    return true;
+        return dst.isAssignableFrom(src);
+    }
+
+    /**
+     * Is the given type java.lang.Null or an equivalent null-only type?
+     */
+    public static boolean isNullType(Class<?> type) {
+        if (type == null)  return false;
+        return type == NULL_CLASS
+            // This one may also be used as a null type.
+            // TO DO: Decide if we really want to legitimize it here.
+            // Probably we do, unless java.lang.Null really makes it into Java 7
+            //|| type == Void.class
+            // Locally known null-only class:
+            || type == Empty.class
+            ;
+    }
+    private static final Class<?> NULL_CLASS;
+    static {
+        Class<?> nullClass = null;
+        try {
+            nullClass = Class.forName("java.lang.Null");
+        } catch (ClassNotFoundException ex) {
+            // OK, we'll cope
+        }
+        NULL_CLASS = nullClass;
+    }
+
+    /**
+     * True if a method handle can receive a call under a slightly different
+     * method type, without moving or reformatting any stack elements.
+     *
+     * @param call the type of call being made
+     * @param recv the type of the method handle receiving the call
+     * @return whether the retyping can be done without motion or reformatting
+     */
+    public static boolean isNullConversion(MethodType call, MethodType recv) {
+        if (call == recv)  return true;
+        int len = call.parameterCount();
+        if (len != recv.parameterCount())  return false;
+        for (int i = 0; i < len; i++)
+            if (!isNullConversion(call.parameterType(i), recv.parameterType(i)))
+                return false;
+        return isNullConversion(recv.returnType(), call.returnType());
+    }
+
+    //TO DO: isRawConversion
+
+    /**
+     * Determine if the JVM verifier allows a value of type call to be
+     * passed to a formal parameter (or return variable) of type recv.
+     * Returns 1 if the verifier allows the types to match without conversion.
+     * Returns -1 if the types can be made to match by a JVM-supported adapter.
+     * Cases supported are:
+     * <ul><li>checkcast
+     * </li><li>conversion between any two integral types (but not floats)
+     * </li><li>unboxing from a wrapper to its corresponding primitive type
+     * </li><li>conversion in either direction between float and double
+     * </li></ul>
+     * (Autoboxing is not supported here; it must be done via Java code.)
+     * Returns 0 otherwise.
+     */
+    public static int canPassUnchecked(Class<?> src, Class<?> dst) {
+        if (src == dst)
+            return 1;
+
+        if (dst.isPrimitive()) {
+            if (dst == void.class)
+                // Return anything to a caller expecting void.
+                // This is a property of the implementation, which links
+                // return values via a register rather than via a stack push.
+                // This makes it possible to ignore cleanly.
+                return 1;
+            if (src == void.class)
+                return 0;  // void-to-something?
+            if (!src.isPrimitive())
+                // Cannot pass a reference to any primitive type (exc. void).
+                return 0;
+            Wrapper sw = Wrapper.forPrimitiveType(src);
+            Wrapper dw = Wrapper.forPrimitiveType(dst);
+            if (sw.isSubwordOrInt() && dw.isSubwordOrInt()) {
+                if (sw.bitWidth() >= dw.bitWidth())
+                    return -1;   // truncation may be required
+                if (!dw.isSigned() && sw.isSigned())
+                    return -1;   // sign elimination may be required
+            }
+            if (src == float.class || dst == float.class) {
+                if (src == double.class || dst == double.class)
+                    return -1;   // floating conversion may be required
+                else
+                    return 0;    // other primitive conversions NYI
+            } else {
+                // all fixed-point conversions are supported
+                return 0;
+            }
+        } else if (src.isPrimitive()) {
+            // Cannot pass a primitive to any reference type.
+            // (Maybe allow null.class?)
+            return 0;
+        }
+
+        // Handle reference types in the rest of the block:
+
+        // The verifier treats interfaces exactly like Object.
+        if (isNullReferenceConversion(src, dst))
+            // pass any reference to object or an arb. interface
+            return 1;
+        // else it's a definite "maybe" (cast is required)
+        return -1;
+    }
+
+    public static int canPassRaw(Class<?> src, Class<?> dst) {
+        if (dst.isPrimitive()) {
+            if (dst == void.class)
+                // As above, return anything to a caller expecting void.
+                return 1;
+            if (src == void.class)
+                // Special permission for raw conversions: allow a void
+                // to be captured as a garbage int.
+                // Caller promises that the actual value will be disregarded.
+                return dst == int.class ? 1 : 0;
+            if (isNullType(src))
+                // Special permission for raw conversions: allow a null
+                // to be reinterpreted as anything.  For objects, it is safe,
+                // and for primitives you get a garbage value (probably zero).
+                return 1;
+            if (!src.isPrimitive())
+                return 0;
+            Wrapper sw = Wrapper.forPrimitiveType(src);
+            Wrapper dw = Wrapper.forPrimitiveType(dst);
+            if (sw.stackSlots() == dw.stackSlots())
+                return 1;  // can do a reinterpret-cast on a stacked primitive
+            if (sw.isSubwordOrInt() && dw == Wrapper.VOID)
+                return 1;  // can drop an outgoing int value
+            return 0;
+        } else if (src.isPrimitive()) {
+            return 0;
+        }
+
+        // Both references.
+        if (isNullReferenceConversion(src, dst))
+            return 1;
+        return -1;
+    }
+
+    public static boolean isSpreadArgType(Class<?> spreadArg) {
+        return spreadArg.isArray();
+    }
+    public static Class<?> spreadArgElementType(Class<?> spreadArg, int i) {
+        return spreadArg.getComponentType();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/Wrapper.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,562 @@
+/*
+ * Copyright (c) 2008, 2011, 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 sun.invoke.util;
+
+public enum Wrapper {
+    BOOLEAN(Boolean.class, boolean.class, 'Z', (Boolean)false, Format.unsigned(1)),
+    // These must be in the order defined for widening primitive conversions in JLS 5.1.2
+    BYTE(Byte.class, byte.class, 'B', (Byte)(byte)0, Format.signed(8)),
+    SHORT(Short.class, short.class, 'S', (Short)(short)0, Format.signed(16)),
+    CHAR(Character.class, char.class, 'C', (Character)(char)0, Format.unsigned(16)),
+    INT(Integer.class, int.class, 'I', (Integer)(int)0, Format.signed(32)),
+    LONG(Long.class, long.class, 'J', (Long)(long)0, Format.signed(64)),
+    FLOAT(Float.class, float.class, 'F', (Float)(float)0, Format.floating(32)),
+    DOUBLE(Double.class, double.class, 'D', (Double)(double)0, Format.floating(64)),
+    //NULL(Null.class, null.class, 'N', null, Format.other(1)),
+    OBJECT(Object.class, Object.class, 'L', null, Format.other(1)),
+    // VOID must be the last type, since it is "assignable" from any other type:
+    VOID(Void.class, void.class, 'V', null, Format.other(0)),
+    ;
+
+    private final Class<?> wrapperType;
+    private final Class<?> primitiveType;
+    private final char     basicTypeChar;
+    private final Object   zero;
+    private final int      format;
+    private final String   simpleName;
+
+    private Wrapper(Class<?> wtype, Class<?> ptype, char tchar, Object zero, int format) {
+        this.wrapperType = wtype;
+        this.primitiveType = ptype;
+        this.basicTypeChar = tchar;
+        this.zero = zero;
+        this.format = format;
+        this.simpleName = wtype.getSimpleName();
+    }
+
+    private static abstract class Format {
+        static final int SLOT_SHIFT = 0, SIZE_SHIFT = 2, KIND_SHIFT = 12;
+        static final int
+                SIGNED   = (-1) << KIND_SHIFT,
+                UNSIGNED = 0    << KIND_SHIFT,
+                FLOATING = 1    << KIND_SHIFT;
+        static final int
+                SLOT_MASK = ((1<<(SIZE_SHIFT-SLOT_SHIFT))-1),
+                SIZE_MASK = ((1<<(KIND_SHIFT-SIZE_SHIFT))-1);
+        static int format(int kind, int size, int slots) {
+            assert(((kind >> KIND_SHIFT) << KIND_SHIFT) == kind);
+            assert((size & (size-1)) == 0); // power of two
+            assert((kind == SIGNED)   ? (size > 0) :
+                   (kind == UNSIGNED) ? (size > 0) :
+                   (kind == FLOATING) ? (size == 32 || size == 64)  :
+                   false);
+            assert((slots == 2) ? (size == 64) :
+                   (slots == 1) ? (size <= 32) :
+                   false);
+            return kind | (size << SIZE_SHIFT) | (slots << SLOT_SHIFT);
+        }
+        static final int
+                INT      = SIGNED   | (32 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
+                SHORT    = SIGNED   | (16 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
+                BOOLEAN  = UNSIGNED | (1  << SIZE_SHIFT) | (1 << SLOT_SHIFT),
+                CHAR     = UNSIGNED | (16 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
+                FLOAT    = FLOATING | (32 << SIZE_SHIFT) | (1 << SLOT_SHIFT),
+                VOID     = UNSIGNED | (0  << SIZE_SHIFT) | (0 << SLOT_SHIFT),
+                NUM_MASK = (-1) << SIZE_SHIFT;
+        static int signed(int size)   { return format(SIGNED,   size, (size > 32 ? 2 : 1)); }
+        static int unsigned(int size) { return format(UNSIGNED, size, (size > 32 ? 2 : 1)); }
+        static int floating(int size) { return format(FLOATING, size, (size > 32 ? 2 : 1)); }
+        static int other(int slots)   { return slots << SLOT_SHIFT; }
+    }
+
+    /// format queries:
+
+    /** How many bits are in the wrapped value?  Returns 0 for OBJECT or VOID. */
+    public int     bitWidth()      { return (format >> Format.SIZE_SHIFT) & Format.SIZE_MASK; }
+    /** How many JVM stack slots occupied by the wrapped value?  Returns 0 for VOID. */
+    public int     stackSlots()    { return (format >> Format.SLOT_SHIFT) & Format.SLOT_MASK; }
+    /** Does the wrapped value occupy a single JVM stack slot? */
+    public boolean isSingleWord()  { return (format & (1 << Format.SLOT_SHIFT)) != 0; }
+    /** Does the wrapped value occupy two JVM stack slots? */
+    public boolean isDoubleWord()  { return (format & (2 << Format.SLOT_SHIFT)) != 0; }
+    /** Is the wrapped type numeric (not void or object)? */
+    public boolean isNumeric()     { return (format & Format.NUM_MASK) != 0; }
+    /** Is the wrapped type a primitive other than float, double, or void? */
+    public boolean isIntegral()    { return isNumeric() && format < Format.FLOAT; }
+    /** Is the wrapped type one of int, boolean, byte, char, or short? */
+    public boolean isSubwordOrInt() { return isIntegral() && isSingleWord(); }
+    /* Is the wrapped value a signed integral type (one of byte, short, int, or long)? */
+    public boolean isSigned()      { return format < Format.VOID; }
+    /* Is the wrapped value an unsigned integral type (one of boolean or char)? */
+    public boolean isUnsigned()    { return format >= Format.BOOLEAN && format < Format.FLOAT; }
+    /** Is the wrapped type either float or double? */
+    public boolean isFloating()    { return format >= Format.FLOAT; }
+
+    /** Does the JVM verifier allow a variable of this wrapper's
+     *  primitive type to be assigned from a value of the given wrapper's primitive type?
+     *  Cases:
+     *  <ul>
+     *  <li>unboxing followed by widening primitive conversion
+     *  <li>any type converted to {@code void}
+     *  <li>boxing conversion followed by widening reference conversion to {@code Object}
+     *  <li>conversion of {@code boolean} to any type
+     *  </ul>
+     */
+    public boolean isConvertibleFrom(Wrapper source) {
+        if (this == source)  return true;
+        if (this.compareTo(source) < 0) {
+            // At best, this is a narrowing conversion.
+            return false;
+        }
+        if ((this.format ^ source.format) == (Format.SHORT ^ Format.CHAR)) {
+            assert (this == SHORT && source == CHAR) || (this == CHAR && source == SHORT);
+            return false;
+        }
+        return true;
+    }
+
+    /** Produce a zero value for the given wrapper type.
+     *  This will be a numeric zero for a number or character,
+     *  false for a boolean, and null for a reference or void.
+     *  The common thread is that this is what is contained
+     *  in a default-initialized variable of the given primitive
+     *  type.  (For void, it is what a reflective method returns
+     *  instead of no value at all.)
+     */
+    public Object zero() { return zero; }
+
+    /** Produce a zero value for the given wrapper type T.
+     *  The optional argument must a type compatible with this wrapper.
+     *  Equivalent to {@code this.cast(this.zero(), type)}.
+     */
+    public <T> T zero(Class<T> type) { return convert(zero, type); }
+
+//    /** Produce a wrapper for the given wrapper or primitive type. */
+//    public static Wrapper valueOf(Class<?> type) {
+//        if (isPrimitiveType(type))
+//            return forPrimitiveType(type);
+//        else
+//            return forWrapperType(type);
+//    }
+
+    /** Return the wrapper that wraps values of the given type.
+     *  The type may be {@code Object}, meaning the {@code OBJECT} wrapper.
+     *  Otherwise, the type must be a primitive.
+     *  @throws IllegalArgumentException for unexpected types
+     */
+    public static Wrapper forPrimitiveType(Class<?> type) {
+        Wrapper w = findPrimitiveType(type);
+        if (w != null)  return w;
+        if (type.isPrimitive())
+            throw new InternalError(); // redo hash function
+        throw newIllegalArgumentException("not primitive: "+type);
+    }
+
+    static Wrapper findPrimitiveType(Class<?> type) {
+        Wrapper w = FROM_PRIM[hashPrim(type)];
+        if (w != null && w.primitiveType == type) {
+            return w;
+        }
+        return null;
+    }
+
+    /** Return the wrapper that wraps values into the given wrapper type.
+     *  If it is {@code Object} or an interface, return {@code OBJECT}.
+     *  Otherwise, it must be a wrapper type.
+     *  The type must not be a primitive type.
+     *  @throws IllegalArgumentException for unexpected types
+     */
+    public static Wrapper forWrapperType(Class<?> type) {
+        Wrapper w = findWrapperType(type);
+        if (w != null)  return w;
+        for (Wrapper x : values())
+            if (x.wrapperType == type)
+                throw new InternalError(); // redo hash function
+        throw newIllegalArgumentException("not wrapper: "+type);
+    }
+
+    static Wrapper findWrapperType(Class<?> type) {
+        Wrapper w = FROM_WRAP[hashWrap(type)];
+        if (w != null && w.wrapperType == type) {
+            return w;
+        }
+        if (type.isInterface())
+            return OBJECT;
+        return null;
+    }
+
+    /** Return the wrapper that corresponds to the given bytecode
+     *  signature character.  Return {@code OBJECT} for the character 'L'.
+     *  @throws IllegalArgumentException for any non-signature character or {@code '['}.
+     */
+    public static Wrapper forBasicType(char type) {
+        Wrapper w = FROM_CHAR[hashChar(type)];
+        if (w != null && w.basicTypeChar == type) {
+            return w;
+        }
+        for (Wrapper x : values())
+            if (w.basicTypeChar == type)
+                throw new InternalError(); // redo hash function
+        throw newIllegalArgumentException("not basic type char: "+type);
+    }
+
+    /** Return the wrapper for the given type, if it is
+     *  a primitive type, else return {@code OBJECT}.
+     */
+    public static Wrapper forBasicType(Class<?> type) {
+        if (type.isPrimitive())
+            return forPrimitiveType(type);
+        return OBJECT;  // any reference, including wrappers or arrays
+    }
+
+    // Note on perfect hashes:
+    //   for signature chars c, do (c + (c >> 1)) % 16
+    //   for primitive type names n, do (n[0] + n[2]) % 16
+    // The type name hash works for both primitive and wrapper names.
+    // You can add "java/lang/Object" to the primitive names.
+    // But you add the wrapper name Object, use (n[2] + (3*n[1])) % 16.
+    private static final Wrapper[] FROM_PRIM = new Wrapper[16];
+    private static final Wrapper[] FROM_WRAP = new Wrapper[16];
+    private static final Wrapper[] FROM_CHAR = new Wrapper[16];
+    private static int hashPrim(Class<?> x) {
+        String xn = x.getName();
+        if (xn.length() < 3)  return 0;
+        return (xn.charAt(0) + xn.charAt(2)) % 16;
+    }
+    private static int hashWrap(Class<?> x) {
+        String xn = x.getName();
+        final int offset = 10; assert(offset == "java.lang.".length());
+        if (xn.length() < offset+3)  return 0;
+        return (3*xn.charAt(offset+1) + xn.charAt(offset+2)) % 16;
+    }
+    private static int hashChar(char x) {
+        return (x + (x >> 1)) % 16;
+    }
+    static {
+        for (Wrapper w : values()) {
+            int pi = hashPrim(w.primitiveType);
+            int wi = hashWrap(w.wrapperType);
+            int ci = hashChar(w.basicTypeChar);
+            assert(FROM_PRIM[pi] == null);
+            assert(FROM_WRAP[wi] == null);
+            assert(FROM_CHAR[ci] == null);
+            FROM_PRIM[pi] = w;
+            FROM_WRAP[wi] = w;
+            FROM_CHAR[ci] = w;
+        }
+        //assert(jdk.sun.invoke.util.WrapperTest.test(false));
+    }
+
+    /** What is the primitive type wrapped by this wrapper? */
+    public Class<?> primitiveType() { return primitiveType; }
+
+    /** What is the wrapper type for this wrapper? */
+    public Class<?> wrapperType() { return wrapperType; }
+
+    /** What is the wrapper type for this wrapper?
+     * Otherwise, the example type must be the wrapper type,
+     * or the corresponding primitive type.
+     * (For {@code OBJECT}, the example type can be any non-primitive,
+     * and is normalized to {@code Object.class}.)
+     * The resulting class type has the same type parameter.
+     */
+    public <T> Class<T> wrapperType(Class<T> exampleType) {
+        if (exampleType == wrapperType) {
+            return exampleType;
+        } else if (exampleType == primitiveType ||
+                   wrapperType == Object.class ||
+                   exampleType.isInterface()) {
+            return forceType(wrapperType, exampleType);
+        }
+        throw newClassCastException(exampleType, primitiveType);
+    }
+
+    private static ClassCastException newClassCastException(Class<?> actual, Class<?> expected) {
+        return new ClassCastException(actual + " is not compatible with " + expected);
+    }
+
+    /** If {@code type} is a primitive type, return the corresponding
+     *  wrapper type, else return {@code type} unchanged.
+     */
+    public static <T> Class<T> asWrapperType(Class<T> type) {
+        if (type.isPrimitive()) {
+            return forPrimitiveType(type).wrapperType(type);
+        }
+        return type;
+    }
+
+    /** If {@code type} is a wrapper type, return the corresponding
+     *  primitive type, else return {@code type} unchanged.
+     */
+    public static <T> Class<T> asPrimitiveType(Class<T> type) {
+        Wrapper w = findWrapperType(type);
+        if (w != null) {
+            return forceType(w.primitiveType(), type);
+        }
+        return type;
+    }
+
+    /** Query:  Is the given type a wrapper, such as {@code Integer} or {@code Void}? */
+    public static boolean isWrapperType(Class<?> type) {
+        return findWrapperType(type) != null;
+    }
+
+    /** Query:  Is the given type a primitive, such as {@code int} or {@code void}? */
+    public static boolean isPrimitiveType(Class<?> type) {
+        return type.isPrimitive();
+    }
+
+    /** What is the bytecode signature character for this type?
+     *  All non-primitives, including array types, report as 'L', the signature character for references.
+     */
+    public static char basicTypeChar(Class<?> type) {
+        if (!type.isPrimitive())
+            return 'L';
+        else
+            return forPrimitiveType(type).basicTypeChar();
+    }
+
+    /** What is the bytecode signature character for this wrapper's
+     *  primitive type?
+     */
+    public char basicTypeChar() { return basicTypeChar; }
+
+    /** What is the simple name of the wrapper type?
+     */
+    public String simpleName() { return simpleName; }
+
+//    /** Wrap a value in the given type, which may be either a primitive or wrapper type.
+//     *  Performs standard primitive conversions, including truncation and float conversions.
+//     */
+//    public static <T> T wrap(Object x, Class<T> type) {
+//        return Wrapper.valueOf(type).cast(x, type);
+//    }
+
+    /** Cast a wrapped value to the given type, which may be either a primitive or wrapper type.
+     *  The given target type must be this wrapper's primitive or wrapper type.
+     *  If this wrapper is OBJECT, the target type may also be an interface, perform no runtime check.
+     *  Performs standard primitive conversions, including truncation and float conversions.
+     *  The given type must be compatible with this wrapper.  That is, it must either
+     *  be the wrapper type (or a subtype, in the case of {@code OBJECT}) or else
+     *  it must be the wrapper's primitive type.
+     *  Primitive conversions are only performed if the given type is itself a primitive.
+     *  @throws ClassCastException if the given type is not compatible with this wrapper
+     */
+    public <T> T cast(Object x, Class<T> type) {
+        return convert(x, type, true);
+    }
+
+    /** Convert a wrapped value to the given type.
+     *  The given target type must be this wrapper's primitive or wrapper type.
+     *  This is equivalent to {@link #cast}, except that it refuses to perform
+     *  narrowing primitive conversions.
+     */
+    public <T> T convert(Object x, Class<T> type) {
+        return convert(x, type, false);
+    }
+
+    private <T> T convert(Object x, Class<T> type, boolean isCast) {
+        if (this == OBJECT) {
+            // If the target wrapper is OBJECT, just do a reference cast.
+            // If the target type is an interface, perform no runtime check.
+            // (This loophole is safe, and is allowed by the JVM verifier.)
+            // If the target type is a primitive, change it to a wrapper.
+            @SuppressWarnings("unchecked")
+            T result = (T) x;  // unchecked warning is expected here
+            return result;
+        }
+        Class<T> wtype = wrapperType(type);
+        if (wtype.isInstance(x)) {
+            @SuppressWarnings("unchecked")
+            T result = (T) x;  // unchecked warning is expected here
+            return result;
+        }
+        Class<?> sourceType = x.getClass();  // throw NPE if x is null
+        if (!isCast) {
+            Wrapper source = findWrapperType(sourceType);
+            if (source == null || !this.isConvertibleFrom(source)) {
+                throw newClassCastException(wtype, sourceType);
+            }
+        }
+        @SuppressWarnings("unchecked")
+        T result = (T) wrap(x);  // unchecked warning is expected here
+        assert result.getClass() == wtype;
+        return result;
+    }
+
+    /** Cast a reference type to another reference type.
+     * If the target type is an interface, perform no runtime check.
+     * (This loophole is safe, and is allowed by the JVM verifier.)
+     * If the target type is a primitive, change it to a wrapper.
+     */
+    static <T> Class<T> forceType(Class<?> type, Class<T> exampleType) {
+        boolean z = (type == exampleType ||
+               type.isPrimitive() && forPrimitiveType(type) == findWrapperType(exampleType) ||
+               exampleType.isPrimitive() && forPrimitiveType(exampleType) == findWrapperType(type) ||
+               type == Object.class && !exampleType.isPrimitive());
+        if (!z)
+            System.out.println(type+" <= "+exampleType);
+        assert(type == exampleType ||
+               type.isPrimitive() && forPrimitiveType(type) == findWrapperType(exampleType) ||
+               exampleType.isPrimitive() && forPrimitiveType(exampleType) == findWrapperType(type) ||
+               type == Object.class && !exampleType.isPrimitive());
+        @SuppressWarnings("unchecked")
+        Class<T> result = (Class<T>) type;  // unchecked warning is expected here
+        return result;
+    }
+
+    /** Wrap a value in this wrapper's type.
+     * Performs standard primitive conversions, including truncation and float conversions.
+     * Performs returns the unchanged reference for {@code OBJECT}.
+     * Returns null for {@code VOID}.
+     * Returns a zero value for a null input.
+     * @throws ClassCastException if this wrapper is numeric and the operand
+     *                            is not a number, character, boolean, or null
+     */
+    public Object wrap(Object x) {
+        // do non-numeric wrappers first
+        switch (basicTypeChar) {
+            case 'L': return x;
+            case 'V': return null;
+        }
+        Number xn = numberValue(x);
+        switch (basicTypeChar) {
+            case 'I': return Integer.valueOf(xn.intValue());
+            case 'J': return Long.valueOf(xn.longValue());
+            case 'F': return Float.valueOf(xn.floatValue());
+            case 'D': return Double.valueOf(xn.doubleValue());
+            case 'S': return Short.valueOf((short) xn.intValue());
+            case 'B': return Byte.valueOf((byte) xn.intValue());
+            case 'C': return Character.valueOf((char) xn.intValue());
+            case 'Z': return Boolean.valueOf(boolValue(xn.longValue()));
+        }
+        throw new InternalError("bad wrapper");
+    }
+
+    /** Wrap a value (an int or smaller value) in this wrapper's type.
+     * Performs standard primitive conversions, including truncation and float conversions.
+     * Produces an {@code Integer} for {@code OBJECT}, although the exact type
+     * of the operand is not known.
+     * Returns null for {@code VOID}.
+     */
+    public Object wrap(int x) {
+        if (basicTypeChar == 'L')  return (Integer)x;
+        switch (basicTypeChar) {
+            case 'L': throw newIllegalArgumentException("cannot wrap to object type");
+            case 'V': return null;
+            case 'I': return Integer.valueOf((int)x);
+            case 'J': return Long.valueOf(x);
+            case 'F': return Float.valueOf(x);
+            case 'D': return Double.valueOf(x);
+            case 'S': return Short.valueOf((short) x);
+            case 'B': return Byte.valueOf((byte) x);
+            case 'C': return Character.valueOf((char) x);
+            case 'Z': return Boolean.valueOf(boolValue(x));
+        }
+        throw new InternalError("bad wrapper");
+    }
+
+    /** Wrap a value (a long or smaller value) in this wrapper's type.
+     * Does not perform floating point conversion.
+     * Produces a {@code Long} for {@code OBJECT}, although the exact type
+     * of the operand is not known.
+     * Returns null for {@code VOID}.
+     */
+    public Object wrapRaw(long x) {
+        switch (basicTypeChar) {
+            case 'F':  return Float.valueOf(Float.intBitsToFloat((int)x));
+            case 'D':  return Double.valueOf(Double.longBitsToDouble(x));
+            case 'L':  // same as 'J':
+            case 'J':  return (Long) x;
+        }
+        // Other wrapping operations are just the same, given that the
+        // operand is already promoted to an int.
+        return wrap((int)x);
+    }
+
+    /** Produce bitwise value which encodes the given wrapped value.
+     * Does not perform floating point conversion.
+     * Returns zero for {@code VOID}.
+     */
+    public long unwrapRaw(Object x) {
+        switch (basicTypeChar) {
+            case 'F':  return Float.floatToRawIntBits((Float) x);
+            case 'D':  return Double.doubleToRawLongBits((Double) x);
+
+            case 'L': throw newIllegalArgumentException("cannot unwrap from sobject type");
+            case 'V': return 0;
+            case 'I': return (int)(Integer) x;
+            case 'J': return (long)(Long) x;
+            case 'S': return (short)(Short) x;
+            case 'B': return (byte)(Byte) x;
+            case 'C': return (char)(Character) x;
+            case 'Z': return (boolean)(Boolean) x ? 1 : 0;
+        }
+        throw new InternalError("bad wrapper");
+    }
+
+    /** Report what primitive type holds this guy's raw value. */
+    public Class<?> rawPrimitiveType() {
+        return rawPrimitive().primitiveType();
+    }
+
+    /** Report, as a wrapper, what primitive type holds this guy's raw value.
+     *  Returns self for INT, LONG, OBJECT; returns LONG for DOUBLE,
+     *  else returns INT.
+     */
+    public Wrapper rawPrimitive() {
+        switch (basicTypeChar) {
+            case 'S': case 'B':
+            case 'C': case 'Z':
+            case 'V':
+            case 'F':
+                return INT;
+            case 'D':
+                return LONG;
+        }
+        return this;
+    }
+
+    private static Number numberValue(Object x) {
+        if (x instanceof Number)     return (Number)x;
+        if (x instanceof Character)  return (int)(Character)x;
+        if (x instanceof Boolean)    return (Boolean)x ? 1 : 0;
+        // Remaining allowed case of void:  Must be a null reference.
+        return (Number)x;
+    }
+
+    private static boolean boolValue(long bits) {
+        //bits &= 1;  // simple 31-bit zero extension
+        return (bits != 0);
+    }
+
+    private static RuntimeException newIllegalArgumentException(String message, Object x) {
+        return newIllegalArgumentException(message + x);
+    }
+    private static RuntimeException newIllegalArgumentException(String message) {
+        return new IllegalArgumentException(message);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/invoke/util/package-info.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2008, 2011, 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.
+ */
+
+/**
+ * Extra support for using JSR 292 RI, package java.lang.invoke.
+ * @author jrose
+ */
+
+package sun.invoke.util;
--- a/src/share/classes/sun/java2d/pipe/AAShapePipe.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/java2d/pipe/AAShapePipe.java	Wed Apr 20 04:38:36 2011 +0100
@@ -109,7 +109,7 @@
         Region clip = sg.getCompClip();
         int abox[] = new int[4];
         AATileGenerator aatg =
-            renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0,
+            renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, lw1, lw2,
                                             clip, abox);
         if (aatg == null) {
             // Nothing to render
--- a/src/share/classes/sun/java2d/pisces/Helpers.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/java2d/pisces/Helpers.java	Wed Apr 20 04:38:36 2011 +0100
@@ -154,9 +154,6 @@
     // These use a hardcoded factor of 2 for increasing sizes. Perhaps this
     // should be provided as an argument.
     static float[] widenArray(float[] in, final int cursize, final int numToAdd) {
-        if (in == null) {
-            return new float[5 * numToAdd];
-        }
         if (in.length >= cursize + numToAdd) {
             return in;
         }
--- a/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java	Wed Apr 20 04:38:36 2011 +0100
@@ -191,8 +191,7 @@
                     System.out.println("len = "+runLen);
                     System.out.print(cache.toString());
                     e0.printStackTrace();
-                    System.exit(1);
-                    return;
+                    throw e0;
                 }
 
                 int rx0 = cx;
@@ -215,8 +214,7 @@
                         System.out.println("len = "+runLen);
                         System.out.print(cache.toString());
                         e.printStackTrace();
-                        System.exit(1);
-                        return;
+                        throw e;
                     }
                 }
                 pos += 2;
@@ -250,4 +248,5 @@
      * No further calls will be made on this instance.
      */
     public void dispose() {}
-}
\ No newline at end of file
+}
+
--- a/src/share/classes/sun/java2d/pisces/Renderer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/java2d/pisces/Renderer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -47,16 +47,16 @@
 
         private static final int INIT_CROSSINGS_SIZE = 10;
 
-        private ScanlineIterator() {
+        // Preconditions: Only subpixel scanlines in the range
+        // (start <= subpixel_y <= end) will be evaluated. No
+        // edge may have a valid (i.e. inside the supplied clip)
+        // crossing that would be generated outside that range.
+        private ScanlineIterator(int start, int end) {
             crossings = new int[INIT_CROSSINGS_SIZE];
             edgePtrs = new int[INIT_CROSSINGS_SIZE];
 
-            // We don't care if we clip some of the line off with ceil, since
-            // no scan line crossings will be eliminated (in fact, the ceil is
-            // the y of the first scan line crossing).
-            final int minY = getFirstScanLineCrossing();
-            nextY = minY;
-            maxY = getScanLineCrossingEnd()-1;
+            nextY = start;
+            maxY = end;
             edgeCount = 0;
         }
 
@@ -148,6 +148,7 @@
     // don't just set NULL to -1, because we want NULL+NEXT to be negative.
     private static final int NULL = -SIZEOF_EDGE;
     private float[] edges = null;
+    private static final int INIT_NUM_EDGES = 8;
     private int[] edgeBuckets = null;
     private int[] edgeBucketCounts = null; // 2*newedges + (1 if pruning needed)
     private int numEdges;
@@ -156,7 +157,7 @@
     private static final float INC_BND = 8f;
 
     // each bucket is a linked list. this method adds eptr to the
-    // start "bucket"th linked list.
+    // start of the "bucket"th linked list.
     private void addEdgeToBucket(final int eptr, final int bucket) {
         edges[eptr+NEXT] = edgeBuckets[bucket];
         edgeBuckets[bucket] = eptr;
@@ -168,7 +169,8 @@
     // X0, Y0, D*[X|Y], COUNT; not variables used for computing scanline crossings).
     private void quadBreakIntoLinesAndAdd(float x0, float y0,
                                           final Curve c,
-                                          final float x2, final float y2) {
+                                          final float x2, final float y2)
+    {
         final float QUAD_DEC_BND = 32;
         final int countlg = 4;
         int count = 1 << countlg;
@@ -204,7 +206,8 @@
     // here, but then too many numbers are passed around.
     private void curveBreakIntoLinesAndAdd(float x0, float y0,
                                            final Curve c,
-                                           final float x3, final float y3) {
+                                           final float x3, final float y3)
+    {
         final int countlg = 3;
         int count = 1 << countlg;
 
@@ -259,8 +262,6 @@
         }
     }
 
-    // Preconditions: y2 > y1 and the curve must cross some scanline
-    // i.e.: y1 <= y < y2 for some y such that boundsMinY <= y < boundsMaxY
     private void addLine(float x1, float y1, float x2, float y2) {
         float or = 1; // orientation of the line. 1 if y increases, 0 otherwise.
         if (y2 < y1) {
@@ -272,12 +273,11 @@
             x1 = or;
             or = 0;
         }
-        final int firstCrossing = Math.max((int) Math.ceil(y1), boundsMinY);
+        final int firstCrossing = Math.max((int)Math.ceil(y1), boundsMinY);
         final int lastCrossing = Math.min((int)Math.ceil(y2), boundsMaxY);
         if (firstCrossing >= lastCrossing) {
             return;
         }
-
         if (y1 < edgeMinY) { edgeMinY = y1; }
         if (y2 > edgeMaxY) { edgeMaxY = y2; }
 
@@ -297,22 +297,10 @@
         edges[ptr+OR] = or;
         edges[ptr+CURX] = x1 + (firstCrossing - y1) * slope;
         edges[ptr+SLOPE] = slope;
-        edges[ptr+YMAX] = y2;
+        edges[ptr+YMAX] = lastCrossing;
         final int bucketIdx = firstCrossing - boundsMinY;
         addEdgeToBucket(ptr, bucketIdx);
-        if (lastCrossing < boundsMaxY) {
-            edgeBucketCounts[lastCrossing - boundsMinY] |= 1;
-        }
-    }
-
-    // preconditions: should not be called before the last line has been added
-    // to the edge list (even though it will return a correct answer at that
-    // point in time, it's not meant to be used that way).
-    private int getFirstScanLineCrossing() {
-        return Math.max(boundsMinY, (int)Math.ceil(edgeMinY));
-    }
-    private int getScanLineCrossingEnd() {
-        return Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY));
+        edgeBucketCounts[lastCrossing - boundsMinY] |= 1;
     }
 
 // END EDGE LIST
@@ -366,9 +354,11 @@
         this.boundsMaxX = (pix_boundsX + pix_boundsWidth) * SUBPIXEL_POSITIONS_X;
         this.boundsMaxY = (pix_boundsY + pix_boundsHeight) * SUBPIXEL_POSITIONS_Y;
 
+        edges = new float[INIT_NUM_EDGES * SIZEOF_EDGE];
+        numEdges = 0;
         edgeBuckets = new int[boundsMaxY - boundsMinY];
         java.util.Arrays.fill(edgeBuckets, NULL);
-        edgeBucketCounts = new int[edgeBuckets.length];
+        edgeBucketCounts = new int[edgeBuckets.length + 1];
     }
 
     private float tosubpixx(float pix_x) {
@@ -394,7 +384,7 @@
         y0 = y1;
     }
 
-    Curve c = new Curve();
+    private Curve c = new Curve();
     @Override public void curveTo(float x1, float y1,
                                   float x2, float y2,
                                   float x3, float y3)
@@ -431,8 +421,8 @@
         throw new InternalError("Renderer does not use a native consumer.");
     }
 
-    private void _endRendering(final int pix_bboxx0, final int pix_bboxy0,
-                               final int pix_bboxx1, final int pix_bboxy1)
+    private void _endRendering(final int pix_bboxx0, final int pix_bboxx1,
+                               int ymin, int ymax)
     {
         // Mask to determine the relevant bit of the crossing sum
         // 0x1 if EVEN_ODD, all bits if NON_ZERO
@@ -455,7 +445,7 @@
         int pix_minX = Integer.MAX_VALUE;
 
         int y = boundsMinY; // needs to be declared here so we emit the last row properly.
-        ScanlineIterator it = this.new ScanlineIterator();
+        ScanlineIterator it = this.new ScanlineIterator(ymin, ymax);
         for ( ; it.hasNext(); ) {
             int numCrossings = it.next();
             int[] crossings = it.crossings;
@@ -477,7 +467,7 @@
                 int curxo = crossings[i];
                 int curx = curxo >> 1;
                 // to turn {0, 1} into {-1, 1}, multiply by 2 and subtract 1.
-                int crorientation = ((curxo & 0x1) << 1) -1;
+                int crorientation = ((curxo & 0x1) << 1) - 1;
                 if ((sum & mask) != 0) {
                     int x0 = Math.max(prev, bboxx0);
                     int x1 = Math.min(curx, bboxx1);
@@ -541,7 +531,7 @@
         }
 
         this.cache = new PiscesCache(pminX, pminY, pmaxX, pmaxY);
-        _endRendering(pminX, pminY, pmaxX, pmaxY);
+        _endRendering(pminX, pmaxX, spminY, spmaxY);
     }
 
     public PiscesCache getCache() {
--- a/src/share/classes/sun/java2d/pisces/Stroker.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/java2d/pisces/Stroker.java	Wed Apr 20 04:38:36 2011 +0100
@@ -764,6 +764,11 @@
     private static final int MAX_N_CURVES = 11;
     private float[] subdivTs = new float[MAX_N_CURVES - 1];
 
+    // If this class is compiled with ecj, then Hotspot crashes when OSR
+    // compiling this function. See bugs 7004570 and 6675699
+    // TODO: until those are fixed, we should work around that by
+    // manually inlining this into curveTo and quadTo.
+/******************************* WORKAROUND **********************************
     private void somethingTo(final int type) {
         // need these so we can update the state at the end of this method
         final float xf = middle[type-2], yf = middle[type-1];
@@ -866,6 +871,7 @@
         this.cy0 = yf;
         this.prev = DRAWING_OP_TO;
     }
+****************************** END WORKAROUND *******************************/
 
     // finds values of t where the curve in pts should be subdivided in order
     // to get good offset curves a distance of w away from the middle curve.
@@ -932,18 +938,168 @@
         middle[2] = x1;  middle[3] = y1;
         middle[4] = x2;  middle[5] = y2;
         middle[6] = x3;  middle[7] = y3;
-        somethingTo(8);
-    }
+
+        // inlined version of somethingTo(8);
+        // See the TODO on somethingTo
+
+        // need these so we can update the state at the end of this method
+        final float xf = middle[6], yf = middle[7];
+        float dxs = middle[2] - middle[0];
+        float dys = middle[3] - middle[1];
+        float dxf = middle[6] - middle[4];
+        float dyf = middle[7] - middle[5];
+
+        boolean p1eqp2 = (dxs == 0f && dys == 0f);
+        boolean p3eqp4 = (dxf == 0f && dyf == 0f);
+        if (p1eqp2) {
+            dxs = middle[4] - middle[0];
+            dys = middle[5] - middle[1];
+            if (dxs == 0f && dys == 0f) {
+                dxs = middle[6] - middle[0];
+                dys = middle[7] - middle[1];
+            }
+        }
+        if (p3eqp4) {
+            dxf = middle[6] - middle[2];
+            dyf = middle[7] - middle[3];
+            if (dxf == 0f && dyf == 0f) {
+                dxf = middle[6] - middle[0];
+                dyf = middle[7] - middle[1];
+            }
+        }
+        if (dxs == 0f && dys == 0f) {
+            // this happens iff the "curve" is just a point
+            lineTo(middle[0], middle[1]);
+            return;
+        }
 
-    @Override public long getNativeConsumer() {
-        throw new InternalError("Stroker doesn't use a native consumer");
+        // if these vectors are too small, normalize them, to avoid future
+        // precision problems.
+        if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) {
+            float len = (float)Math.sqrt(dxs*dxs + dys*dys);
+            dxs /= len;
+            dys /= len;
+        }
+        if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) {
+            float len = (float)Math.sqrt(dxf*dxf + dyf*dyf);
+            dxf /= len;
+            dyf /= len;
+        }
+
+        computeOffset(dxs, dys, lineWidth2, offset[0]);
+        final float mx = offset[0][0];
+        final float my = offset[0][1];
+        drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, mx, my);
+
+        int nSplits = findSubdivPoints(middle, subdivTs, 8, lineWidth2);
+
+        int kind = 0;
+        Iterator<Integer> it = Curve.breakPtsAtTs(middle, 8, subdivTs, nSplits);
+        while(it.hasNext()) {
+            int curCurveOff = it.next();
+
+            kind = computeOffsetCubic(middle, curCurveOff, lp, rp);
+            if (kind != 0) {
+                emitLineTo(lp[0], lp[1]);
+                switch(kind) {
+                case 8:
+                    emitCurveTo(lp[0], lp[1], lp[2], lp[3], lp[4], lp[5], lp[6], lp[7], false);
+                    emitCurveTo(rp[0], rp[1], rp[2], rp[3], rp[4], rp[5], rp[6], rp[7], true);
+                    break;
+                case 4:
+                    emitLineTo(lp[2], lp[3]);
+                    emitLineTo(rp[0], rp[1], true);
+                    break;
+                }
+                emitLineTo(rp[kind - 2], rp[kind - 1], true);
+            }
+        }
+
+        this.cmx = (lp[kind - 2] - rp[kind - 2]) / 2;
+        this.cmy = (lp[kind - 1] - rp[kind - 1]) / 2;
+        this.cdx = dxf;
+        this.cdy = dyf;
+        this.cx0 = xf;
+        this.cy0 = yf;
+        this.prev = DRAWING_OP_TO;
     }
 
     @Override public void quadTo(float x1, float y1, float x2, float y2) {
         middle[0] = cx0; middle[1] = cy0;
         middle[2] = x1;  middle[3] = y1;
         middle[4] = x2;  middle[5] = y2;
-        somethingTo(6);
+
+        // inlined version of somethingTo(8);
+        // See the TODO on somethingTo
+
+        // need these so we can update the state at the end of this method
+        final float xf = middle[4], yf = middle[5];
+        float dxs = middle[2] - middle[0];
+        float dys = middle[3] - middle[1];
+        float dxf = middle[4] - middle[2];
+        float dyf = middle[5] - middle[3];
+        if ((dxs == 0f && dys == 0f) || (dxf == 0f && dyf == 0f)) {
+            dxs = dxf = middle[4] - middle[0];
+            dys = dyf = middle[5] - middle[1];
+        }
+        if (dxs == 0f && dys == 0f) {
+            // this happens iff the "curve" is just a point
+            lineTo(middle[0], middle[1]);
+            return;
+        }
+        // if these vectors are too small, normalize them, to avoid future
+        // precision problems.
+        if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) {
+            float len = (float)Math.sqrt(dxs*dxs + dys*dys);
+            dxs /= len;
+            dys /= len;
+        }
+        if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) {
+            float len = (float)Math.sqrt(dxf*dxf + dyf*dyf);
+            dxf /= len;
+            dyf /= len;
+        }
+
+        computeOffset(dxs, dys, lineWidth2, offset[0]);
+        final float mx = offset[0][0];
+        final float my = offset[0][1];
+        drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, mx, my);
+
+        int nSplits = findSubdivPoints(middle, subdivTs, 6, lineWidth2);
+
+        int kind = 0;
+        Iterator<Integer> it = Curve.breakPtsAtTs(middle, 6, subdivTs, nSplits);
+        while(it.hasNext()) {
+            int curCurveOff = it.next();
+
+            kind = computeOffsetQuad(middle, curCurveOff, lp, rp);
+            if (kind != 0) {
+                emitLineTo(lp[0], lp[1]);
+                switch(kind) {
+                case 6:
+                    emitQuadTo(lp[0], lp[1], lp[2], lp[3], lp[4], lp[5], false);
+                    emitQuadTo(rp[0], rp[1], rp[2], rp[3], rp[4], rp[5], true);
+                    break;
+                case 4:
+                    emitLineTo(lp[2], lp[3]);
+                    emitLineTo(rp[0], rp[1], true);
+                    break;
+                }
+                emitLineTo(rp[kind - 2], rp[kind - 1], true);
+            }
+        }
+
+        this.cmx = (lp[kind - 2] - rp[kind - 2]) / 2;
+        this.cmy = (lp[kind - 1] - rp[kind - 1]) / 2;
+        this.cdx = dxf;
+        this.cdy = dyf;
+        this.cx0 = xf;
+        this.cy0 = yf;
+        this.prev = DRAWING_OP_TO;
+    }
+
+    @Override public long getNativeConsumer() {
+        throw new InternalError("Stroker doesn't use a native consumer");
     }
 
     // a stack of polynomial curves where each curve shares endpoints with
--- a/src/share/classes/sun/launcher/LauncherHelper.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/launcher/LauncherHelper.java	Wed Apr 20 04:38:36 2011 +0100
@@ -42,10 +42,12 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.nio.charset.Charset;
 import java.util.ResourceBundle;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -471,11 +473,11 @@
         } catch (ClassNotFoundException cnfe) {
             abort(ostream, cnfe, "java.launcher.cls.error1", cn);
         }
-        signatureDiagnostic(ostream, c);
+        getMainMethod(ostream, c);
         return c;
     }
 
-    static void signatureDiagnostic(PrintStream ostream, Class<?> clazz) {
+    static Method getMainMethod(PrintStream ostream, Class<?> clazz) {
         String classname = clazz.getName();
         Method method = null;
         try {
@@ -495,6 +497,31 @@
         if (method.getReturnType() != java.lang.Void.TYPE) {
             abort(ostream, null, "java.launcher.cls.error3", classname);
         }
-        return;
+        return method;
+    }
+
+    private static final String encprop = "sun.jnu.encoding";
+    private static String encoding = null;
+    private static boolean isCharsetSupported = false;
+
+    /*
+     * converts a c or a byte array to a platform specific string,
+     * previously implemented as a native method in the launcher.
+     */
+    static String makePlatformString(boolean printToStderr, byte[] inArray) {
+        final PrintStream ostream = (printToStderr) ? System.err : System.out;
+        if (encoding == null) {
+            encoding = System.getProperty(encprop);
+            isCharsetSupported = Charset.isSupported(encoding);
+        }
+        try {
+            String out = isCharsetSupported
+                    ? new String(inArray, encoding)
+                    : new String(inArray);
+            return out;
+        } catch (UnsupportedEncodingException uee) {
+            abort(ostream, uee, null);
+        }
+        return null; // keep the compiler happy
     }
 }
--- a/src/share/classes/sun/misc/BootClassLoaderHook.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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 sun.misc;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URLStreamHandlerFactory;
-import sun.misc.URLClassPath;
-
-/**
- * BootClassLoaderHook defines an interface for a hook to inject
- * into the bootstrap class loader.
- *
- * With jkernel now removed, no hook is set
- */
-public abstract class BootClassLoaderHook {
-    private static BootClassLoaderHook bootLoaderHook = null;
-    public static synchronized BootClassLoaderHook getHook() {
-        return bootLoaderHook;
-    }
-
-    public static synchronized void setHook(BootClassLoaderHook hook) {
-        if (!VM.isBooted()) {
-            throw new InternalError("hook can only be set after VM is booted");
-        }
-        if (bootLoaderHook != null) {
-            throw new InternalError("hook should not be reinitialized");
-        }
-        bootLoaderHook = hook;
-    }
-
-    protected BootClassLoaderHook() {
-    }
-
-    /**
-     * A method to be invoked before a class loader loads
-     * a bootstrap class.
-     *
-     * @param classname the binary name of the class
-     */
-    public static void preLoadClass(String classname) {
-        BootClassLoaderHook hook = getHook();
-        if (hook != null) {
-            hook.loadBootstrapClass(classname);
-        }
-    }
-
-    /**
-     * A method to be invoked before a class loader loads
-     * a resource.
-     *
-     * @param resourcename the resource name
-     */
-    public static void preLoadResource(String resourcename) {
-        BootClassLoaderHook hook = getHook();
-        if (hook != null) {
-            hook.getBootstrapResource(resourcename);
-        }
-    }
-
-    /**
-     * A method to be invoked before a library is loaded.
-     *
-     * @param libname the name of the library
-     */
-    public static void preLoadLibrary(String libname) {
-        BootClassLoaderHook hook = getHook();
-        if (hook != null) {
-            hook.loadLibrary(libname);
-        }
-    }
-
-    /**
-     * Returns a pathname of a JAR or class that the hook loads
-     * per this loadClass request; or null.
-     *
-     * @param classname the binary name of the class
-     */
-    public abstract String loadBootstrapClass(String className);
-
-    /**
-     * Returns a pathname of a resource file that the hook loads
-     * per this getResource request; or null.
-     *
-     * @param resourceName the resource name
-     */
-    public abstract String getBootstrapResource(String resourceName);
-
-    /**
-     * Returns true if the hook successfully performs an operation per
-     * this loadLibrary request; or false if it fails.
-     *
-     * @param libname the name of the library
-     */
-    public abstract boolean loadLibrary(String libname);
-
-    /**
-     * Returns a bootstrap class path constructed by the hook.
-     *
-     * @param bcp VM's bootstrap class path
-     * @param factory Launcher's URL stream handler
-     */
-    public abstract URLClassPath getBootstrapClassPath(URLClassPath bcp,
-            URLStreamHandlerFactory factory);
-
-    /**
-     * Returns true if the current thread is in the process of doing
-     * a prefetching operation.
-     */
-    public abstract boolean isCurrentThreadPrefetching();
-
-    /**
-     * Returns true if the hook successfully prefetches the specified file.
-     *
-     * @param name a platform independent pathname
-     */
-    public abstract boolean prefetchFile(String name);
-}
--- a/src/share/classes/sun/misc/JarIndex.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/misc/JarIndex.java	Wed Apr 20 04:38:36 2011 +0100
@@ -106,6 +106,19 @@
     /**
      * Returns the jar index, or <code>null</code> if none.
      *
+     * This single parameter version of the method is retained
+     * for binary compatibility with earlier releases.
+     *
+     * @param jar the JAR file to get the index from.
+     * @exception IOException if an I/O error has occurred.
+     */
+    public static JarIndex getJarIndex(JarFile jar) throws IOException {
+        return getJarIndex(jar, null);
+    }
+
+    /**
+     * Returns the jar index, or <code>null</code> if none.
+     *
      * @param jar the JAR file to get the index from.
      * @exception IOException if an I/O error has occurred.
      */
--- a/src/share/classes/sun/misc/JavaSecurityCodeSignerAccess.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2010, 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 sun.misc;
-
-import java.security.CodeSigner;
-import java.security.cert.CRL;
-
-public interface JavaSecurityCodeSignerAccess {
-    void setCRLs(CodeSigner signer, CRL[] crls);
-    CRL[] getCRLs(CodeSigner signer);
-}
--- a/src/share/classes/sun/misc/JavaUtilJarAccess.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/misc/JavaUtilJarAccess.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, 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,8 +26,19 @@
 package sun.misc;
 
 import java.io.IOException;
+import java.net.URL;
+import java.security.CodeSource;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 
 public interface JavaUtilJarAccess {
     public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
+    public CodeSource[] getCodeSources(JarFile jar, URL url);
+    public CodeSource getCodeSource(JarFile jar, URL url, String name);
+    public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
+    public Enumeration<JarEntry> entries2(JarFile jar);
+    public void setEagerValidation(JarFile jar, boolean eager);
+    public List getManifestDigests(JarFile jar);
 }
--- a/src/share/classes/sun/misc/Launcher.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/misc/Launcher.java	Wed Apr 20 04:38:36 2011 +0100
@@ -38,7 +38,6 @@
 import java.util.Set;
 import java.util.Vector;
 import java.security.AccessController;
-import java.security.AllPermission;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedExceptionAction;
 import java.security.AccessControlContext;
@@ -117,18 +116,6 @@
         return loader;
     }
 
-    public static void addURLToAppClassLoader(URL u) {
-        AccessController.checkPermission(new AllPermission());
-        ClassLoader loader = Launcher.getLauncher().getClassLoader();
-        ((Launcher.AppClassLoader) loader).addAppURL(u);
-    }
-
-    public static void addURLToExtClassLoader(URL u) {
-        AccessController.checkPermission(new AllPermission());
-        ClassLoader loader = Launcher.getLauncher().getClassLoader();
-        ((Launcher.ExtClassLoader) loader.getParent()).addExtURL(u);
-    }
-
     /*
      * The class loader used for loading installed extensions.
      */
@@ -247,11 +234,6 @@
             return null;
         }
 
-        protected Class findClass(String name) throws ClassNotFoundException {
-            BootClassLoaderHook.preLoadClass(name);
-            return super.findClass(name);
-        }
-
         private static AccessControlContext getContext(File[] dirs)
             throws IOException
         {
@@ -316,7 +298,6 @@
         public Class loadClass(String name, boolean resolve)
             throws ClassNotFoundException
         {
-            BootClassLoaderHook.preLoadClass(name);
             int i = name.lastIndexOf('.');
             if (i != -1) {
                 SecurityManager sm = System.getSecurityManager();
@@ -373,10 +354,6 @@
 
             return acc;
         }
-
-        void addAppURL(URL url) {
-            super.addURL(url);
-        }
     }
 
     private static class BootClassPathHolder {
@@ -413,11 +390,7 @@
     }
 
     public static URLClassPath getBootstrapClassPath() {
-        URLClassPath bcp = BootClassPathHolder.bcp;
-        // if DownloadManager is installed, return the bootstrap class path
-        // maintained by the Java kernel
-        BootClassLoaderHook hook = BootClassLoaderHook.getHook();
-        return hook == null ? bcp : hook.getBootstrapClassPath(bcp, factory);
+        return BootClassPathHolder.bcp;
     }
 
     private static URL[] pathToURLs(File[] path) {
--- a/src/share/classes/sun/misc/SharedSecrets.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/misc/SharedSecrets.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, 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,9 +28,6 @@
 import java.util.jar.JarFile;
 import java.io.Console;
 import java.io.FileDescriptor;
-import java.security.CodeSigner;
-import java.security.ProtectionDomain;
-
 import java.security.ProtectionDomain;
 
 import java.security.AccessController;
@@ -53,7 +50,6 @@
     private static JavaNioAccess javaNioAccess;
     private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
     private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
-    private static JavaSecurityCodeSignerAccess javaSecurityCodeSignerAccess;
     private static JavaSecurityAccess javaSecurityAccess;
 
     public static JavaUtilJarAccess javaUtilJarAccess() {
@@ -134,18 +130,6 @@
         return javaSecurityProtectionDomainAccess;
     }
 
-    public static void setJavaSecurityCodeSignerAccess
-            (JavaSecurityCodeSignerAccess jscsa) {
-        javaSecurityCodeSignerAccess = jscsa;
-    }
-
-    public static JavaSecurityCodeSignerAccess
-            getJavaSecurityCodeSignerAccess() {
-        if (javaSecurityCodeSignerAccess == null)
-            unsafe.ensureClassInitialized(CodeSigner.class);
-        return javaSecurityCodeSignerAccess;
-    }
-
     public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
         javaSecurityAccess = jsa;
     }
@@ -156,4 +140,5 @@
         }
         return javaSecurityAccess;
     }
+
 }
--- a/src/share/classes/sun/net/httpserver/ChunkedInputStream.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/net/httpserver/ChunkedInputStream.java	Wed Apr 20 04:38:36 2011 +0100
@@ -69,32 +69,33 @@
      */
     private int readChunkHeader () throws IOException {
         boolean gotCR = false;
-        char c;
+        int c;
         char[] len_arr = new char [16];
         int len_size = 0;
         boolean end_of_len = false;
 
-        while ((c=(char)in.read())!= -1) {
+        while ((c=in.read())!= -1) {
+            char ch = (char) c;
             if (len_size == len_arr.length -1) {
                 throw new IOException ("invalid chunk header");
             }
             if (gotCR) {
-                if (c == LF) {
+                if (ch == LF) {
                     int l = numeric (len_arr, len_size);
                     return l;
                 } else {
                     gotCR = false;
                 }
                 if (!end_of_len) {
-                    len_arr[len_size++] = c;
+                    len_arr[len_size++] = ch;
                 }
             } else {
-                if (c == CR) {
+                if (ch == CR) {
                     gotCR = true;
-                } else if (c == ';') {
+                } else if (ch == ';') {
                     end_of_len = true;
                 } else if (!end_of_len) {
-                    len_arr[len_size++] = c;
+                    len_arr[len_size++] = ch;
                 }
             }
         }
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Apr 20 04:38:36 2011 +0100
@@ -2173,6 +2173,13 @@
                         if (tryTransparentNTLMServer) {
                             tryTransparentNTLMServer =
                                     NTLMAuthenticationProxy.proxy.supportsTransparentAuth;
+                            /* If the platform supports transparent authentication
+                             * then check if we are in a secure environment
+                             * whether, or not, we should try transparent authentication.*/
+                            if (tryTransparentNTLMServer) {
+                                tryTransparentNTLMServer =
+                                        NTLMAuthenticationProxy.proxy.isTrustedSite(url);
+                            }
                         }
                         a = null;
                         if (tryTransparentNTLMServer) {
--- a/src/share/classes/sun/net/www/protocol/http/NTLMAuthenticationProxy.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/net/www/protocol/http/NTLMAuthenticationProxy.java	Wed Apr 20 04:38:36 2011 +0100
@@ -36,12 +36,14 @@
  */
 class NTLMAuthenticationProxy {
     private static Method supportsTA;
+    private static Method isTrustedSite;
     private static final String clazzStr = "sun.net.www.protocol.http.ntlm.NTLMAuthentication";
     private static final String supportsTAStr = "supportsTransparentAuth";
+    private static final String isTrustedSiteStr = "isTrustedSite";
 
     static final NTLMAuthenticationProxy proxy = tryLoadNTLMAuthentication();
     static final boolean supported = proxy != null ? true : false;
-    static final boolean supportsTransparentAuth = supported ? supportsTransparentAuth(supportsTA) : false;
+    static final boolean supportsTransparentAuth = supported ? supportsTransparentAuth() : false;
 
     private final Constructor<? extends AuthenticationInfo> threeArgCtr;
     private final Constructor<? extends AuthenticationInfo> fiveArgCtr;
@@ -82,9 +84,22 @@
      * authentication (try with the current users credentials before
      * prompting for username and password, etc).
      */
-    private static boolean supportsTransparentAuth(Method method) {
+    private static boolean supportsTransparentAuth() {
         try {
-            return (Boolean)method.invoke(null);
+            return (Boolean)supportsTA.invoke(null);
+        } catch (ReflectiveOperationException roe) {
+            finest(roe);
+        }
+
+        return false;
+    }
+
+    /* Transparent authentication should only be tried with a trusted
+     * site ( when running in a secure environment ).
+     */
+    public static boolean isTrustedSite(URL url) {
+        try {
+            return (Boolean)isTrustedSite.invoke(null, url);
         } catch (ReflectiveOperationException roe) {
             finest(roe);
         }
@@ -112,6 +127,7 @@
                                             int.class,
                                             PasswordAuthentication.class);
                 supportsTA = cl.getDeclaredMethod(supportsTAStr);
+                isTrustedSite = cl.getDeclaredMethod(isTrustedSiteStr, java.net.URL.class);
                 return new NTLMAuthenticationProxy(threeArg,
                                                    fiveArg);
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/net/www/protocol/http/ntlm/NTLMAuthenticationCallback.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2011, 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 sun.net.www.protocol.http.ntlm;
+
+import java.net.URL;
+
+/**
+ * This class is used to call back to deployment to determine if a given
+ * URL is trusted. Transparent authentication (try with logged in users
+ * credentials without prompting) should only be tried with trusted sites.
+ */
+public abstract class NTLMAuthenticationCallback {
+    private static volatile NTLMAuthenticationCallback callback =
+            new DefaultNTLMAuthenticationCallback();
+
+    public static void setNTLMAuthenticationCallback(
+            NTLMAuthenticationCallback callback) {
+        NTLMAuthenticationCallback.callback = callback;
+    }
+
+    public static NTLMAuthenticationCallback getNTLMAuthenticationCallback() {
+        return callback;
+    }
+
+    /**
+     * Returns true if the given site is trusted, i.e. we can try
+     * transparent Authentication.
+     */
+    public abstract boolean isTrustedSite(URL url);
+
+    static class DefaultNTLMAuthenticationCallback extends NTLMAuthenticationCallback {
+        @Override
+        public boolean isTrustedSite(URL url) { return true; }
+    }
+}
+
--- a/src/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Wed Apr 20 04:38:36 2011 +0100
@@ -27,6 +27,9 @@
 
 import java.io.*;
 import java.net.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
 import java.util.*;
 import java.util.jar.*;
 import java.util.zip.ZipFile;
@@ -208,38 +211,23 @@
             JarFile result = null;
 
             /* get the stream before asserting privileges */
-            final InputStream in =  url.openConnection().getInputStream();
-
-            try {
+            try (final InputStream in = url.openConnection().getInputStream()) {
                 result = AccessController.doPrivileged(
                     new PrivilegedExceptionAction<JarFile>() {
                         public JarFile run() throws IOException {
-                            OutputStream out = null;
-                            File tmpFile = null;
+                            Path tmpFile = Files.createTempFile("jar_cache", null);
                             try {
-                                tmpFile = File.createTempFile("jar_cache", null);
-                                tmpFile.deleteOnExit();
-                                out  = new FileOutputStream(tmpFile);
-                                int read = 0;
-                                byte[] buf = new byte[BUF_SIZE];
-                                while ((read = in.read(buf)) != -1) {
-                                    out.write(buf, 0, read);
+                                Files.copy(in, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+                                JarFile jarFile = new URLJarFile(tmpFile.toFile(), closeController);
+                                tmpFile.toFile().deleteOnExit();
+                                return jarFile;
+                            } catch (Throwable thr) {
+                                try {
+                                    Files.delete(tmpFile);
+                                } catch (IOException ioe) {
+                                    thr.addSuppressed(ioe);
                                 }
-                                out.close();
-                                out = null;
-                                return new URLJarFile(tmpFile, closeController);
-                            } catch (IOException e) {
-                                if (tmpFile != null) {
-                                    tmpFile.delete();
-                                }
-                                throw e;
-                            } finally {
-                                if (in != null) {
-                                    in.close();
-                                }
-                                if (out != null) {
-                                    out.close();
-                                }
+                                throw thr;
                             }
                         }
                     });
--- a/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -764,11 +764,14 @@
             throw new IllegalArgumentException("Group not a multicast address");
 
         // check multicast address is compatible with this socket
-        if (!(group instanceof Inet4Address)) {
-            if (family == StandardProtocolFamily.INET)
-                throw new IllegalArgumentException("Group is not IPv4 address");
-            if (!(group instanceof Inet6Address))
-                throw new IllegalArgumentException("Address type not supported");
+        if (group instanceof Inet4Address) {
+            if (family == StandardProtocolFamily.INET6 && !Net.canIPv6SocketJoinIPv4Group())
+                throw new IllegalArgumentException("Group is not IPv4 multicast address");
+        } else if (group instanceof Inet6Address) {
+            if (family != StandardProtocolFamily.INET6)
+                throw new IllegalArgumentException("Group is not IPv6 multicast address");
+        } else {
+            throw new IllegalArgumentException("Address type not supported");
         }
 
         // check source address
@@ -800,7 +803,9 @@
             }
 
             MembershipKeyImpl key;
-            if (family == StandardProtocolFamily.INET6) {
+            if ((family == StandardProtocolFamily.INET6) &&
+                ((group instanceof Inet6Address) || Net.canJoin6WithIPv4Group()))
+            {
                 int index = interf.getIndex();
                 if (index == -1)
                     throw new IOException("Network interface cannot be identified");
@@ -870,7 +875,7 @@
                 return;
 
             try {
-                if (family == StandardProtocolFamily.INET6) {
+                if (key instanceof MembershipKeyImpl.Type6) {
                     MembershipKeyImpl.Type6 key6 =
                         (MembershipKeyImpl.Type6)key;
                     Net.drop6(fd, key6.groupAddress(), key6.index(), key6.source());
@@ -910,7 +915,7 @@
                 throw new IllegalArgumentException("Source address is different type to group");
 
             int n;
-            if (family == StandardProtocolFamily.INET6) {
+            if (key instanceof MembershipKeyImpl.Type6) {
                  MembershipKeyImpl.Type6 key6 =
                     (MembershipKeyImpl.Type6)key;
                 n = Net.block6(fd, key6.groupAddress(), key6.index(),
@@ -940,7 +945,7 @@
                 throw new IllegalStateException("key is no longer valid");
 
             try {
-                if (family == StandardProtocolFamily.INET6) {
+                if (key instanceof MembershipKeyImpl.Type6) {
                     MembershipKeyImpl.Type6 key6 =
                         (MembershipKeyImpl.Type6)key;
                     Net.unblock6(fd, key6.groupAddress(), key6.index(),
--- a/src/share/classes/sun/nio/ch/FileChannelImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -51,6 +51,7 @@
     // File access mode (immutable)
     private final boolean writable;
     private final boolean readable;
+    private final boolean append;
 
     // Required to prevent finalization of creating stream (immutable)
     private final Object parent;
@@ -67,6 +68,7 @@
         this.fd = fd;
         this.readable = readable;
         this.writable = writable;
+        this.append = append;
         this.parent = parent;
         this.nd = new FileDispatcherImpl(append);
     }
@@ -242,7 +244,8 @@
                 if (!isOpen())
                     return 0;
                 do {
-                    p = position0(fd, -1);
+                    // in append-mode then position is advanced to end before writing
+                    p = (append) ? nd.size(fd) : position0(fd, -1);
                 } while ((p == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(p);
             } finally {
@@ -472,8 +475,8 @@
                 assert !target.isOpen();
                 try {
                     close();
-                } catch (IOException ignore) {
-                    // nothing we can do
+                } catch (Throwable suppressed) {
+                    e.addSuppressed(suppressed);
                 }
                 throw e;
             } catch (IOException ioe) {
--- a/src/share/classes/sun/nio/ch/Net.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/ch/Net.java	Wed Apr 20 04:38:36 2011 +0100
@@ -60,6 +60,21 @@
         return isIPv6Available;
     }
 
+    /**
+     * Tells whether IPv6 sockets can join IPv4 multicast groups
+     */
+    static boolean canIPv6SocketJoinIPv4Group() {
+        return canIPv6SocketJoinIPv4Group0();
+    }
+
+    /**
+     * Tells whether {@link #join6} can be used to join an IPv4
+     * multicast group (IPv4 group as IPv4-mapped IPv6 address)
+     */
+    static boolean canJoin6WithIPv4Group() {
+        return canJoin6WithIPv4Group0();
+    }
+
     static InetSocketAddress checkAddress(SocketAddress sa) {
         if (sa == null)
             throw new NullPointerException();
@@ -291,7 +306,11 @@
 
     // -- Socket operations --
 
-    static native boolean isIPv6Available0();
+    private static native boolean isIPv6Available0();
+
+    private static native boolean canIPv6SocketJoinIPv4Group0();
+
+    private static native boolean canJoin6WithIPv4Group0();
 
     static FileDescriptor socket(boolean stream) throws IOException {
         return socket(UNSPEC, stream);
--- a/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Wed Apr 20 04:38:36 2011 +0100
@@ -679,6 +679,14 @@
                     "1124"
                 });
 
+        charset("x-IBM1364", "IBM1364",
+                new String[] {
+                    "cp1364",
+                    "ibm1364",
+                    "ibm-1364",
+                    "1364"
+                });
+
         charset("IBM273", "IBM273",
                 new String[] {
                     "cp273", // JDK historical
--- a/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java	Wed Apr 20 04:38:36 2011 +0100
@@ -57,8 +57,8 @@
             setAcl((List<AclEntry>)value);
             return;
         }
-        throw new UnsupportedOperationException("'" + name() + ":" +
-                attribute + "' not supported");
+        throw new IllegalArgumentException("'" + name() + ":" +
+            attribute + "' not recognized");
     }
 
     @Override
@@ -81,6 +81,8 @@
                 owner = true;
                 continue;
             }
+            throw new IllegalArgumentException("'" + name() + ":" +
+                attribute + "' not recognized");
         }
         Map<String,Object> result = new HashMap<>(2);
         if (acl)
--- a/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java	Wed Apr 20 04:38:36 2011 +0100
@@ -46,6 +46,18 @@
     private static final String IS_SYMBOLIC_LINK_NAME = "isSymbolicLink";
     private static final String IS_OTHER_NAME = "isOther";
 
+    // the names of the basic attributes
+    static final Set<String> basicAttributeNames =
+        Util.newSet(SIZE_NAME,
+                    CREATION_TIME_NAME,
+                    LAST_ACCESS_TIME_NAME,
+                    LAST_MODIFIED_TIME_NAME,
+                    FILE_KEY_NAME,
+                    IS_DIRECTORY_NAME,
+                    IS_REGULAR_FILE_NAME,
+                    IS_SYMBOLIC_LINK_NAME,
+                    IS_OTHER_NAME);
+
     protected AbstractBasicFileAttributeView() { }
 
     @Override
@@ -69,24 +81,26 @@
             setTimes(null, null, (FileTime)value);
             return;
         }
-        throw new UnsupportedOperationException("'" + attribute +
-            "' is unknown or read-only attribute");
+        throw new IllegalArgumentException("'" + name() + ":" +
+            attribute + "' not recognized");
     }
 
     /**
      * Used to build a map of attribute name/values.
      */
     static class AttributesBuilder {
-        private Set<String> set = new HashSet<>();
+        private Set<String> names = new HashSet<>();
         private Map<String,Object> map = new HashMap<>();
         private boolean copyAll;
 
-        private AttributesBuilder(String[] attributes) {
-            for (String attribute: attributes) {
-                if (attribute.equals("*")) {
+        private AttributesBuilder(Set<String> allowed, String[] requested) {
+            for (String name: requested) {
+                if (name.equals("*")) {
                     copyAll = true;
                 } else {
-                    set.add(attribute);
+                    if (!allowed.contains(name))
+                        throw new IllegalArgumentException("'" + name + "' not recognized");
+                    names.add(name);
                 }
             }
         }
@@ -94,21 +108,19 @@
         /**
          * Creates builder to build up a map of the matching attributes
          */
-        static AttributesBuilder create(String[] attributes) {
-            return new AttributesBuilder(attributes);
+        static AttributesBuilder create(Set<String> allowed, String[] requested) {
+            return new AttributesBuilder(allowed, requested);
         }
 
         /**
          * Returns true if the attribute should be returned in the map
          */
-        boolean match(String attribute) {
-            if (copyAll)
-                return true;
-            return set.contains(attribute);
+        boolean match(String name) {
+            return copyAll || names.contains(name);
         }
 
-        void add(String attribute, Object value) {
-            map.put(attribute, value);
+        void add(String name, Object value) {
+            map.put(name, value);
         }
 
         /**
@@ -124,7 +136,7 @@
      * Invoked by readAttributes or sub-classes to add all matching basic
      * attributes to the builder
      */
-    final void addBasicAttributesToBuilder(BasicFileAttributes attrs,
+    final void addRequestedBasicAttributes(BasicFileAttributes attrs,
                                            AttributesBuilder builder)
     {
         if (builder.match(SIZE_NAME))
@@ -148,9 +160,12 @@
     }
 
     @Override
-    public Map<String,Object> readAttributes(String[] attributes) throws IOException {
-        AttributesBuilder builder = AttributesBuilder.create(attributes);
-        addBasicAttributesToBuilder(readAttributes(), builder);
+    public Map<String,Object> readAttributes(String[] requested)
+        throws IOException
+    {
+        AttributesBuilder builder =
+            AttributesBuilder.create(basicAttributeNames, requested);
+        addRequestedBasicAttributes(readAttributes(), builder);
         return builder.unmodifiableMap();
     }
 }
--- a/src/share/classes/sun/nio/fs/AbstractFileSystemProvider.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/AbstractFileSystemProvider.java	Wed Apr 20 04:38:36 2011 +0100
@@ -29,7 +29,6 @@
 import java.nio.file.spi.FileSystemProvider;
 import java.io.IOException;
 import java.util.Map;
-import java.util.Collections;
 
 /**
  * Base implementation class of FileSystemProvider
@@ -72,6 +71,8 @@
         throws IOException
     {
         String[] s = split(attribute);
+        if (s[0].length() == 0)
+            throw new IllegalArgumentException(attribute);
         DynamicFileAttributeView view = getFileAttributeView(file, s[0], options);
         if (view == null)
             throw new UnsupportedOperationException("View '" + s[0] + "' not available");
@@ -83,9 +84,11 @@
         throws IOException
     {
         String[] s = split(attributes);
+        if (s[0].length() == 0)
+            throw new IllegalArgumentException(attributes);
         DynamicFileAttributeView view = getFileAttributeView(file, s[0], options);
         if (view == null)
-            return Collections.emptyMap();
+            throw new UnsupportedOperationException("View '" + s[0] + "' not available");
         return view.readAttributes(s[1].split(","));
     }
 
--- a/src/share/classes/sun/nio/fs/AbstractUserDefinedFileAttributeView.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/AbstractUserDefinedFileAttributeView.java	Wed Apr 20 04:38:36 2011 +0100
@@ -59,22 +59,6 @@
         return "user";
     }
 
-    private Object getAttribute(String attribute) throws IOException {
-        int size;
-        try {
-            size = size(attribute);
-        } catch (IOException e) {
-            // not found or some other I/O error
-            if (list().contains(attribute))
-                throw e;
-            return null;
-        }
-
-        byte[] buf = new byte[size];
-        int n = read(attribute, ByteBuffer.wrap(buf));
-        return (n == size) ? buf : Arrays.copyOf(buf, n);
-    }
-
     @Override
     public final void setAttribute(String attribute, Object value)
         throws IOException
@@ -94,12 +78,13 @@
     {
         // names of attributes to return
         List<String> names = new ArrayList<>();
-
         for (String name: attributes) {
             if (name.equals("*")) {
                 names = list();
                 break;
             } else {
+                if (name.length() == 0)
+                    throw new IllegalArgumentException();
                 names.add(name);
             }
         }
@@ -107,11 +92,12 @@
         // read each value and return in map
         Map<String,Object> result = new HashMap<>();
         for (String name: names) {
-            Object value = getAttribute(name);
-            if (value != null)
-                result.put(name, value);
+            int size = size(name);
+            byte[] buf = new byte[size];
+            int n = read(name, ByteBuffer.wrap(buf));
+            byte[] value = (n == size) ? buf : Arrays.copyOf(buf, n);
+            result.put(name, value);
         }
-
         return result;
     }
 }
--- a/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Wed Apr 20 04:38:36 2011 +0100
@@ -81,7 +81,8 @@
     /**
      * Return the original watchable (Path)
      */
-    Path watchable() {
+    @Override
+    public Path watchable() {
         return dir;
     }
 
--- a/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -63,10 +63,10 @@
     {
         if (attribute.equals(OWNER_NAME)) {
             setOwner((UserPrincipal)value);
-            return;
+        } else {
+            throw new IllegalArgumentException("'" + name() + ":" +
+                attribute + "' not recognized");
         }
-        throw new UnsupportedOperationException("'" + name() + ":" +
-                attribute + "' not supported");
     }
 
     @Override
@@ -75,6 +75,9 @@
         for (String attribute: attributes) {
             if (attribute.equals("*") || attribute.equals(OWNER_NAME)) {
                 result.put(OWNER_NAME, getOwner());
+            } else {
+                throw new IllegalArgumentException("'" + name() + ":" +
+                    attribute + "' not recognized");
             }
         }
         return result;
--- a/src/share/classes/sun/nio/fs/Util.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/nio/fs/Util.java	Wed Apr 20 04:38:36 2011 +0100
@@ -25,6 +25,8 @@
 
 package sun.nio.fs;
 
+import java.util.*;
+
 /**
  * Utility methods
  */
@@ -54,6 +56,28 @@
         }
         result[n] = s.substring(last, s.length());
         return result;
+    }
 
+    /**
+     * Returns a Set containing the given elements.
+     */
+    static <E> Set<E> newSet(E... elements) {
+        HashSet<E> set = new HashSet<>();
+        for (E e: elements) {
+            set.add(e);
+        }
+        return set;
+    }
+
+    /**
+     * Returns a Set containing all the elements of the given Set plus
+     * the given elements.
+     */
+    static <E> Set<E> newSet(Set<E> other, E... elements) {
+        HashSet<E> set = new HashSet<>(other);
+        for (E e: elements) {
+            set.add(e);
+        }
+        return set;
     }
 }
--- a/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java	Wed Apr 20 04:38:36 2011 +0100
@@ -87,6 +87,7 @@
                                 gssLibs = new String[]{
                                     "libgssapi.so",
                                     "libgssapi_krb5.so",
+                                    "libgssapi_krb5.so.2",
                                 };
                             }
                         } else {
--- a/src/share/classes/sun/security/pkcs11/P11Cipher.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/pkcs11/P11Cipher.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -42,14 +42,12 @@
  * Cipher implementation class. This class currently supports
  * DES, DESede, AES, ARCFOUR, and Blowfish.
  *
- * This class is designed to support ECB and CBC with NoPadding and
- * PKCS5Padding for both. It will use its own padding impl if the
- * native mechanism does not support padding.
+ * This class is designed to support ECB, CBC, CTR with NoPadding
+ * and ECB, CBC with PKCS5Padding. It will use its own padding impl
+ * if the native mechanism does not support padding.
  *
- * Note that PKCS#11 current only supports ECB and CBC. There are no
- * provisions for other modes such as CFB, OFB, PCBC, or CTR mode.
- * However, CTR could be implemented relatively easily (and efficiently)
- * on top of ECB mode in this class, if need be.
+ * Note that PKCS#11 currently only supports ECB, CBC, and CTR.
+ * There are no provisions for other modes such as CFB, OFB, and PCBC.
  *
  * @author  Andreas Sterbenz
  * @since   1.5
@@ -60,6 +58,8 @@
     private final static int MODE_ECB = 3;
     // mode constant for CBC mode
     private final static int MODE_CBC = 4;
+    // mode constant for CTR mode
+    private final static int MODE_CTR = 5;
 
     // padding constant for NoPadding
     private final static int PAD_NONE = 5;
@@ -157,7 +157,7 @@
     private byte[] padBuffer;
     private int padBufferLen;
 
-    // original IV, if in MODE_CBC
+    // original IV, if in MODE_CBC or MODE_CTR
     private byte[] iv;
 
     // number of bytes buffered internally by the native mechanism and padBuffer
@@ -213,6 +213,8 @@
                         ("CBC mode not supported with stream ciphers");
             }
             result = MODE_CBC;
+        } else if (mode.equals("CTR")) {
+            result = MODE_CTR;
         } else {
             throw new NoSuchAlgorithmException("Unsupported mode " + mode);
         }
@@ -228,6 +230,10 @@
         if (padding.equals("NOPADDING")) {
             paddingType = PAD_NONE;
         } else if (padding.equals("PKCS5PADDING")) {
+            if (this.blockMode == MODE_CTR) {
+                throw new NoSuchPaddingException
+                    ("PKCS#5 padding not supported with CTR mode");
+            }
             paddingType = PAD_PKCS5;
             if (mechanism != CKM_DES_CBC_PAD && mechanism != CKM_DES3_CBC_PAD &&
                     mechanism != CKM_AES_CBC_PAD) {
@@ -348,11 +354,14 @@
                             ("IV not used in ECB mode");
                 }
             }
-        } else { // MODE_CBC
+        } else { // MODE_CBC or MODE_CTR
             if (iv == null) {
                 if (encrypt == false) {
-                    throw new InvalidAlgorithmParameterException
-                            ("IV must be specified for decryption in CBC mode");
+                    String exMsg =
+                        (blockMode == MODE_CBC ?
+                         "IV must be specified for decryption in CBC mode" :
+                         "IV must be specified for decryption in CTR mode");
+                    throw new InvalidAlgorithmParameterException(exMsg);
                 }
                 // generate random IV
                 if (random == null) {
@@ -410,13 +419,15 @@
         if (session == null) {
             session = token.getOpSession();
         }
+        CK_MECHANISM mechParams = (blockMode == MODE_CTR?
+            new CK_MECHANISM(mechanism, new CK_AES_CTR_PARAMS(iv)) :
+            new CK_MECHANISM(mechanism, iv));
+
         try {
             if (encrypt) {
-                token.p11.C_EncryptInit(session.id(),
-                        new CK_MECHANISM(mechanism, iv), p11Key.keyID);
+                token.p11.C_EncryptInit(session.id(), mechParams, p11Key.keyID);
             } else {
-                token.p11.C_DecryptInit(session.id(),
-                        new CK_MECHANISM(mechanism, iv), p11Key.keyID);
+                token.p11.C_DecryptInit(session.id(), mechParams, p11Key.keyID);
             }
         } catch (PKCS11Exception ex) {
             // release session when initialization failed
--- a/src/share/classes/sun/security/pkcs11/P11Key.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/pkcs11/P11Key.java	Wed Apr 20 04:38:36 2011 +0100
@@ -999,18 +999,34 @@
                 new CK_ATTRIBUTE(CKA_EC_PARAMS),
             };
             fetchAttributes(attributes);
+
             try {
                 params = P11ECKeyFactory.decodeParameters
                             (attributes[1].getByteArray());
-                DerValue wECPoint = new DerValue(attributes[0].getByteArray());
-                if (wECPoint.getTag() != DerValue.tag_OctetString)
-                    throw new IOException("Unexpected tag: " +
-                        wECPoint.getTag());
-                params = P11ECKeyFactory.decodeParameters
-                            (attributes[1].getByteArray());
-                w = P11ECKeyFactory.decodePoint
-                    (wECPoint.getDataBytes(), params.getCurve());
+
+                /*
+                 * An uncompressed EC point may be in either of two formats.
+                 * First try the OCTET STRING encoding:
+                 *   04 <length> 04 <X-coordinate> <Y-coordinate>
+                 *
+                 * Otherwise try the raw encoding:
+                 *   04 <X-coordinate> <Y-coordinate>
+                 */
+                byte[] ecKey = attributes[0].getByteArray();
 
+                try {
+                    DerValue wECPoint = new DerValue(ecKey);
+                    if (wECPoint.getTag() != DerValue.tag_OctetString)
+                        throw new IOException("Unexpected tag: " +
+                            wECPoint.getTag());
+
+                    w = P11ECKeyFactory.decodePoint
+                        (wECPoint.getDataBytes(), params.getCurve());
+
+                } catch (IOException e) {
+                    // Failover
+                    w = P11ECKeyFactory.decodePoint(ecKey, params.getCurve());
+                }
 
             } catch (Exception e) {
                 throw new RuntimeException("Could not parse key values", e);
--- a/src/share/classes/sun/security/pkcs11/P11RSACipher.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/pkcs11/P11RSACipher.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -62,6 +62,11 @@
     // mode constant for public key decryption (verifying)
     private final static int MODE_VERIFY  = 4;
 
+    // padding type constant for NoPadding
+    private final static int PAD_NONE = 1;
+    // padding type constant for PKCS1Padding
+    private final static int PAD_PKCS1 = 2;
+
     // token instance
     private final Token token;
 
@@ -77,6 +82,9 @@
     // mode, one of MODE_* above
     private int mode;
 
+    // padding, one of PAD_* above
+    private int padType;
+
     private byte[] buffer;
     private int bufOfs;
 
@@ -113,8 +121,10 @@
     protected void engineSetPadding(String padding)
             throws NoSuchPaddingException {
         String lowerPadding = padding.toLowerCase(Locale.ENGLISH);
-        if (lowerPadding.equals("pkcs1Padding")) {
-            // empty
+        if (lowerPadding.equals("pkcs1padding")) {
+            padType = PAD_PKCS1;
+        } else if (lowerPadding.equals("nopadding")) {
+            padType = PAD_NONE;
         } else {
             throw new NoSuchPaddingException("Unsupported padding " + padding);
         }
@@ -209,7 +219,8 @@
         int n = (p11Key.keyLength() + 7) >> 3;
         outputSize = n;
         buffer = new byte[n];
-        maxInputSize = encrypt ? (n - PKCS1_MIN_PADDING_LENGTH) : n;
+        maxInputSize = ((padType == PAD_PKCS1 && encrypt) ?
+                            (n - PKCS1_MIN_PADDING_LENGTH) : n);
         try {
             initialize();
         } catch (PKCS11Exception e) {
--- a/src/share/classes/sun/security/pkcs11/SunPKCS11.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/pkcs11/SunPKCS11.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -621,12 +621,16 @@
                 m(CKM_AES_CBC_PAD, CKM_AES_CBC));
         d(CIP, "AES/ECB",                       P11Cipher,      s("AES"),
                 m(CKM_AES_ECB));
+        d(CIP, "AES/CTR/NoPadding",             P11Cipher,
+                m(CKM_AES_CTR));
         d(CIP, "Blowfish/CBC",                  P11Cipher,
                 m(CKM_BLOWFISH_CBC));
 
         // XXX RSA_X_509, RSA_OAEP not yet supported
-        d(CIP, "RSA/ECB/PKCS1Padding",          P11RSACipher,
+        d(CIP, "RSA/ECB/PKCS1Padding",          P11RSACipher,   s("RSA"),
                 m(CKM_RSA_PKCS));
+        d(CIP, "RSA/ECB/NoPadding",             P11RSACipher,
+                m(CKM_RSA_X_509));
 
         d(SIG, "RawDSA",        P11Signature,           s("NONEwithDSA"),
                 m(CKM_DSA));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2011, 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 sun.security.pkcs11.wrapper;
+
+/**
+ * This class represents the necessary parameters required by
+ * the CKM_AES_CTR mechanism as defined in CK_AES_CTR_PARAMS structure.<p>
+ * <B>PKCS#11 structure:</B>
+ * <PRE>
+ * typedef struct CK_AES_CTR_PARAMS {
+ *   CK_ULONG ulCounterBits;
+ *   CK_BYTE cb[16];
+ * } CK_AES_CTR_PARAMS;
+ * </PRE>
+ *
+ * @author Yu-Ching Valerie Peng
+ * @since   1.7
+ */
+public class CK_AES_CTR_PARAMS {
+
+    private final long ulCounterBits;
+    private final byte cb[];
+
+    public CK_AES_CTR_PARAMS(byte[] cb) {
+        ulCounterBits = 128;
+        this.cb = cb.clone();
+    }
+
+    public String toString() {
+        StringBuffer buffer = new StringBuffer();
+
+        buffer.append(Constants.INDENT);
+        buffer.append("ulCounterBits: ");
+        buffer.append(ulCounterBits);
+        buffer.append(Constants.NEWLINE);
+
+        buffer.append(Constants.INDENT);
+        buffer.append("cb: ");
+        buffer.append(Functions.toHexString(cb));
+
+        return buffer.toString();
+    }
+}
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -48,6 +48,7 @@
 package sun.security.pkcs11.wrapper;
 
 import java.math.BigInteger;
+import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
 
 /**
  * class CK_MECHANISM specifies a particular mechanism and any parameters it
@@ -127,6 +128,10 @@
         init(mechanism, params);
     }
 
+    public CK_MECHANISM(long mechanism, CK_AES_CTR_PARAMS params) {
+        init(mechanism, params);
+    }
+
     private void init(long mechanism, Object pParameter) {
         this.mechanism = mechanism;
         this.pParameter = pParameter;
--- a/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -47,8 +47,6 @@
 
 package sun.security.pkcs11.wrapper;
 
-
-
 /**
  * This interface holds constants of the PKCS#11 v2.11 standard.
  * This is mainly the content of the 'pkcs11t.h' header file.
@@ -306,6 +304,10 @@
 
     public static final long  CKK_VENDOR_DEFINED  = 0x80000000L;
 
+    // new for v2.20 amendment 3
+    //public static final long  CKK_CAMELLIA          = 0x00000025L;
+    //public static final long  CKK_ARIA              = 0x00000026L;
+
     // pseudo key type ANY (for template manager)
     public static final long  PCKK_ANY            = 0x7FFFFF22L;
 
@@ -690,6 +692,34 @@
 
     public static final long  CKM_VENDOR_DEFINED             = 0x80000000L;
 
+    // new for v2.20 amendment 3
+    public static final long  CKM_SHA224                     = 0x00000255L;
+    public static final long  CKM_SHA224_HMAC                = 0x00000256L;
+    public static final long  CKM_SHA224_HMAC_GENERAL        = 0x00000257L;
+    public static final long  CKM_SHA224_KEY_DERIVATION      = 0x00000396L;
+    public static final long  CKM_SHA224_RSA_PKCS            = 0x00000046L;
+    public static final long  CKM_SHA224_RSA_PKCS_PSS        = 0x00000047L;
+    public static final long  CKM_AES_CTR                    = 0x00001086L;
+    /*
+    public static final long  CKM_CAMELLIA_KEY_GEN           = 0x00000550L;
+    public static final long  CKM_CAMELLIA_ECB               = 0x00000551L;
+    public static final long  CKM_CAMELLIA_CBC               = 0x00000552L;
+    public static final long  CKM_CAMELLIA_MAC               = 0x00000553L;
+    public static final long  CKM_CAMELLIA_MAC_GENERAL       = 0x00000554L;
+    public static final long  CKM_CAMELLIA_CBC_PAD           = 0x00000555L;
+    public static final long  CKM_CAMELLIA_ECB_ENCRYPT_DATA  = 0x00000556L;
+    public static final long  CKM_CAMELLIA_CBC_ENCRYPT_DATA  = 0x00000557L;
+    public static final long  CKM_CAMELLIA_CTR               = 0x00000558L;
+    public static final long  CKM_ARIA_KEY_GEN               = 0x00000560L;
+    public static final long  CKM_ARIA_ECB                   = 0x00000561L;
+    public static final long  CKM_ARIA_CBC                   = 0x00000562L;
+    public static final long  CKM_ARIA_MAC                   = 0x00000563L;
+    public static final long  CKM_ARIA_MAC_GENERAL           = 0x00000564L;
+    public static final long  CKM_ARIA_CBC_PAD               = 0x00000565L;
+    public static final long  CKM_ARIA_ECB_ENCRYPT_DATA      = 0x00000566L;
+    public static final long  CKM_ARIA_CBC_ENCRYPT_DATA      = 0x00000567L;
+    */
+
     // NSS private
     public static final long  CKM_NSS_TLS_PRF_GENERAL        = 0x80000373L;
 
@@ -881,7 +911,8 @@
 
     /* The following MGFs are defined */
     public static final long  CKG_MGF1_SHA1       =  0x00000001L;
-
+    // new for v2.20 amendment 3
+    public static final long  CKG_MGF1_SHA224     = 0x00000005L;
 
     /* The following encoding parameter sources are defined */
     public static final long  CKZ_DATA_SPECIFIED   = 0x00000001L;
--- a/src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java	Wed Apr 20 04:38:36 2011 +0100
@@ -46,10 +46,16 @@
  */
 class AdaptableX509CertSelector extends X509CertSelector {
     // The start date of a validity period.
-    private Date startDate = null;
+    private Date startDate;
 
     // The end date of a validity period.
-    private Date endDate = null;
+    private Date endDate;
+
+    // Is subject key identifier sensitive?
+    private boolean isSKIDSensitive = false;
+
+    // Is serial number sensitive?
+    private boolean isSNSensitive = false;
 
     AdaptableX509CertSelector() {
         super();
@@ -97,15 +103,24 @@
         if (akidext != null) {
             KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID);
             if (akid != null) {
-                DerOutputStream derout = new DerOutputStream();
-                derout.putOctetString(akid.getIdentifier());
-                super.setSubjectKeyIdentifier(derout.toByteArray());
+                // Do not override the previous setting for initial selection.
+                if (isSKIDSensitive || getSubjectKeyIdentifier() == null) {
+                    DerOutputStream derout = new DerOutputStream();
+                    derout.putOctetString(akid.getIdentifier());
+                    super.setSubjectKeyIdentifier(derout.toByteArray());
+
+                    isSKIDSensitive = true;
+                }
             }
 
             SerialNumber asn =
                 (SerialNumber)akidext.get(akidext.SERIAL_NUMBER);
             if (asn != null) {
-                super.setSerialNumber(asn.getNumber());
+                // Do not override the previous setting for initial selection.
+                if (isSNSensitive || getSerialNumber() == null) {
+                    super.setSerialNumber(asn.getNumber());
+                    isSNSensitive = true;
+                }
             }
 
             // the subject criterion should be set by the caller.
@@ -148,11 +163,25 @@
             }
         }
 
-        if (version < 3 || xcert.getExtensionValue("2.5.29.14") == null) {
-            // If no SubjectKeyIdentifier extension, don't bother to check it.
+        // If no SubjectKeyIdentifier extension, don't bother to check it.
+        if (isSKIDSensitive &&
+            (version < 3 || xcert.getExtensionValue("2.5.29.14") == null)) {
             setSubjectKeyIdentifier(null);
         }
 
+        // In practice, a CA may replace its root certificate and require that
+        // the existing certificate is still valid, even if the AKID extension
+        // does not match the replacement root certificate fields.
+        //
+        // Conservatively, we only support the replacement for version 1 and
+        // version 2 certificate. As for version 2, the certificate extension
+        // may contain sensitive information (for example, policies), the
+        // AKID need to be respected to seek the exact certificate in case
+        // of key or certificate abuse.
+        if (isSNSensitive && version < 3) {
+            setSerialNumber(null);
+        }
+
         return super.match(cert);
     }
 
--- a/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java	Wed Apr 20 04:38:36 2011 +0100
@@ -243,12 +243,6 @@
                     caTargetSelector.setPolicy(getMatchingPolicies());
             }
 
-            /*
-             * Require CA certs with a pathLenConstraint that allows
-             * at least as many CA certs that have already been traversed
-             */
-            caTargetSelector.setBasicConstraints(currentState.traversedCACerts);
-
             sel = caTargetSelector;
         } else {
 
@@ -283,12 +277,6 @@
                 (caSelector, currentState.subjectNamesTraversed);
 
             /*
-             * Require CA certs with a pathLenConstraint that allows
-             * at least as many CA certs that have already been traversed
-             */
-            caSelector.setBasicConstraints(currentState.traversedCACerts);
-
-            /*
              * Facilitate certification path construction with authority
              * key identifier and subject key identifier.
              */
@@ -305,6 +293,14 @@
             sel = caSelector;
         }
 
+        /*
+         * For compatibility, conservatively, we don't check the path
+         * length constraint of trusted anchors.  Please don't set the
+         * basic constraints criterion unless the trusted certificate
+         * matching is completed.
+         */
+        sel.setBasicConstraints(-1);
+
         for (X509Certificate trustedCert : trustedCerts) {
             if (sel.match(trustedCert)) {
                 if (debug != null) {
@@ -324,6 +320,12 @@
         sel.setCertificateValid(date);
 
         /*
+         * Require CA certs with a pathLenConstraint that allows
+         * at least as many CA certs that have already been traversed
+         */
+        sel.setBasicConstraints(currentState.traversedCACerts);
+
+        /*
          * If we have already traversed as many CA certs as the maxPathLength
          * will allow us to, then we don't bother looking through these
          * certificate pairs. If maxPathLength has a value of -1, this
--- a/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Wed Apr 20 04:38:36 2011 +0100
@@ -231,13 +231,6 @@
         AdaptableX509CertSelector issuerSelector =
                         new AdaptableX509CertSelector();
 
-        // check trusted certificate's key usage
-        boolean[] usages = trustedCert.getKeyUsage();
-        if (usages != null) {
-            usages[5] = true;    // keyCertSign
-            issuerSelector.setKeyUsage(usages);
-        }
-
         // check trusted certificate's subject
         issuerSelector.setSubject(firstCert.getIssuerX500Principal());
 
--- a/src/share/classes/sun/security/ssl/ClientHandshaker.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/ssl/ClientHandshaker.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -377,8 +377,9 @@
         ProtocolVersion mesgVersion = mesg.protocolVersion;
         if (!isNegotiable(mesgVersion)) {
             throw new SSLHandshakeException(
-                    "Server chose unsupported or disabled protocol: " +
-                    mesgVersion);
+                "Server chose " + mesgVersion +
+                ", but that protocol version is not enabled or not supported " +
+                "by the client.");
         }
 
         handshakeHash.protocolDetermined(mesgVersion);
--- a/src/share/classes/sun/security/ssl/SunJSSE.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/ssl/SunJSSE.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -195,6 +195,8 @@
             "sun.security.ssl.KeyManagerFactoryImpl$SunX509");
         put("KeyManagerFactory.NewSunX509",
             "sun.security.ssl.KeyManagerFactoryImpl$X509");
+        put("Alg.Alias.KeyManagerFactory.PKIX", "NewSunX509");
+
         put("TrustManagerFactory.SunX509",
             "sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory");
         put("TrustManagerFactory.PKIX",
--- a/src/share/classes/sun/security/tools/JarSigner.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/tools/JarSigner.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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 @@
 package sun.security.tools;
 
 import java.io.*;
-import java.security.cert.X509CRL;
 import java.util.*;
 import java.util.zip.*;
 import java.util.jar.*;
@@ -36,7 +35,6 @@
 import java.text.Collator;
 import java.text.MessageFormat;
 import java.security.cert.Certificate;
-import java.security.cert.CRL;
 import java.security.cert.X509Certificate;
 import java.security.cert.CertificateException;
 import java.security.*;
@@ -58,7 +56,6 @@
 import sun.security.x509.*;
 import sun.security.util.*;
 import sun.misc.BASE64Encoder;
-import sun.misc.SharedSecrets;
 
 
 /**
@@ -117,13 +114,11 @@
     static final int SIGNED_BY_ALIAS = 0x08;    // signer is in alias list
 
     X509Certificate[] certChain;    // signer's cert chain (when composing)
-    Set<X509CRL> crls;                 // signer provided CRLs
     PrivateKey privateKey;          // private key
     KeyStore store;                 // the keystore specified by -keystore
                                     // or the default keystore, never null
 
     String keystore; // key store file
-    List<String> crlfiles = new ArrayList<>();  // CRL files to add
     boolean nullStream = false; // null keystore input stream (NONE)
     boolean token = false; // token-based keystore
     String jarfile;  // jar files to sign or verify
@@ -151,7 +146,6 @@
     boolean signManifest = true; // "sign" the whole manifest
     boolean externalSF = true; // leave the .SF out of the PKCS7 block
     boolean strict = false;  // treat warnings as error
-    boolean autoCRL = false;    // Automatcially add CRL defined in cert
 
     // read zip entry raw bytes
     private ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
@@ -232,29 +226,6 @@
             } else {
                 loadKeyStore(keystore, true);
                 getAliasInfo(alias);
-                crls = new HashSet<X509CRL>();
-                if (crlfiles.size() > 0 || autoCRL) {
-                    CertificateFactory fac =
-                            CertificateFactory.getInstance("X509");
-                    List<CRL> list = new ArrayList<>();
-                    for (String file: crlfiles) {
-                        Collection<? extends CRL> tmp = KeyTool.loadCRLs(file);
-                        for (CRL crl: tmp) {
-                            if (crl instanceof X509CRL) {
-                                crls.add((X509CRL)crl);
-                            }
-                        }
-                    }
-                    if (autoCRL) {
-                        List<CRL> crlsFromCert =
-                                KeyTool.readCRLsFromCert(certChain[0]);
-                        for (CRL crl: crlsFromCert) {
-                            if (crl instanceof X509CRL) {
-                                crls.add((X509CRL)crl);
-                            }
-                        }
-                    }
-                }
 
                 // load the alternative signing mechanism
                 if (altSignerClass != null) {
@@ -396,13 +367,6 @@
             } else if (collator.compare(flags, "-digestalg") ==0) {
                 if (++n == args.length) usageNoArg();
                 digestalg = args[n];
-            } else if (collator.compare(flags, "-crl") ==0) {
-                if ("auto".equals(modifier)) {
-                    autoCRL = true;
-                } else {
-                    if (++n == args.length) usageNoArg();
-                    crlfiles.add(args[n]);
-                }
             } else if (collator.compare(flags, "-certs") ==0) {
                 showcerts = true;
             } else if (collator.compare(flags, "-strict") ==0) {
@@ -549,9 +513,6 @@
                 (".sigalg.algorithm.name.of.signature.algorithm"));
         System.out.println();
         System.out.println(rb.getString
-                (".crl.auto.file.include.CRL.in.signed.jar"));
-        System.out.println();
-        System.out.println(rb.getString
                 (".verify.verify.a.signed.JAR.file"));
         System.out.println();
         System.out.println(rb.getString
@@ -691,20 +652,6 @@
                             if (showcerts) {
                                 sb.append(si);
                                 sb.append('\n');
-                                CRL[] crls = SharedSecrets
-                                        .getJavaSecurityCodeSignerAccess()
-                                        .getCRLs(signer);
-                                if (crls != null) {
-                                    for (CRL crl: crls) {
-                                        if (crl instanceof X509CRLImpl) {
-                                            sb.append(tab).append("[");
-                                            sb.append(String.format(
-                                                    rb.getString("with.a.CRL.including.d.entries"),
-                                                    ((X509CRLImpl)crl).getRevokedCertificates().size()))
-                                                .append("]\n");
-                                        }
-                                    }
-                                }
                             }
                         }
                     } else if (showcerts && !verbose.equals("all")) {
@@ -1284,7 +1231,7 @@
 
             try {
                 block =
-                    sf.generateBlock(privateKey, sigalg, certChain, crls,
+                    sf.generateBlock(privateKey, sigalg, certChain,
                         externalSF, tsaUrl, tsaCert, signingMechanism, args,
                         zipFile);
             } catch (SocketTimeoutException e) {
@@ -2249,7 +2196,6 @@
     public Block generateBlock(PrivateKey privateKey,
                                String sigalg,
                                X509Certificate[] certChain,
-                               Set<X509CRL> crls,
                                boolean externalSF, String tsaUrl,
                                X509Certificate tsaCert,
                                ContentSigner signingMechanism,
@@ -2257,7 +2203,7 @@
         throws NoSuchAlgorithmException, InvalidKeyException, IOException,
             SignatureException, CertificateException
     {
-        return new Block(this, privateKey, sigalg, certChain, crls, externalSF,
+        return new Block(this, privateKey, sigalg, certChain, externalSF,
                 tsaUrl, tsaCert, signingMechanism, args, zipFile);
     }
 
@@ -2271,8 +2217,7 @@
          * Construct a new signature block.
          */
         Block(SignatureFile sfg, PrivateKey privateKey, String sigalg,
-            X509Certificate[] certChain, Set<X509CRL> crls,
-            boolean externalSF, String tsaUrl,
+            X509Certificate[] certChain, boolean externalSF, String tsaUrl,
             X509Certificate tsaCert, ContentSigner signingMechanism,
             String[] args, ZipFile zipFile)
             throws NoSuchAlgorithmException, InvalidKeyException, IOException,
@@ -2359,7 +2304,7 @@
             // Assemble parameters for the signing mechanism
             ContentSignerParameters params =
                 new JarSignerParameters(args, tsaUri, tsaCert, signature,
-                    signatureAlgorithm, certChain, crls, content, zipFile);
+                    signatureAlgorithm, certChain, content, zipFile);
 
             // Generate the signature block
             block = signingMechanism.generateSignedData(
@@ -2400,7 +2345,6 @@
     private byte[] signature;
     private String signatureAlgorithm;
     private X509Certificate[] signerCertificateChain;
-    private Set<X509CRL> crls;
     private byte[] content;
     private ZipFile source;
 
@@ -2409,8 +2353,7 @@
      */
     JarSignerParameters(String[] args, URI tsa, X509Certificate tsaCertificate,
         byte[] signature, String signatureAlgorithm,
-        X509Certificate[] signerCertificateChain, Set<X509CRL> crls,
-        byte[] content,
+        X509Certificate[] signerCertificateChain, byte[] content,
         ZipFile source) {
 
         if (signature == null || signatureAlgorithm == null ||
@@ -2423,7 +2366,6 @@
         this.signature = signature;
         this.signatureAlgorithm = signatureAlgorithm;
         this.signerCertificateChain = signerCertificateChain;
-        this.crls = crls;
         this.content = content;
         this.source = source;
     }
@@ -2499,13 +2441,4 @@
     public ZipFile getSource() {
         return source;
     }
-
-    @Override
-    public Set<X509CRL> getCRLs() {
-        if (crls == null) {
-            return Collections.emptySet();
-        } else {
-            return Collections.unmodifiableSet(crls);
-        }
-    }
 }
--- a/src/share/classes/sun/security/tools/JarSignerResources.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/tools/JarSignerResources.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -74,8 +74,6 @@
                 "[-digestalg <algorithm>]    name of digest algorithm"},
         {".sigalg.algorithm.name.of.signature.algorithm",
                 "[-sigalg <algorithm>]       name of signature algorithm"},
-        {".crl.auto.file.include.CRL.in.signed.jar",
-                "[-crl[:auto| <file>]        include CRL in signed jar"},
         {".verify.verify.a.signed.JAR.file",
                 "[-verify]                   verify a signed JAR file"},
         {".verbose.suboptions.verbose.output.when.signing.verifying.",
@@ -193,7 +191,6 @@
         {"using.an.alternative.signing.mechanism",
                 "using an alternative signing mechanism"},
         {"entry.was.signed.on", "entry was signed on {0}"},
-        {"with.a.CRL.including.d.entries", "with a CRL including %d entries"},
         {"Warning.", "Warning: "},
         {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.",
                 "This jar contains unsigned entries which have not been integrity-checked. "},
--- a/src/share/classes/sun/security/tools/KeyTool.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/tools/KeyTool.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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 sun.security.tools;
 
-import sun.misc.SharedSecrets;
 import java.io.*;
 import java.security.CodeSigner;
 import java.security.KeyStore;
@@ -2311,16 +2310,6 @@
                                     out.println();
                                 }
                             }
-                            CRL[] crls = SharedSecrets
-                                    .getJavaSecurityCodeSignerAccess()
-                                    .getCRLs(signer);
-                            if (crls != null) {
-                                out.println(rb.getString("CRLs."));
-                                out.println();
-                                for (CRL crl: crls) {
-                                    printCRL(crl, out);
-                                }
-                            }
                         }
                     }
                 }
--- a/src/share/classes/sun/security/tools/TimestampedSigner.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/tools/TimestampedSigner.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2011, 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,7 +38,6 @@
 import java.util.List;
 
 import com.sun.jarsigner.*;
-import java.security.cert.X509CRL;
 import java.util.Arrays;
 import sun.security.pkcs.*;
 import sun.security.timestamp.*;
@@ -238,9 +237,8 @@
         AlgorithmId[] algorithms = {digestAlgorithmId};
 
         // Create the PKCS #7 signed data message
-        PKCS7 p7 =
-            new PKCS7(algorithms, contentInfo, signerCertificateChain,
-                    parameters.getCRLs().toArray(new X509CRL[parameters.getCRLs().size()]), signerInfos);
+        PKCS7 p7 = new PKCS7(algorithms, contentInfo, signerCertificateChain,
+                null, signerInfos);
         ByteArrayOutputStream p7out = new ByteArrayOutputStream();
         p7.encodeSignedData(p7out);
 
--- a/src/share/classes/sun/security/util/SignatureFileVerifier.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/security/util/SignatureFileVerifier.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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,7 +37,6 @@
 import sun.security.pkcs.*;
 import sun.security.timestamp.TimestampToken;
 import sun.misc.BASE64Decoder;
-import sun.misc.SharedSecrets;
 
 import sun.security.jca.Providers;
 
@@ -181,7 +180,8 @@
      *
      *
      */
-    public void process(Hashtable<String, CodeSigner[]> signers)
+    public void process(Hashtable<String, CodeSigner[]> signers,
+            List manifestDigests)
         throws IOException, SignatureException, NoSuchAlgorithmException,
             JarException, CertificateException
     {
@@ -190,14 +190,15 @@
         Object obj = null;
         try {
             obj = Providers.startJarVerification();
-            processImpl(signers);
+            processImpl(signers, manifestDigests);
         } finally {
             Providers.stopJarVerification(obj);
         }
 
     }
 
-    private void processImpl(Hashtable<String, CodeSigner[]> signers)
+    private void processImpl(Hashtable<String, CodeSigner[]> signers,
+            List manifestDigests)
         throws IOException, SignatureException, NoSuchAlgorithmException,
             JarException, CertificateException
     {
@@ -232,7 +233,7 @@
                                 sf.getEntries().entrySet().iterator();
 
         // see if we can verify the whole manifest first
-        boolean manifestSigned = verifyManifestHash(sf, md, decoder);
+        boolean manifestSigned = verifyManifestHash(sf, md, decoder, manifestDigests);
 
         // verify manifest main attributes
         if (!manifestSigned && !verifyManifestMainAttrs(sf, md, decoder)) {
@@ -275,7 +276,8 @@
      */
     private boolean verifyManifestHash(Manifest sf,
                                        ManifestDigester md,
-                                       BASE64Decoder decoder)
+                                       BASE64Decoder decoder,
+                                       List manifestDigests)
          throws IOException
     {
         Attributes mattr = sf.getMainAttributes();
@@ -290,6 +292,8 @@
                 // 16 is length of "-Digest-Manifest"
                 String algorithm = key.substring(0, key.length()-16);
 
+                manifestDigests.add(key);
+                manifestDigests.add(se.getValue());
                 MessageDigest digest = getDigest(algorithm);
                 if (digest != null) {
                     byte[] computedHash = md.manifestDigest(digest);
@@ -481,12 +485,7 @@
                 signers = new ArrayList<CodeSigner>();
             }
             // Append the new code signer
-            CodeSigner signer = new CodeSigner(certChain, getTimestamp(info));
-            if (block.getCRLs() != null) {
-                SharedSecrets.getJavaSecurityCodeSignerAccess().setCRLs(
-                        signer, block.getCRLs());
-            }
-            signers.add(signer);
+            signers.add(new CodeSigner(certChain, getTimestamp(info)));
 
             if (debug != null) {
                 debug.println("Signature Block Certificate: " +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/CollationData_sr_Latn.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2005, 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.
+ */
+
+/*
+ */
+
+/*
+ * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
+ *
+ * The original version of this source code and documentation
+ * is copyrighted and owned by Taligent, Inc., a wholly-owned
+ * subsidiary of IBM. These materials are provided under terms
+ * of a License Agreement between Taligent and Sun. This technology
+ * is protected by multiple US and International patents.
+ *
+ * This notice and attribution to Taligent may not be removed.
+ * Taligent is a registered trademark of Taligent, Inc.
+ *
+ */
+
+package sun.text.resources;
+
+import java.util.ListResourceBundle;
+
+public class CollationData_sr_Latn extends ListResourceBundle {
+
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "Rule",
+                /* for sr-Latin, default sorting except for the following: */
+
+                /* add dz "ligature" between d and d<stroke>. */
+                /* add d<stroke> between d and e. */
+                /* add lj "ligature" between l and l<stroke>. */
+                /* add l<stroke> between l and m. */
+                /* add nj "ligature" between n and o. */
+                /* add z<abovedot> after z.       */
+                "& \u200f = \u030c "
+                + "& \u0306 = \u030d "
+                + "& C < c\u030c , C\u030c "  // C < c-caron
+                + "< c\u0301 , C\u0301 "      // c-acute
+                + "& D < \u01f3 , \u01f2 , \u01f1 "  // dz
+                + "< dz , dZ , Dz , DZ "      // dz ligature
+                + "< \u01c6 , \u01c5 , \u01c4 "  // dz-caron
+                + "< \u0111 , \u0110 "           // d-stroke
+                + "& L < lj , lJ , Lj , LJ " // l < lj ligature
+                + "& N < nj , nJ , Nj , NJ " // n < nj ligature
+                + "& S < s\u030c , S\u030c "  // s < s-caron
+                + "& Z < z\u030c , Z\u030c "  // z < z-caron
+            }
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/FormatData_sr_Latn.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 1997, 2011, 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.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation (the
+ * "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, and/or sell copies of the Data
+ * Files or Software, and to permit persons to whom the Data Files or
+ * Software are furnished to do so, provided that (a) the above copyright
+ * notice(s) and this permission notice appear with all copies of the
+ * Data Files or Software, (b) both the above copyright notice(s) and
+ * this permission notice appear in associated documentation, and (c)
+ * there is clear notice in each modified Data File or in the Software as
+ * well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+ * ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+package sun.text.resources;
+
+import java.util.ListResourceBundle;
+
+public class FormatData_sr_Latn extends ListResourceBundle {
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "MonthNames",
+                new String[] {
+                    "januar",
+                    "februar",
+                    "mart",
+                    "april",
+                    "maj",
+                    "jun",
+                    "jul",
+                    "avgust",
+                    "septembar",
+                    "oktobar",
+                    "novembar",
+                    "decembar",
+                    "",
+                }
+            },
+            { "MonthAbbreviations",
+                new String[] {
+                    "jan",
+                    "feb",
+                    "mar",
+                    "apr",
+                    "maj",
+                    "jun",
+                    "jul",
+                    "avg",
+                    "sep",
+                    "okt",
+                    "nov",
+                    "dec",
+                    "",
+                }
+            },
+            { "DayNames",
+                new String[] {
+                    "nedelja",
+                    "ponedeljak",
+                    "utorak",
+                    "sreda",
+                    "\u010detvrtak",
+                    "petak",
+                    "subota",
+                }
+            },
+            { "DayAbbreviations",
+                new String[] {
+                    "ned",
+                    "pon",
+                    "uto",
+                    "sre",
+                    "\u010det",
+                    "pet",
+                    "sub",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "p. n. e.",
+                    "n. e",
+                }
+            },
+            { "NumberPatterns",
+                new String[] {
+                    "#,##0.###",
+                    "\u00a4\u00a0#,##0.00",
+                    "#,##0%",
+                }
+            },
+            { "NumberElements",
+                new String[] {
+                    ".",
+                    ",",
+                    ";",
+                    "%",
+                    "0",
+                    "#",
+                    "-",
+                    "E",
+                    "\u2030",
+                    "\u221e",
+                    "NaN",
+                }
+            },
+            { "DateTimePatterns",
+                new String[] {
+                    "HH.mm.ss zzzz",
+                    "HH.mm.ss z",
+                    "HH.mm.ss",
+                    "HH.mm",
+                    "EEEE, dd. MMMM y.",
+                    "dd. MMMM y.",
+                    "dd.MM.y.",
+                    "d.M.yy.",
+                    "{1} {0}",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/FormatData_sr_Latn_BA.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1997, 2011, 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.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation (the
+ * "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, and/or sell copies of the Data
+ * Files or Software, and to permit persons to whom the Data Files or
+ * Software are furnished to do so, provided that (a) the above copyright
+ * notice(s) and this permission notice appear with all copies of the
+ * Data Files or Software, (b) both the above copyright notice(s) and
+ * this permission notice appear in associated documentation, and (c)
+ * there is clear notice in each modified Data File or in the Software as
+ * well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+ * ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+package sun.text.resources;
+
+import sun.util.EmptyListResourceBundle;
+
+public class FormatData_sr_Latn_BA extends EmptyListResourceBundle {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/FormatData_sr_Latn_ME.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1997, 2011, 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.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation (the
+ * "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, and/or sell copies of the Data
+ * Files or Software, and to permit persons to whom the Data Files or
+ * Software are furnished to do so, provided that (a) the above copyright
+ * notice(s) and this permission notice appear with all copies of the
+ * Data Files or Software, (b) both the above copyright notice(s) and
+ * this permission notice appear in associated documentation, and (c)
+ * there is clear notice in each modified Data File or in the Software as
+ * well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+ * ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+package sun.text.resources;
+
+import java.util.ListResourceBundle;
+
+public class FormatData_sr_Latn_ME extends ListResourceBundle {
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "DateTimePatterns",
+                new String[] {
+                    "HH.mm.ss zzzz",
+                    "HH.mm.ss z",
+                    "HH.mm.ss",
+                    "HH.mm",
+                    "EEEE, dd. MMMM y.",
+                    "d.MM.yyyy.",
+                    "dd.MM.y.",
+                    "d.M.yy.",
+                    "{1} {0}",
+                }
+            }
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/FormatData_sr_Latn_RS.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1997, 2011, 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.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation (the
+ * "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, and/or sell copies of the Data
+ * Files or Software, and to permit persons to whom the Data Files or
+ * Software are furnished to do so, provided that (a) the above copyright
+ * notice(s) and this permission notice appear with all copies of the
+ * Data Files or Software, (b) both the above copyright notice(s) and
+ * this permission notice appear in associated documentation, and (c)
+ * there is clear notice in each modified Data File or in the Software as
+ * well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+ * ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+package sun.text.resources;
+
+import sun.util.EmptyListResourceBundle;
+
+public class FormatData_sr_Latn_RS extends EmptyListResourceBundle {
+}
--- a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_ja.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_ja.java	Wed Apr 20 04:38:36 2011 +0100
@@ -44,7 +44,7 @@
  * or if the keys ends with ".mnemonic", an element
  * representing a mnemomic keycode <code>int</code> or <code>char</code>.
  */
-public class JConsoleResources_ja extends ListResourceBundle {
+public class JConsoleResources_ja extends JConsoleResources {
 
     /**
      * Returns the contents of this <code>ResourceBundle</code>.
--- a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_zh_CN.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_zh_CN.java	Wed Apr 20 04:38:36 2011 +0100
@@ -44,7 +44,7 @@
  * or if the keys ends with ".mnemonic", an element
  * representing a mnemomic keycode <code>int</code> or <code>char</code>.
  */
-public class JConsoleResources_zh_CN extends ListResourceBundle {
+public class JConsoleResources_zh_CN extends JConsoleResources {
 
     /**
      * Returns the contents of this <code>ResourceBundle</code>.
--- a/src/share/classes/sun/tools/jps/Jps.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/tools/jps/Jps.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2011, 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
@@ -77,9 +77,52 @@
                 MonitoredVm vm = null;
                 String vmidString = "//" + lvmid + "?mode=r";
 
+                String errorString = null;
+
                 try {
+                    // Note: The VM associated with the current VM id may
+                    // no longer be running so these queries may fail. We
+                    // already added the VM id to the output stream above.
+                    // If one of the queries fails, then we try to add a
+                    // reasonable message to indicate that the requested
+                    // info is not available.
+
+                    errorString = " -- process information unavailable";
                     VmIdentifier id = new VmIdentifier(vmidString);
                     vm = monitoredHost.getMonitoredVm(id, 0);
+
+                    errorString = " -- main class information unavailable";
+                    output.append(" " + MonitoredVmUtil.mainClass(vm,
+                            arguments.showLongPaths()));
+
+                    if (arguments.showMainArgs()) {
+                        errorString = " -- main args information unavailable";
+                        String mainArgs = MonitoredVmUtil.mainArgs(vm);
+                        if (mainArgs != null && mainArgs.length() > 0) {
+                            output.append(" " + mainArgs);
+                        }
+                    }
+                    if (arguments.showVmArgs()) {
+                        errorString = " -- jvm args information unavailable";
+                        String jvmArgs = MonitoredVmUtil.jvmArgs(vm);
+                        if (jvmArgs != null && jvmArgs.length() > 0) {
+                          output.append(" " + jvmArgs);
+                        }
+                    }
+                    if (arguments.showVmFlags()) {
+                        errorString = " -- jvm flags information unavailable";
+                        String jvmFlags = MonitoredVmUtil.jvmFlags(vm);
+                        if (jvmFlags != null && jvmFlags.length() > 0) {
+                            output.append(" " + jvmFlags);
+                        }
+                    }
+
+                    errorString = " -- detach failed";
+                    monitoredHost.detach(vm);
+
+                    System.out.println(output);
+
+                    errorString = null;
                 } catch (URISyntaxException e) {
                     // unexpected as vmidString is based on a validated hostid
                     lastError = e;
@@ -87,7 +130,7 @@
                 } catch (Exception e) {
                     lastError = e;
                 } finally {
-                    if (vm == null) {
+                    if (errorString != null) {
                         /*
                          * we ignore most exceptions, as there are race
                          * conditions where a JVM in 'jvms' may terminate
@@ -95,7 +138,7 @@
                          * Other errors, such as access and I/O exceptions
                          * should stop us from iterating over the complete set.
                          */
-                        output.append(" -- process information unavailable");
+                        output.append(errorString);
                         if (arguments.isDebug()) {
                             if ((lastError != null)
                                     && (lastError.getMessage() != null)) {
@@ -110,33 +153,6 @@
                         continue;
                     }
                 }
-
-                output.append(" ");
-                output.append(MonitoredVmUtil.mainClass(vm,
-                        arguments.showLongPaths()));
-
-                if (arguments.showMainArgs()) {
-                    String mainArgs = MonitoredVmUtil.mainArgs(vm);
-                    if (mainArgs != null && mainArgs.length() > 0) {
-                        output.append(" ").append(mainArgs);
-                    }
-                }
-                if (arguments.showVmArgs()) {
-                    String jvmArgs = MonitoredVmUtil.jvmArgs(vm);
-                    if (jvmArgs != null && jvmArgs.length() > 0) {
-                      output.append(" ").append(jvmArgs);
-                    }
-                }
-                if (arguments.showVmFlags()) {
-                    String jvmFlags = MonitoredVmUtil.jvmFlags(vm);
-                    if (jvmFlags != null && jvmFlags.length() > 0) {
-                        output.append(" ").append(jvmFlags);
-                    }
-                }
-
-                System.out.println(output);
-
-                monitoredHost.detach(vm);
             }
         } catch (MonitorException e) {
             if (e.getMessage() != null) {
--- a/src/share/classes/sun/tools/native2ascii/Main.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/tools/native2ascii/Main.java	Wed Apr 20 04:38:36 2011 +0100
@@ -94,7 +94,7 @@
      * Run the converter
      */
     public synchronized boolean convert(String argv[]){
-        Vector v = new Vector(2);
+        List<String> v = new ArrayList<>(2);
         File outputFile = null;
         boolean createOutputFile = false;
 
@@ -115,7 +115,7 @@
                     usage();
                     return false;
                 }
-                v.addElement(argv[i]);
+                v.add(argv[i]);
             }
         }
         if (encodingString == null)
@@ -126,11 +126,11 @@
             initializeConverter();
 
             if (v.size() == 1)
-                inputFileName = (String)v.elementAt(0);
+                inputFileName = v.get(0);
 
             if (v.size() == 2) {
-                inputFileName = (String)v.elementAt(0);
-                outputFileName = (String)v.elementAt(1);
+                inputFileName = v.get(0);
+                outputFileName = v.get(1);
                 createOutputFile = true;
             }
 
@@ -363,9 +363,7 @@
 
     private String formatMsg(String key, String arg) {
         String msg = getMsg(key);
-        String[] args = new String[1];
-        args[0] = arg;
-        return MessageFormat.format(msg, (Object)args);
+        return MessageFormat.format(msg, arg);
     }
 
 
--- a/src/share/classes/sun/util/calendar/LocalGregorianCalendar.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/calendar/LocalGregorianCalendar.java	Wed Apr 20 04:38:36 2011 +0100
@@ -127,7 +127,9 @@
             calendarProps = (Properties) AccessController.doPrivileged(new PrivilegedExceptionAction() {
                 public Object run() throws IOException {
                     Properties props = new Properties();
-                    props.load(new FileInputStream(fname));
+                    try (FileInputStream fis = new FileInputStream(fname)) {
+                        props.load(fis);
+                    }
                     return props;
                 }
             });
--- a/src/share/classes/sun/util/calendar/ZoneInfo.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/calendar/ZoneInfo.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -266,7 +266,7 @@
         int index = getTransitionIndex(date, type);
 
         // prior to the transition table, returns the raw offset.
-        // should support LMT.
+        // FIXME: should support LMT.
         if (index < 0) {
             int offset = getLastRawOffset();
             if (offsets != null) {
@@ -297,7 +297,13 @@
             if (type != UTC_TIME) {
                 msec -= rawOffset;
             }
-            int dstoffset = tz.inDaylightTime(new Date(msec)) ? tz.getDSTSavings() : 0;
+            int dstoffset = tz.getOffset(msec) - rawOffset;
+
+            // Check if it's in a standard-to-daylight transition.
+            if (dstoffset > 0 && tz.getOffset(msec - dstoffset) == rawoffset) {
+                dstoffset = 0;
+            }
+
             if (offsets != null) {
                 offsets[0] = rawoffset;
                 offsets[1] = dstoffset;
@@ -452,6 +458,36 @@
         return (simpleTimeZoneParams != null);
     }
 
+    @Override
+    public boolean observesDaylightTime() {
+        if (simpleTimeZoneParams != null) {
+            return true;
+        }
+        if (transitions == null) {
+            return false;
+        }
+
+        // Look up the transition table to see if it's in DST right
+        // now or if there's any standard-to-daylight transition at
+        // any future.
+        long utc = System.currentTimeMillis() - rawOffsetDiff;
+        int index = getTransitionIndex(utc, UTC_TIME);
+
+        // before transitions in the transition table
+        if (index < 0) {
+            return false;
+        }
+
+        // the time is in the table range.
+        for (int i = index; i < transitions.length; i++) {
+            if ((transitions[i] & DST_MASK) != 0) {
+                return true;
+            }
+        }
+        // No further DST is observed.
+        return false;
+    }
+
     /**
      * Queries if the specified date is in Daylight Saving Time.
      */
--- a/src/share/classes/sun/util/logging/PlatformLogger.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/logging/PlatformLogger.java	Wed Apr 20 04:38:36 2011 +0100
@@ -535,7 +535,14 @@
         }
 
         void doLog(int level, String msg, Object... params) {
-            LoggingSupport.log(javaLogger, levelObjects.get(level), msg, params);
+            // only pass String objects to the j.u.l.Logger which may
+            // be created by untrusted code
+            int len = (params != null) ? params.length : 0;
+            Object[] sparams = new String[len];
+            for (int i = 0; i < len; i++) {
+                sparams [i] = String.valueOf(params[i]);
+            }
+            LoggingSupport.log(javaLogger, levelObjects.get(level), msg, sparams);
         }
 
         boolean isEnabled() {
--- a/src/share/classes/sun/util/logging/resources/logging.properties	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/logging/resources/logging.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -25,13 +25,22 @@
 
 # Localizations for Level names.  For the US locale
 # these are the same as the non-localized level name.
+
+# The following ALL CAPS words should be translated.
 ALL=ALL
+# The following ALL CAPS words should be translated.
 SEVERE=SEVERE
+# The following ALL CAPS words should be translated.
 WARNING=WARNING
+# The following ALL CAPS words should be translated.
 INFO=INFO
+# The following ALL CAPS words should be translated.
 CONFIG= CONFIG
+# The following ALL CAPS words should be translated.
 FINE=FINE
+# The following ALL CAPS words should be translated.
 FINER=FINER
+# The following ALL CAPS words should be translated.
 FINEST=FINEST
+# The following ALL CAPS words should be translated.
 OFF=OFF
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CalendarData_sr_Latn_BA.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+minimalDaysInFirstWeek=4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CalendarData_sr_Latn_ME.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+minimalDaysInFirstWeek=4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CalendarData_sr_Latn_RS.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+minimalDaysInFirstWeek=4
--- a/src/share/classes/sun/util/resources/CurrencyNames.properties	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/CurrencyNames.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -1,45 +1,68 @@
 #
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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.
 #
 
 #
 # COPYRIGHT AND PERMISSION NOTICE
 #
-# Copyright (C) 1991-2007 Unicode, Inc. All rights reserved.
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
 # Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
 #
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of the Unicode data files and any associated documentation (the "Data
-# Files") or Unicode software and any associated documentation (the
-# "Software") to deal in the Data Files or Software without restriction,
-# including without limitation the rights to use, copy, modify, merge,
-# publish, distribute, and/or sell copies of the Data Files or Software, and
-# to permit persons to whom the Data Files or Software are furnished to do
-# so, provided that (a) the above copyright notice(s) and this permission
-# notice appear with all copies of the Data Files or Software, (b) both the
-# above copyright notice(s) and this permission notice appear in associated
-# documentation, and (c) there is clear notice in each modified Data File or
-# in the Software as well as in the documentation associated with the Data
-# File(s) or Software that the data or software has been modified.
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
 #
-# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
-# THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
-# INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
-# CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-# USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
 #
-# Except as contained in this notice, the name of a copyright holder shall not
-# be used in advertising or otherwise to promote the sale, use or other
-# dealings in these Data Files or Software without prior written
-# authorization of the copyright holder.
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
 #
- 
 # Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
+#
 ADP=ADP
 AED=AED
 AFA=AFA
@@ -254,52 +277,52 @@
 ZWN=ZWN
 adp=Andorran Peseta
 aed=United Arab Emirates Dirham
-afa=Afghani (1927-2002)
-afn=Afghani
+afa=Afghan Afghani (1927-2002)
+afn=Afghan Afghani
 all=Albanian Lek
 amd=Armenian Dram
-ang=Netherlands Antillan Guilder
+ang=Netherlands Antillean Guilder
 aoa=Angolan Kwanza
 ars=Argentine Peso
 ats=Austrian Schilling
 aud=Australian Dollar
-awg=Aruban Guilder
-azm=Azerbaijanian Manat (1993-2006)
-azn=Azerbaijanian Manat
+awg=Aruban Florin
+azm=Azerbaijani Manat (1993-2006)
+azn=Azerbaijani Manat
 bam=Bosnia-Herzegovina Convertible Mark
-bbd=Barbados Dollar
-bdt=Bangladesh Taka
+bbd=Barbadian Dollar
+bdt=Bangladeshi Taka
 bef=Belgian Franc
 bgl=Bulgarian Hard Lev
-bgn=Bulgarian New Lev
+bgn=Bulgarian Lev
 bhd=Bahraini Dinar
-bif=Burundi Franc
+bif=Burundian Franc
 bmd=Bermudan Dollar
 bnd=Brunei Dollar
-bob=Boliviano
+bob=Bolivian Boliviano
 bov=Bolivian Mvdol
 brl=Brazilian Real
 bsd=Bahamian Dollar
-btn=Bhutan Ngultrum
+btn=Bhutanese Ngultrum
 bwp=Botswanan Pula
-byb=Belarussian New Ruble (1994-1999)
-byr=Belarussian Ruble
+byb=Belarusian New Ruble (1994-1999)
+byr=Belarusian Ruble
 bzd=Belize Dollar
 cad=Canadian Dollar
-cdf=Congolese Franc Congolais
+cdf=Congolese Franc
 chf=Swiss Franc
-clf=Chilean Unidades de Fomento
+clf=Chilean Unit of Account (UF)
 clp=Chilean Peso
-cny=Chinese Yuan Renminbi
+cny=Chinese Yuan
 cop=Colombian Peso
-crc=Costa Rican Colon
-csd=Serbian Dinar
+crc=Costa Rican Col\u00f3n
+csd=Serbian Dinar (2002-2006)
 cup=Cuban Peso
-cve=Cape Verde Escudo
-cyp=Cyprus Pound
+cve=Cape Verdean Escudo
+cyp=Cypriot Pound
 czk=Czech Republic Koruna
-dem=Deutsche Mark
-djf=Djibouti Franc
+dem=German Mark
+djf=Djiboutian Franc
 dkk=Danish Krone
 dop=Dominican Peso
 dzd=Algerian Dinar
@@ -310,22 +333,22 @@
 etb=Ethiopian Birr
 eur=Euro
 fim=Finnish Markka
-fjd=Fiji Dollar
+fjd=Fijian Dollar
 fkp=Falkland Islands Pound
 frf=French Franc
 gbp=British Pound Sterling
 gel=Georgian Lari
-ghc=Ghana Cedi
-ghs=Ghana Cedi
+ghc=Ghanaian Cedi (1979-2007)
+ghs=Ghanaian Cedi
 gip=Gibraltar Pound
-gmd=Gambia Dalasi
-gnf=Guinea Franc
+gmd=Gambian Dalasi
+gnf=Guinean Franc
 grd=Greek Drachma
-gtq=Guatemala Quetzal
+gtq=Guatemalan Quetzal
 gwp=Guinea-Bissau Peso
-gyd=Guyana Dollar
+gyd=Guyanaese Dollar
 hkd=Hong Kong Dollar
-hnl=Hoduras Lempira
+hnl=Honduran Lempira
 hrk=Croatian Kuna
 htg=Haitian Gourde
 huf=Hungarian Forint
@@ -335,110 +358,111 @@
 inr=Indian Rupee
 iqd=Iraqi Dinar
 irr=Iranian Rial
-isk=Icelandic Krona
+isk=Icelandic Kr\u00f3na
 itl=Italian Lira
 jmd=Jamaican Dollar
 jod=Jordanian Dinar
 jpy=Japanese Yen
 kes=Kenyan Shilling
-kgs=Kyrgystan Som
+kgs=Kyrgystani Som
 khr=Cambodian Riel
-kmf=Comoro Franc
+kmf=Comorian Franc
 kpw=North Korean Won
 krw=South Korean Won
 kwd=Kuwaiti Dinar
 kyd=Cayman Islands Dollar
-kzt=Kazakhstan Tenge
+kzt=Kazakhstani Tenge
 lak=Laotian Kip
 lbp=Lebanese Pound
-lkr=Sri Lanka Rupee
+lkr=Sri Lankan Rupee
 lrd=Liberian Dollar
 lsl=Lesotho Loti
-ltl=Lithuanian Lita
-luf=Luxembourg Franc
+ltl=Lithuanian Litas
+luf=Luxembourgian Franc
 lvl=Latvian Lats
 lyd=Libyan Dinar
 mad=Moroccan Dirham
 mdl=Moldovan Leu
-mga=Madagascar Ariary
-mgf=Madagascar Franc
+mga=Malagasy Ariary
+mgf=Malagasy Franc
 mkd=Macedonian Denar
-mmk=Myanmar Kyat
+mmk=Myanma Kyat
 mnt=Mongolian Tugrik
-mop=Macao Pataca
-mro=Mauritania Ouguiya
+mop=Macanese Pataca
+mro=Mauritanian Ouguiya
 mtl=Maltese Lira
-mur=Mauritius Rupee
-mvr=Maldive Islands Rufiyaa
-mwk=Malawi Kwacha
+mur=Mauritian Rupee
+mvr=Maldivian Rufiyaa
+mwk=Malawian Kwacha
 mxn=Mexican Peso
-mxv=Mexican Unidad de Inversion (UDI)
+mxv=Mexican Investment Unit
 myr=Malaysian Ringgit
-mzm=Old Mozambique Metical
-mzn=Mozambique Metical
-nad=Namibia Dollar
+mzm=Mozambican Metical (1980-2006)
+mzn=Mozambican Metical
+nad=Namibian Dollar
 ngn=Nigerian Naira
-nio=Nicaraguan Cordoba Oro
-nlg=Netherlands Guilder
+nio=Nicaraguan C\u00f3rdoba
+nlg=Dutch Guilder
 nok=Norwegian Krone
 npr=Nepalese Rupee
 nzd=New Zealand Dollar
-omr=Oman Rial
+omr=Omani Rial
 pab=Panamanian Balboa
-pen=Peruvian Sol Nuevo
-pgk=Papua New Guinea Kina
+pen=Peruvian Nuevo Sol
+pgk=Papua New Guinean Kina
 php=Philippine Peso
-pkr=Pakistan Rupee
+pkr=Pakistani Rupee
 pln=Polish Zloty
 pte=Portuguese Escudo
-pyg=Paraguay Guarani
+pyg=Paraguayan Guarani
 qar=Qatari Rial
-rol=Old Romanian Leu
+rol=Romanian Leu (1952-2006)
 ron=Romanian Leu
+rsd=Serbian Dinar
 rub=Russian Ruble
 rur=Russian Ruble (1991-1998)
 rwf=Rwandan Franc
 sar=Saudi Riyal
 sbd=Solomon Islands Dollar
-scr=Seychelles Rupee
-sdd=Sudanese Dinar
+scr=Seychellois Rupee
+sdd=Sudanese Dinar (1992-2007)
 sdg=Sudanese Pound
 sek=Swedish Krona
 sgd=Singapore Dollar
 shp=Saint Helena Pound
-sit=Slovenia Tolar
+sit=Slovenian Tolar
 skk=Slovak Koruna
-sll=Sierra Leone Leone
+sll=Sierra Leonean Leone
 sos=Somali Shilling
-srd=Surinam Dollar
-srg=Suriname Guilder
-std=Sao Tome and Principe Dobra
-svc=El Salvador Colon
+srd=Surinamese Dollar
+srg=Surinamese Guilder
+std=S\u00e3o Tom\u00e9 and Pr\u00edncipe Dobra
+svc=Salvadoran Col\u00f3n
 syp=Syrian Pound
-szl=Swaziland Lilangeni
+szl=Swazi Lilangeni
 thb=Thai Baht
-tjs=Tajikistan Somoni
-tmm=Turkmenistan Manat
+tjs=Tajikistani Somoni
+tmm=Turkmenistani Manat (1993-2009)
 tnd=Tunisian Dinar
-top=Tonga Pa\u02bbanga
-tpe=Timor Escudo
-trl=Turkish Lira
-try=New Turkish Lira
+top=Tongan Pa\u02bbanga
+tpe=Timorese Escudo
+trl=Turkish Lira (1922-2005)
+try=Turkish Lira
 ttd=Trinidad and Tobago Dollar
-twd=Taiwan New Dollar
+twd=New Taiwan Dollar
 tzs=Tanzanian Shilling
 uah=Ukrainian Hryvnia
 ugx=Ugandan Shilling
 usd=US Dollar
 usn=US Dollar (Next day)
 uss=US Dollar (Same day)
-uyu=Uruguay Peso Uruguayo
-uzs=Uzbekistan Sum
-veb=Venezuelan Bolivar
-vef=Venezuelan Bolivar Fuerte
+uyu=Uruguayan Peso
+uzs=Uzbekistan Som
+veb=Venezuelan Bol\u00edvar (1871-2008)
+vef=Venezuelan Bol\u00edvar
 vnd=Vietnamese Dong
 vuv=Vanuatu Vatu
-wst=Western Samoa Tala
+wst=Samoan Tala
 xaf=CFA Franc BEAC
 xag=Silver
 xau=Gold
@@ -455,9 +479,9 @@
 xpf=CFP Franc
 xpt=Platinum
 xts=Testing Currency Code
-xxx=No Currency
+xxx=Unknown Currency
 yer=Yemeni Rial
-yum=Yugoslavian Noviy Dinar
+yum=Yugoslavian New Dinar (1994-2002)
 zar=South African Rand
 zmk=Zambian Kwacha
-zwd=Zimbabwe Dollar
+zwd=Zimbabwean Dollar (1980-2008)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CurrencyNames_pt.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,273 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+adp=Peseta de Andorra
+aed=Dir\u00e9m dos Emirados \u00c1rabes Unidos
+afa=Afegane (1927-2002)
+afn=Afegane
+all=Lek Alban\u00eas
+amd=Dram arm\u00eanio
+ang=Guilder das Antilhas Holandesas
+aoa=Cuanza angolano
+ars=Peso argentino
+ats=Xelim austr\u00edaco
+aud=D\u00f3lar australiano
+awg=Guilder de Aruba
+azm=Manat azerbaijano
+azn=Manat do Azerbaij\u00e3o
+bam=Marco b\u00f3snio-herzegovino convers\u00edvel
+bbd=D\u00f3lar de Barbados
+bdt=Taka de Bangladesh
+bef=Franco belga
+bgl=Lev forte b\u00falgaro
+bgn=Lev novo b\u00falgaro
+bhd=Dinar bareinita
+bif=Franco do Burundi
+bmd=D\u00f3lar das Bermudas
+bnd=D\u00f3lar do Brunei
+bov=Mvdol boliviano
+brl=Real brasileiro
+bsd=D\u00f3lar das Bahamas
+btn=Ngultrum do But\u00e3o
+bwp=Pula botsuanesa
+byb=Rublo novo bielo-russo (1994-1999)
+byr=Rublo bielo-russo
+bzd=D\u00f3lar do Belize
+cad=D\u00f3lar canadense
+cdf=Franco congol\u00eas
+chf=Franco su\u00ed\u00e7o
+clf=Unidades de Fomento chilenas
+clp=Peso chileno
+cny=Yuan Renminbi chin\u00eas
+cop=Peso colombiano
+crc=Colon da Costa Rica
+csd=Dinar s\u00e9rvio antigo
+cup=Peso cubano
+cve=Escudo cabo-verdiano
+cyp=Libra cipriota
+czk=Coroa checa
+dem=Marco alem\u00e3o
+djf=Franco do Djibuti
+dkk=Coroa dinamarquesa
+dop=Peso dominicano
+dzd=Dinar argelino
+eek=Coroa estoniana
+egp=Libra eg\u00edpcia
+ern=Nakfa da Eritreia
+esp=Peseta espanhola
+etb=Birr et\u00edope
+fim=Marca finlandesa
+fjd=D\u00f3lar de Fiji
+fkp=Libra das Malvinas
+frf=Franco franc\u00eas
+gbp=Libra esterlina brit\u00e2nica
+gel=Lari georgiano
+ghc=Cedi de Gana (1979-2007)
+ghs=Cedi gan\u00eas
+gip=Libra de Gibraltar
+gmd=Dalasi de G\u00e2mbia
+gnf=Franco de Guin\u00e9
+grd=Dracma grego
+gtq=Quet\u00e7al da Guatemala
+gwp=Peso da Guin\u00e9-Bissau
+gyd=D\u00f3lar da Guiana
+hkd=D\u00f3lar de Hong Kong
+hnl=Lempira de Honduras
+hrk=Kuna croata
+htg=Gurde do Haiti
+huf=Forinte h\u00fangaro
+idr=Rupia indon\u00e9sia
+iep=Libra irlandesa
+ils=Sheqel Novo israelita
+inr=R\u00fapia indiana
+iqd=Dinar iraquiano
+irr=Rial iraniano
+isk=Coroa islandesa
+itl=Lira italiana
+jmd=D\u00f3lar jamaicano
+jod=Dinar jordaniano
+jpy=Iene japon\u00eas
+kes=Xelim queniano
+kgs=Som quirguiz
+khr=Riel cambojano
+kmf=Franco de Comores
+kpw=Won norte-coreano
+krw=Won sul-coreano
+kwd=Dinar coveitiano
+kyd=D\u00f3lar das Ilhas Caiman
+kzt=Tenge do Cazaquist\u00e3o
+lak=Kip de Laos
+lbp=Libra libanesa
+lkr=Rupia do Sri Lanka
+lrd=D\u00f3lar liberiano
+lsl=Loti do Lesoto
+ltl=Lita lituano
+luf=Franco luxemburgu\u00eas
+lvl=Lats let\u00e3o
+lyd=Dinar l\u00edbio
+mad=Dir\u00e9m marroquino
+mdl=Leu mold\u00e1vio
+mga=Ariary de Madagascar
+mgf=Franco de Madagascar
+mkd=Dinar maced\u00f4nio
+mmk=Kyat de Mianmar
+mnt=Tugrik mongol
+mop=Pataca macaense
+mro=Ouguiya da Maurit\u00e2nia
+mtl=Lira maltesa
+mur=Rupia de Maur\u00edcio
+mvr=Rupias das Ilhas Maldivas
+mwk=Cuacha do Mal\u00e1ui
+mxn=Peso mexicano
+mxv=Unidade Mexicana de Investimento (UDI)
+myr=Ringgit malaio
+mzm=Metical antigo de Mo\u00e7ambique
+mzn=Metical do Mo\u00e7ambique
+nad=D\u00f3lar da Nam\u00edbia
+ngn=Naira nigeriana
+nio=C\u00f3rdoba Ouro nicaraguense
+nlg=Florim holand\u00eas
+nok=Coroa norueguesa
+npr=Rupia nepalesa
+nzd=D\u00f3lar da Nova Zel\u00e2ndia
+omr=Rial de Om\u00e3
+pab=Balboa panamenho
+pen=Sol Novo peruano
+pgk=Kina da Papua-Nova Guin\u00e9
+php=Peso filipino
+pkr=Rupia paquistanesa
+pln=Zloti polon\u00eas
+pte=Escudo portugu\u00eas
+pyg=Guarani paraguaio
+qar=Rial catariano
+rol=Leu romeno antigo
+ron=Leu romeno
+rsd=Dinar s\u00e9rvio
+rub=Rublo russo
+rur=Rublo russo (1991-1998)
+rwf=Franco ruand\u00eas
+sar=Rial saudita
+sbd=D\u00f3lar das Ilhas Salom\u00e3o
+scr=Rupia das Seychelles
+sdd=Dinar sudan\u00eas
+sdg=Libra sudanesa
+sek=Coroa sueca
+sgd=D\u00f3lar de Cingapura
+shp=Libra de Santa Helena
+sit=Tolar Bons esloveno
+skk=Coroa eslovaca
+sll=Leone de Serra Leoa
+sos=Xelim somali
+srd=D\u00f3lar do Suriname
+srg=Florim do Suriname
+std=Dobra de S\u00e3o Tom\u00e9 e Pr\u00edncipe
+svc=Colom salvadorenho
+syp=Libra s\u00edria
+szl=Lilangeni da Suazil\u00e2ndia
+thb=Baht tailand\u00eas
+tjs=Somoni tadjique
+tmm=Manat do Turcomenist\u00e3o
+tnd=Dinar tunisiano
+top=Pa\u02bbanga de Tonga
+tpe=Escudo timorense
+trl=Lira turca antiga
+try=Lira turca
+ttd=D\u00f3lar de Trinidad e Tobago
+twd=D\u00f3lar Novo de Taiwan
+tzs=Xelim da Tanz\u00e2nia
+uah=Hryvnia ucraniano
+ugx=Xelim ugandense
+usd=D\u00f3lar norte-americano
+usn=D\u00f3lar norte-americano (Dia seguinte)
+uss=D\u00f3lar norte-americano (Mesmo dia)
+uyu=Peso uruguaio
+uzs=Sum do Usbequist\u00e3o
+veb=Bol\u00edvar venezuelano
+vef=Bol\u00edvar v enezuelano forte
+vnd=Dong vietnamita
+vuv=Vatu de Vanuatu
+wst=Tala samoano
+xaf=Franco CFA BEAC
+xag=Prata
+xau=Ouro
+xba=Unidade Composta Europeia
+xbb=Unidade Monet\u00e1ria Europeia
+xbc=Unidade de Conta Europeia (XBC)
+xbd=Unidade de Conta Europeia (XBD)
+xcd=D\u00f3lar do Caribe Oriental
+xdr=Direitos Especiais de Giro
+xfo=Franco-ouro franc\u00eas
+xfu=Franco UIC franc\u00eas
+xof=Franco CFA BCEAO
+xpd=Pal\u00e1dio
+xpf=Franco CFP
+xpt=Platina
+xts=C\u00f3digo de Moeda de Teste
+xxx=Moeda Desconhecida ou Inv\u00e1lida
+yer=Rial iemenita
+yum=Dinar noviy iugoslavo
+zar=Rand sul-africano
+zmk=Cuacha zambiano
+zwd=D\u00f3lar do Zimb\u00e1bue
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CurrencyNames_sr_Latn_BA.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+BAM=KM
+bam=Bosansko-Hercegova\u010dka konvertibilna marka
+EUR=\u20ac
+eur=Evro
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CurrencyNames_sr_Latn_ME.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+EUR=\u20ac
+eur=Evro
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CurrencyNames_sr_Latn_RS.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+RSD=din.
+rsd=Srpski dinar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/CurrencyNames_sr_RS.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+RSD=\u0434\u0438\u043d.
--- a/src/share/classes/sun/util/resources/LocaleData.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/LocaleData.java	Wed Apr 20 04:38:36 2011 +0100
@@ -171,16 +171,21 @@
             /* Get the locale string list from LocaleDataMetaInfo class. */
             String localeString = LocaleDataMetaInfo.getSupportedLocaleString(baseName);
 
-            if (localeString.length() == 0) {
+      if (localeString.length() == 0) {
                 return candidates;
             }
 
             for (Iterator<Locale> l = candidates.iterator(); l.hasNext(); ) {
-                String lstr = l.next().toString();
-                /* truncate extra segment introduced by Java 7 for script and extesions */
-                int idx = lstr.indexOf("_#");
-                if (idx >= 0) {
-                    lstr = lstr.substring(0, idx);
+                Locale loc = l.next();
+                String lstr = null;
+                if (loc.getScript().length() > 0) {
+                    lstr = loc.toLanguageTag().replace('-', '_');
+                } else {
+                    lstr = loc.toString();
+                    int idx = lstr.indexOf("_#");
+                    if (idx >= 0) {
+                        lstr = lstr.substring(0, idx);
+                    }
                 }
                 /* Every locale string in the locale string list returned from
                    the above getSupportedLocaleString is enclosed
@@ -265,28 +270,15 @@
 
         Locale[] locales = new Locale[localeStringTokenizer.countTokens()];
         for (int i = 0; i < locales.length; i++) {
-            String currentToken = localeStringTokenizer.nextToken();
-            int p2 = 0;
-            int p1 = currentToken.indexOf('_');
-            String language = "";
-            String country = "";
-            String variant = "";
-
-            if (p1 == -1) {
-                language = currentToken;
-            } else {
-                language = currentToken.substring(0, p1);
-                p2 = currentToken.indexOf('_', p1 + 1);
-                if (p2 == -1) {
-                    country = currentToken.substring(p1 + 1);
-                } else {
-                    country = currentToken.substring(p1 + 1, p2);
-                    if (p2 < currentToken.length()) {
-                        variant = currentToken.substring(p2 + 1);
-                    }
-                }
+            String currentToken = localeStringTokenizer.nextToken().replace('_','-');
+            if (currentToken.equals("ja-JP-JP")) {
+                currentToken = "ja-JP-u-ca-japanese-x-lvariant-JP";
+            } else if (currentToken.equals("th-TH-TH")) {
+                currentToken = "th-TH-u-nu-thai-x-lvariant-TH";
+            } else if (currentToken.equals("no-NO-NY")) {
+                currentToken = "no-NO-x-lvariant-NY";
             }
-            locales[i] = new Locale(language, country, variant);
+            locales[i] = Locale.forLanguageTag(currentToken);
         }
         return locales;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/LocaleNames_sr_Latn.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,471 @@
+#
+# Copyright (c) 2005, 2011, 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.
+#
+
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
+# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of the Unicode data files and any associated documentation (the
+# "Data Files") or Unicode software and any associated documentation
+# (the "Software") to deal in the Data Files or Software without
+# restriction, including without limitation the rights to use, copy,
+# modify, merge, publish, distribute, and/or sell copies of the Data
+# Files or Software, and to permit persons to whom the Data Files or
+# Software are furnished to do so, provided that (a) the above copyright
+# notice(s) and this permission notice appear with all copies of the
+# Data Files or Software, (b) both the above copyright notice(s) and
+# this permission notice appear in associated documentation, and (c)
+# there is clear notice in each modified Data File or in the Software as
+# well as in the documentation associated with the Data File(s) or
+# Software that the data or software has been modified.
+#
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
+# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+# SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in these Data Files or Software without prior
+# written authorization of the copyright holder.
+
+#
+# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
+#
+aa=Afarski
+ab=Abkazijski
+ae=Avestanski
+af=Afrikanerski
+am=Amharski
+an=Aragone\u017eanski
+ar=Arapski
+as=Asemijski
+av=Avarski
+ay=Ajmara
+az=Azerbejd\u017eanski
+ba=Ba\u0161kir
+be=Beloruski
+bg=Bugarski
+bh=Biharski
+bn=Bengalski
+bo=Tibetanski
+br=Bretonski
+bs=Bosanski
+ca=Katalonski
+ce=\u010ce\u010denski
+ch=\u010camoro
+co=Korzikanski
+cr=Kri
+cs=\u010ce\u0161ki
+cu=Staroslovenski
+cv=\u010cuva\u0161ki
+cy=Vel\u0161ki
+da=Danski
+de=Nema\u010dki
+dv=Divehijski
+dz=D\u017eonga
+ee=Eve
+el=Gr\u010dki
+en=Engleski
+eo=Esperanto
+es=\u0160panski
+et=Estonski
+eu=Baskijski
+fa=Persijski
+fi=Finski
+fj=Fid\u017eijski
+fo=Farski
+fr=Francuski
+fy=Frizijski
+ga=Irski
+gd=\u0160kotski Galski
+gl=Galski
+gn=Gvarani
+gu=Gud\u017earati
+gv=Manks
+he=Hebrejski
+hi=Hindi
+hr=Hrvatski
+ht=Hai\u0107anski
+hu=Ma\u0111arski
+hy=Jermenski
+ia=Interlingva
+id=Indonezijski
+ie=Interlingve
+ii=Si\u010duan ji
+ik=Inupiak
+in=Indonezijski
+is=Islandski
+it=Italijanski
+iw=Hebrejski
+ja=Japanski
+ji=Jidi\u0161
+jv=Javanski
+ka=Gruzijski
+ki=Kikuju
+kj=Kuanjama
+kk=Koza\u010dki
+kl=Kalalisutski
+km=Kmerski
+kn=Kanada
+ko=Korejski
+ks=Ka\u0161miri
+ku=Kurdski
+kw=Korni\u0161ki
+ky=Kirgiski
+la=Latinski
+lb=Luksembur\u0161ki
+li=Limburgi\u0161
+lo=Lao\u0161ki
+lt=Litvanski
+lu=Luba-katanga
+lv=Letonski
+mg=Malagazijski
+mh=Mar\u0161alski
+mi=Maorski
+mk=Makedonski
+ml=Malajalam
+mn=Mongolski
+mo=Moldavski
+mr=Marati
+ms=Malajski
+mt=Melte\u0161ki
+my=Burmanski
+nb=Norve\u0161ki bokm\u00e5l
+nd=Severni ndebele
+ne=Nepalski
+nl=Holandski
+nn=Norve\u0161ki njorsk
+no=Norve\u0161ki
+nr=Ju\u017eni ndebele
+nv=Navaho
+ny=Njanja
+oc=Provansalski
+oj=Ojibva
+or=Orijski
+os=Osetski
+pa=Pand\u017eabski
+pl=Poljski
+ps=Pa\u0161tunski
+pt=Portugalski
+qu=Kven\u010da
+rm=Reto-Romanski
+ro=Rumunski
+ru=Ruski
+rw=Kinjarvanda
+sa=Sanskrit
+sc=Sardinijski
+sd=Sindi
+se=Severni sami
+si=Singaleski
+sk=Slova\u010dki
+sl=Slovena\u010dki
+sm=Samoanski
+sn=\u0160ona
+so=Somalski
+sq=Albanski
+sr=Srpski
+ss=Svati
+st=Sesoto
+su=Sudanski
+sv=\u0160vedski
+sw=Svahili
+ta=Tamilski
+tg=Ta\u0111ik
+th=Tajlandski
+ti=Tigrinja
+tk=Turkmenski
+tl=Tagalski
+tn=Tsvana
+tr=Turski
+tt=Tatarski
+tw=Tvi
+ty=Tahi\u0107anski
+ug=Ujgurski
+uk=Ukrajinski
+uz=Uzbe\u010dki
+vi=Vijetnamski
+wa=Valun
+wo=Volof
+xh=Khosa
+yi=Jidi\u0161
+yo=Jorubanski
+za=Zuang
+zh=Kineski
+AD=Andora
+AE=Ujedinjeni Arapski Emirati
+AF=Avganistan
+AG=Antigva i Barbuda
+AI=Angvila
+AL=Albanija
+AM=Armenija
+AN=Holandski Antili
+AO=Angola
+AQ=Antarktika
+AR=Argentina
+AS=Ameri\u010dka Samoa
+AT=Austrija
+AU=Australija
+AW=Aruba
+AX=Alandska ostrva
+AZ=Azerbejd\u017ean
+BA=Bosna i Hercegovina
+BB=Barbados
+BD=Banglade\u0161
+BE=Belgija
+BF=Burkina Faso
+BG=Bugarska
+BH=Bahrein
+BI=Burundi
+BJ=Benin
+BL=Sv. Bartolomej
+BM=Bermuda
+BN=Brunej
+BO=Bolivija
+BR=Brazil
+BS=Bahami
+BT=Butan
+BV=Buve Ostrva
+BW=Bocvana
+BY=Belorusija
+BZ=Belise
+CA=Kanada
+CC=Kokos (Keling) Ostrva
+CD=Demokratska Republika Kongo
+CF=Centralno Afri\u010dka Republika
+CG=Kongo
+CH=\u0160vajcarska
+CI=Obala Slonova\u010de
+CK=Kukova Ostrva
+CL=\u010cile
+CM=Kamerun
+CN=Kina
+CO=Kolumbija
+CR=Kostarika
+CU=Kuba
+CV=Kape Verde
+CX=Bo\u017ei\u0107na Ostrva
+CY=Kipar
+CZ=\u010ce\u0161ka
+DE=Nema\u010dka
+DJ=D\u017eibuti
+DK=Danska
+DM=Dominika
+DO=Dominikanska Republika
+DZ=Al\u017eir
+EC=Ekvador
+EE=Estonija
+EG=Egipat
+EH=Zapadna Sahara
+ER=Eritreja
+ES=\u0160panija
+ET=Etiopija
+FI=Finska
+FJ=Fid\u017ei
+FK=Folklandska Ostrva
+FM=Mikronezija
+FO=Farska Ostrva
+FR=Francuska
+GA=Gabon
+GB=Velika Britanija
+GD=Grenada
+GE=Gruzija
+GF=Francuska Gvajana
+GG=Gurnsi
+GH=Gana
+GI=Gibraltar
+GL=Grenland
+GM=Gambija
+GN=Gvineja
+GP=Gvadelupe
+GQ=Ekvatorijalna Gvineja
+GR=Gr\u010dka
+GS=Ju\u017ena D\u017eord\u017eija i Ju\u017ena Sendvi\u010d Ostrva
+GT=Gvatemala
+GU=Guam
+GW=Gvineja-Bisao
+GY=Gvajana
+HK=Hong Kong (S. A. R. Kina)
+HM=Herd i Mekdonald Ostrva
+HN=Honduras
+HR=Hrvatska
+HT=Haiti
+HU=Ma\u0111arska
+ID=Indonezija
+IE=Irska
+IL=Izrael
+IM=Ostrvo Man
+IN=Indija
+IO=Britansko Indijska Okeanska Teritorija
+IQ=Irak
+IR=Iran
+IS=Island
+IT=Italija
+JE=D\u017eersi
+JM=Jamajka
+JO=Jordan
+JP=Japan
+KE=Kenija
+KG=Kirgizstan
+KH=Kambod\u017ea
+KI=Kiribati
+KM=Komorska Ostrva
+KN=Sent Kits i Nevis
+KP=Severna Koreja
+KR=Ju\u017ena Koreja
+KW=Kuvajt
+KY=Kajmanska Ostrva
+KZ=Kazahstan
+LA=Laos
+LB=Liban
+LC=Sent Lucija
+LI=Lihten\u0161tajn
+LK=\u0160ri Lanka
+LR=Liberija
+LS=Lesoto
+LT=Litvanija
+LU=Luksemburg
+LV=Letonija
+LY=Libija
+MA=Maroko
+MC=Monako
+MD=Moldavija
+ME=Crna Gora
+MF=Sv. Martin
+MG=Madagaskar
+MH=Mar\u0161alska Ostrva
+MK=Makedonija
+ML=Mali
+MM=Mijanmar
+MN=Mongolija
+MO=Makao (S. A. R. Kina)
+MP=Severna Marijanska Ostrva
+MQ=Martinik
+MR=Mauritanija
+MS=Monserat
+MT=Malta
+MU=Mauricius
+MV=Maldivi
+MW=Malavi
+MX=Meksiko
+MY=Malezija
+MZ=Mozambik
+NA=Namibija
+NC=Nova Kaledonija
+NE=Niger
+NF=Norfolk Ostrvo
+NG=Nigerija
+NI=Nikaragva
+NL=Holandija
+NO=Norve\u0161ka
+NP=Nepal
+NR=Nauru
+NU=Niue
+NZ=Novi Zeland
+OM=Oman
+PA=Panama
+PE=Peru
+PF=Francuska Polinezija
+PG=Papua Nova Gvineja
+PH=Filipini
+PK=Pakistan
+PL=Poljska
+PM=Sen Pjer i Mikelon
+PN=Pitcairn
+PR=Porto Riko
+PS=Palestinska Teritorija
+PT=Portugal
+PW=Palau
+PY=Paragvaj
+QA=Katar
+RE=Rejunion
+RO=Rumunija
+RS=Srbija
+RU=Rusija
+RW=Ruanda
+SA=Saudijska Arabija
+SB=Solomonska Ostrva
+SC=Sej\u0161eli
+SD=Sudan
+SE=\u0160vedska
+SG=Singapur
+SH=Sveta Jelena
+SI=Slovenija
+SJ=Svalbard i Janmajen Ostrva
+SK=Slova\u010dka
+SL=Sijera Leone
+SM=San Marino
+SN=Senegal
+SO=Somalija
+SR=Surinam
+ST=Sao Tome i Principe
+SV=Salvador
+SY=Sirija
+SZ=Svazilend
+TC=Turks i Kajkos Ostrva
+TD=\u010cad
+TF=Francuske Ju\u017ene Teritorije
+TG=Togo
+TH=Tajland
+TJ=Tad\u017eikistan
+TK=Tokelau
+TL=Isto\u010dni Timor
+TM=Turkmenistan
+TN=Tunis
+TO=Tonga
+TR=Turska
+TT=Trinidad i Tobago
+TV=Tuvalu
+TW=Tajvan
+TZ=Tanzanija
+UA=Ukrajina
+UG=Uganda
+UM=Manja Udaljena Ostrva SAD
+US=Sjedinjene Ameri\u010dke Dr\u017eave
+UY=Urugvaj
+UZ=Uzbekistan
+VA=Vatikan
+VC=Sent Vinsent i Grenadini
+VE=Venecuela
+VG=Britanska Devi\u010danska Ostrva
+VI=S.A.D. Devi\u010danska Ostrva
+VN=Vijetnam
+VU=Vanuatu
+WF=Valis i Futuna Ostrva
+WS=Samoa
+YE=Jemen
+YT=Majote
+ZA=Ju\u017enoafri\u010dka Republika
+ZM=Zambija
+ZW=Zimbabve
--- a/src/share/classes/sun/util/resources/TimeZoneNames.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Pierre & Miquelon Standard Time", "PMST",
                                                "Pierre & Miquelon Daylight Time", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Pierre & Miquelon Normalzeit", "PMST",
                                                "Pierre & Miquelon Sommerzeit", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Hora est\u00e1ndar de Pierre & Miquelon", "PMST",
                                                "Hora de verano de Pierre & Miquelon", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_fr.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_fr.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Heure normale de Saint-Pierre et Miquelon", "PMST",
                                                "Heure avanc\u00e9e de Saint-Pierre et Miquelon", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_it.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_it.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Ora solare di Saint-Pierre e Miquelon", "PMST",
                                                "Ora legale di Saint-Pierre e Miquelon", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_ja.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_ja.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u6a19\u6e96\u6642", "PMST",
                                                "\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_ko.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_ko.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \ud45c\uc900\uc2dc", "PMST",
                                                "\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java	Wed Apr 20 04:38:36 2011 +0100
@@ -217,6 +217,7 @@
         {"America/Anchorage", AKST},
         {"AST", AKST},
         {"America/Halifax", AST},
+        {"America/Sitka", AKST},
         {"America/St_Johns", NST},
         {"CNT", NST},
         {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
         {"America/Mendoza", AGT},
         {"America/Menominee", CST},
         {"America/Merida", CST},
+        {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                             "Metlakatla Daylight Time", "MeDT"}},
         {"America/Mexico_City", CST},
         {"America/Miquelon", new String[] {"Fuso hor\u00e1rio padr\u00e3o de S\u00e3o Pedro e Miquelon", "PMST",
                            "Hor\u00e1rio de luz natural de S\u00e3o Pedro e Miquelon", "PMDT"}},
@@ -405,6 +408,7 @@
         {"America/Nipigon", EST},
         {"America/Nome", AKST},
         {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
         {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
         {"America/Panama", EST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Saint-Pierre-et-Miquelon, normaltid", "PMST",
                                                "Saint-Pierre-et-Miquelon, sommartid", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u6807\u51c6\u65f6\u95f4", "PMST",
                                                "\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u590f\u4ee4\u65f6", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java	Wed Apr 20 04:38:36 2011 +0100
@@ -216,6 +216,7 @@
             {"America/Anchorage", AKST},
             {"AST", AKST},
             {"America/Halifax", AST},
+            {"America/Sitka", AKST},
             {"America/St_Johns", NST},
             {"CNT", NST},
             {"Europe/Paris", CET},
@@ -392,6 +393,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
+            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
+                                                 "Metlakatla Daylight Time", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u6a19\u6e96\u6642\u9593", "PMST",
                                                "\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PMDT"}},
@@ -405,6 +408,7 @@
             {"America/Nipigon", EST},
             {"America/Nome", AKST},
             {"America/Noronha", NORONHA},
+            {"America/North_Dakota/Beulah", CST},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
             {"America/Ojinaga", MST},
--- a/src/share/demo/jfc/Font2DTest/README.txt	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/jfc/Font2DTest/README.txt	Wed Apr 20 04:38:36 2011 +0100
@@ -7,7 +7,7 @@
     or 
 % appletviewer Font2DTest.html
 
-These instructions assume that the 1.5 versions of the java
+These instructions assume that the 1.7 versions of the java
 and appletviewer commands are in your path.  If they aren't,
 then you should either specify the complete path to the commands
 or update your PATH environment variable as described in the
--- a/src/share/demo/jfc/Font2DTest/RangeMenu.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/jfc/Font2DTest/RangeMenu.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,6 +41,9 @@
 
 import javax.swing.*;
 
+import java.util.*;
+import java.util.regex.*;
+
 /**
  * RangeMenu.java
  *
@@ -52,358 +55,8 @@
 
 public final class RangeMenu extends JComboBox implements ActionListener {
 
-    /// Painfully extracted from java.lang.Character.UnicodeBlock.  Arrrgh!
-    /// Unicode 5.1.0 data.
-
-    private final int[][] UNICODE_RANGES = {
-        { 0x000000, 0x00007f }, /// BASIC_LATIN
-        { 0x000080, 0x0000ff }, /// LATIN_1_SUPPLEMENT
-        { 0x000100, 0x00017f }, /// LATIN_EXTENDED_A
-        { 0x000180, 0x00024f }, /// LATIN_EXTENDED_B
-        { 0x000250, 0x0002af }, /// IPA_EXTENSIONS
-        { 0x0002b0, 0x0002ff }, /// SPACING_MODIFIER_LETTERS
-        { 0x000300, 0x00036f }, /// COMBINING_DIACRITICAL_MARKS
-        { 0x000370, 0x0003ff }, /// GREEK_AND_COPTIC
-        { 0x000400, 0x0004ff }, /// CYRILLIC
-        { 0x000500, 0x00052f }, /// CYRILLIC_SUPPLEMENTARY
-        { 0x000530, 0x00058f }, /// ARMENIAN
-        { 0x000590, 0x0005ff }, /// HEBREW
-        { 0x000600, 0x0006ff }, /// ARABIC
-        { 0x000700, 0x00074f }, /// SYRIAC
-        { 0x000750, 0x00077f }, /// ARABIC_SUPPLEMENT
-        { 0x000780, 0x0007bf }, /// THAANA
-        { 0x0007c0, 0x0007ff }, /// NKO
-        { 0x000900, 0x00097f }, /// DEVANAGARI
-        { 0x000980, 0x0009ff }, /// BENGALI
-        { 0x000a00, 0x000a7f }, /// GURMUKHI
-        { 0x000a80, 0x000aff }, /// GUJARATI
-        { 0x000b00, 0x000b7f }, /// ORIYA
-        { 0x000b80, 0x000bff }, /// TAMIL
-        { 0x000c00, 0x000c7f }, /// TELUGU
-        { 0x000c80, 0x000cff }, /// KANNADA
-        { 0x000d00, 0x000d7f }, /// MALAYALAM
-        { 0x000d80, 0x000dff }, /// SINHALA
-        { 0x000e00, 0x000e7f }, /// THAI
-        { 0x000e80, 0x000eff }, /// LAO
-        { 0x000f00, 0x000fff }, /// TIBETAN
-        { 0x001000, 0x00109f }, /// MYANMAR
-        { 0x0010a0, 0x0010ff }, /// GEORGIAN
-        { 0x001100, 0x0011ff }, /// HANGUL_JAMO
-        { 0x001200, 0x00137f }, /// ETHIOPIC
-        { 0x001380, 0x00139f }, /// ETHIOPIC_SUPPLEMENT
-        { 0x0013a0, 0x0013ff }, /// CHEROKEE
-        { 0x001400, 0x00167f }, /// UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS
-        { 0x001680, 0x00169f }, /// OGHAM
-        { 0x0016a0, 0x0016ff }, /// RUNIC
-        { 0x001700, 0x00171f }, /// TAGALOG
-        { 0x001720, 0x00173f }, /// HANUNOO
-        { 0x001740, 0x00175f }, /// BUHID
-        { 0x001760, 0x00177f }, /// TAGBANWA
-        { 0x001780, 0x0017ff }, /// KHMER
-        { 0x001800, 0x0018af }, /// MONGOLIAN
-        { 0x001900, 0x00194f }, /// LIMBU
-        { 0x001950, 0x00197f }, /// TAI_LE
-        { 0x001980, 0x0019df }, /// NEW_TAI_LE
-        { 0x0019e0, 0x0019ff }, /// KHMER_SYMBOLS
-        { 0x001a00, 0x001a1f }, /// BUGINESE
-        { 0x001b00, 0x001b7f }, /// BALINESE
-        { 0x001b80, 0x001bbf }, /// SUNDANESE
-        { 0x001c00, 0x001c4f }, /// LEPCHA
-        { 0x001c50, 0x001c7f }, /// OL_CHIKI
-        { 0x001d00, 0x001d7f }, /// PHONETIC_EXTENSIONS
-        { 0x001d80, 0x001dbf }, /// PHONEITC EXTENSIONS SUPPLEMENT
-        { 0x001dc0, 0x001dff }, /// COMBINING_DIACRITICAL_MAKRS_SUPPLEMENT
-        { 0x001e00, 0x001eff }, /// LATIN_EXTENDED_ADDITIONAL
-        { 0x001f00, 0x001fff }, /// GREEK_EXTENDED
-        { 0x002000, 0x00206f }, /// GENERAL_PUNCTUATION
-        { 0x002070, 0x00209f }, /// SUPERSCRIPTS_AND_SUBSCRIPTS
-        { 0x0020a0, 0x0020cf }, /// CURRENCY_SYMBOLS
-        { 0x0020d0, 0x0020ff }, /// COMBINING_MARKS_FOR_SYMBOLS
-        { 0x002100, 0x00214f }, /// LETTERLIKE_SYMBOLS
-        { 0x002150, 0x00218f }, /// NUMBER_FORMS
-        { 0x002190, 0x0021ff }, /// ARROWS
-        { 0x002200, 0x0022ff }, /// MATHEMATICAL_OPERATORS
-        { 0x002300, 0x0023ff }, /// MISCELLANEOUS_TECHNICAL
-        { 0x002400, 0x00243f }, /// CONTROL_PICTURES
-        { 0x002440, 0x00245f }, /// OPTICAL_CHARACTER_RECOGNITION
-        { 0x002460, 0x0024ff }, /// ENCLOSED_ALPHANUMERICS
-        { 0x002500, 0x00257f }, /// BOX_DRAWING
-        { 0x002580, 0x00259f }, /// BLOCK_ELEMENTS
-        { 0x0025a0, 0x0025ff }, /// GEOMETRIC_SHAPES
-        { 0x002600, 0x0026ff }, /// MISCELLANEOUS_SYMBOLS
-        { 0x002700, 0x0027bf }, /// DINGBATS
-        { 0x0027c0, 0x0027ef }, /// MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A
-        { 0x0027f0, 0x0027ff }, /// SUPPLEMENTAL_ARROWS_A
-        { 0x002800, 0x0028ff }, /// BRAILLE_PATTERNS
-        { 0x002900, 0x00297f }, /// SUPPLEMENTAL_ARROWS_B
-        { 0x002980, 0x0029ff }, /// MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B
-        { 0x002a00, 0x002aff }, /// SUPPLEMENTAL_MATHEMATICAL_OPERATORS
-        { 0x002b00, 0x002bff }, /// MISCELLANEOUS_SYMBOLS_AND_ARROWS
-        { 0x002c00, 0x002c5f }, /// GLAGOLITIC
-        { 0x002c60, 0x002c7f }, /// LATIN_EXTENDED-C
-        { 0x002c80, 0x002cff }, /// COPTIC
-        { 0x002d00, 0x002d2f }, /// GEORGIAN_SUPPLEMENT
-        { 0x002d30, 0x002d7f }, /// TIFINAGH
-        { 0x002d80, 0x002ddf }, /// ETHIOPIC_EXTENDED
-        { 0x002de0, 0x002dff }, /// CYRILLIC_EXTENDED-A
-        { 0x002e00, 0x002e7f }, /// SUPPLEMENTAL_PUNCTUATION
-        { 0x002e80, 0x002eff }, /// CJK_RADICALS_SUPPLEMENT
-        { 0x002f00, 0x002fdf }, /// KANGXI_RADICALS
-        { 0x002ff0, 0x002fff }, /// IDEOGRAPHIC_DESCRIPTION_CHARACTERS
-        { 0x003000, 0x00303f }, /// CJK_SYMBOLS_AND_PUNCTUATION
-        { 0x003040, 0x00309f }, /// HIRAGANA
-        { 0x0030a0, 0x0030ff }, /// KATAKANA
-        { 0x003100, 0x00312f }, /// BOPOMOFO
-        { 0x003130, 0x00318f }, /// HANGUL_COMPATIBILITY_JAMO
-        { 0x003190, 0x00319f }, /// KANBUN
-        { 0x0031a0, 0x0031bf }, /// BOPOMOFO_EXTENDED
-        { 0x0031c0, 0x0031ef }, /// CJK_STROKES
-        { 0x0031f0, 0x0031ff }, /// KATAKANA_PHONETIC_EXTENSIONS
-        { 0x003200, 0x0032ff }, /// ENCLOSED_CJK_LETTERS_AND_MONTHS
-        { 0x003300, 0x0033ff }, /// CJK_COMPATIBILITY
-        { 0x003400, 0x004dbf }, /// CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
-        { 0x004dc0, 0x004dff }, /// YIJING_HEXAGRAM_SYMBOLS
-        { 0x004e00, 0x009fff }, /// CJK_UNIFIED_IDEOGRAPHS
-        { 0x00a000, 0x00a48f }, /// YI_SYLLABLES
-        { 0x00a490, 0x00a4cf }, /// YI_RADICALS
-        { 0x00a500, 0x00a63f }, /// YAI
-        { 0x00a640, 0x00a69f }, /// CYRILLIC_EXTENDED-B
-        { 0x00a700, 0x00a71f }, /// MODIFIER_TONE_LETTERS
-        { 0x00a720, 0x00a7ff }, /// LATIN_EXTENDED-D
-        { 0x00a800, 0x00a82f }, /// SYLOTI_NAGRI
-        { 0x00a840, 0x00a87f }, /// PHAGS-PA
-        { 0x00a880, 0x00a8df }, /// SAURASHTRA
-        { 0x00a900, 0x00a92f }, /// KAYAH_LI
-        { 0x00a930, 0x00a95f }, /// REJANG
-        { 0x00aa00, 0x00aa5f }, /// CHAM
-        { 0x00ac00, 0x00d7af }, /// HANGUL_SYLLABLES
-        { 0x00d800, 0x00db7f }, /// HIGH_SURROGATES_AREA
-        { 0x00db80, 0x00dbff }, /// HIGH_PRIVATE_USE_SURROGATES_AREA
-        { 0x00dc00, 0x00dfff }, /// LOW_SURROGATES_AREA
-        { 0x00e000, 0x00f8ff }, /// PRIVATE_USE_AREA
-        { 0x00f900, 0x00faff }, /// CJK_COMPATIBILITY_IDEOGRAPHS
-        { 0x00fb00, 0x00fb4f }, /// ALPHABETIC_PRESENTATION_FORMS
-        { 0x00fb50, 0x00fdff }, /// ARABIC_PRESENTATION_FORMS_A
-        { 0x00fe00, 0x00fe0f }, /// VARIATION_SELECTORS
-        { 0x00fe10, 0x00fe1f }, /// VERTICAL_FORMS
-        { 0x00fe20, 0x00fe2f }, /// COMBINING_HALF_MARKS
-        { 0x00fe30, 0x00fe4f }, /// CJK_COMPATIBILITY_FORMS
-        { 0x00fe50, 0x00fe6f }, /// SMALL_FORM_VARIANTS
-        { 0x00fe70, 0x00feff }, /// ARABIC_PRESENTATION_FORMS_B
-        { 0x00ff00, 0x00ffef }, /// HALFWIDTH_AND_FULLWIDTH_FORMS
-        { 0x00fff0, 0x00ffff }, /// SPECIALS
-        { 0x010000, 0x01007f }, /// LINEAR_B_SYLLABARY
-        { 0x010080, 0x0100ff }, /// LINEAR_B_IDEOGRAMS
-        { 0x010100, 0x01013f }, /// AEGEAN_NUMBERS
-        { 0x010140, 0x01018f }, /// ANCIENT_GREEK_NUMBERS
-        { 0x010190, 0x0101cf }, /// ANCIENT_SYMBOLS
-        { 0x0101d0, 0x0101ff }, /// PHAISTOS_DISC
-        { 0x010280, 0x01029f }, /// LYCIAN
-        { 0x0102a0, 0x0102df }, /// CARIAN
-        { 0x010300, 0x01032f }, /// OLD_ITALIC
-        { 0x010330, 0x01034f }, /// GOTHIC
-        { 0x010380, 0x01039f }, /// UGARITIC
-        { 0x0103a0, 0x0103df }, /// OLD_PERSIAN
-        { 0x010400, 0x01044f }, /// DESERET
-        { 0x010450, 0x01047f }, /// SHAVIAN
-        { 0x010480, 0x0104af }, /// OSMANYA
-        { 0x010800, 0x01083f }, /// CYPRIOT_SYLLABARY
-        { 0x010900, 0x01091f }, /// PHOENICIAN
-        { 0x010920, 0x01093f }, /// LYDIAN
-        { 0x010a00, 0x010a5f }, /// KHAROSHTHI
-        { 0x012000, 0x0123ff }, /// CUNEIFORM
-        { 0x012400, 0x01247f }, /// CUNEIFORM_NUMBERS_AND_PUNCTUATION
-        { 0x01d000, 0x01d0ff }, /// BYZANTINE_MUSICAL_SYMBOLS
-        { 0x01d100, 0x01d1ff }, /// MUSICAL_SYMBOLS
-        { 0x01d200, 0x01d24f }, /// ANCIENT_GREEK_MUSICAL_NOTATION
-        { 0x01d300, 0x01d35f }, /// TAI_XUAN_JING_SYMBOLS
-        { 0x01d360, 0x01d37f }, /// COUNTING_ROD_NUMERALS
-        { 0x01d400, 0x01d7ff }, /// MATHEMATICAL_ALPHANUMERIC_SYMBOLS
-        { 0x01f000, 0x01f02f }, /// MAHJONG_TILES
-        { 0x01f030, 0x01f09f }, /// DOMINO_TILES
-        { 0x020000, 0x02a6df }, /// CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
-        { 0x02f800, 0x02fa1f }, /// CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT
-        { 0x0e0000, 0x0e007f }, /// TAGS
-        { 0x0e0100, 0x0e01ef }, /// VARIATION_SELECTORS_SUPPLEMENT
-        { 0x0f0000, 0x0fffff }, /// SUPPLEMENTARY_PRIVATE_USE_AREA_A
-        { 0x100000, 0x10ffff }, /// SUPPLEMENTARY_PRIVATE_USE_AREA_B
-        { 0x000000, 0x00007f }, /// OTHER [USER DEFINED RANGE]
-     };
-
-    private final String[] UNICODE_RANGE_NAMES = {
-        "Basic Latin",
-        "Latin-1 Supplement",
-        "Latin Extended-A",
-        "Latin Extended-B",
-        "IPA Extensions",
-        "Spacing Modifier Letters",
-        "Combining Diacritical Marks",
-        "Greek and Coptic",
-        "Cyrillic",
-        "Cyrillic Supplement",
-        "Armenian",
-        "Hebrew",
-        "Arabic",
-        "Syriac",
-        "Arabic Supplement",
-        "Thaana",
-        "NKo",
-        "Devanagari",
-        "Bengali",
-        "Gurmukhi",
-        "Gujarati",
-        "Oriya",
-        "Tamil",
-        "Telugu",
-        "Kannada",
-        "Malayalam",
-        "Sinhala",
-        "Thai",
-        "Lao",
-        "Tibetan",
-        "Myanmar",
-        "Georgian",
-        "Hangul Jamo",
-        "Ethiopic",
-        "Ethiopic Supplement",
-        "Cherokee",
-        "Unified Canadian Aboriginal Syllabics",
-        "Ogham",
-        "Runic",
-        "Tagalog",
-        "Hanunoo",
-        "Buhid",
-        "Tagbanwa",
-        "Khmer",
-        "Mongolian",
-        "Limbu",
-        "Tai Le",
-        "New Tai Lue",
-        "Khmer Symbols",
-        "Buginese",
-        "Balinese",
-        "Sundanese",
-        "Lepcha",
-        "Ol Chiki",
-        "Phonetic Extensions",
-        "Phonetic Extensions Supplement",
-        "Combining Diacritical Marks Supplement",
-        "Latin Extended Additional",
-        "Greek Extended",
-        "General Punctuation",
-        "Superscripts and Subscripts",
-        "Currency Symbols",
-        "Combining Diacritical Marks for Symbols",
-        "Letterlike Symbols",
-        "Number Forms",
-        "Arrows",
-        "Mathematical Operators",
-        "Miscellaneous Technical",
-        "Control Pictures",
-        "Optical Character Recognition",
-        "Enclosed Alphanumerics",
-        "Box Drawing",
-        "Block Elements",
-        "Geometric Shapes",
-        "Miscellaneous Symbols",
-        "Dingbats",
-        "Miscellaneous Mathematical Symbols-A",
-        "Supplemental Arrows-A",
-        "Braille Patterns",
-        "Supplemental Arrows-B",
-        "Miscellaneous Mathematical Symbols-B",
-        "Supplemental Mathematical Operators",
-        "Miscellaneous Symbols and Arrows",
-        "Glagolitic",
-        "Latin Extended-C",
-        "Coptic",
-        "Georgian Supplement",
-        "Tifinagh",
-        "Ethiopic Extended",
-        "Cyrillic Extended-A",
-        "Supplemental Punctuation",
-        "CJK Radicals Supplement",
-        "Kangxi Radicals",
-        "Ideographic Description Characters",
-        "CJK Symbols and Punctuation",
-        "Hiragana",
-        "Katakana",
-        "Bopomofo",
-        "Hangul Compatibility Jamo",
-        "Kanbun",
-        "Bopomofo Extended",
-        "CJK Strokes",
-        "Katakana Phonetic Extensions",
-        "Enclosed CJK Letters and Months",
-        "CJK Compatibility",
-        "CJK Unified Ideographs Extension A",
-        "Yijing Hexagram Symbols",
-        "CJK Unified Ideographs",
-        "Yi Syllables",
-        "Yi Radicals",
-        "Vai",
-        "Cyrillic Extended-B",
-        "Modifier Tone Letters",
-        "Latin Extended-D",
-        "Syloti Nagri",
-        "Phags-pa",
-        "Saurashtra",
-        "Kayah Li",
-        "Rejang",
-        "Cham",
-        "Hangul Syllables",
-        "High Surrogates",
-        "High Private Use Surrogates",
-        "Low Surrogates",
-        "Private Use Area",
-        "CJK Compatibility Ideographs",
-        "Alphabetic Presentation Forms",
-        "Arabic Presentation Forms-A",
-        "Variation Selectors",
-        "Vertical Forms",
-        "Combining Half Marks",
-        "CJK Compatibility Forms",
-        "Small Form Variants",
-        "Arabic Presentation Forms-B",
-        "Halfwidth and Fullwidth Forms",
-        "Specials",
-        "Linear B Syllabary",
-        "Linear B Ideograms",
-        "Aegean Numbers",
-        "Ancient Greek Numbers",
-        "Ancient Symbols",
-        "Phaistos Disc",
-        "Lycian",
-        "Carian",
-        "Old Italic",
-        "Gothic",
-        "Ugaritic",
-        "Old Persian",
-        "Deseret",
-        "Shavian",
-        "Osmanya",
-        "Cypriot Syllabary",
-        "Phoenician",
-        "Lydian",
-        "Kharoshthi",
-        "Cuneiform",
-        "Cuneiform Numbers and Punctuation",
-        "Byzantine Musical Symbols",
-        "Musical Symbols",
-        "Ancient Greek Musical Notation",
-        "Tai Xuan Jing Symbols",
-        "Counting Rod Numerals",
-        "Mathematical Alphanumeric Symbols",
-        "Mahjong Tiles",
-        "Domino Tiles",
-        "CJK Unified Ideographs Extension B",
-        "CJK Compatibility Ideographs Supplement",
-        "Tags",
-        "Variation Selectors Supplement",
-        "Supplementary Private Use Area-A",
-        "Supplementary Private Use Area-B",
-        "Custom...",
-    };
+    private static final int[][] UNICODE_RANGES = getUnicodeRanges();
+    private static final String[] UNICODE_RANGE_NAMES = getUnicodeRangeNames();
 
     private boolean useCustomRange = false;
     private int[] customRange = { 0x0000, 0x007f };
@@ -536,4 +189,61 @@
                 customRangeDialog.hide();
         }
     }
+
+    private static int[][] getUnicodeRanges() {
+        List<Integer> ranges = new ArrayList<>();
+        ranges.add(0);
+        Character.UnicodeBlock currentBlock = Character.UnicodeBlock.of(0);
+        for (int cp = 0x000001; cp < 0x110000; cp++ ) {
+            Character.UnicodeBlock ub = Character.UnicodeBlock.of(cp);
+            if (currentBlock == null) {
+                if (ub != null) {
+                    ranges.add(cp);
+                    currentBlock = ub;
+                }
+            } else {  // being in some unicode range
+                if (ub == null) {
+                    ranges.add(cp - 1);
+                    currentBlock = null;
+                } else if (cp == 0x10ffff) {  // end of last block
+                    ranges.add(cp);
+                } else if (! ub.equals(currentBlock)) {
+                    ranges.add(cp - 1);
+                    ranges.add(cp);
+                    currentBlock = ub;
+                }
+            }
+        }
+        ranges.add(0x00);  // for user defined range.
+        ranges.add(0x7f);  // for user defined range.
+
+        int[][] returnval = new int[ranges.size() / 2][2];
+        for (int i = 0 ; i < ranges.size() / 2 ; i++ ) {
+            returnval[i][0] = ranges.get(2*i);
+            returnval[i][1] = ranges.get(2*i + 1);
+        }
+        return returnval;
+    }
+
+    private static String[] getUnicodeRangeNames() {
+        String[] names = new String[UNICODE_RANGES.length];
+        for (int i = 0 ; i < names.length ; i++ ) {
+            names[i] = titleCase(
+                Character.UnicodeBlock.of(UNICODE_RANGES[i][0]).toString());
+        }
+        names[names.length - 1] = "Custom...";
+        return names;
+    }
+
+    private static String titleCase(String str) {
+        str = str.replaceAll("_", " ");
+        Pattern p = Pattern.compile("(^|\\W)([a-z])");
+        Matcher m = p.matcher(str.toLowerCase(Locale.ROOT));
+        StringBuffer sb = new StringBuffer();
+        while (m.find()) {
+            m.appendReplacement(sb, m.group(1) + m.group(2).toUpperCase(Locale.ROOT));
+        }
+        m.appendTail(sb);
+        return sb.toString().replace("Cjk", "CJK").replace("Nko", "NKo");
+    }
 }
--- a/src/share/demo/jfc/Notepad/resources/Notepad.properties	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/jfc/Notepad/resources/Notepad.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -3,12 +3,15 @@
 
 Title=Notepad
 ElementTreeFrameTitle=Elements
+# The following string should NOT be translated: ViewportBackingStore
 ViewportBackingStore=false
 
 # menubar definition
 #
 # Each of the strings that follow form a key to be 
 # used to the actual menu definition.
+
+# The following string should NOT be translated: menubar
 menubar=file edit debug
 
 # file Menu definition
@@ -20,6 +23,8 @@
 # new  ->  Notepad.newAction
 # save ->  Notepad.saveAction
 # exit ->  Notepad.exitAction
+
+# The following string should NOT be translated: file
 file=new open save - exit
 fileLabel=File
 openLabel=Open
@@ -36,28 +41,38 @@
 # cut   -> JTextComponent.cutAction
 # copy  -> JTextComponent.copyAction
 # paste -> JTextComponent.pasteAction
+
+# The following string should NOT be translated: edit
 edit=cut copy paste - undo redo
 editLabel=Edit
 cutLabel=Cut
+# The following string should NOT be translated: cutAction
 cutAction=cut-to-clipboard
 cutImage=resources/cut.gif
 copyLabel=Copy
+# The following string should NOT be translated: copyAction
 copyAction=copy-to-clipboard
 copyImage=resources/copy.gif
 pasteLabel=Paste
+# The following string should NOT be translated: pasteAction
 pasteAction=paste-from-clipboard
 pasteImage=resources/paste.gif
 undoLabel=Undo
+# The following string should NOT be translated: undoAction
 undoAction=Undo
 redoLabel=Redo
+# The following string should NOT be translated: redoAction
 redoAction=Redo
 
 #
 # debug Menu definition
 #
+
+# The following string should NOT be translated: debug
 debug=dump showElementTree
 debugLabel=Debug
 dumpLabel=Dump model to System.err
+# The following string should NOT be translated: dumpAction
 dumpAction=dump-model
 showElementTreeLabel=Show Elements
 
@@ -67,6 +82,8 @@
 # used as the basis of the tool definition.  Actions
 # are of course sharable, and in this case are shared
 # with the menu items.
+
+# The following string should NOT be translated: toolbar
 toolbar=new open save - cut copy paste
 newTooltip=Create a new file
 openTooltip=Open a file
--- a/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -9,7 +9,7 @@
 #
 # Each of the strings that follow form a key to be 
 # used to the actual menu definition.
-menubar=\u30D5\u30A1\u30A4\u30EB \u7DE8\u96C6 \u30C7\u30D0\u30C3\u30B0
+menubar=file edit debug
 
 # file Menu definition
 #
@@ -20,7 +20,7 @@
 # new  ->  Notepad.newAction
 # save ->  Notepad.saveAction
 # exit ->  Notepad.exitAction
-file=\u65B0\u898F \u958B\u304F \u4FDD\u5B58 - \u7D42\u4E86
+file=new open save - exit
 fileLabel=\u30D5\u30A1\u30A4\u30EB
 openLabel=\u958B\u304F
 openImage=resources/open.gif
@@ -36,7 +36,7 @@
 # cut   -> JTextComponent.cutAction
 # copy  -> JTextComponent.copyAction
 # paste -> JTextComponent.pasteAction
-edit=\u5207\u53D6\u308A \u30B3\u30D4\u30FC \u8CBC\u4ED8\u3051 - \u5143\u306B\u623B\u3059 \u518D\u5B9F\u884C
+edit=cut copy paste - undo redo
 editLabel=\u7DE8\u96C6
 cutLabel=\u5207\u53D6\u308A
 cutAction=cut-to-clipboard
@@ -48,14 +48,14 @@
 pasteAction=paste-from-clipboard
 pasteImage=resources/paste.gif
 undoLabel=\u5143\u306B\u623B\u3059
-undoAction=\u5143\u306B\u623B\u3059
+undoAction=Undo
 redoLabel=\u518D\u5B9F\u884C
-redoAction=\u518D\u5B9F\u884C
+redoAction=Redo
 
 #
 # debug Menu definition
 #
-debug=showElementTree\u306E\u30C0\u30F3\u30D7
+debug=dump showElementTree
 debugLabel=\u30C7\u30D0\u30C3\u30B0
 dumpLabel=\u30E2\u30C7\u30EB\u3092System.err\u306B\u30C0\u30F3\u30D7
 dumpAction=dump-model
@@ -67,7 +67,7 @@
 # used as the basis of the tool definition.  Actions
 # are of course sharable, and in this case are shared
 # with the menu items.
-toolbar=\u65B0\u898F \u958B\u304F \u4FDD\u5B58 - \u5207\u53D6\u308A \u30B3\u30D4\u30FC \u8CBC\u4ED8\u3051
+toolbar=new open save - cut copy paste
 newTooltip=\u30D5\u30A1\u30A4\u30EB\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B
 openTooltip=\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F
 saveTooltip=\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58
--- a/src/share/demo/jfc/Notepad/resources/Notepad_zh_CN.properties	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/jfc/Notepad/resources/Notepad_zh_CN.properties	Wed Apr 20 04:38:36 2011 +0100
@@ -48,9 +48,9 @@
 pasteAction=paste-from-clipboard
 pasteImage=resources/paste.gif
 undoLabel=\u64A4\u6D88
-undoAction=\u64A4\u6D88
+undoAction=Undo
 redoLabel=\u91CD\u505A
-redoAction=\u91CD\u505A
+redoAction=Redo
 
 #
 # debug Menu definition
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipDirectoryStream.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipDirectoryStream.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -76,7 +76,7 @@
         } catch (IOException e) {
             throw new IllegalStateException(e);
         }
-        return new Iterator<>() {
+        return new Iterator<Path>() {
             private Path next;
             @Override
             public boolean hasNext() {
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Wed Apr 20 04:38:36 2011 +0100
@@ -112,11 +112,8 @@
         }
         // sm and existence check
         zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.READ);
-        try {
-            zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.WRITE);
-        } catch (AccessDeniedException x) {
+        if (!Files.isWritable(zfpath))
             this.readOnly = true;
-        }
         this.zc = ZipCoder.get(nameEncoding);
         this.defaultdir = new ZipPath(this, getBytes(defaultDir));
         this.ch = Files.newByteChannel(zfpath, READ);
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java	Wed Apr 20 04:38:36 2011 +0100
@@ -42,6 +42,7 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
+import java.util.zip.ZipError;
 import java.util.concurrent.ExecutorService;
 
 /*
@@ -78,39 +79,60 @@
         }
     }
 
+    private boolean ensureFile(Path path) {
+        try {
+            BasicFileAttributes attrs =
+                Files.readAttributes(path, BasicFileAttributes.class);
+            if (!attrs.isRegularFile())
+                throw new UnsupportedOperationException();
+            return true;
+        } catch (IOException ioe) {
+            return false;
+        }
+    }
+
     @Override
     public FileSystem newFileSystem(URI uri, Map<String, ?> env)
         throws IOException
     {
-        return newFileSystem(uriToPath(uri), env, true);
+        Path path = uriToPath(uri);
+        synchronized(filesystems) {
+            Path realPath = null;
+            if (ensureFile(path)) {
+                realPath = path.toRealPath(true);
+                if (filesystems.containsKey(realPath))
+                    throw new FileSystemAlreadyExistsException();
+            }
+            ZipFileSystem zipfs = null;
+            try {
+                zipfs = new ZipFileSystem(this, path, env);
+            } catch (ZipError ze) {
+                String pname = path.toString();
+                if (pname.endsWith(".zip") || pname.endsWith(".jar"))
+                    throw ze;
+                // assume NOT a zip/jar file
+                throw new UnsupportedOperationException();
+            }
+            filesystems.put(realPath, zipfs);
+            return zipfs;
+        }
     }
 
     @Override
     public FileSystem newFileSystem(Path path, Map<String, ?> env)
         throws IOException
     {
-        if (!path.toUri().getScheme().equalsIgnoreCase("file")) {
+        if (path.getFileSystem() != FileSystems.getDefault()) {
             throw new UnsupportedOperationException();
         }
-        return newFileSystem(path, env, false);
-    }
-
-    private FileSystem newFileSystem(Path path, Map<String, ?> env, boolean checkIfFSExists)
-        throws IOException
-    {
-        synchronized(filesystems) {
-            Path realPath = null;
-            if (checkIfFSExists && Files.exists(path)) {
-                realPath = path.toRealPath(true);
-                if (filesystems.containsKey(realPath))
-                    throw new FileSystemAlreadyExistsException();
-            }
-            ZipFileSystem zipfs = new ZipFileSystem(this, path, env);
-            if (realPath == null)
-                realPath = path.toRealPath(true);
-            if (!filesystems.containsKey(realPath))
-                filesystems.put(realPath, zipfs);
-            return zipfs;
+        ensureFile(path);
+        try {
+            return new ZipFileSystem(this, path, env);
+        } catch (ZipError ze) {
+            String pname = path.toString();
+            if (pname.endsWith(".zip") || pname.endsWith(".jar"))
+                throw ze;
+            throw new UnsupportedOperationException();
         }
     }
 
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -590,7 +590,7 @@
 
     @Override
     public Iterator<Path> iterator() {
-        return new Iterator<>() {
+        return new Iterator<Path>() {
             private int i = 0;
 
             @Override
--- a/src/share/native/com/sun/java/util/jar/pack/unpack.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/com/sun/java/util/jar/pack/unpack.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -489,7 +489,6 @@
 
 // Call malloc.  Try to combine small blocks and free much later.
 void* unpacker::alloc_heap(size_t size, bool smallOK, bool temp) {
-  CHECK_0;
   if (!smallOK || size > SMALL) {
     void* res = must_malloc((int)size);
     (temp ? &tmallocs : &mallocs)->add(res);
@@ -2559,6 +2558,10 @@
   int i;
   int prevBII = -1;
   int prevBCI = -1;
+  if (body == NULL) {
+    abort("putlayout: unexpected NULL for body");
+    return;
+  }
   for (i = 0; body[i] != null; i++) {
     band& b = *body[i];
     byte le_kind = b.le_kind;
@@ -4766,7 +4769,9 @@
     }
 
     char *tname = tempnam(tmpdir,"#upkg");
+    if (tname == NULL) return;
     sprintf(log_file_name, "%s", tname);
+    ::free(tname);
     if ((errstrm = fopen(log_file_name, "a+")) != NULL) {
       log_file = errstrm_name = saveStr(log_file_name);
       return ;
--- a/src/share/native/com/sun/media/sound/SoundDefs.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/com/sun/media/sound/SoundDefs.h	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2011, 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
@@ -39,6 +39,8 @@
 #define X_IA64          4
 #define X_AMD64         5
 #define X_ZERO          6
+#define X_ARM           7
+#define X_PPC           8
 
 // **********************************
 // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- a/src/share/native/common/check_code.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/common/check_code.c	Wed Apr 20 04:38:36 2011 +0100
@@ -2685,11 +2685,11 @@
                     switch (type_table[operand]) {
                     case JVM_CONSTANT_MethodType:
                       full_info = make_class_info_from_name(context,
-                                                            "java/dyn/MethodType");
+                                                            "java/lang/invoke/MethodType");
                       break;
                     default: //JVM_CONSTANT_MethodHandle
                       full_info = make_class_info_from_name(context,
-                                                            "java/dyn/MethodHandle");
+                                                            "java/lang/invoke/MethodHandle");
                       break;
                     }
                     break;
--- a/src/share/native/java/lang/fdlibm/include/fdlibm.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/java/lang/fdlibm/include/fdlibm.h	Wed Apr 20 04:38:36 2011 +0100
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, 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,8 +28,8 @@
 
 #ifdef __NEWVALID       /* special setup for Sun test regime */
 #if defined(i386) || defined(i486) || \
-        defined(intel) || defined(x86) || \
-        defined(i86pc) || defined(_M_IA64) || defined(ia64)
+    defined(intel) || defined(x86) || defined(arm) || \
+    defined(i86pc) || defined(_M_IA64) || defined(ia64)
 #define _LITTLE_ENDIAN
 #endif
 #endif
--- a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Wed Apr 20 04:38:36 2011 +0100
@@ -40,7 +40,7 @@
 #include <setjmp.h>
 #include <assert.h>
 #include <string.h>
-
+#include <limits.h>
 
 /* java native interface headers */
 #include "jni.h"
@@ -109,8 +109,8 @@
     jobject stream;            // ImageInputStream or ImageOutputStream
     jbyteArray hstreamBuffer;  // Handle to a Java buffer for the stream
     JOCTET *buf;               // Pinned buffer pointer */
-    int bufferOffset;          // holds offset between unpin and the next pin
-    int bufferLength;          // Allocated, nut just used
+    size_t bufferOffset;          // holds offset between unpin and the next pin
+    size_t bufferLength;          // Allocated, nut just used
     int suspendable;           // Set to true to suspend input
     long remaining_skip;       // Used only on input
 } streamBuffer, *streamBufferPtr;
@@ -129,7 +129,7 @@
  * Used to signal that no data need be restored from an unpin to a pin.
  * I.e. the buffer is empty.
  */
-#define NO_DATA -1
+#define NO_DATA ((size_t)-1)
 
 // Forward reference
 static void resetStreamBuffer(JNIEnv *env, streamBufferPtr sb);
@@ -389,7 +389,6 @@
 static imageIODataPtr initImageioData (JNIEnv *env,
                                        j_common_ptr cinfo,
                                        jobject obj) {
-    int i, j;
 
     imageIODataPtr data = (imageIODataPtr) malloc (sizeof(imageIOData));
     if (data == NULL) {
@@ -982,7 +981,7 @@
     streamBufferPtr sb = &data->streamBuf;
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
     jint ret;
-    int offset, buflen;
+    size_t offset, buflen;
 
     /*
      * The original (jpegdecoder.c) had code here that called
@@ -1520,7 +1519,7 @@
         imageio_dispose((j_common_ptr)cinfo);
         return 0;
     }
-    return (jlong) ret;
+    return ptr_to_jlong(ret);
 }
 
 /*
@@ -1535,7 +1534,7 @@
      jlong ptr,
      jobject source) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_common_ptr cinfo;
 
     if (data == NULL) {
@@ -1574,7 +1573,7 @@
     int h_samp0, h_samp1, h_samp2;
     int v_samp0, v_samp1, v_samp2;
     jboolean retval = JNI_FALSE;
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_decompress_ptr cinfo;
     struct jpeg_source_mgr *src;
     sun_jpeg_error_ptr jerr;
@@ -1772,7 +1771,7 @@
      jlong ptr,
      jint code) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_decompress_ptr cinfo;
 
     if (data == NULL) {
@@ -1814,7 +1813,7 @@
     struct jpeg_source_mgr *src;
     JSAMPROW scanLinePtr = NULL;
     jint bands[MAX_BANDS];
-    int i, j;
+    int i;
     jint *body;
     int scanlineLimit;
     int pixelStride;
@@ -1824,14 +1823,12 @@
     pixelBufferPtr pb;
     sun_jpeg_error_ptr jerr;
     boolean done;
-    jint *bandSize;
-    int maxBandValue, halfMaxBandValue;
     boolean mustScale = FALSE;
     boolean progressive = FALSE;
     boolean orderedBands = TRUE;
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_decompress_ptr cinfo;
-    unsigned int numBytes;
+    size_t numBytes;
 
     /* verify the inputs */
 
@@ -1849,7 +1846,7 @@
 
     cinfo = (j_decompress_ptr) data->jpegObj;
 
-    if ((numBands < 1) ||
+    if ((numBands < 1) || (numBands > MAX_BANDS) ||
         (sourceXStart < 0) || (sourceXStart >= (jint)cinfo->image_width) ||
         (sourceYStart < 0) || (sourceYStart >= (jint)cinfo->image_height) ||
         (sourceWidth < 1) || (sourceWidth > (jint)cinfo->image_width) ||
@@ -1863,10 +1860,10 @@
         return JNI_FALSE;
     }
 
-    if (stepX > cinfo->image_width) {
+    if (stepX > (jint)cinfo->image_width) {
         stepX = cinfo->image_width;
     }
-    if (stepY > cinfo->image_height) {
+    if (stepY > (jint)cinfo->image_height) {
         stepY = cinfo->image_height;
     }
 
@@ -2119,7 +2116,7 @@
      jobject this,
      jlong ptr) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
 
     if (data == NULL) {
         JNU_ThrowByName(env,
@@ -2137,7 +2134,7 @@
     (JNIEnv *env,
      jobject this,
      jlong ptr) {
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_decompress_ptr cinfo;
 
     if (data == NULL) {
@@ -2159,7 +2156,7 @@
      jobject this,
      jlong ptr) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_decompress_ptr cinfo;
     sun_jpeg_error_ptr jerr;
 
@@ -2232,7 +2229,7 @@
      jclass reader,
      jlong ptr) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_common_ptr info = destroyImageioData(env, data);
 
     imageio_dispose(info);
@@ -2317,8 +2314,8 @@
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 
     /* find out how much needs to be written */
-    jint datacount = sb->bufferLength - dest->free_in_buffer;
-
+    /* this conversion from size_t to jint is safe, because the lenght of the buffer is limited by jint */
+    jint datacount = (jint)(sb->bufferLength - dest->free_in_buffer);
     if (datacount != 0) {
         RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte));
 
@@ -2485,7 +2482,7 @@
         imageio_dispose((j_common_ptr)cinfo);
         return 0;
     }
-    return (jlong) ret;
+    return ptr_to_jlong(ret);
 }
 
 JNIEXPORT void JNICALL
@@ -2495,7 +2492,7 @@
      jlong ptr,
      jobject destination) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_compress_ptr cinfo;
 
     if (data == NULL) {
@@ -2526,7 +2523,7 @@
 
     struct jpeg_destination_mgr *dest;
     sun_jpeg_error_ptr jerr;
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_compress_ptr cinfo;
 
     if (data == NULL) {
@@ -2625,10 +2622,11 @@
     jint *scanData;
     jint *bandSize;
     int maxBandValue, halfMaxBandValue;
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_compress_ptr cinfo;
     UINT8** scale = NULL;
 
+
     /* verify the inputs */
 
     if (data == NULL) {
@@ -2659,7 +2657,7 @@
         (destWidth < 0) || (destWidth > srcWidth) ||
         (destHeight < 0) ||
         (stepX < 0) || (stepY < 0) ||
-        ((scanLineSize / numBands) < destWidth))  /* destWidth causes an integer overflow */
+        ((INT_MAX / numBands) < destWidth))  /* destWidth causes an integer overflow */
     {
         JNU_ThrowByName(env, "javax/imageio/IIOException",
                         "Invalid argument to native writeImage");
@@ -2740,6 +2738,16 @@
                                           buffer);
             JNU_ThrowByName(env, "javax/imageio/IIOException", buffer);
         }
+
+        if (scale != NULL) {
+            for (i = 0; i < numBands; i++) {
+                if (scale[i] != NULL) {
+                    free(scale[i]);
+                }
+            }
+            free(scale);
+        }
+
         free(scanLinePtr);
         return data->abortFlag;
     }
@@ -2953,7 +2961,7 @@
      jobject this,
      jlong ptr) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
 
     if (data == NULL) {
         JNU_ThrowByName(env,
@@ -2970,7 +2978,7 @@
     (JNIEnv *env,
      jobject this,
      jlong ptr) {
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_compress_ptr cinfo;
 
     if (data == NULL) {
@@ -3002,7 +3010,7 @@
      jclass writer,
      jlong ptr) {
 
-    imageIODataPtr data = (imageIODataPtr) ptr;
+    imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_common_ptr info = destroyImageioData(env, data);
 
     imageio_dispose(info);
--- a/src/share/native/sun/awt/image/jpeg/jdmarker.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/jdmarker.c	Wed Apr 20 04:38:36 2011 +0100
@@ -1325,14 +1325,14 @@
                    unsigned int length_limit)
 {
   my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-  long maxlength;
+  size_t maxlength;
   jpeg_marker_parser_method processor;
 
   /* Length limit mustn't be larger than what we can allocate
    * (should only be a concern in a 16-bit environment).
    */
   maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct);
-  if (((long) length_limit) > maxlength)
+  if (length_limit > maxlength)
     length_limit = (unsigned int) maxlength;
 
   /* Choose processor routine to use.
--- a/src/share/native/sun/awt/image/jpeg/jmemmgr.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/jmemmgr.c	Wed Apr 20 04:38:36 2011 +0100
@@ -133,7 +133,7 @@
   jvirt_barray_ptr virt_barray_list;
 
   /* This counts total space obtained from jpeg_get_small/large */
-  long total_space_allocated;
+  size_t total_space_allocated;
 
   /* alloc_sarray and alloc_barray set this value for use by virtual
    * array routines.
@@ -588,8 +588,8 @@
 /* Allocate the in-memory buffers for any unrealized virtual arrays */
 {
   my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  long space_per_minheight, maximum_space, avail_mem;
-  long minheights, max_minheights;
+  size_t space_per_minheight, maximum_space, avail_mem;
+  size_t minheights, max_minheights;
   jvirt_sarray_ptr sptr;
   jvirt_barray_ptr bptr;
 
@@ -1032,7 +1032,7 @@
 jinit_memory_mgr (j_common_ptr cinfo)
 {
   my_mem_ptr mem;
-  long max_to_use;
+  size_t max_to_use;
   int pool;
   size_t test_mac;
 
@@ -1109,8 +1109,10 @@
 
     if ((memenv = getenv("JPEGMEM")) != NULL) {
       char ch = 'x';
+      unsigned int mem_max = 0u;
 
-      if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) {
+      if (sscanf(memenv, "%u%c", &mem_max, &ch) > 0) {
+        max_to_use = (size_t)mem_max;
         if (ch == 'm' || ch == 'M')
           max_to_use *= 1000L;
         mem->pub.max_memory_to_use = max_to_use * 1000L;
--- a/src/share/native/sun/awt/image/jpeg/jmemnobs.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/jmemnobs.c	Wed Apr 20 04:38:36 2011 +0100
@@ -73,9 +73,9 @@
  * Here we always say, "we got all you want bud!"
  */
 
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-                    long max_bytes_needed, long already_allocated)
+GLOBAL(size_t)
+jpeg_mem_available (j_common_ptr cinfo, size_t min_bytes_needed,
+                    size_t max_bytes_needed, size_t already_allocated)
 {
   return max_bytes_needed;
 }
@@ -100,7 +100,7 @@
  * cleanup required.  Here, there isn't any.
  */
 
-GLOBAL(long)
+GLOBAL(size_t)
 jpeg_mem_init (j_common_ptr cinfo)
 {
   return 0;                     /* just set max_memory_to_use to 0 */
--- a/src/share/native/sun/awt/image/jpeg/jmemsys.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/jmemsys.h	Wed Apr 20 04:38:36 2011 +0100
@@ -104,10 +104,10 @@
  * Conversely, zero may be returned to always use the minimum amount of memory.
  */
 
-EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
-                                     long min_bytes_needed,
-                                     long max_bytes_needed,
-                                     long already_allocated));
+EXTERN(size_t) jpeg_mem_available JPP((j_common_ptr cinfo,
+                                     size_t min_bytes_needed,
+                                     size_t max_bytes_needed,
+                                     size_t already_allocated));
 
 
 /*
@@ -198,5 +198,5 @@
  * all opened backing-store objects have been closed.
  */
 
-EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
+EXTERN(size_t) jpeg_mem_init JPP((j_common_ptr cinfo));
 EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
--- a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c	Wed Apr 20 04:38:36 2011 +0100
@@ -328,7 +328,7 @@
     if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) {
         cinfo->err->error_exit((struct jpeg_common_struct *) cinfo);
     }
-    if (ret <= src->remaining_skip) {
+    if (ret < 0 || (unsigned int)ret <= src->remaining_skip) {
         return;
     }
     if (src->remaining_skip) {
@@ -397,7 +397,7 @@
     }
     num_bytes += src->remaining_skip;
     src->remaining_skip = 0;
-    ret = src->pub.bytes_in_buffer;
+    ret = (int)src->pub.bytes_in_buffer; /* this conversion is safe, because capacity of the buffer is limited by jnit */
     if (ret >= num_bytes) {
         src->pub.next_input_byte += num_bytes;
         src->pub.bytes_in_buffer -= num_bytes;
--- a/src/share/native/sun/awt/image/jpeg/jpeglib.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/awt/image/jpeg/jpeglib.h	Wed Apr 20 04:38:36 2011 +0100
@@ -800,10 +800,10 @@
    * used for virtual-array buffers.)  May be changed by outer application
    * after creating the JPEG object.
    */
-  long max_memory_to_use;
+  size_t max_memory_to_use;
 
   /* Maximum allocation request accepted by alloc_large. */
-  long max_alloc_chunk;
+  size_t max_alloc_chunk;
 };
 
 
--- a/src/share/native/sun/font/layout/KernTable.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/font/layout/KernTable.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -210,7 +210,7 @@
       // all the elements ahead of time and store them in the font
 
       const PairInfo* p = pairs;
-      const PairInfo* tp = (const PairInfo*)(p + rangeShift);
+      const PairInfo* tp = (const PairInfo*)(p + (rangeShift/KERN_PAIRINFO_SIZE)); /* rangeshift is in original table bytes */
       if (key > tp->key) {
         p = tp;
       }
@@ -222,7 +222,7 @@
       le_uint32 probe = searchRange;
       while (probe > 1) {
         probe >>= 1;
-        tp = (const PairInfo*)(p + probe);
+        tp = (const PairInfo*)(p + (probe/KERN_PAIRINFO_SIZE));
         le_uint32 tkey = tp->key;
 #if DEBUG
         fprintf(stdout, "   %.3d (%0.8x)\n", (tp - pairs), tkey);
--- a/src/share/native/sun/font/layout/LayoutEngine.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/font/layout/LayoutEngine.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -251,6 +251,10 @@
         return 0;
     }
 
+    if ((fTypoFlags & 0x4) == 0) { // no canonical processing
+      return count;
+    }
+
     const GlyphSubstitutionTableHeader *canonGSUBTable = (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
     LETag scriptTag  = OpenTypeLayoutEngine::getScriptTag(fScriptCode);
     LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode);
--- a/src/share/native/sun/java2d/loops/ProcessPath.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/java2d/loops/ProcessPath.c	Wed Apr 20 04:38:36 2011 +0100
@@ -118,19 +118,25 @@
         jint Y1 = (fY1) >> MDP_PREC;                                        \
         jint res;                                                           \
                                                                             \
-        /* Checking bounds and clipping if necessary */                     \
+        /* Checking bounds and clipping if necessary.                       \
+         * REMIND: It's temporary solution to avoid OOB in rendering code.  \
+         * Current approach uses float equations which are unreliable for   \
+         * clipping and makes assumptions about the line biases of the      \
+         * rendering algorithm. Also, clipping code should be moved down    \
+         * into only those output renderers that need it.                   \
+         */                                                                 \
         if (checkBounds) {                                                  \
-            TESTANDCLIP(hnd->dhnd->yMin, hnd->dhnd->yMax, Y0, X0, Y1, X1,   \
-                        jint, res);                                         \
+            jfloat xMinf = hnd->dhnd->xMinf + 0.5f;                         \
+            jfloat yMinf = hnd->dhnd->yMinf + 0.5f;                         \
+            jfloat xMaxf = hnd->dhnd->xMaxf + 0.5f;                         \
+            jfloat yMaxf = hnd->dhnd->yMaxf + 0.5f;                         \
+            TESTANDCLIP(yMinf, yMaxf, Y0, X0, Y1, X1, jint, res);           \
             if (res == CRES_INVISIBLE) break;                               \
-            TESTANDCLIP(hnd->dhnd->yMin, hnd->dhnd->yMax, Y1, X1, Y0, X0,   \
-                        jint, res);                                         \
+            TESTANDCLIP(yMinf, yMaxf, Y1, X1, Y0, X0, jint, res);           \
             if (res == CRES_INVISIBLE) break;                               \
-            TESTANDCLIP(hnd->dhnd->xMin, hnd->dhnd->xMax, X0, Y0, X1, Y1,   \
-                        jint, res);                                         \
+            TESTANDCLIP(xMinf, xMaxf, X0, Y0, X1, Y1, jint, res);           \
             if (res == CRES_INVISIBLE) break;                               \
-            TESTANDCLIP(hnd->dhnd->xMin, hnd->dhnd->xMax, X1, Y1, X0, Y0,   \
-                        jint, res);                                         \
+            TESTANDCLIP(xMinf, xMaxf, X1, Y1, X0, Y0, jint, res);           \
             if (res == CRES_INVISIBLE) break;                               \
         }                                                                   \
                                                                             \
--- a/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -695,6 +695,46 @@
 }
 
 /*
+ * converts the Java CK_AES_CTR_PARAMS object to a CK_AES_CTR_PARAMS structure
+ *
+ * @param env - used to call JNI funktions to get the Java classes and objects
+ * @param jParam - the Java CK_AES_CTR_PARAMS object to convert
+ * @param ckpParam - pointer to the new CK_AES_CTR_PARAMS structure
+ */
+void jAesCtrParamsToCKAesCtrParam(JNIEnv *env, jobject jParam,
+                                  CK_AES_CTR_PARAMS_PTR ckpParam) {
+    jclass jAesCtrParamsClass;
+    jfieldID fieldID;
+    jlong jCounterBits;
+    jobject jCb;
+    CK_BYTE_PTR ckBytes;
+    CK_ULONG ckTemp;
+
+    /* get ulCounterBits */
+    jAesCtrParamsClass = (*env)->FindClass(env, CLASS_AES_CTR_PARAMS);
+    if (jAesCtrParamsClass == NULL) { return; }
+    fieldID = (*env)->GetFieldID(env, jAesCtrParamsClass, "ulCounterBits", "J");
+    if (fieldID == NULL) { return; }
+    jCounterBits = (*env)->GetLongField(env, jParam, fieldID);
+
+    /* get cb */
+    fieldID = (*env)->GetFieldID(env, jAesCtrParamsClass, "cb", "[B");
+    if (fieldID == NULL) { return; }
+    jCb = (*env)->GetObjectField(env, jParam, fieldID);
+
+    /* populate java values */
+    ckpParam->ulCounterBits = jLongToCKULong(jCounterBits);
+    jByteArrayToCKByteArray(env, jCb, &ckBytes, &ckTemp);
+    if ((*env)->ExceptionCheck(env)) { return; }
+    if (ckTemp != 16) {
+        TRACE1("ERROR: WRONG CTR IV LENGTH %d", ckTemp);
+    } else {
+        memcpy(ckpParam->cb, ckBytes, ckTemp);
+        free(ckBytes);
+    }
+}
+
+/*
  * converts a Java CK_MECHANISM object into a CK_MECHANISM structure
  *
  * @param env - used to call JNI funktions to get the values out of the Java object
@@ -937,12 +977,10 @@
 {
     /* get all Java mechanism parameter classes */
     jclass jVersionClass, jSsl3MasterKeyDeriveParamsClass, jSsl3KeyMatParamsClass;
-    jclass jTlsPrfParamsClass, jRsaPkcsOaepParamsClass, jPbeParamsClass;
-    jclass jPkcs5Pbkd2ParamsClass, jRsaPkcsPssParamsClass;
+    jclass jTlsPrfParamsClass, jAesCtrParamsClass, jRsaPkcsOaepParamsClass;
+    jclass jPbeParamsClass, jPkcs5Pbkd2ParamsClass, jRsaPkcsPssParamsClass;
     jclass jEcdh1DeriveParamsClass, jEcdh2DeriveParamsClass;
     jclass jX942Dh1DeriveParamsClass, jX942Dh2DeriveParamsClass;
-
-    /* get all Java mechanism parameter classes */
     TRACE0("\nDEBUG: jMechanismParameterToCKMechanismParameter");
 
     /* most common cases, i.e. NULL/byte[]/long, are already handled by
@@ -1046,6 +1084,33 @@
         return;
     }
 
+    jAesCtrParamsClass = (*env)->FindClass(env, CLASS_AES_CTR_PARAMS);
+    if (jAesCtrParamsClass == NULL) { return; }
+    if ((*env)->IsInstanceOf(env, jParam, jAesCtrParamsClass)) {
+        /*
+         * CK_AES_CTR_PARAMS
+         */
+        CK_AES_CTR_PARAMS_PTR ckpParam;
+
+        ckpParam = (CK_AES_CTR_PARAMS_PTR) malloc(sizeof(CK_AES_CTR_PARAMS));
+        if (ckpParam == NULL) {
+            JNU_ThrowOutOfMemoryError(env, 0);
+            return;
+        }
+
+        /* convert jParameter to CKParameter */
+        jAesCtrParamsToCKAesCtrParam(env, jParam, ckpParam);
+        if ((*env)->ExceptionCheck(env)) {
+            free(ckpParam);
+            return;
+        }
+
+        /* get length and pointer of parameter */
+        *ckpLength = sizeof(CK_AES_CTR_PARAMS);
+        *ckpParamPtr = ckpParam;
+        return;
+    }
+
     jRsaPkcsOaepParamsClass = (*env)->FindClass(env, CLASS_RSA_PKCS_OAEP_PARAMS);
     if (jRsaPkcsOaepParamsClass == NULL) { return; }
     if ((*env)->IsInstanceOf(env, jParam, jRsaPkcsOaepParamsClass)) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,124 @@
+/* pkcs-11v2-20a3.h include file for the PKCS #11 Version 2.20 Amendment 3
+   document. */
+
+/* $Revision: 1.4 $ */
+
+/* License to copy and use this software is granted provided that it is
+ * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
+ * (Cryptoki) Version 2.20 Amendment 3" in all material mentioning or
+ * referencing this software.
+
+ * RSA Security Inc. makes no representations concerning either the
+ * merchantability of this software or the suitability of this software for
+ * any particular purpose. It is provided "as is" without express or implied
+ * warranty of any kind.
+ */
+
+/* This file is preferably included after inclusion of pkcs11.h */
+
+#ifndef _PKCS_11V2_20A3_H_
+#define _PKCS_11V2_20A3_H_ 1
+
+/* Are the definitions of this file already included in pkcs11t.h ? */
+#ifndef CKK_CAMELLIA
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Key types */
+
+/* Camellia is new for PKCS #11 v2.20 amendment 3 */
+#define CKK_CAMELLIA                   0x00000025
+/* ARIA is new for PKCS #11 v2.20 amendment 3 */
+#define CKK_ARIA                       0x00000026
+
+
+/* Mask-generating functions */
+
+/* SHA-224 is new for PKCS #11 v2.20 amendment 3 */
+#define CKG_MGF1_SHA224                0x00000005
+
+
+/* Mechanism Identifiers */
+
+/* SHA-224 is new for PKCS #11 v2.20 amendment 3 */
+#define CKM_SHA224                     0x00000255
+#define CKM_SHA224_HMAC                0x00000256
+#define CKM_SHA224_HMAC_GENERAL        0x00000257
+
+/* SHA-224 key derivation is new for PKCS #11 v2.20 amendment 3 */
+#define CKM_SHA224_KEY_DERIVATION      0x00000396
+
+/* SHA-224 RSA mechanisms are new for PKCS #11 v2.20 amendment 3 */
+#define CKM_SHA224_RSA_PKCS            0x00000046
+#define CKM_SHA224_RSA_PKCS_PSS        0x00000047
+
+/* AES counter mode is new for PKCS #11 v2.20 amendment 3 */
+#define CKM_AES_CTR                    0x00001086
+
+/* Camellia is new for PKCS #11 v2.20 amendment 3 */
+#define CKM_CAMELLIA_KEY_GEN           0x00000550
+#define CKM_CAMELLIA_ECB               0x00000551
+#define CKM_CAMELLIA_CBC               0x00000552
+#define CKM_CAMELLIA_MAC               0x00000553
+#define CKM_CAMELLIA_MAC_GENERAL       0x00000554
+#define CKM_CAMELLIA_CBC_PAD           0x00000555
+#define CKM_CAMELLIA_ECB_ENCRYPT_DATA  0x00000556
+#define CKM_CAMELLIA_CBC_ENCRYPT_DATA  0x00000557
+#define CKM_CAMELLIA_CTR               0x00000558
+
+/* ARIA is new for PKCS #11 v2.20 amendment 3 */
+#define CKM_ARIA_KEY_GEN               0x00000560
+#define CKM_ARIA_ECB                   0x00000561
+#define CKM_ARIA_CBC                   0x00000562
+#define CKM_ARIA_MAC                   0x00000563
+#define CKM_ARIA_MAC_GENERAL           0x00000564
+#define CKM_ARIA_CBC_PAD               0x00000565
+#define CKM_ARIA_ECB_ENCRYPT_DATA      0x00000566
+#define CKM_ARIA_CBC_ENCRYPT_DATA      0x00000567
+
+
+/* Mechanism parameters */
+
+/* CK_AES_CTR_PARAMS is new for PKCS #11 v2.20 amendment 3 */
+typedef struct CK_AES_CTR_PARAMS {
+    CK_ULONG ulCounterBits;
+    CK_BYTE cb[16];
+} CK_AES_CTR_PARAMS;
+
+typedef CK_AES_CTR_PARAMS CK_PTR CK_AES_CTR_PARAMS_PTR;
+
+/* CK_CAMELLIA_CTR_PARAMS is new for PKCS #11 v2.20 amendment 3 */
+typedef struct CK_CAMELLIA_CTR_PARAMS {
+    CK_ULONG ulCounterBits;
+    CK_BYTE cb[16];
+} CK_CAMELLIA_CTR_PARAMS;
+
+typedef CK_CAMELLIA_CTR_PARAMS CK_PTR CK_CAMELLIA_CTR_PARAMS_PTR;
+
+/* CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS is new for PKCS #11 v2.20 amendment 3 */
+typedef struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS {
+    CK_BYTE      iv[16];
+    CK_BYTE_PTR  pData;
+    CK_ULONG     length;
+} CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS;
+
+typedef CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR;
+
+/* CK_ARIA_CBC_ENCRYPT_DATA_PARAMS is new for PKCS #11 v2.20 amendment 3 */
+typedef struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS {
+    CK_BYTE      iv[16];
+    CK_BYTE_PTR  pData;
+    CK_ULONG     length;
+} CK_ARIA_CBC_ENCRYPT_DATA_PARAMS;
+
+typedef CK_ARIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
--- a/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -153,6 +153,7 @@
 #include "p11_md.h"
 
 #include "pkcs11.h"
+#include "pkcs-11v2-20a3.h"
 #include <jni.h>
 #include <jni_util.h>
 
@@ -272,6 +273,7 @@
 #define CLASS_SSL3_MASTER_KEY_DERIVE_PARAMS "sun/security/pkcs11/wrapper/CK_SSL3_MASTER_KEY_DERIVE_PARAMS"
 #define CLASS_SSL3_KEY_MAT_PARAMS "sun/security/pkcs11/wrapper/CK_SSL3_KEY_MAT_PARAMS"
 #define CLASS_TLS_PRF_PARAMS "sun/security/pkcs11/wrapper/CK_TLS_PRF_PARAMS"
+#define CLASS_AES_CTR_PARAMS "sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS"
 
 /* function to convert a PKCS#11 return value other than CK_OK into a Java Exception
  * or to throw a PKCS11RuntimeException
--- a/src/share/sample/nio/file/WatchDir.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/share/sample/nio/file/WatchDir.java	Wed Apr 20 04:38:36 2011 +0100
@@ -33,8 +33,7 @@
 import static java.nio.file.StandardWatchEventKind.*;
 import static java.nio.file.LinkOption.*;
 import java.nio.file.attribute.*;
-import java.io.*;
-import java.util.*;
+import java.io.IOException;
 
 /**
  * Example to watch a directory (or tree) for changes to files.
@@ -43,9 +42,9 @@
 public class WatchDir {
 
     private final WatchService watcher;
-    private final Map<WatchKey,Path> keys;
     private final boolean recursive;
     private boolean trace = false;
+    private int count;
 
     @SuppressWarnings("unchecked")
     static <T> WatchEvent<T> cast(WatchEvent<?> event) {
@@ -57,17 +56,9 @@
      */
     private void register(Path dir) throws IOException {
         WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
-        if (trace) {
-            Path prev = keys.get(key);
-            if (prev == null) {
-                System.out.format("register: %s\n", dir);
-            } else {
-                if (!dir.equals(prev)) {
-                    System.out.format("update: %s -> %s\n", prev, dir);
-                }
-            }
-        }
-        keys.put(key, dir);
+        count++;
+        if (trace)
+            System.out.format("register: %s\n", dir);
     }
 
     /**
@@ -92,7 +83,6 @@
      */
     WatchDir(Path dir, boolean recursive) throws IOException {
         this.watcher = FileSystems.getDefault().newWatchService();
-        this.keys = new HashMap<WatchKey,Path>();
         this.recursive = recursive;
 
         if (recursive) {
@@ -121,12 +111,6 @@
                 return;
             }
 
-            Path dir = keys.get(key);
-            if (dir == null) {
-                System.err.println("WatchKey not recognized!!");
-                continue;
-            }
-
             for (WatchEvent<?> event: key.pollEvents()) {
                 WatchEvent.Kind kind = event.kind();
 
@@ -138,7 +122,7 @@
                 // Context for directory entry event is the file name of entry
                 WatchEvent<Path> ev = cast(event);
                 Path name = ev.context();
-                Path child = dir.resolve(name);
+                Path child = ((Path)key.watchable()).resolve(name);
 
                 // print out event
                 System.out.format("%s: %s\n", event.kind().name(), child);
@@ -156,15 +140,13 @@
                 }
             }
 
-            // reset key and remove from set if directory no longer accessible
+            // reset key
             boolean valid = key.reset();
             if (!valid) {
-                keys.remove(key);
-
-                // all directories are inaccessible
-                if (keys.isEmpty()) {
+                // directory no longer accessible
+                count--;
+                if (count == 0)
                     break;
-                }
             }
         }
     }
--- a/src/solaris/bin/ergo.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/bin/ergo.c	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, 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,6 +67,35 @@
   }
 }
 
+#ifdef USE_GENERIC_ERGO
+/* Ask the OS how many processors there are. */
+static unsigned long
+physical_processors(void) {
+  const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF);
+  JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors);
+  return sys_processors;
+}
+
+jboolean
+ServerClassMachineImpl(void) {
+  jboolean            result            = JNI_FALSE;
+  /* How big is a server class machine? */
+  const unsigned long server_processors = 2UL;
+  const uint64_t      server_memory     = 2UL * GB;
+  const uint64_t      actual_memory     = physical_memory();
+
+  /* Is this a server class machine? */
+  if (actual_memory >= server_memory) {
+    const unsigned long actual_processors = physical_processors();
+    if (actual_processors >= server_processors) {
+      result = JNI_TRUE;
+    }
+  }
+  JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n",
+           (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE"));
+  return result;
+}
+#endif
 
 /* Compute physical memory by asking the OS */
 uint64_t
--- a/src/solaris/bin/ergo_sparc.c	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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.
- */
-#include "ergo.h"
-
-
-/* Methods for solaris-sparc and linux-sparc: these are easy. */
-
-/* Ask the OS how many processors there are. */
-static unsigned long
-physical_processors(void) {
-  const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF);
-
-  JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors);
-  return sys_processors;
-}
-
-/* The sparc version of the "server-class" predicate. */
-jboolean
-ServerClassMachineImpl(void) {
-  jboolean            result            = JNI_FALSE;
-  /* How big is a server class machine? */
-  const unsigned long server_processors = 2UL;
-  const uint64_t      server_memory     = 2UL * GB;
-  const uint64_t      actual_memory     = physical_memory();
-
-  /* Is this a server class machine? */
-  if (actual_memory >= server_memory) {
-    const unsigned long actual_processors = physical_processors();
-    if (actual_processors >= server_processors) {
-      result = JNI_TRUE;
-    }
-  }
-  JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n",
-           (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE"));
-  return result;
-}
--- a/src/solaris/bin/ergo_zero.c	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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.
- */
-#include "ergo.h"
-
-
-/* Methods for solaris-sparc and linux-sparc: these are easy. */
-
-/* Ask the OS how many processors there are. */
-static unsigned long
-physical_processors(void) {
-  const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF);
-
-  JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors);
-  return sys_processors;
-}
-
-/* The sparc version of the "server-class" predicate. */
-jboolean
-ServerClassMachineImpl(void) {
-  jboolean            result            = JNI_FALSE;
-  /* How big is a server class machine? */
-  const unsigned long server_processors = 2UL;
-  const uint64_t      server_memory     = 2UL * GB;
-  const uint64_t      actual_memory     = physical_memory();
-
-  /* Is this a server class machine? */
-  if (actual_memory >= server_memory) {
-    const unsigned long actual_processors = physical_processors();
-    if (actual_processors >= server_processors) {
-      result = JNI_TRUE;
-    }
-  }
-  JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n",
-           (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE"));
-  return result;
-}
--- a/src/solaris/classes/java/util/prefs/FileSystemPreferences.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/java/util/prefs/FileSystemPreferences.java	Wed Apr 20 04:38:36 2011 +0100
@@ -571,9 +571,9 @@
                     long newLastSyncTime = 0;
                     try {
                         newLastSyncTime = prefsFile.lastModified();
-                        FileInputStream fis = new FileInputStream(prefsFile);
-                        XmlSupport.importMap(fis, m);
-                        fis.close();
+                        try (FileInputStream fis = new FileInputStream(prefsFile)) {
+                            XmlSupport.importMap(fis, m);
+                        }
                     } catch(Exception e) {
                         if (e instanceof InvalidPreferencesFormatException) {
                             getLogger().warning("Invalid preferences format in "
@@ -618,9 +618,9 @@
                         if (!dir.exists() && !dir.mkdirs())
                             throw new BackingStoreException(dir +
                                                              " create failed.");
-                        FileOutputStream fos = new FileOutputStream(tmpFile);
-                        XmlSupport.exportMap(fos, prefsCache);
-                        fos.close();
+                        try (FileOutputStream fos = new FileOutputStream(tmpFile)) {
+                            XmlSupport.exportMap(fos, prefsCache);
+                        }
                         if (!tmpFile.renameTo(prefsFile))
                             throw new BackingStoreException("Can't rename " +
                             tmpFile + " to " + prefsFile);
--- a/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -56,12 +56,14 @@
     }
 
     private native void run(String title, int mode, String dir, String file,
-            FilenameFilter filter, boolean isMultipleMode);
+                            FilenameFilter filter, boolean isMultipleMode, int x, int y);
     private native void quit();
 
     @Override
     public native void toFront();
 
+    @Override
+    public native void setBounds(int x, int y, int width, int height, int op);
 
     /**
      * Called exclusively by the native C code.
@@ -106,9 +108,8 @@
                 Thread t = new Thread() {
                     public void run() {
                         GtkFileDialogPeer.this.run(fd.getTitle(), fd.getMode(),
-                                fd.getDirectory(), fd.getFile(), fd
-                                        .getFilenameFilter(), fd
-                                        .isMultipleMode());
+                                   fd.getDirectory(), fd.getFile(), fd.getFilenameFilter(), fd.isMultipleMode(),
+                                   fd.getX(), fd.getY());
                         fd.setVisible(false);
                     }
                 };
--- a/src/solaris/classes/sun/awt/X11/XDesktopPeer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/awt/X11/XDesktopPeer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -44,11 +44,27 @@
 public class XDesktopPeer implements DesktopPeer {
 
     private static boolean nativeLibraryLoaded = false;
-    static {
-        nativeLibraryLoaded = init();
+    private static boolean initExecuted = false;
+
+    private static void initWithLock(){
+        XToolkit.awtLock();
+        try {
+            if (!initExecuted) {
+                nativeLibraryLoaded = init();
+            }
+        } finally {
+            initExecuted = true;
+            XToolkit.awtUnlock();
+        }
+    }
+
+    //package-private
+    XDesktopPeer(){
+        initWithLock();
     }
 
     static boolean isDesktopSupported() {
+        initWithLock();
         return nativeLibraryLoaded;
     }
 
@@ -83,12 +99,17 @@
     }
 
     private void launch(URI uri) throws IOException {
-        if (!nativeLibraryLoaded) {
-            throw new IOException("Failed to load native libraries.");
+        byte[] uriByteArray = ( uri.toString() + '\0' ).getBytes();
+        boolean result = false;
+        XToolkit.awtLock();
+        try {
+            if (!nativeLibraryLoaded) {
+                throw new IOException("Failed to load native libraries.");
+            }
+            result = gnome_url_show(uriByteArray);
+        } finally {
+            XToolkit.awtUnlock();
         }
-
-        byte[] uriByteArray = ( uri.toString() + '\0' ).getBytes();
-        boolean result = gnome_url_show(uriByteArray);
         if (!result) {
             throw new IOException("Failed to show URI:" + uri);
         }
--- a/src/solaris/classes/sun/font/XRGlyphCache.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/font/XRGlyphCache.java	Wed Apr 20 04:38:36 2011 +0100
@@ -70,9 +70,14 @@
         try {
             SunToolkit.awtLock();
 
-            ArrayList<Integer> glyphIDList = new ArrayList<Integer>(glyphPtrList.size());
+            GrowableIntArray glyphIDList = new GrowableIntArray(1, glyphPtrList.size());
             for (long glyphPtr : glyphPtrList) {
-                glyphIDList.add(XRGlyphCacheEntry.getGlyphID(glyphPtr));
+                int glyphID = XRGlyphCacheEntry.getGlyphID(glyphPtr);
+
+                //Check if glyph hasn't been freed already
+                if (glyphID != 0) {
+                   glyphIDList.addInt(glyphID);
+                }
             }
             freeGlyphs(glyphIDList);
         } finally {
@@ -83,7 +88,6 @@
     protected int getFreeGlyphID() {
         if (freeGlyphIDs.size() > 0) {
             int newID = freeGlyphIDs.remove(freeGlyphIDs.size() - 1);
-            ;
             return newID;
         }
         return nextID++;
@@ -246,7 +250,7 @@
             glyph.setPinned();
         }
 
-        ArrayList<Integer> deleteGlyphList = new ArrayList<Integer>();
+        GrowableIntArray deleteGlyphList = new GrowableIntArray(1, 10);
         int pixelsToRelease = cachedPixels - MAX_CACHED_PIXELS;
 
         for (int i = cacheList.size() - 1; i >= 0 && pixelsToRelease > 0; i--) {
@@ -254,7 +258,7 @@
 
             if (!entry.isPinned()) {
                 pixelsToRelease -= entry.getPixelCnt();
-                deleteGlyphList.add(new Integer(entry.getGlyphID()));
+                deleteGlyphList.addInt(entry.getGlyphID());
             }
         }
 
@@ -265,26 +269,23 @@
         freeGlyphs(deleteGlyphList);
     }
 
-    private void freeGlyphs(List<Integer> glyphIdList) {
-
-        freeGlyphIDs.addAll(glyphIdList);
+    private void freeGlyphs(GrowableIntArray glyphIdList) {
+        GrowableIntArray removedLCDGlyphs = new GrowableIntArray(1, 10);
+        GrowableIntArray removedGrayscaleGlyphs = new GrowableIntArray(1, 10);
 
-        GrowableIntArray removedLCDGlyphs = new GrowableIntArray(1, 1);
-        GrowableIntArray removedGrayscaleGlyphs = new GrowableIntArray(1, 1);
+        for (int i=0; i < glyphIdList.getSize(); i++) {
+            int glyphId = glyphIdList.getInt(i);
+            freeGlyphIDs.add(glyphId);
 
-        for (Integer glyphId : glyphIdList) {
-            tmp.setValue(glyphId.intValue());
+            tmp.setValue(glyphId);
             XRGlyphCacheEntry entry = cacheMap.get(tmp);
             cachedPixels -= entry.getPixelCnt();
-
-            int removedGlyphID = entry.getGlyphID();
-            tmp.setValue(removedGlyphID);
             cacheMap.remove(tmp);
 
             if (entry.getGlyphSet() == grayGlyphSet) {
-                removedGrayscaleGlyphs.addInt(removedGlyphID);
+                removedGrayscaleGlyphs.addInt(glyphId);
             } else {
-                removedLCDGlyphs.addInt(removedGlyphID);
+                removedLCDGlyphs.addInt(glyphId);
             }
 
             entry.setGlyphID(0);
--- a/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java	Wed Apr 20 04:38:36 2011 +0100
@@ -55,6 +55,8 @@
 
     native void initXRPicture(long xsdo, int pictForm);
 
+    native void freeXSDOPicture(long xsdo);
+
     public static final String DESC_BYTE_A8_X11 = "Byte A8 Pixmap";
     public static final String DESC_INT_RGB_X11 = "Integer RGB Pixmap";
     public static final String DESC_INT_ARGB_X11 = "Integer ARGB-Pre Pixmap";
@@ -479,8 +481,7 @@
         if (xrpipe == null) {
             try {
                 SunToolkit.awtLock();
-                xgc = renderQueue.createGC(xid); // TODO: GC leak? where to
-                // clean up?
+                xgc = XCreateGC(getNativeOps());
 
                 xrpipe = new XRRenderer(maskBuffer.getMaskBuffer());
                 xrtxpipe = new PixelToShapeConverter(xrpipe);
@@ -532,6 +533,17 @@
         public Object getDestination() {
             return peer.getTarget();
         }
+
+       public void invalidate() {
+           try {
+               SunToolkit.awtLock();
+               freeXSDOPicture(getNativeOps());
+           }finally {
+               SunToolkit.awtUnlock();
+           }
+
+           super.invalidate();
+       }
     }
 
     public static class XRInternalSurfaceData extends XRSurfaceData {
--- a/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Wed Apr 20 04:38:36 2011 +0100
@@ -68,6 +68,9 @@
 public class NTLMAuthentication extends AuthenticationInfo {
     private static final long serialVersionUID = 170L;
 
+    private static final NTLMAuthenticationCallback NTLMAuthCallback =
+        NTLMAuthenticationCallback.getNTLMAuthenticationCallback();
+
     private String hostname;
     private static String defaultDomain; /* Domain to use if not specified by user */
 
@@ -81,6 +84,14 @@
         return false;
     }
 
+    /**
+     * Returns true if the given site is trusted, i.e. we can try
+     * transparent Authentication.
+     */
+    public static boolean isTrustedSite(URL url) {
+        return NTLMAuthCallback.isTrustedSite(url);
+    }
+
     private void init0() {
 
         hostname = java.security.AccessController.doPrivileged(
--- a/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -236,7 +236,9 @@
         } catch (SecurityException x) {
             try {
                 ch.close();
-            } catch (IOException ignore) { }
+            } catch (Throwable suppressed) {
+                x.addSuppressed(suppressed);
+            }
             throw x;
         }
         return ch;
--- a/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -137,7 +137,7 @@
         return port;
     }
 
-    // register for events if there are outstanding I/O operations
+    // register events for outstanding I/O operations, caller already owns updateLock
     private void updateEvents() {
         assert Thread.holdsLock(updateLock);
         int events = 0;
@@ -149,6 +149,13 @@
             port.startPoll(fdVal, events);
     }
 
+    // register events for outstanding I/O operations
+    private void lockAndUpdateEvents() {
+        synchronized (updateLock) {
+            updateEvents();
+        }
+    }
+
     // invoke to finish read and/or write operations
     private void finish(boolean mayInvokeDirect,
                         boolean readable,
@@ -255,10 +262,11 @@
             // close channel if connection cannot be established
             try {
                 close();
-            } catch (IOException ignore) { }
+            } catch (Throwable suppressed) {
+                e.addSuppressed(suppressed);
+            }
         }
 
-
         // invoke handler and set result
         CompletionHandler<Void,Object> handler = connectHandler;
         Object att = connectAttachment;
@@ -345,7 +353,9 @@
         if (e != null) {
             try {
                 close();
-            } catch (IOException ignore) { }
+            } catch (Throwable suppressed) {
+                e.addSuppressed(suppressed);
+            }
         }
         if (handler == null) {
             return CompletedFuture.withResult(null, e);
@@ -399,9 +409,8 @@
             exc = x;
         } finally {
             // restart poll in case of concurrent write
-            synchronized (updateLock) {
-                updateEvents();
-            }
+            if (!(exc instanceof AsynchronousCloseException))
+                lockAndUpdateEvents();
             end();
         }
 
@@ -595,9 +604,8 @@
             exc = x;
         } finally {
             // restart poll in case of concurrent write
-            synchronized (updateLock) {
-                updateEvents();
-            }
+            if (!(exc instanceof AsynchronousCloseException))
+                lockAndUpdateEvents();
             end();
         }
 
--- a/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java	Wed Apr 20 04:38:36 2011 +0100
@@ -27,6 +27,7 @@
 
 import java.nio.file.attribute.*;
 import java.util.Map;
+import java.util.Set;
 import java.io.IOException;
 import sun.misc.Unsafe;
 
@@ -57,6 +58,10 @@
     private static final int DOS_XATTR_SYSTEM   = 0x04;
     private static final int DOS_XATTR_ARCHIVE  = 0x20;
 
+    // the names of the DOS attributes (includes basic)
+    private static final Set<String> dosAttributeNames =
+        Util.newSet(basicAttributeNames, READONLY_NAME, ARCHIVE_NAME, SYSTEM_NAME, HIDDEN_NAME);
+
     LinuxDosFileAttributeView(UnixPath file, boolean followLinks) {
         super(file, followLinks);
     }
@@ -93,9 +98,10 @@
     public Map<String,Object> readAttributes(String[] attributes)
         throws IOException
     {
-        AttributesBuilder builder = AttributesBuilder.create(attributes);
+        AttributesBuilder builder =
+            AttributesBuilder.create(dosAttributeNames, attributes);
         DosFileAttributes attrs = readAttributes();
-        addBasicAttributesToBuilder(attrs, builder);
+        addRequestedBasicAttributes(attrs, builder);
         if (builder.match(READONLY_NAME))
             builder.add(READONLY_NAME, attrs.isReadOnly());
         if (builder.match(ARCHIVE_NAME))
--- a/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java	Wed Apr 20 04:38:36 2011 +0100
@@ -28,8 +28,6 @@
 import java.nio.file.*;
 import java.io.IOException;
 import java.util.*;
-import java.security.AccessController;
-import sun.security.action.GetPropertyAction;
 import static sun.nio.fs.LinuxNativeDispatcher.*;
 
 /**
@@ -37,42 +35,16 @@
  */
 
 class LinuxFileSystem extends UnixFileSystem {
-    private final boolean hasInotify;
-
     LinuxFileSystem(UnixFileSystemProvider provider, String dir) {
         super(provider, dir);
-
-        // assume X.Y[-Z] format
-        String osversion = AccessController
-            .doPrivileged(new GetPropertyAction("os.version"));
-        String[] vers = Util.split(osversion, '.');
-        assert vers.length >= 2;
-
-        int majorVersion = Integer.parseInt(vers[0]);
-        int minorVersion = Integer.parseInt(vers[1]);
-        int microVersion = 0;
-        if (vers.length > 2) {
-            String[] microVers = Util.split(vers[2], '-');
-            microVersion = (microVers.length > 0) ?
-                Integer.parseInt(microVers[0]) : 0;
-        }
-
-        // inotify available since 2.6.13
-        this.hasInotify = ((majorVersion > 2) ||
-            (majorVersion == 2 && minorVersion > 6) ||
-            ((majorVersion == 2) && (minorVersion == 6) && (microVersion >= 13)));
     }
 
     @Override
     public WatchService newWatchService()
         throws IOException
     {
-        if (hasInotify) {
-            return new LinuxWatchService(this);
-        } else {
-            // use polling implementation on older kernels
-            return new PollingWatchService();
-        }
+        // assume 2.6.13 or newer
+        return new LinuxWatchService(this);
     }
 
 
--- a/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java	Wed Apr 20 04:38:36 2011 +0100
@@ -136,7 +136,7 @@
             throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed");
 
         FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode);
-        return FileChannelImpl.open(fdObj, flags.read, flags.write, null);
+        return FileChannelImpl.open(fdObj, flags.read, flags.write, flags.append, null);
     }
 
     /**
--- a/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java	Wed Apr 20 04:38:36 2011 +0100
@@ -123,6 +123,10 @@
         private static final String OWNER_NAME = "owner";
         private static final String GROUP_NAME = "group";
 
+        // the names of the posix attributes (incudes basic)
+        static final Set<String> posixAttributeNames =
+            Util.newSet(basicAttributeNames, PERMISSIONS_NAME, OWNER_NAME, GROUP_NAME);
+
         Posix(UnixPath file, boolean followLinks) {
             super(file, followLinks);
         }
@@ -172,9 +176,10 @@
          * Invoked by readAttributes or sub-classes to add all matching posix
          * attributes to the builder
          */
-        final void addPosixAttributesToBuilder(PosixFileAttributes attrs,
+        final void addRequestedPosixAttributes(PosixFileAttributes attrs,
                                                AttributesBuilder builder)
         {
+            addRequestedBasicAttributes(attrs, builder);
             if (builder.match(PERMISSIONS_NAME))
                 builder.add(PERMISSIONS_NAME, attrs.permissions());
             if (builder.match(OWNER_NAME))
@@ -184,13 +189,13 @@
         }
 
         @Override
-        public Map<String,Object> readAttributes(String[] attributes)
+        public Map<String,Object> readAttributes(String[] requested)
             throws IOException
         {
-            AttributesBuilder builder = AttributesBuilder.create(attributes);
+            AttributesBuilder builder =
+                AttributesBuilder.create(posixAttributeNames, requested);
             PosixFileAttributes attrs = readAttributes();
-            addBasicAttributesToBuilder(attrs, builder);
-            addPosixAttributesToBuilder(attrs, builder);
+            addRequestedPosixAttributes(attrs, builder);
             return builder.unmodifiableMap();
         }
 
@@ -287,6 +292,12 @@
         private static final String GID_NAME = "gid";
         private static final String CTIME_NAME = "ctime";
 
+        // the names of the unix attributes (including posix)
+        static final Set<String> unixAttributeNames =
+            Util.newSet(posixAttributeNames,
+                        MODE_NAME, INO_NAME, DEV_NAME, RDEV_NAME,
+                        NLINK_NAME, UID_NAME, GID_NAME, CTIME_NAME);
+
         Unix(UnixPath file, boolean followLinks) {
             super(file, followLinks);
         }
@@ -316,13 +327,13 @@
         }
 
         @Override
-        public Map<String,Object> readAttributes(String[] attributes)
+        public Map<String,Object> readAttributes(String[] requested)
             throws IOException
         {
-            AttributesBuilder builder = AttributesBuilder.create(attributes);
+            AttributesBuilder builder =
+                AttributesBuilder.create(unixAttributeNames, requested);
             UnixFileAttributes attrs = readAttributes();
-            addBasicAttributesToBuilder(attrs, builder);
-            addPosixAttributesToBuilder(attrs, builder);
+            addRequestedPosixAttributes(attrs, builder);
             if (builder.match(MODE_NAME))
                 builder.add(MODE_NAME, attrs.mode());
             if (builder.match(INO_NAME))
--- a/src/solaris/classes/sun/nio/fs/UnixPath.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/classes/sun/nio/fs/UnixPath.java	Wed Apr 20 04:38:36 2011 +0100
@@ -606,7 +606,9 @@
 
     @Override
     public boolean startsWith(Path other) {
-        UnixPath that = toUnixPath(other);
+        if (!(Objects.requireNonNull(other) instanceof UnixPath))
+            return false;
+        UnixPath that = (UnixPath)other;
 
         // other path is longer
         if (that.path.length > path.length)
@@ -655,7 +657,9 @@
 
     @Override
     public boolean endsWith(Path other) {
-        UnixPath that = toUnixPath(other);
+        if (!(Objects.requireNonNull(other) instanceof UnixPath))
+            return false;
+        UnixPath that = (UnixPath)other;
 
         int thisLen = path.length;
         int thatLen = that.path.length;
--- a/src/solaris/native/java/net/Inet4AddressImpl.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/Inet4AddressImpl.c	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -60,7 +60,7 @@
     char hostname[MAXHOSTNAMELEN+1];
 
     hostname[0] = '\0';
-    if (JVM_GetHostName(hostname, MAXHOSTNAMELEN)) {
+    if (JVM_GetHostName(hostname, sizeof(hostname))) {
         /* Something went wrong, maybe networking is not setup? */
         strcpy(hostname, "localhost");
     } else {
@@ -77,22 +77,27 @@
          */
 #endif /* __linux__ */
         struct hostent res, res2, *hp;
-        char buf[HENT_BUF_SIZE];
-        char buf2[HENT_BUF_SIZE];
+        // these buffers must be pointer-aligned so they are declared
+        // with pointer type
+        char *buf[HENT_BUF_SIZE/(sizeof (char *))];
+        char *buf2[HENT_BUF_SIZE/(sizeof (char *))];
         int h_error=0;
 
+        // ensure null-terminated
+        hostname[MAXHOSTNAMELEN] = '\0';
+
 #ifdef __GLIBC__
-        gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
+        gethostbyname_r(hostname, &res, (char*)buf, sizeof(buf), &hp, &h_error);
 #else
-        hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+        hp = gethostbyname_r(hostname, &res, (char*)buf, sizeof(buf), &h_error);
 #endif
         if (hp) {
 #ifdef __GLIBC__
             gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
-                            &res2, buf2, sizeof(buf2), &hp, &h_error);
+                            &res2, (char*)buf2, sizeof(buf2), &hp, &h_error);
 #else
             hp = gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
-                                 &res2, buf2, sizeof(buf2), &h_error);
+                                 &res2, (char*)buf2, sizeof(buf2), &h_error);
 #endif
             if (hp) {
                 /*
@@ -136,7 +141,9 @@
     const char *hostname;
     jobjectArray ret = 0;
     struct hostent res, *hp = 0;
-    char buf[HENT_BUF_SIZE];
+    // this buffer must be pointer-aligned so is declared
+    // with pointer type
+    char *buf[HENT_BUF_SIZE/(sizeof (char *))];
 
     /* temporary buffer, on the off chance we need to expand */
     char *tmp = NULL;
@@ -176,9 +183,9 @@
 
     /* Try once, with our static buffer. */
 #ifdef __GLIBC__
-    gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
+    gethostbyname_r(hostname, &res, (char*)buf, sizeof(buf), &hp, &h_error);
 #else
-    hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+    hp = gethostbyname_r(hostname, &res, (char*)buf, sizeof(buf), &h_error);
 #endif
 
     /* With the re-entrant system calls, it's possible that the buffer
@@ -251,7 +258,9 @@
     jstring ret = NULL;
     jint addr;
     struct hostent hent, *hp = 0;
-    char buf[HENT_BUF_SIZE];
+    // this buffer must be pointer-aligned so is declared
+    // with pointer type
+    char *buf[HENT_BUF_SIZE/(sizeof (char *))];
     int h_error = 0;
     char *tmp = NULL;
 
@@ -273,10 +282,10 @@
     addr = htonl(addr);
 #ifdef __GLIBC__
     gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
-                    buf, sizeof(buf), &hp, &h_error);
+                    (char*)buf, sizeof(buf), &hp, &h_error);
 #else
     hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
-                         buf, sizeof(buf), &h_error);
+                         (char*)buf, sizeof(buf), &h_error);
 #endif
     /* With the re-entrant system calls, it's possible that the buffer
      * we pass to it is not large enough to hold an exceptionally
--- a/src/solaris/native/java/net/Inet6AddressImpl.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Apr 20 04:38:36 2011 +0100
@@ -64,10 +64,12 @@
     char hostname[NI_MAXHOST+1];
 
     hostname[0] = '\0';
-    if (JVM_GetHostName(hostname, MAXHOSTNAMELEN)) {
+    if (JVM_GetHostName(hostname, sizeof(hostname))) {
         /* Something went wrong, maybe networking is not setup? */
         strcpy(hostname, "localhost");
     } else {
+        // ensure null-terminated
+        hostname[NI_MAXHOST] = '\0';
 #ifdef __linux__
         /* On Linux gethostname() says "host.domain.sun.com".  On
          * Solaris gethostname() says "host", so extra work is needed.
--- a/src/solaris/native/java/net/NetworkInterface.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/NetworkInterface.c	Wed Apr 20 04:38:36 2011 +0100
@@ -45,7 +45,6 @@
 #ifdef __linux__
 #include <sys/ioctl.h>
 #include <bits/ioctls.h>
-#include <linux/sockios.h>
 #include <sys/utsname.h>
 #include <stdio.h>
 #endif
@@ -1100,7 +1099,7 @@
 #ifdef AF_INET6
 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
     FILE *f;
-    char addr6[40], devname[20];
+    char addr6[40], devname[21];
     char addr6p[8][5];
     int plen, scope, dad_status, if_idx;
     uint8_t ipv6addr[16];
--- a/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Wed Apr 20 04:38:36 2011 +0100
@@ -34,8 +34,8 @@
 #include <fcntl.h>
 #endif
 #ifdef __linux__
-#include <linux/unistd.h>
-#include <linux/sysctl.h>
+#include <unistd.h>
+#include <sys/sysctl.h>
 #include <sys/utsname.h>
 #include <netinet/ip.h>
 
--- a/src/solaris/native/java/net/PlainSocketImpl.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/PlainSocketImpl.c	Wed Apr 20 04:38:36 2011 +0100
@@ -42,8 +42,8 @@
 #include <fcntl.h>
 #endif
 #ifdef __linux__
-#include <linux/unistd.h>
-#include <linux/sysctl.h>
+#include <unistd.h>
+#include <sys/sysctl.h>
 #endif
 
 #include "jvm.h"
--- a/src/solaris/native/java/net/linux_close.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/linux_close.c	Wed Apr 20 04:38:36 2011 +0100
@@ -112,7 +112,7 @@
  */
 static inline fdEntry_t *getFdEntry(int fd)
 {
-    if (fd < 0 || fd > fdCount) {
+    if (fd < 0 || fd >= fdCount) {
         return NULL;
     }
     return &fdTable[fd];
--- a/src/solaris/native/java/net/net_util_md.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/java/net/net_util_md.c	Wed Apr 20 04:38:36 2011 +0100
@@ -608,7 +608,7 @@
     {
         /* now find the scope_id for "lo" */
 
-        char devname[20];
+        char devname[21];
         char addr6p[8][5];
         int plen, scope, dad_status, if_idx;
 
@@ -651,7 +651,7 @@
 static void initLocalIfs () {
     FILE *f;
     unsigned char staddr [16];
-    char ifname [32];
+    char ifname [33];
     struct localinterface *lif=0;
     int index, x1, x2, x3;
     unsigned int u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,ua,ub,uc,ud,ue,uf;
@@ -660,7 +660,7 @@
         return ;
     }
     while (fscanf (f, "%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x "
-                "%d %x %x %x %s",&u0,&u1,&u2,&u3,&u4,&u5,&u6,&u7,
+                "%d %x %x %x %32s",&u0,&u1,&u2,&u3,&u4,&u5,&u6,&u7,
                 &u8,&u9,&ua,&ub,&uc,&ud,&ue,&uf,
                 &index, &x1, &x2, &x3, ifname) == 21) {
         staddr[0] = (unsigned char)u0;
@@ -1102,7 +1102,7 @@
      * index.
      */
     if (match) {
-        char devname[20];
+        char devname[21];
         char addr6p[8][5];
         int plen, scope, dad_status, if_idx;
 
--- a/src/solaris/native/sun/awt/awt_DrawingSurface.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/awt/awt_DrawingSurface.c	Wed Apr 20 04:38:36 2011 +0100
@@ -302,6 +302,7 @@
 #ifdef DEBUG
         fprintf(stderr, "Drawing Surface Info is NULL\n");
 #endif
+        return;
     }
     free(dsi->platformInfo);
     free(dsi);
--- a/src/solaris/native/sun/awt/awt_GraphicsEnv.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/awt/awt_GraphicsEnv.c	Wed Apr 20 04:38:36 2011 +0100
@@ -240,7 +240,7 @@
 
     AwtGraphicsConfigDataPtr defaultConfig;
     int xinawareScreen = 0;
-    VisualID forcedVisualID, defaultVisualID;
+    VisualID forcedVisualID = 0, defaultVisualID;
     char *forcedVisualStr;
     XVisualInfo vinfo;
     long mask;
@@ -254,7 +254,7 @@
 
     if ((forcedVisualStr = getenv("FORCEDEFVIS"))) {
         mask = VisualIDMask | VisualScreenMask;
-        if (sscanf(forcedVisualStr, "%x", &forcedVisualID) > 0 &&
+        if (sscanf(forcedVisualStr, "%lx", &forcedVisualID) > 0 &&
             forcedVisualID > 0)
         {
             vinfo.visualid = forcedVisualID;
--- a/src/solaris/native/sun/awt/gtk2_interface.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/awt/gtk2_interface.c	Wed Apr 20 04:38:36 2011 +0100
@@ -608,7 +608,10 @@
         fp_gtk_viewport_new = dl_symbol("gtk_viewport_new");
         fp_gtk_window_new = dl_symbol("gtk_window_new");
         fp_gtk_window_present = dl_symbol("gtk_window_present");
-        fp_gtk_dialog_new = dl_symbol("gtk_dialog_new");
+        fp_gtk_window_move = dl_symbol("gtk_window_move");
+        fp_gtk_window_resize = dl_symbol("gtk_window_resize");
+
+          fp_gtk_dialog_new = dl_symbol("gtk_dialog_new");
         fp_gtk_frame_new = dl_symbol("gtk_frame_new");
 
         fp_gtk_adjustment_new = dl_symbol("gtk_adjustment_new");
--- a/src/solaris/native/sun/awt/gtk2_interface.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/awt/gtk2_interface.h	Wed Apr 20 04:38:36 2011 +0100
@@ -750,7 +750,8 @@
 GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, GError **error);
 void (*fp_gtk_widget_destroy)(GtkWidget *widget);
 void (*fp_gtk_window_present)(GtkWindow *window);
-
+void (*fp_gtk_window_move)(GtkWindow *window, gint x, gint y);
+void (*fp_gtk_window_resize)(GtkWindow *window, gint width, gint height);
 
 /**
  * Function Pointers for GtkFileChooser
--- a/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Wed Apr 20 04:38:36 2011 +0100
@@ -102,6 +102,33 @@
     fp_gdk_threads_leave();
 }
 
+/*
+ * Class:     sun_awt_X11_GtkFileDialogPeer
+ * Method:    setBounds
+ * Signature: (IIIII)V
+ */
+JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_setBounds
+(JNIEnv * env, jobject jpeer, jint x, jint y, jint width, jint height, jint op)
+{
+    GtkWindow* dialog;
+
+    fp_gdk_threads_enter();
+
+    dialog = (GtkWindow*)jlong_to_ptr(
+        (*env)->GetLongField(env, jpeer, widgetFieldID));
+
+    if (dialog != NULL) {
+        if (x >= 0 && y >= 0) {
+            fp_gtk_window_move(dialog, (gint)x, (gint)y);
+        }
+        if (width > 0 && height > 0) {
+            fp_gtk_window_resize(dialog, (gint)width, (gint)height);
+        }
+    }
+
+    fp_gdk_threads_leave();
+}
+
 /**
  * Convert a GSList to an array of filenames (without the parent folder)
  */
@@ -175,12 +202,12 @@
 /*
  * Class:     sun_awt_X11_GtkFileDialogPeer
  * Method:    run
- * Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z;)V
+ * Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;ZII)V
  */
 JNIEXPORT void JNICALL
 Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
         jstring jtitle, jint mode, jstring jdir, jstring jfile,
-        jobject jfilter, jboolean multiple)
+        jobject jfilter, jboolean multiple, int x, int y)
 {
     GtkWidget *dialog = NULL;
     GtkFileFilter *filter;
@@ -244,6 +271,14 @@
                 dialog), TRUE);
     }
 
+    /* Set the initial location */
+    if (x >= 0 && y >= 0) {
+        fp_gtk_window_move((GtkWindow*)dialog, (gint)x, (gint)y);
+
+        // NOTE: it doesn't set the initial size for the file chooser
+        // as it seems like the file chooser overrides the size internally
+    }
+
     fp_g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(
             handle_response), jpeer);
 
--- a/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h	Wed Apr 20 04:38:36 2011 +0100
@@ -20,10 +20,10 @@
 /*
  * Class:     sun_awt_X11_GtkFileDialogPeer
  * Method:    run
- * Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z;)V
+ * Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;ZII)V
  */
 JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_run
-(JNIEnv *, jobject, jstring, jint, jstring, jstring, jobject, jboolean);
+(JNIEnv *, jobject, jstring, jint, jstring, jstring, jobject, jboolean, jint, jint);
 
 /*
  * Class:     sun_awt_X11_GtkFileDialogPeer
@@ -41,6 +41,14 @@
 JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
 (JNIEnv *, jobject);
 
+/*
+ * Class:     sun_awt_X11_GtkFileDialogPeer
+ * Method:    setBounds
+ * Signature: (IIIII)V
+ */
+JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_setBounds
+(JNIEnv * env, jobject jpeer, jint x, jint y, jint width, jint height, jint op);
+
 #ifdef __cplusplus
 }
 #endif
--- a/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Wed Apr 20 04:38:36 2011 +0100
@@ -375,6 +375,12 @@
     AWT_LOCK();
 
     xsdo->invalid = JNI_TRUE;
+
+    if (xsdo->xrPic != None) {
+        XRenderFreePicture(awt_display, xsdo->xrPic);
+        xsdo->xrPic = None;
+     }
+
     if (xsdo->isPixmap == JNI_TRUE && xsdo->drawable != 0) {
 #ifdef MITSHM
         if (xsdo->shmPMData.shmSegInfo != NULL) {
@@ -595,15 +601,16 @@
 }
 
 XImage* X11SD_GetSharedImage(X11SDOps *xsdo, jint width, jint height,
-                             jboolean readBits)
+                             jint maxWidth, jint maxHeight, jboolean readBits)
 {
     XImage * retImage = NULL;
     if (cachedXImage != NULL &&
-        X11SD_CachedXImageFits(width, height, xsdo->depth, readBits)) {
-            /* sync so previous data gets flushed */
-            XSync(awt_display, False);
-            retImage = cachedXImage;
-            cachedXImage = (XImage *)NULL;
+        X11SD_CachedXImageFits(width, height, maxWidth, maxHeight,
+                               xsdo->depth, readBits)) {
+        /* sync so previous data gets flushed */
+        XSync(awt_display, False);
+        retImage = cachedXImage;
+        cachedXImage = (XImage *)NULL;
     } else if (width * height * xsdo->depth > 0x10000) {
         retImage = X11SD_CreateSharedImage(xsdo, width, height);
     }
@@ -728,8 +735,8 @@
  * it must be close enough to avoid excessive reading from the screen;
  * otherwise it should just be at least the size requested.
  */
-jboolean X11SD_CachedXImageFits(jint width, jint height, jint depth,
-                                jboolean readBits)
+jboolean X11SD_CachedXImageFits(jint width, jint height, jint maxWidth,
+                                jint maxHeight, jint depth, jboolean readBits)
 {
     /* we assume here that the cached image exists */
     jint imgWidth = cachedXImage->width;
@@ -747,10 +754,14 @@
         return JNI_TRUE;
     }
 
-    if ((imgWidth < width + 64) && (imgHeight < height + 64)) {
+    if ((imgWidth < width + 64) && (imgHeight < height + 64)
+         && imgWidth <= maxWidth && imgHeight <= maxHeight)
+    {
         /* Cached image's width/height shouldn't be more than 64 pixels
          * larger than requested, because the region in XShmGetImage
          * can't be specified and we don't want to read too much.
+         * Furthermore it has to be smaller than maxWidth/Height
+         * so drawables are not read out of bounds.
          */
         return JNI_TRUE;
     }
@@ -1295,7 +1306,7 @@
                                SurfaceDataBounds *bounds,
                                jint lockFlags)
 {
-    int x, y, w, h;
+    int x, y, w, h, maxWidth, maxHeight;
     int scan;
     XImage * img = NULL;
     Drawable drawable;
@@ -1311,10 +1322,31 @@
 
 #ifdef MITSHM
     if (useMitShmExt == CAN_USE_MITSHM) {
-        if (xsdo->isPixmap && readBits) {
-            X11SD_PuntPixmap(xsdo, w, h);
+        if (xsdo->isPixmap) {
+            if (readBits) {
+                X11SD_PuntPixmap(xsdo, w, h);
+            }
+            maxWidth = xsdo->pmWidth;
+            maxHeight = xsdo->pmHeight;
+        } else {
+            XWindowAttributes winAttr;
+            if (XGetWindowAttributes(awt_display,
+                                     (Window) xsdo->drawable, &winAttr) != 0) {
+                maxWidth = winAttr.width;
+                maxHeight = winAttr.height;
+           } else {
+                /* XGWA failed which isn't a good thing. Defaulting to using
+                 * x,y means that after the subtraction of these we will use
+                 * w=0, h=0 which is a reasonable default on such a failure.
+                 */
+                maxWidth = x;
+                maxHeight = y;
+           }
         }
-        img = X11SD_GetSharedImage(xsdo, w, h, readBits);
+        maxWidth -= x;
+        maxHeight -= y;
+
+        img = X11SD_GetSharedImage(xsdo, w, h, maxWidth, maxHeight, readBits);
     }
 #endif /* MITSHM */
     drawable = xsdo->drawable;
--- a/src/solaris/native/sun/java2d/x11/X11SurfaceData.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/java2d/x11/X11SurfaceData.h	Wed Apr 20 04:38:36 2011 +0100
@@ -125,15 +125,21 @@
 #define X11SD_LOCK_BY_SHMEM     4       /* surface locked by ShMemExt */
 
 #ifdef MITSHM
-XImage * X11SD_GetSharedImage       (X11SDOps *xsdo, jint width, jint height, jboolean readBits);
+XImage * X11SD_GetSharedImage       (X11SDOps *xsdo,
+                                     jint width, jint height,
+                                     jint maxWidth, jint maxHeight,
+                                     jboolean readBits);
 XImage * X11SD_CreateSharedImage    (X11SDOps *xsdo, jint width, jint height);
 Drawable X11SD_CreateSharedPixmap   (X11SDOps *xsdo);
 void     X11SD_DropSharedSegment    (XShmSegmentInfo *shminfo);
 void     X11SD_PuntPixmap           (X11SDOps *xsdo, jint width, jint height);
 void     X11SD_UnPuntPixmap         (X11SDOps *xsdo);
-jboolean X11SD_CachedXImageFits     (jint width, jint height, jint depth, jboolean readBits);
+jboolean X11SD_CachedXImageFits     (jint width, jint height,
+                                     jint maxWidth, jint maxHeight,
+                                     jint depth, jboolean readBits);
 XImage * X11SD_GetCachedXImage      (jint width, jint height, jboolean readBits);
 #endif /* MITSHM */
+jint     X11SD_InitWindow(JNIEnv *env, X11SDOps *xsdo);
 void     X11SD_DisposeOrCacheXImage (XImage * image);
 void     X11SD_DisposeXImage(XImage * image);
 void     X11SD_DirectRenderNotify(JNIEnv *env, X11SDOps *xsdo);
--- a/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Wed Apr 20 04:38:36 2011 +0100
@@ -304,23 +304,27 @@
     color.blue = blue;
 
     if (rectCnt <= 256) {
-      xRects = &sRects[0];
+        xRects = &sRects[0];
     } else {
-      xRects = (XRectangle *) malloc(sizeof(XRectangle) * rectCnt);
-      if (xRects == NULL) {
-        return;
-      }
+        xRects = (XRectangle *) malloc(sizeof(XRectangle) * rectCnt);
+        if (xRects == NULL) {
+            return;
+        }
     }
 
-    if ((rects = (jint *) (*env)->GetPrimitiveArrayCritical(env, rectArray, NULL)) == NULL) {
-      return;
+    if ((rects = (jint *)
+         (*env)->GetPrimitiveArrayCritical(env, rectArray, NULL)) == NULL) {
+        if (xRects != &sRects[0]) {
+            free(xRects);
+        }
+        return;
     }
 
     for (i=0; i < rectCnt; i++) {
-      xRects[i].x = rects[i*4 + 0];
-      xRects[i].y = rects[i*4 + 1];
-      xRects[i].width = rects[i*4 + 2];
-      xRects[i].height = rects[i*4 + 3];
+        xRects[i].x = rects[i*4 + 0];
+        xRects[i].y = rects[i*4 + 1];
+        xRects[i].width = rects[i*4 + 2];
+        xRects[i].height = rects[i*4 + 3];
     }
 
     XRenderFillRectangles(awt_display, op,
@@ -328,7 +332,7 @@
 
     (*env)->ReleasePrimitiveArrayCritical(env, rectArray, rects, JNI_ABORT);
     if (xRects != &sRects[0]) {
-      free(xRects);
+        free(xRects);
     }
 }
 
@@ -610,17 +614,30 @@
     Glyph *gid = (Glyph *) malloc(sizeof(Glyph) * glyphCnt);
 
     if (xginfo == NULL || gid == NULL) {
-      return;
+        if (xginfo != NULL) {
+            free(xginfo);
+        }
+        if (gid != NULL) {
+            free(gid);
+        }
+        return;
     }
 
-    if ((glyphInfoPtrs = (jlong *) (*env)->GetPrimitiveArrayCritical(env, glyphInfoPtrsArray, NULL)) == NULL) {
+    if ((glyphInfoPtrs = (jlong *)(*env)->
+        GetPrimitiveArrayCritical(env, glyphInfoPtrsArray, NULL)) == NULL)
+    {
+        free(xginfo);
+        free(gid);
         return;
     }
 
     if ((pixelData = (unsigned char *)
-        (*env)->GetPrimitiveArrayCritical(env, pixelDataArray, NULL)) == NULL) {
+        (*env)->GetPrimitiveArrayCritical(env, pixelDataArray, NULL)) == NULL)
+    {
         (*env)->ReleasePrimitiveArrayCritical(env,
-                                  glyphInfoPtrsArray, glyphInfoPtrs, JNI_ABORT);
+                                glyphInfoPtrsArray, glyphInfoPtrs, JNI_ABORT);
+        free(xginfo);
+        free(gid);
         return;
     }
 
@@ -637,7 +654,7 @@
     }
 
     XRenderAddGlyphs(awt_display, glyphSet, &gid[0], &xginfo[0], glyphCnt,
-                     pixelData, pixelDataLength);
+                     (const char*)pixelData, pixelDataLength);
 
     (*env)->ReleasePrimitiveArrayCritical(env, glyphInfoPtrsArray, glyphInfoPtrs, JNI_ABORT);
     (*env)->ReleasePrimitiveArrayCritical(env, pixelDataArray, pixelData, JNI_ABORT);
@@ -684,22 +701,44 @@
       xelts = &selts[0];
     }else {
       xelts = (XGlyphElt32 *) malloc(sizeof(XGlyphElt32) * eltCnt);
+      if (xelts == NULL) {
+          return;
+      }
     }
 
     if (glyphCnt <= 256) {
       xids = &sids[0];
-    }else {
+    } else {
       xids = (Glyph *) malloc(sizeof(Glyph) * glyphCnt);
+      if (xids == NULL) {
+          if (xelts != &selts[0]) {
+            free(xelts);
+          }
+          return;
+      }
     }
 
-    if ((ids = (jint *) (*env)->GetPrimitiveArrayCritical(env, glyphIDArray, NULL)) == NULL) {
-      return;
+    if ((ids = (jint *)
+         (*env)->GetPrimitiveArrayCritical(env, glyphIDArray, NULL)) == NULL) {
+        if (xelts != &selts[0]) {
+            free(xelts);
+        }
+        if (xids != &sids[0]) {
+            free(xids);
+        }
+        return;
     }
     if ((elts = (jint *)
           (*env)->GetPrimitiveArrayCritical(env, eltArray, NULL)) == NULL) {
         (*env)->ReleasePrimitiveArrayCritical(env,
                                               glyphIDArray, ids, JNI_ABORT);
-      return;
+        if (xelts != &selts[0]) {
+            free(xelts);
+        }
+        if (xids != &sids[0]) {
+            free(xids);
+        }
+        return;
     }
 
     for (i=0; i < glyphCnt; i++) {
@@ -724,11 +763,11 @@
     (*env)->ReleasePrimitiveArrayCritical(env, eltArray, elts, JNI_ABORT);
 
     if (xelts != &selts[0]) {
-      free(xelts);
+        free(xelts);
     }
 
     if (xids != &sids[0]) {
-      free(xids);
+        free(xids);
     }
 }
 
@@ -762,8 +801,12 @@
       }
     }
 
-    if ((rects = (jint *) (*env)->GetPrimitiveArrayCritical(env, rectArray, NULL)) == NULL) {
-      return;
+    if ((rects = (jint*)
+         (*env)->GetPrimitiveArrayCritical(env, rectArray, NULL)) == NULL) {
+        if (xRects != &sRects[0]) {
+            free(xRects);
+        }
+        return;
     }
 
     for (i=0; i < rectCnt; i++) {
--- a/src/solaris/native/sun/java2d/x11/XRSurfaceData.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/java2d/x11/XRSurfaceData.c	Wed Apr 20 04:38:36 2011 +0100
@@ -114,3 +114,26 @@
     XShared_initSurface(env, xsdo, depth, width, height, drawable);
 #endif /* !HEADLESS */
 }
+
+
+
+JNIEXPORT void JNICALL
+Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture(JNIEnv *env, jobject xsd,
+                                                  jlong pXSData)
+{
+#ifndef HEADLESS
+    X11SDOps *xsdo;
+
+    J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_freeXSDOPicture");
+
+    xsdo = X11SurfaceData_GetOps(env, xsd);
+    if (xsdo == NULL) {
+        return;
+    }
+
+    if(xsdo->xrPic != None) {
+       XRenderFreePicture(awt_display, xsdo->xrPic);
+       xsdo->xrPic = None;
+    }
+#endif /* !HEADLESS */
+}
--- a/src/solaris/native/sun/nio/ch/Net.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/nio/ch/Net.c	Wed Apr 20 04:38:36 2011 +0100
@@ -154,6 +154,22 @@
     return (ipv6_available()) ? JNI_TRUE : JNI_FALSE;
 }
 
+JNIEXPORT jboolean JNICALL
+Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0(JNIEnv* env, jclass cl)
+{
+    return JNI_TRUE;
+}
+
+JNIEXPORT jboolean JNICALL
+Java_sun_nio_ch_Net_canJoin6WithIPv4Group0(JNIEnv* env, jclass cl)
+{
+#ifdef __solaris__
+    return JNI_TRUE;
+#else
+    return JNI_FALSE;
+#endif
+}
+
 JNIEXPORT int JNICALL
 Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
                             jboolean stream, jboolean reuse)
--- a/src/solaris/native/sun/xawt/awt_Desktop.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/solaris/native/sun/xawt/awt_Desktop.c	Wed Apr 20 04:38:36 2011 +0100
@@ -48,9 +48,15 @@
     }
     dlerror(); /* Clear errors */
     gnome_vfs_init = (GNOME_VFS_INIT_TYPE*)dlsym(vfs_handle, "gnome_vfs_init");
+    if (gnome_vfs_init == NULL){
+#ifdef INTERNAL_BUILD
+        fprintf(stderr, "dlsym( gnome_vfs_init) returned NULL\n");
+#endif
+        return 0;
+    }
     if ((errmsg = dlerror()) != NULL) {
 #ifdef INTERNAL_BUILD
-        fprintf(stderr, "can not find symble gnome_vfs_init\n");
+        fprintf(stderr, "can not find symbol gnome_vfs_init %s \n", errmsg);
 #endif
         return 0;
     }
--- a/src/windows/classes/sun/awt/windows/WPathGraphics.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/awt/windows/WPathGraphics.java	Wed Apr 20 04:38:36 2011 +0100
@@ -51,9 +51,12 @@
 import java.awt.image.DataBuffer;
 import java.awt.image.IndexColorModel;
 import java.awt.image.WritableRaster;
+import java.awt.image.ComponentSampleModel;
+import java.awt.image.MultiPixelPackedSampleModel;
+import java.awt.image.SampleModel;
+
 import sun.awt.image.ByteComponentRaster;
 import sun.awt.image.BytePackedRaster;
-
 import java.awt.print.PageFormat;
 import java.awt.print.Printable;
 import java.awt.print.PrinterException;
@@ -1272,6 +1275,25 @@
                         return false;
                     }
 
+                    int bitsPerPixel = 24;
+                    SampleModel sm = deepImage.getSampleModel();
+                    if (sm instanceof ComponentSampleModel) {
+                        ComponentSampleModel csm = (ComponentSampleModel)sm;
+                        bitsPerPixel = csm.getPixelStride() * 8;
+                    } else if (sm instanceof MultiPixelPackedSampleModel) {
+                        MultiPixelPackedSampleModel mppsm =
+                            (MultiPixelPackedSampleModel)sm;
+                        bitsPerPixel = mppsm.getPixelBitStride();
+                    } else {
+                        if (icm != null) {
+                            int diw = deepImage.getWidth();
+                            int dih = deepImage.getHeight();
+                            if (diw > 0 && dih > 0) {
+                                bitsPerPixel = data.length*8/diw/dih;
+                            }
+                        }
+                    }
+
                     /* Because the caller's image has been rotated
                      * and sheared into our BufferedImage and because
                      * we will be handing that BufferedImage directly to
@@ -1289,7 +1311,7 @@
                          (float)Math.rint(scaledBounds.height+0.5),
                          0f, 0f,
                          deepImage.getWidth(), deepImage.getHeight(),
-                         icm);
+                         bitsPerPixel, icm);
 
                     setClip(holdClip);
                 }
--- a/src/windows/classes/sun/awt/windows/WPrinterJob.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/awt/windows/WPrinterJob.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1212,13 +1212,14 @@
                                 float destWidth, float destHeight,
                                 float srcX, float srcY,
                                 float srcWidth, float srcHeight,
+                                int sampleBitsPerPixel,
                                 IndexColorModel icm) {
         int bitCount = 24;
         byte[] bmiColors = null;
 
         if (icm != null) {
-            bitCount = icm.getPixelSize();
-            bmiColors = new byte[(1<<bitCount)*4];
+            bitCount = sampleBitsPerPixel;
+            bmiColors = new byte[(1<<icm.getPixelSize())*4];
             for (int i=0;i<icm.getMapSize(); i++) {
                 bmiColors[i*4+0]=(byte)(icm.getBlue(i)&0xff);
                 bmiColors[i*4+1]=(byte)(icm.getGreen(i)&0xff);
--- a/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Wed Apr 20 04:38:36 2011 +0100
@@ -45,6 +45,9 @@
 
     private static final long serialVersionUID = 100L;
 
+    private static final NTLMAuthenticationCallback NTLMAuthCallback =
+        NTLMAuthenticationCallback.getNTLMAuthenticationCallback();
+
     private String hostname;
     private static String defaultDomain; /* Domain to use if not specified by user */
 
@@ -143,6 +146,14 @@
     }
 
     /**
+     * Returns true if the given site is trusted, i.e. we can try
+     * transparent Authentication.
+     */
+    public static boolean isTrustedSite(URL url) {
+        return NTLMAuthCallback.isTrustedSite(url);
+    }
+
+    /**
      * Not supported. Must use the setHeaders() method
      */
     @Override
--- a/src/windows/classes/sun/nio/ch/PendingIoCache.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/nio/ch/PendingIoCache.java	Wed Apr 20 04:38:36 2011 +0100
@@ -110,8 +110,7 @@
             if (closed)
                 return;
 
-            // handle the case that where there are I/O operations that have
-            // not completed.
+            // handle case where I/O operations that have not completed.
             if (!pendingIoMap.isEmpty())
                 clearPendingIoMap();
 
@@ -132,7 +131,9 @@
         closePending = true;
         try {
             this.wait(50);
-        } catch (InterruptedException x) { }
+        } catch (InterruptedException x) {
+            Thread.currentThread().interrupt();
+        }
         closePending = false;
         if (pendingIoMap.isEmpty())
             return;
--- a/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -439,6 +439,7 @@
                 address = ((DirectBuffer)buf).address();
             }
 
+            boolean pending = false;
             try {
                 begin();
 
@@ -449,6 +450,7 @@
                 n = readFile(handle, address, rem, position, overlapped);
                 if (n == IOStatus.UNAVAILABLE) {
                     // I/O is pending
+                    pending = true;
                     return;
                 } else if (n == IOStatus.EOF) {
                     result.setResult(n);
@@ -460,14 +462,15 @@
                 // failed to initiate read
                 result.setFailure(toIOException(x));
             } finally {
+                if (!pending) {
+                    // release resources
+                    if (overlapped != 0L)
+                        ioCache.remove(overlapped);
+                    releaseBufferIfSubstituted();
+                }
                 end();
             }
 
-            // release resources
-            if (overlapped != 0L)
-                ioCache.remove(overlapped);
-            releaseBufferIfSubstituted();
-
             // invoke completion handler
             Invoker.invoke(result);
         }
--- a/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java	Wed Apr 20 04:38:36 2011 +0100
@@ -239,14 +239,14 @@
                     result.setResult(null);
                 }
             } catch (Throwable x) {
+                if (overlapped != 0L)
+                    ioCache.remove(overlapped);
                 exc = x;
             } finally {
                 end();
             }
 
             if (exc != null) {
-                if (overlapped != 0L)
-                    ioCache.remove(overlapped);
                 closeChannel();
                 result.setFailure(toIOException(exc));
             }
--- a/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java	Wed Apr 20 04:38:36 2011 +0100
@@ -157,6 +157,11 @@
         private static final String HIDDEN_NAME = "hidden";
         private static final String ATTRIBUTES_NAME = "attributes";
 
+        // the names of the DOS attribtues (includes basic)
+        static final Set<String> dosAttributeNames =
+            Util.newSet(basicAttributeNames,
+                        READONLY_NAME, ARCHIVE_NAME, SYSTEM_NAME,  HIDDEN_NAME, ATTRIBUTES_NAME);
+
         Dos(WindowsPath file, boolean followLinks) {
             super(file, followLinks);
         }
@@ -193,9 +198,10 @@
         public Map<String,Object> readAttributes(String[] attributes)
             throws IOException
         {
-            AttributesBuilder builder = AttributesBuilder.create(attributes);
+            AttributesBuilder builder =
+                AttributesBuilder.create(dosAttributeNames, attributes);
             WindowsFileAttributes attrs = readAttributes();
-            addBasicAttributesToBuilder(attrs, builder);
+            addRequestedBasicAttributes(attrs, builder);
             if (builder.match(READONLY_NAME))
                 builder.add(READONLY_NAME, attrs.isReadOnly());
             if (builder.match(ARCHIVE_NAME))
--- a/src/windows/classes/sun/nio/fs/WindowsFileStore.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/nio/fs/WindowsFileStore.java	Wed Apr 20 04:38:36 2011 +0100
@@ -201,13 +201,12 @@
         if (!(ob instanceof WindowsFileStore))
             return false;
         WindowsFileStore other = (WindowsFileStore)ob;
-        return this.volInfo.volumeSerialNumber() == other.volInfo.volumeSerialNumber();
+        return root.equals(other.root);
     }
 
     @Override
     public int hashCode() {
-        // reveals VSN without permission check - okay?
-        return volInfo.volumeSerialNumber();
+        return root.hashCode();
     }
 
     @Override
--- a/src/windows/classes/sun/nio/fs/WindowsPath.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/nio/fs/WindowsPath.java	Wed Apr 20 04:38:36 2011 +0100
@@ -646,7 +646,9 @@
 
     @Override
     public boolean startsWith(Path obj) {
-        WindowsPath other = toWindowsPath(obj);
+        if (!(Objects.requireNonNull(obj) instanceof WindowsPath))
+            return false;
+        WindowsPath other = (WindowsPath)obj;
 
         // if this path has a root component the given path's root must match
         if (!this.root.equalsIgnoreCase(other.root)) {
@@ -675,7 +677,9 @@
 
     @Override
     public boolean endsWith(Path obj) {
-        WindowsPath other = toWindowsPath(obj);
+        if (!(Objects.requireNonNull(obj) instanceof WindowsPath))
+            return false;
+        WindowsPath other = (WindowsPath)obj;
 
         // other path is longer
         if (other.path.length() > this.path.length()) {
--- a/src/windows/classes/sun/print/Win32PrintService.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/classes/sun/print/Win32PrintService.java	Wed Apr 20 04:38:36 2011 +0100
@@ -31,6 +31,7 @@
 import java.net.URL;
 
 import java.util.Vector;
+import java.util.HashMap;
 
 import javax.print.DocFlavor;
 import javax.print.DocPrintJob;
@@ -205,6 +206,7 @@
     private MediaPrintableArea[] mediaPrintables;
     private MediaTray[] mediaTrays;
     private PrinterResolution[] printRes;
+    private HashMap mpaMap;
     private int nCopies;
     private int prnCaps;
     private int[] defaultSettings;
@@ -212,6 +214,7 @@
     private boolean gotTrays;
     private boolean gotCopies;
     private boolean mediaInitialized;
+    private boolean mpaListInitialized;
 
     private ArrayList idList;
     private MediaSize[] mediaSizes;
@@ -270,6 +273,20 @@
                 return DMPAPER_B6_JIS;
             }
         }
+
+        // If not found in predefined Windows ID, then we search through
+        // the returned IDs of the driver because they can define their own
+        // unique IDs.
+        initMedia();
+
+        if ((idList != null) && (mediaSizes != null) &&
+            (idList.size() == mediaSizes.length)) {
+            for (int i=0; i< idList.size(); i++) {
+                if (mediaSizes[i].getMediaSizeName() == msn) {
+                    return ((Integer)idList.get(i)).intValue();
+                }
+            }
+        }
         return 0;
     }
 
@@ -380,43 +397,115 @@
             // Add mediaName to the msnList
             if (mediaName != null) {
                 added = addToUniqueList(msnList, mediaName);
-
-                // get MediaPrintableArea only for supported MediaSizeName ?
-                if (added && !queryFailure) {
-                    prnArea=getMediaPrintableArea(printer,
-                                                  ((Integer)idList.get(i)).intValue());
-                    if (prnArea != null) {
-                        try {
-                            MediaPrintableArea mpa =
-                                new MediaPrintableArea(prnArea[0],
-                                                       prnArea[1],
-                                                       prnArea[2],
-                                                       prnArea[3],
-                                                       MediaPrintableArea.INCH);
-                            printableList.add(mpa);
-                        } catch (IllegalArgumentException iae) {
-                        }
-                    } else {
-                        // Calling getMediaPrintableArea causes
-                        // much overhead so if first attempt failed, we should
-                        // just bail out.
-                        if (i==0) {
-                            queryFailure = true;
-                        }
-                    }
-                }
             }
         }
 
         // init mediaSizeNames
         mediaSizeNames = new MediaSizeName[msnList.size()];
         msnList.toArray(mediaSizeNames);
+    }
 
-        // init mediaPrintables
-        mediaPrintables = new MediaPrintableArea[printableList.size()];
-        printableList.toArray(mediaPrintables);
+
+    /*
+     * Gets a list of MediaPrintableAreas using a call to native function.
+     *  msn is MediaSizeName used to get a specific printable area.  If null,
+     *  it will get all the supported MediPrintableAreas.
+     */
+    private synchronized MediaPrintableArea[] getMediaPrintables(MediaSizeName msn)
+    {
+        if (msn == null)  {
+            if (mpaListInitialized == true) {
+                return mediaPrintables;
+            }
+        } else {
+            // get from cached mapping of MPAs
+            if (mpaMap != null && (mpaMap.get(msn) != null)) {
+                MediaPrintableArea[] mpaArr = new MediaPrintableArea[1];
+                mpaArr[0] = (MediaPrintableArea)mpaMap.get(msn);
+                return mpaArr;
+            }
+        }
+
+        initMedia();
+
+        if ((mediaSizeNames == null) && (mediaSizeNames.length == 0)) {
+            return null;
+        }
+
+        MediaSizeName[] loopNames;
+        if (msn != null) {
+            loopNames = new MediaSizeName[1];
+            loopNames[0] = msn;
+        } else {
+            loopNames = mediaSizeNames;
+        }
+
+        if (mpaMap == null) {
+            mpaMap = new HashMap();
+        }
+
+        for (int i=0; i < loopNames.length; i++) {
+            MediaSizeName mediaName = loopNames[i];
+
+            if (mpaMap.get(mediaName) != null) {
+                continue;
+             }
+
+            if (mediaName != null) {
+                int defPaper = findPaperID(mediaName);
+                float[] prnArea = (defPaper != 0) ? getMediaPrintableArea(printer, defPaper) : null;
+                MediaPrintableArea printableArea = null;
+                if (prnArea != null) {
+                    try {
+                        printableArea = new MediaPrintableArea(prnArea[0],
+                                                               prnArea[1],
+                                                               prnArea[2],
+                                                               prnArea[3],
+                                                 MediaPrintableArea.INCH);
+
+                        mpaMap.put(mediaName, printableArea);
+                    }
+                    catch (IllegalArgumentException e) {
+                    }
+                } else {
+                    // if getting  MPA failed, we use MediaSize
+                    MediaSize ms =
+                        MediaSize.getMediaSizeForName((MediaSizeName)mediaName);
+
+                    if (ms != null) {
+                        try {
+                            printableArea = new MediaPrintableArea(0, 0,
+                                                     ms.getX(MediaSize.INCH),
+                                                     ms.getY(MediaSize.INCH),
+                                                     MediaPrintableArea.INCH);
+                            mpaMap.put(mediaName, printableArea);
+                        } catch (IllegalArgumentException e) {
+                        }
+                    }
+                }
+            } //mediaName != null
+        }
+
+       if (mpaMap.size() == 0) {
+           return null;
+       }
+
+       if (msn != null) {
+           if (mpaMap.get(msn) == null) {
+               return null;
+           }
+           MediaPrintableArea[] mpaArr = new MediaPrintableArea[1];
+           // by this time, we've already gotten the desired MPA
+           mpaArr[0] = (MediaPrintableArea)mpaMap.get(msn);
+           return mpaArr;
+       } else {
+           mediaPrintables = (MediaPrintableArea[])mpaMap.values().toArray(new MediaPrintableArea[0]);
+           mpaListInitialized = true;
+           return mediaPrintables;
+       }
     }
 
+
     private synchronized MediaTray[] getMediaTrays() {
         if (gotTrays == true && mediaTrays != null) {
             return mediaTrays;
@@ -626,7 +715,7 @@
 
     private boolean isSupportedMediaPrintableArea(MediaPrintableArea mpa) {
 
-        initMedia();
+        getMediaPrintables(null);
 
         if (mediaPrintables != null) {
             for (int i=0; i<mediaPrintables.length; i++) {
@@ -1250,57 +1339,32 @@
             }
             if (trays != null) {
                 System.arraycopy(trays, 0, arr,
-                                 mediaSizeNames.length, trays.length);
+                                 len - trays.length, trays.length);
             }
             return arr;
         } else if (category == MediaPrintableArea.class) {
-            initMedia();
-
-            if (mediaPrintables == null) {
-                return null;
-            }
-
             // if getting printable area for a specific media size
-            Media mediaName;
+            Media mediaName = null;
             if ((attributes != null) &&
                 ((mediaName =
                   (Media)attributes.get(Media.class)) != null)) {
 
-                if (mediaName instanceof MediaSizeName) {
-                    MediaPrintableArea []arr = new MediaPrintableArea[1];
-
-                    if (mediaSizeNames.length == mediaPrintables.length) {
-
-                        for (int j=0; j < mediaSizeNames.length; j++) {
-
-                            if (mediaName.equals(mediaSizeNames[j])) {
-                                arr[0] = mediaPrintables[j];
-                                return arr;
-                            }
-                        }
-                    }
-
-                    MediaSize ms =
-                      MediaSize.getMediaSizeForName((MediaSizeName)mediaName);
-
-                    if (ms != null) {
-                        arr[0] = new MediaPrintableArea(0, 0,
-                                                        ms.getX(MediaSize.INCH),
-                                                        ms.getY(MediaSize.INCH),
-                                                        MediaPrintableArea.INCH);
-                        return arr;
-                    } else {
-                        return null;
-                    }
+                if (!(mediaName instanceof MediaSizeName)) {
+                    // if an instance of MediaTray, fall thru returning
+                    // all MediaPrintableAreas
+                    mediaName = null;
                 }
-                // else an instance of MediaTray, fall thru returning
-                // all MediaPrintableAreas
             }
 
-            MediaPrintableArea []arr =
-                new MediaPrintableArea[mediaPrintables.length];
-            System.arraycopy(mediaPrintables, 0, arr, 0, mediaPrintables.length);
-            return arr;
+            MediaPrintableArea[] mpas =
+                                  getMediaPrintables((MediaSizeName)mediaName);
+            if (mpas != null) {
+                MediaPrintableArea[] arr = new MediaPrintableArea[mpas.length];
+                System.arraycopy(mpas, 0, arr, 0, mpas.length);
+                return arr;
+            } else {
+                return null;
+            }
         } else if (category == SunAlternateMedia.class) {
             return new SunAlternateMedia(
                               (Media)getDefaultAttributeValue(Media.class));
--- a/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -107,8 +107,16 @@
         // could retain their own DIB info and we would not need to
         // recreate it every time.
 
+        // GetRasInfo implicitly calls GetPrimitiveArrayCritical
+        // and since GetDC uses JNI it needs to be called first.
+        HDC hDC = dstOps->GetDC(env, dstOps, 0, NULL, clip, NULL, 0);
+        if (hDC == NULL) {
+            SurfaceData_InvokeUnlock(env, srcOps, &srcInfo);
+            return;
+        }
         srcOps->GetRasInfo(env, srcOps, &srcInfo);
         if (srcInfo.rasBase == NULL) {
+            dstOps->ReleaseDC(env, dstOps, hDC);
             SurfaceData_InvokeUnlock(env, srcOps, &srcInfo);
             return;
         }
@@ -174,13 +182,6 @@
             bmi.colors.dwMasks[2] = bmask;
         }
 
-        HDC hDC = dstOps->GetDC(env, dstOps, 0, NULL, clip, NULL, 0);
-        if (hDC == NULL) {
-            SurfaceData_InvokeRelease(env, srcOps, &srcInfo);
-            SurfaceData_InvokeUnlock(env, srcOps, &srcInfo);
-            return;
-        }
-
         if (fastBlt) {
             // Window could go away at any time, leaving bits on the screen
             // from this GDI call, so make sure window still exists
--- a/src/windows/native/sun/nio/ch/Net.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/nio/ch/Net.c	Wed Apr 20 04:38:36 2011 +0100
@@ -100,6 +100,18 @@
     return JNI_FALSE;
 }
 
+JNIEXPORT jboolean JNICALL
+Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0(JNIEnv* env, jclass cl)
+{
+    return JNI_FALSE;
+}
+
+JNIEXPORT jboolean JNICALL
+Java_sun_nio_ch_Net_canJoin6WithIPv4Group0(JNIEnv* env, jclass cl)
+{
+    return JNI_FALSE;
+}
+
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
                             jboolean stream, jboolean reuse)
--- a/src/windows/native/sun/security/krb5/NativeCreds.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/security/krb5/NativeCreds.c	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -1032,12 +1032,12 @@
         // XXX Cannot use %02.2ld, because the leading 0 is ignored for integers.
         // So, print them to strings, and then print them to the master string with a
         // format pattern that makes it two digits and prefix with a 0 if necessary.
-        swprintf( (wchar_t *)month, L"%2.2d", systemTime.wMonth);
-        swprintf( (wchar_t *)day, L"%2.2d", systemTime.wDay);
-        swprintf( (wchar_t *)hour, L"%2.2d", systemTime.wHour);
-        swprintf( (wchar_t *)minute, L"%2.2d", systemTime.wMinute);
-        swprintf( (wchar_t *)second, L"%2.2d", systemTime.wSecond);
-        swprintf( (wchar_t *)timeString,
+        swprintf( (wchar_t *)month, 3, L"%2.2d", systemTime.wMonth);
+        swprintf( (wchar_t *)day, 3, L"%2.2d", systemTime.wDay);
+        swprintf( (wchar_t *)hour, 3, L"%2.2d", systemTime.wHour);
+        swprintf( (wchar_t *)minute, 3, L"%2.2d", systemTime.wMinute);
+        swprintf( (wchar_t *)second, 3, L"%2.2d", systemTime.wSecond);
+        swprintf( (wchar_t *)timeString, 16,
                 L"%ld%02.2s%02.2s%02.2s%02.2s%02.2sZ",
                 systemTime.wYear,
                 month,
--- a/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -173,24 +173,45 @@
 JNIEXPORT jlong JNICALL Java_sun_tools_attach_WindowsVirtualMachine_openProcess
   (JNIEnv *env, jclass cls, jint pid)
 {
-    HANDLE hProcess;
+    HANDLE hProcess = NULL;
 
-    /*
-     * Attempt to open process. If it fails then we try to enable the
-     * SE_DEBUG_NAME privilege and retry.
-     */
-    hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
-    if (hProcess == NULL && GetLastError() == ERROR_ACCESS_DENIED) {
-        hProcess = doPrivilegedOpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
+    if (pid == (jint) GetCurrentProcessId()) {
+        /* process is attaching to itself; get a pseudo handle instead */
+        hProcess = GetCurrentProcess();
+        /* duplicate the pseudo handle so it can be used in more contexts */
+        if (DuplicateHandle(hProcess, hProcess, hProcess, &hProcess,
+                PROCESS_ALL_ACCESS, FALSE, 0) == 0) {
+            /*
+             * Could not duplicate the handle which isn't a good sign,
+             * but we'll try again with OpenProcess() below.
+             */
+            hProcess = NULL;
+        }
     }
 
     if (hProcess == NULL) {
-        if (GetLastError() == ERROR_INVALID_PARAMETER) {
-            JNU_ThrowIOException(env, "no such process");
-        } else {
-            JNU_ThrowIOExceptionWithLastError(env, "OpenProcess failed");
+        /*
+         * Attempt to open process. If it fails then we try to enable the
+         * SE_DEBUG_NAME privilege and retry.
+         */
+        hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
+        if (hProcess == NULL && GetLastError() == ERROR_ACCESS_DENIED) {
+            hProcess = doPrivilegedOpenProcess(PROCESS_ALL_ACCESS, FALSE,
+                           (DWORD)pid);
         }
-        return (jlong)0;
+
+        if (hProcess == NULL) {
+            if (GetLastError() == ERROR_INVALID_PARAMETER) {
+                JNU_ThrowIOException(env, "no such process");
+            } else {
+                char err_mesg[255];
+                /* include the last error in the default detail message */
+                sprintf(err_mesg, "OpenProcess(pid=%d) failed; LastError=0x%x",
+                    (int)pid, (int)GetLastError());
+                JNU_ThrowIOExceptionWithLastError(env, err_mesg);
+            }
+            return (jlong)0;
+        }
     }
 
     /*
--- a/src/windows/native/sun/windows/awt_Frame.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/windows/awt_Frame.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -109,7 +109,6 @@
     m_isMenuDropped = FALSE;
     m_isInputMethodWindow = FALSE;
     m_isUndecorated = FALSE;
-    m_proxyFocusOwner = NULL;
     m_lastProxiedFocusOwner = NULL;
     m_actualFocusedWindow = NULL;
     m_iconic = FALSE;
@@ -127,7 +126,6 @@
 
 void AwtFrame::Dispose()
 {
-    DestroyProxyFocusOwner();
     AwtWindow::Dispose();
 }
 
@@ -308,22 +306,9 @@
     return frame;
 }
 
-LRESULT CALLBACK AwtFrame::ProxyWindowProc(HWND hwnd, UINT message,
-                                           WPARAM wParam, LPARAM lParam)
+LRESULT AwtFrame::ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, MsgRouting &mr)
 {
-    TRY;
-
-    DASSERT(::IsWindow(hwnd));
-
-    AwtFrame *parent = (AwtFrame *)
-        AwtComponent::GetComponentImpl(::GetParent(hwnd));
-
-    if (!parent || parent->GetProxyFocusOwner() != hwnd ||
-        message == AwtComponent::WmAwtIsComponent ||
-        message == WM_GETOBJECT)
-    {
-        return ComCtl32Util::GetInstance().DefWindowProc(NULL, hwnd, message, wParam, lParam);
-    }
+    LRESULT retValue = 0L;
 
     AwtComponent *focusOwner = NULL;
     // IME and input language related messages need to be sent to a window
@@ -346,19 +331,23 @@
         // TODO: when a Choice's list is dropped down and we're scrolling in
         // the list WM_MOUSEWHEEL messages come to the poxy, not to the list. Why?
         case WM_MOUSEWHEEL:
-            focusOwner = AwtComponent::GetComponent(parent->GetLastProxiedFocusOwner());
-            if  (focusOwner != NULL) {
-                return focusOwner->WindowProc(message, wParam, lParam);
+            focusOwner = AwtComponent::GetComponent(GetLastProxiedFocusOwner());
+            if  (focusOwner != NULL &&
+                 focusOwner != this) // avoid recursive calls
+            {
+                 retValue = focusOwner->WindowProc(message, wParam, lParam);
+                 mr = mrConsume;
             }
             break;
         case WM_SETFOCUS:
-            if (!sm_suppressFocusAndActivation && parent->IsEmbeddedFrame()) {
-                parent->AwtSetActiveWindow();
+            if (!sm_suppressFocusAndActivation && IsEmbeddedFrame()) {
+                AwtSetActiveWindow();
             }
-            return 0;
+            mr = mrConsume;
+            break;
         case WM_KILLFOCUS:
-            if (!sm_suppressFocusAndActivation && parent->IsEmbeddedFrame()) {
-                AwtWindow::SynthesizeWmActivate(FALSE, parent->GetHWnd(), NULL);
+            if (!sm_suppressFocusAndActivation && IsEmbeddedFrame()) {
+                AwtWindow::SynthesizeWmActivate(FALSE, GetHWnd(), NULL);
 
             } else if (sm_restoreFocusAndActivation) {
                 if (AwtComponent::GetFocusedWindow() != NULL) {
@@ -369,64 +358,28 @@
                     }
                 }
             }
-            return 0;
+            mr = mrConsume;
+            break;
         case 0x0127: // WM_CHANGEUISTATE
         case 0x0128: // WM_UPDATEUISTATE
-            return 0;
+            mr = mrConsume;
+            break;
     }
-    return parent->WindowProc(message, wParam, lParam);
-
-    CATCH_BAD_ALLOC_RET(0);
-}
 
-void AwtFrame::CreateProxyFocusOwner()
-{
-    if (AwtToolkit::IsMainThread()) {
-        AwtFrame::_CreateProxyFocusOwner((void *)this);
-    } else {
-        AwtToolkit::GetInstance().InvokeFunction(AwtFrame::_CreateProxyFocusOwner, (void *)this);
-    }
+    return retValue;
 }
 
-void AwtFrame::_CreateProxyFocusOwner(void *param)
-{
-    DASSERT(AwtToolkit::IsMainThread());
-
-    AwtFrame *f = (AwtFrame *)param;
-    DASSERT(f->m_proxyFocusOwner == NULL);
-
-    f->m_proxyFocusOwner = ::CreateWindow(TEXT("STATIC"),
-                                          TEXT("ProxyFocusOwner"),
-                                          WS_CHILD,
-                                          0, 0, 0, 0, f->GetHWnd(), NULL,
-                                          AwtToolkit::GetInstance().
-                                          GetModuleHandle(),
-                                          NULL);
-
-    f->m_proxyDefWindowProc = ComCtl32Util::GetInstance().SubclassHWND(f->m_proxyFocusOwner, ProxyWindowProc);
-}
-
-void AwtFrame::DestroyProxyFocusOwner()
+LRESULT AwtFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
 {
-    // proxy focus owner must be destroyed on toolkit thread only
-    if (AwtToolkit::IsMainThread()) {
-        AwtFrame::_DestroyProxyFocusOwner((void *)this);
-    } else {
-        AwtToolkit::GetInstance().InvokeFunction(AwtFrame::_DestroyProxyFocusOwner, (void *)this);
-    }
-}
+    MsgRouting mr = mrDoDefault;
+    LRESULT retValue = 0L;
+
+    retValue = ProxyWindowProc(message, wParam, lParam, mr);
 
-void AwtFrame::_DestroyProxyFocusOwner(void *param)
-{
-    DASSERT(AwtToolkit::IsMainThread());
-
-    AwtFrame *f = (AwtFrame *)param;
-    if (f->m_proxyFocusOwner != NULL) {
-        HWND toDestroy = f->m_proxyFocusOwner;
-        f->m_proxyFocusOwner = NULL;
-        ComCtl32Util::GetInstance().UnsubclassHWND(toDestroy, ProxyWindowProc, f->m_proxyDefWindowProc);
-        ::DestroyWindow(toDestroy);
+    if (mr != mrConsume) {
+        retValue = AwtWindow::WindowProc(message, wParam, lParam);
     }
+    return retValue;
 }
 
 MsgRouting AwtFrame::WmShowWindow(BOOL show, UINT status)
--- a/src/windows/native/sun/windows/awt_Frame.h	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/windows/awt_Frame.h	Wed Apr 20 04:38:36 2011 +0100
@@ -96,6 +96,8 @@
     AwtMenuBar* GetMenuBar();
     void SetMenuBar(AwtMenuBar*);
 
+    virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
+
     MsgRouting WmGetMinMaxInfo(LPMINMAXINFO lpmmi);
     MsgRouting WmSize(UINT type, int w, int h);
     MsgRouting WmActivate(UINT nState, BOOL fMinimized, HWND opposite);
@@ -117,10 +119,7 @@
     INLINE BOOL IsUndecorated() { return m_isUndecorated; }
 
     INLINE HWND GetProxyFocusOwner() {
-        if (m_proxyFocusOwner == NULL) {
-            CreateProxyFocusOwner();
-        }
-        return m_proxyFocusOwner;
+        return GetHWnd();
     }
 
     void SetMaximizedBounds(int x, int y, int w, int h);
@@ -159,15 +158,7 @@
     BOOL m_isUndecorated;
 
 private:
-    static LRESULT CALLBACK ProxyWindowProc(HWND hwnd, UINT message,
-                                            WPARAM wParam, LPARAM lParam);
-    void CreateProxyFocusOwner();
-    void DestroyProxyFocusOwner();
-
-    /* creates proxy focus owner, called on Toolkit thread */
-    static void _CreateProxyFocusOwner(void *param);
-    /* destroys proxy focus owner, called on Toolkit thread */
-    static void _DestroyProxyFocusOwner(void *param);
+    LRESULT ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, MsgRouting &mr);
 
     /* The frame's embedding parent (if any) */
     HWND m_parentWnd;
@@ -188,10 +179,6 @@
     /* The frame is an InputMethodWindow */
     BOOL m_isInputMethodWindow;
 
-    /* Receives all keyboard input when an AwtWindow which is not an AwtFrame
-       or an AwtDialog (or one of its children) has the logical input focus. */
-    HWND m_proxyFocusOwner;
-
     /* Retains the last/current sm_focusOwner proxied. Actually, it should be
      * a component of an owned window last/currently active. */
     HWND m_lastProxiedFocusOwner;
--- a/src/windows/native/sun/windows/awt_PrintJob.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/windows/awt_PrintJob.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -3699,7 +3699,9 @@
                            double* newWid, double *newHgt,
                            WORD* paperSize) {
 
-    const double epsilon = 0.50;
+    // Tolerated differences in comparing page dimensions between passed in
+    // "orig" media with that of Windows' device.
+    const double epsilon = 3.6; // (1/72) of an inch
     const double tolerance = (1.0 * 72.0);  // # inches * 72
 
     *newWid = origWid;
--- a/src/windows/native/sun/windows/awt_TrayIcon.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/windows/awt_TrayIcon.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -200,10 +200,9 @@
             m_nid.cbSize = (BYTE *)(&m_nid.guidItem) - (BYTE *)(&m_nid.cbSize);
             break;
         case 6: // WIN_XP
-            // Uncomment these two lines when moving to VS2008
-//            m_nid.cbSize = (BYTE *)(&m_nid.hBalloonIcon) - (BYTE *)(&m_nid.cbSize);
-//            break;
-        default: // WIN_VISTA?
+            m_nid.cbSize = (BYTE *)(&m_nid.hBalloonIcon) - (BYTE *)(&m_nid.cbSize);
+            break;
+        default: // WIN_VISTA
             m_nid.cbSize = sizeof(m_nid);
             break;
     }
--- a/src/windows/native/sun/windows/awt_Window.cpp	Mon Nov 01 11:32:50 2010 -0400
+++ b/src/windows/native/sun/windows/awt_Window.cpp	Wed Apr 20 04:38:36 2011 +0100
@@ -221,6 +221,8 @@
 
     m_windowType = NORMAL;
     m_alwaysOnTop = false;
+
+    fullScreenExclusiveModeState = FALSE;
 }
 
 AwtWindow::~AwtWindow()
--- a/test/Makefile	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/Makefile	Wed Apr 20 04:38:36 2011 +0100
@@ -399,12 +399,12 @@
 endef
 # Running batches of tests with or without samevm
 define RunSamevmBatch
-$(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)"
-$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true  UNIQUE_DIR=$@ jtreg_tests
+$(ECHO) "Running tests in samevm mode: $?"
+$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=true  UNIQUE_DIR=$@ jtreg_tests
 endef
 define RunOthervmBatch
-$(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)"
-$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
+$(ECHO) "Running tests in othervm mode: $?"
+$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
 endef
 define SummaryInfo
 $(ECHO) "########################################################"
@@ -420,27 +420,29 @@
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has problems, and doesn't help performance as much as others.
 JDK_ALL_TARGETS += jdk_awt
-jdk_awt: com/sun/awt java/awt sun/awt
+jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt)
 	$(call RunOthervmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_beans1
-jdk_beans1: java/beans/beancontext java/beans/PropertyChangeSupport \
+jdk_beans1: $(call TestDirs, \
+            java/beans/beancontext java/beans/PropertyChangeSupport \
             java/beans/Introspector java/beans/Performance \
-            java/beans/VetoableChangeSupport java/beans/Statement
+            java/beans/VetoableChangeSupport java/beans/Statement)
 	$(call RunSamevmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_beans2
-jdk_beans2: java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
-            java/beans/PropertyEditor
+jdk_beans2: $(call TestDirs, \
+            java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
+            java/beans/PropertyEditor)
 	$(call RunOthervmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_beans3
-jdk_beans3: java/beans/XMLEncoder
+jdk_beans3: $(call TestDirs, java/beans/XMLEncoder)
 	$(call RunOthervmBatch)
 
 # All beans tests
@@ -449,24 +451,24 @@
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_io
-jdk_io: java/io
+jdk_io: $(call TestDirs, java/io)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_lang
-jdk_lang: java/lang
+jdk_lang: $(call TestDirs, java/lang)
 	$(call RunSamevmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_management1
-jdk_management1: javax/management
+jdk_management1: $(call TestDirs, javax/management)
 	$(call RunOthervmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_management2
-jdk_management2: com/sun/jmx com/sun/management sun/management
+jdk_management2: $(call TestDirs, com/sun/jmx com/sun/management sun/management)
 	$(call RunOthervmBatch)
 
 # All management tests
@@ -475,36 +477,37 @@
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_math
-jdk_math: java/math
+jdk_math: $(call TestDirs, java/math)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_misc
-jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
+jdk_misc: $(call TestDirs, \
+          demo javax/imageio javax/naming javax/print javax/script \
           javax/smartcardio javax/sound com/sun/java com/sun/jndi \
-	  com/sun/org sun/misc sun/pisces
+	  com/sun/org com/sun/xml sun/misc sun/pisces)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_net
-jdk_net: com/sun/net java/net sun/net
+jdk_net: $(call TestDirs, com/sun/net java/net sun/net)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_nio1
-jdk_nio1: java/nio/file
+jdk_nio1: $(call TestDirs, java/nio/file)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_nio2
-jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
-          java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer
+jdk_nio2: $(call TestDirs, java/nio/Buffer java/nio/ByteOrder \
+          java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer)
 	$(call SharedLibraryPermissions,java/nio/channels)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_nio3
-jdk_nio3: com/sun/nio sun/nio
+jdk_nio3: $(call TestDirs, com/sun/nio sun/nio)
 	$(call RunSamevmBatch)
 
 # All nio tests
@@ -514,24 +517,25 @@
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_rmi
-jdk_rmi: java/rmi javax/rmi sun/rmi
+jdk_rmi: $(call TestDirs, java/rmi javax/rmi sun/rmi)
 	$(call RunOthervmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_security1
-jdk_security1: java/security
+jdk_security1: $(call TestDirs, java/security)
 	$(call RunSamevmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_security2
-jdk_security2: javax/crypto com/sun/crypto
+jdk_security2: $(call TestDirs, javax/crypto com/sun/crypto)
 	$(call RunOthervmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_security3
-jdk_security3: com/sun/security lib/security javax/security sun/security
+jdk_security3: $(call TestDirs, com/sun/security lib/security \
+               javax/security sun/security)
 	$(call SharedLibraryPermissions,sun/security)
 	$(call RunOthervmBatch)
 
@@ -542,23 +546,25 @@
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has problems, and doesn't help performance as much as others.
 JDK_ALL_TARGETS += jdk_swing
-jdk_swing: javax/swing sun/java2d
+jdk_swing: $(call TestDirs, javax/swing sun/java2d)
 	$(call RunOthervmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_text
-jdk_text: java/text sun/text
+jdk_text: $(call TestDirs, java/text sun/text)
 	$(call RunSamevmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_tools1
-jdk_tools1: com/sun/jdi
+jdk_tools1: $(call TestDirs, com/sun/jdi)
 	$(call RunSamevmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has serious problems with these tests
 JDK_ALL_TARGETS += jdk_tools2
-jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
+jdk_tools2: $(call TestDirs, \
+            com/sun/tools sun/jvmstat sun/tools tools vm \
+            com/sun/servicetag com/sun/tracing)
 	$(call SharedLibraryPermissions,tools/launcher)
 	$(call RunSamevmBatch)
 
@@ -568,7 +574,7 @@
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_util
-jdk_util: java/util sun/util
+jdk_util: $(call TestDirs, java/util sun/util)
 	$(call RunSamevmBatch)
 
 # ------------------------------------------------------------------
--- a/test/ProblemList.txt	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/ProblemList.txt	Wed Apr 20 04:38:36 2011 +0100
@@ -41,14 +41,14 @@
 #
 # Shell tests are othervm by default.
 #
-# List items  are testnames followed by labels, all MUST BE commented 
+# List items  are testnames followed by labels, all MUST BE commented
 #   as to why they are here and use a label:
 #     generic-all	Problems on all platforms
 #     generic-ARCH	Where ARCH is one of: sparc, sparcv9, x64, i586, etc.
 #     OSNAME-all	Where OSNAME is one of: solaris, linux, windows
 #     OSNAME-ARCH	Specific on to one OSNAME and ARCH, e.g. solaris-x64
 #     OSNAME-REV	Specific on to one OSNAME and REV, e.g. solaris-5.8
-#	 
+#
 # More than one label is allowed but must be on the same line.
 #
 #############################################################################
@@ -234,7 +234,7 @@
 # Linux 32bit Fedora 9, IllegalStateException
 javax/management/monitor/RuntimeExceptionTest.java		generic-all
 
-# Problems with rmi connection, othervm  
+# Problems with rmi connection, othervm
 javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java generic-all
 
 # Fails with port already in use
@@ -380,30 +380,9 @@
 
 # jdk_nio
 
-# 6944810
-java/nio/channels/FileChannel/ReleaseOnCloseDeadlock.java       windows-all
-
 # 6963118
 java/nio/channels/Selector/Wakeup.java                          windows-all
 
-# The asynchronous I/O implementation on Windows requires Windows XP or newer.
-# We can remove the following once all Windows 2000 machines have been
-# decommissioned.
-java/nio/channels/AsynchronousChannelGroup/Basic.java           windows-5.0
-java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java      windows-5.0
-java/nio/channels/AsynchronousChannelGroup/Identity.java        windows-5.0
-java/nio/channels/AsynchronousChannelGroup/Restart.java         windows-5.0
-java/nio/channels/AsynchronousChannelGroup/Unbounded.java       windows-5.0
-java/nio/channels/AsynchronousDatagramChannel/Basic.java        windows-5.0
-java/nio/channels/AsynchronousFileChannel/Lock.java             windows-5.0
-java/nio/channels/AsynchronousServerSocketChannel/Basic.java    windows-5.0
-java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java windows-5.0
-java/nio/channels/AsynchronousSocketChannel/Basic.java          windows-5.0
-java/nio/channels/AsynchronousSocketChannel/DieBeforeComplete.java windows-5.0
-java/nio/channels/AsynchronousSocketChannel/Leaky.java          windows-5.0
-java/nio/channels/AsynchronousSocketChannel/StressLoopback.java windows-5.0
-java/nio/channels/Channels/Basic2.java                          windows-5.0
-
 # 6959891
 com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
 
@@ -411,7 +390,7 @@
 com/sun/nio/sctp/SctpChannel/Send.java				generic-all
 com/sun/nio/sctp/SctpChannel/Shutdown.java			generic-all
 
-# Fails on OpenSolaris, IllegalStateException: Cannot add or remove addresses 
+# Fails on OpenSolaris, IllegalStateException: Cannot add or remove addresses
 #    from a channel that is bound to the wildcard address
 com/sun/nio/sctp/SctpChannel/Bind.java				generic-all
 
@@ -456,10 +435,10 @@
 java/rmi/server/RemoteServer/AddrInUse.java			generic-all
 
 # Connection error on Windows i586 -server
-#  Also connection errors in othervm on Solaris 10 sparc, same port??? 
+#  Also connection errors in othervm on Solaris 10 sparc, same port???
 sun/rmi/transport/tcp/DeadCachedConnection.java 	 	generic-all
 
-# Connection errors in othervm on Solaris 10 sparc, same port??? 
+# Connection errors in othervm on Solaris 10 sparc, same port???
 java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java generic-all
 java/rmi/activation/Activatable/checkAnnotations/CheckAnnotations.java generic-all
 java/rmi/activation/Activatable/checkImplClassLoader/CheckImplClassLoader.java generic-all
@@ -532,7 +511,7 @@
 java/security/Security/SynchronizedAccess.java			generic-all
 
 # Failing on Solaris X64 (-d64 -server) with:
-#  GSSException: Failure unspecified at GSS-API level 
+#  GSSException: Failure unspecified at GSS-API level
 #    (Mechanism level: Specified version of key is not available (44))
 sun/security/krb5/auto/BasicKrb5Test.java			generic-all
 
@@ -546,14 +525,14 @@
 sun/security/krb5/auto/HttpNegotiateServer.java			generic-all
 
 # Fails on almost all platforms
-#   java.lang.UnsupportedClassVersionError: SerialTest : 
+#   java.lang.UnsupportedClassVersionError: SerialTest :
 #      Unsupported major.minor version 51.0
 #    at java.lang.ClassLoader.defineClass1(Native Method)
 sun/security/util/Oid/S11N.sh					generic-all
 
 # Fails on Fedora 9 32bit
-#  GSSException: Failure unspecified at GSS-API level (Mechanism level: 
-#    Invalid argument (400) - Cannot find key of appropriate type to decrypt 
+#  GSSException: Failure unspecified at GSS-API level (Mechanism level:
+#    Invalid argument (400) - Cannot find key of appropriate type to decrypt
 #    AP REP - DES CBC mode with MD5)
 #  at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:778)
 sun/security/krb5/auto/NonMutualSpnego.java			generic-all
@@ -625,9 +604,6 @@
 # Timeout on solaris-sparcv9 or exception thrown
 com/sun/crypto/provider/Cipher/RSA/TestOAEP_KAT.java	 	solaris-all
 
-# File 6535697.test input stream left open? windows samevm
-java/security/cert/CertificateFactory/openssl/OpenSSLCert.java	generic-all
-
 # Leaving file open: SerialVersion.current, windows samevm
 java/security/BasicPermission/SerialVersion.java		generic-all
 
@@ -673,7 +649,7 @@
 # Timeout on solaris-sparc and i586 and x64, -client and -server
 sun/security/ssl/com/sun/net/ssl/internal/ssl/InputRecord/InterruptedIO.java solaris-all
 
-# Do not seem to run on windows machines? dll missing? 
+# Do not seem to run on windows machines? dll missing?
 sun/security/tools/jarsigner/emptymanifest.sh		 	windows-all
 
 # Files does not exist or no encoding? solaris-sparcv9
@@ -717,6 +693,7 @@
 # Filed 6933803
 java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java	generic-all
 
+# Filed 7022325
 # Fails with assertion error on windows
 #   11 separate stacktraces created... file reuse problem?
 java/util/zip/ZipFile/ReadLongZipFileName.java			generic-all
@@ -734,8 +711,5 @@
 # Problems on windows, jmap.exe hangs? (these run jmap), fails on Solaris 10 x86
 java/util/concurrent/locks/Lock/TimedAcquireLeak.java		generic-all
 
-# Fails on solaris-sparc -server (Set not equal to copy. 1)
-java/util/EnumSet/EnumSetBash.java			 	solaris-sparc
-
 ############################################################################
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jndi/ldap/NoWaitForReplyTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2011, 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 6748156
+ * @summary add an new JNDI property to control the boolean flag WaitForReply
+ */
+
+import java.net.Socket;
+import java.net.ServerSocket;
+import java.io.*;
+import javax.naming.*;
+import javax.naming.directory.*;
+import java.util.Hashtable;
+
+public class NoWaitForReplyTest {
+
+    public static void main(String[] args) throws Exception {
+
+        boolean passed = false;
+
+        // start the LDAP server
+        DummyServer ldapServer = new DummyServer();
+        ldapServer.start();
+
+        // Set up the environment for creating the initial context
+        Hashtable env = new Hashtable(11);
+        env.put(Context.PROVIDER_URL, "ldap://localhost:" +
+            ldapServer.getPortNumber());
+        env.put(Context.INITIAL_CONTEXT_FACTORY,
+            "com.sun.jndi.ldap.LdapCtxFactory");
+
+        // Wait up to 10 seconds for a response from the LDAP server
+        env.put("com.sun.jndi.ldap.read.timeout", "10000");
+
+        // Don't wait until the first search reply is received
+        env.put("com.sun.jndi.ldap.search.waitForReply", "false");
+
+        // Send the LDAP search request without first authenticating (no bind)
+        env.put("java.naming.ldap.version", "3");
+
+
+        try {
+
+            // Create initial context
+            System.out.println("Client: connecting to the server");
+            DirContext ctx = new InitialDirContext(env);
+
+            SearchControls scl = new SearchControls();
+            scl.setSearchScope(SearchControls.SUBTREE_SCOPE);
+            System.out.println("Client: performing search");
+            NamingEnumeration answer =
+            ctx.search("ou=People,o=JNDITutorial", "(objectClass=*)", scl);
+
+            // Server will never reply: either we waited in the call above until
+            // the timeout (fail) or we did not wait and reached here (pass).
+            passed = true;
+            System.out.println("Client: did not wait until first reply");
+
+            // Close the context when we're done
+            ctx.close();
+
+        } catch (NamingException e) {
+            // timeout (ignore)
+        }
+        ldapServer.interrupt();
+
+        if (!passed) {
+            throw new Exception(
+                "Test FAILED: should not have waited until first search reply");
+        }
+        System.out.println("Test PASSED");
+    }
+
+    static class DummyServer extends Thread {
+
+        private final ServerSocket serverSocket;
+
+        DummyServer() throws IOException {
+            this.serverSocket = new ServerSocket(0);
+            System.out.println("Server: listening on port " + serverSocket.getLocalPort());
+        }
+
+        public int getPortNumber() {
+            return serverSocket.getLocalPort();
+        }
+
+        public void run() {
+            try (Socket socket = serverSocket.accept()) {
+                System.out.println("Server: accepted a connection");
+                InputStream in = socket.getInputStream();
+
+                while (!isInterrupted()) {
+                   in.skip(in.available());
+                }
+
+            } catch (Exception e) {
+                // ignore
+
+            } finally {
+                System.out.println("Server: shutting down");
+                try {
+                    serverSocket.close();
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+        }
+    }
+}
--- a/test/demo/zipfs/ZipFSTester.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/demo/zipfs/ZipFSTester.java	Wed Apr 20 04:38:36 2011 +0100
@@ -105,6 +105,18 @@
             os.write(bits);
             os.close();
 
+            try {
+                provider.newFileSystem(new File(System.getProperty("test.src", ".")).toPath(),
+                                       new HashMap<String, Object>());
+                throw new RuntimeException("newFileSystem() opens a directory as zipfs");
+            } catch (UnsupportedOperationException uoe) {}
+
+            try {
+                provider.newFileSystem(src, new HashMap<String, Object>());
+                throw new RuntimeException("newFileSystem() opens a non-zip file as zipfs");
+            } catch (UnsupportedOperationException uoe) {}
+
+
             // copyin
             Path dst = getPathWithParents(fs, tmpName);
             Files.copy(src, dst);
--- a/test/demo/zipfs/basic.sh	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/demo/zipfs/basic.sh	Wed Apr 20 04:38:36 2011 +0100
@@ -21,7 +21,7 @@
 # questions.
 #
 # @test
-# @bug 6990846 7009092 7009085 7015391 7014948 7005986 7017840
+# @bug 6990846 7009092 7009085 7015391 7014948 7005986 7017840 7007596
 # @summary Test ZipFileSystem demo
 # @build Basic PathOps ZipFSTester
 # @run shell basic.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FontClass/SurrogateTest/SupplementaryCanDisplayUpToTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2011, 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 6623219
+ * @summary Test canDisplayUpTo with supplementary characters.
+ */
+
+import java.awt.*;
+import java.text.*;
+
+public class SupplementaryCanDisplayUpToTest {
+    // Lists consisting of a font name, test text, and its expected
+    // return value. Test text uses private area code point U+F0000
+    // (\udb80\udc00).
+    private static String[][] DATA = {
+        // Windows
+        { "Meiryo", "\ud87e\udd45\ud87e\udd47\udb80\udc00", "4" },
+        { "Meiryo", "\ud87e\udd45\ud87e\udd47\udb80Z", "4" },
+        { "Meiryo", "\ud87e\udd45\ud87e\udd47\udb80", "4" },
+        { "Meiryo", "\ud87e\udd45\ud87e\udd47\udc00", "4" },
+        { "Meiryo", "\ud87e\udd45\ud87e\udd47", "-1" },
+
+        // Linux
+        { "AR PL UMing TW", "\ud87e\udc25\ud87e\udc3b\udb80\udc00", "4" },
+        { "AR PL UMing TW", "\ud87e\udc25\ud87e\udc3b\udb80Z", "4" },
+        { "AR PL UMing TW", "\ud87e\udc25\ud87e\udc3b\udb80", "4" },
+        { "AR PL UMing TW", "\ud87e\udc25\ud87e\udc3b\udc00", "4" },
+        { "AR PL UMing TW", "\ud87e\udc25\ud87e\udc3b", "-1" },
+
+        // Solaris
+        { "FZMingTi", "\ud87e\udc25\ud87e\udc3b\udb80\udc00", "4" },
+        { "FZMingTi", "\ud87e\udc25\ud87e\udc3b\udb80Z", "4" },
+        { "FZMingTi", "\ud87e\udc25\ud87e\udc3b\udb80", "4" },
+        { "FZMingTi", "\ud87e\udc25\ud87e\udc3b\udc00", "4" },
+        { "FZMingTi", "\ud87e\udc25\ud87e\udc3b", "-1" },
+    };
+    private static int errorcount = 0;
+
+    public static void main(String[] args) {
+        for (String[] data : DATA) {
+            String fontname = data[0];
+            Font font = new Font(fontname, Font.PLAIN, 16);
+            if (font.getFamily().equals(Font.DIALOG)) {
+                // Skip any unavailable fonts.
+                continue;
+            }
+
+            System.out.printf("Testing with font '%s'... ", fontname);
+            int errors = 0;
+            String text = data[1];
+            int expected = Integer.parseInt(data[2]);
+
+            int result = font.canDisplayUpTo(text);
+            if (result != expected) {
+                System.err.println("canDisplayUpTo(String) returns " + result);
+                errors++;
+            }
+
+            result = font.canDisplayUpTo(text.toCharArray(), 0, text.length());
+            if (result != expected) {
+                System.err.println("canDisplayUpTo(char[], int, int) returns " + result);
+                errors++;
+            }
+
+            CharacterIterator iter = new StringCharacterIterator(text);
+            result = font.canDisplayUpTo(iter, iter.getBeginIndex(), iter.getEndIndex());
+            if (result != expected) {
+                System.err.println("canDisplayUpTo(CharacterIterator, int, int) returns " + result);
+                errors++;
+            }
+
+            if (errors == 0) {
+                System.out.println("passed");
+            } else {
+                System.out.println("failed");
+                errorcount += errors;
+            }
+        }
+        if (errorcount > 0) {
+            throw new RuntimeException("SupplementaryCanDisplayUpToTest: failed");
+        }
+    }
+}
--- a/test/java/awt/PrintJob/Text/StringWidth.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/awt/PrintJob/Text/StringWidth.java	Wed Apr 20 04:38:36 2011 +0100
@@ -63,7 +63,8 @@
   }
 
   public static void main(String[] args) {
-    new StringWidth();
+    StringWidth sw = new StringWidth();
+    sw.dispose();
   }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/font/StyledMetrics/BoldSpace.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2008, 2011, 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 6686365 7017637
+  @summary Confirm that styling does not affect metrics of zero advance glyphs
+*/
+
+import java.awt.*;
+import java.awt.image.*;
+
+public class BoldSpace {
+    public static void main(String[] s) {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+
+        String errMsg = "ZWJ Space char should have 0 advance\n";
+
+        Graphics g = bi.getGraphics();
+
+        // It turns out that some fonts inexplicably treat this as
+        // a standard character. In this 14 pt font, if we see an advance
+        // that's clearly bigger than we'd have introduced in bolding we'll
+        // not error out this test, presuming that its a consequence of
+        // the actual font data. A Linux font 'TLwg Type Bold' is the case
+        // in point.
+        int errorMargin = 4;
+        g.setFont(new Font("monospaced", Font.BOLD, 14));
+        //g.setFont(new Font("Lucida Sans Regular", Font.BOLD, 14));
+        FontMetrics fm = g.getFontMetrics();
+        System.out.println("Bold: " + fm.charWidth('\u200b'));
+        int cwid = fm.charWidth('\u200b');
+        if (cwid > 0 && cwid < errorMargin) {
+            throw new RuntimeException(errMsg);
+        }
+
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+                                 RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
+        fm = g.getFontMetrics();
+        System.out.println("Bold + LCD: "+fm.charWidth('\u200b'));
+        cwid = fm.charWidth('\u200b');
+        if (cwid > 0 && cwid < errorMargin) {
+            throw new RuntimeException(errMsg);
+        }
+
+
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+                                 RenderingHints.VALUE_FRACTIONALMETRICS_ON);
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+                                 RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+        fm = g.getFontMetrics();
+        System.out.println("Bold FM OFF + AA: " + fm.charWidth('\u200b'));
+        cwid = fm.charWidth('\u200b');
+        if (cwid > 0 && cwid < errorMargin) {
+            throw new RuntimeException(errMsg);
+        }
+
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+                                 RenderingHints.VALUE_FRACTIONALMETRICS_OFF);
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+                                 RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+        fm = g.getFontMetrics();
+        System.out.println("Bold FM ON + AA: " + fm.charWidth('\u200b'));
+        cwid = fm.charWidth('\u200b');
+        if (cwid > 0 && cwid < errorMargin) {
+            throw new RuntimeException(errMsg);
+        }
+
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+                                 RenderingHints.VALUE_FRACTIONALMETRICS_ON);
+        ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+                                 RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
+        fm = g.getFontMetrics();
+        System.out.println("Bold FM ON + nonAA: " + fm.charWidth('\u200b'));
+        cwid = fm.charWidth('\u200b');
+        if (cwid > 0 && cwid < errorMargin) {
+            throw new RuntimeException(errMsg);
+        }
+
+        System.out.println("All printed values should be 0 to PASS");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/font/TextLayout/CombiningPerf.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2011, 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 6328154 6962082
+ * @summary ensure that ascii, and latin-1 text without combining marks, both layout faster
+ *  than latin-1 text with combining marks.  The presumption is then that the canonical
+ *  GSUB table is being run only on the latter and not on either of the former.
+ */
+
+import java.awt.Font;
+import java.awt.GraphicsEnvironment;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+
+import static java.awt.Font.*;
+
+public class CombiningPerf {
+    private static Font font;
+    private static FontRenderContext frc;
+
+    public static void main(String[] args) throws Exception {
+        System.err.println("start");
+
+        GraphicsEnvironment.getLocalGraphicsEnvironment();
+
+        font = new Font("Lucida Sans Regular", PLAIN, 12);
+        frc = new FontRenderContext(null, false, false);
+
+        String ascii = "the characters are critical noodles?";
+        String french = "l'aper\u00e7u caract\u00e8re one \u00e9t\u00e9 cr\u00e9\u00e9s";
+        String frenchX = "l'aper\u00e7u caracte\u0300re one e\u0301te\u0301 ere\u0301e\u0301s";
+
+        // warmup
+        for (int i = 0; i < 100; ++i) {
+            TextLayout tl = new TextLayout(french, font, frc);
+            tl = new TextLayout(ascii, font, frc);
+            tl = new TextLayout(frenchX, font, frc);
+        }
+        /**/
+        long atime = test(ascii);
+        System.err.println("atime: " + (atime/1000000.0) + " length: " + ascii.length());
+
+        long ftime = test(french);
+        System.err.println("ftime: " + (ftime/1000000.0) + " length: " + french.length());
+
+        long xtime = test(frenchX);
+        System.err.println("xtime: " + (xtime/1000000.0) + " length: " + frenchX.length());
+
+        long limit = xtime * 2 / 3;
+        if (atime > limit || ftime > limit) {
+            throw new Exception("took too long");
+        }
+        /**/
+    }
+
+    private static long test(String text) {
+        long start = System.nanoTime();
+        for (int i = 0; i < 2000; ++i) {
+            TextLayout tl = new TextLayout(text, font, frc);
+        }
+        return System.nanoTime() - start;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/font/TextLayout/KernCrash.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2011, 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.*;
+import java.awt.*;
+import java.awt.font.*;
+import java.util.*;
+
+/**
+ * Shows (top) with kerning, (middle) without, (bottom) also without.
+ *
+ * @bug 7017324
+ */
+public class KernCrash extends Frame {
+    private static Font font0;
+    private static Font font1;
+    private static Font font2;
+
+    public static void main(String[] args) throws Exception {
+        HashMap attrs = new HashMap();
+        font0 = Font.createFont(Font.TRUETYPE_FONT, new File("Vera.ttf"));
+        System.out.println("using " + font0);
+        attrs.put(TextAttribute.SIZE, new Float(58f));
+        font1 = font0.deriveFont(attrs);
+        attrs.put(TextAttribute.KERNING, TextAttribute.KERNING_ON);
+        font2 = font0.deriveFont(attrs);
+
+        KernCrash f = new KernCrash();
+        f.setTitle("Kerning Crash");
+        f.setSize(600, 300);
+        f.setForeground(Color.black);
+        f.show();
+    }
+
+    public void paint(Graphics g) {
+        Graphics2D g2 = (Graphics2D)g;
+        FontRenderContext frc = g2.getFontRenderContext();
+        TextLayout layout = new TextLayout("text", font2, frc);
+        layout.draw(g2, 10, 150);
+
+        String s = "WAVATastic";
+        TextLayout layout2 = new TextLayout(s, font1, frc);
+        layout2.draw(g2, 10, 200);
+        TextLayout layout3 = new TextLayout(s, font2, frc);
+        layout3.draw(g2, 10, 100);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/print/PrinterJob/ImagePrinting/ImageTypes.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,272 @@
+/*
+ * Copyright (c) 2006, 2011, 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 4521945 7006865
+ * @summary Test printing images of different types.
+ * @author prr
+ * @run main/manual=yesno/timeout=900 ImageTypes
+ */
+
+import java.io.*;
+import static java.awt.Color.*;
+import java.awt.*;
+import java.awt.geom.*;
+import java.awt.event.*;
+import java.awt.print.*;
+import java.awt.image.*;
+import static java.awt.image.BufferedImage.*;
+import javax.print.*;
+import javax.print.attribute.*;
+import javax.print.attribute.standard.*;
+
+public class ImageTypes extends Frame implements ActionListener {
+
+    private ImageCanvas c;
+
+    public static void main(String args[]) {
+
+        ImageTypes f = new ImageTypes();
+        f.show();
+    }
+
+    public ImageTypes () {
+        super("Image Types Printing Test");
+        c = new ImageCanvas();
+        add("Center", c);
+
+        Button printThisButton = new Button("Print");
+        printThisButton.addActionListener(this);
+        Panel p = new Panel();
+        p.add(printThisButton);
+        add("South", p);
+        add("North", getInstructions());
+        addWindowListener(new WindowAdapter() {
+                public void windowClosing(WindowEvent e) {
+                    System.exit(0);
+                }
+            });
+
+        pack();
+    }
+
+    private TextArea getInstructions() {
+        TextArea ta = new TextArea(10, 60);
+        ta.setFont(new Font("Dialog", Font.PLAIN, 11));
+        ta.setText
+            ("This is a manual test as it requires that you compare "+
+             "the on-screen rendering with the printed output.\n"+
+             "Select the 'Print' button to print out the test.\n"+
+             "For each image compare the printed one to the on-screen one.\n"+
+             "The test PASSES if the onscreen and printed rendering match.");
+        return ta;
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        PrinterJob pj = PrinterJob.getPrinterJob();
+
+        PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
+        if (pj != null && pj.printDialog(attrs)) {
+            pj.setPrintable(c);
+            try {
+                pj.print(attrs);
+            } catch (PrinterException pe) {
+                pe.printStackTrace();
+                throw new RuntimeException("Exception whilst printing.");
+            } finally {
+                System.out.println("PRINT RETURNED OK.");
+            }
+        }
+    }
+}
+
+class ImageCanvas extends Component implements Printable {
+
+    IndexColorModel icm2 = null;
+    IndexColorModel icm4 = null;
+    BufferedImage opaqueImg = null;
+    BufferedImage transImg = null;
+    int sw=99, sh=99;
+
+    void paintImage(BufferedImage bi, Color c1, Color c2) {
+
+        GradientPaint tp= new GradientPaint(0.0f, 0.0f, c1, 10f, 8f, c2, true);
+        Graphics2D g2d = (Graphics2D)bi.getGraphics();
+        g2d.setPaint(tp);
+        g2d.fillRect(0, 0, sw, sh);
+        g2d.setColor(gray);
+        int cnt=0;
+        Font font = new Font("Serif", Font.PLAIN, 11);
+        g2d.setFont(font);
+        FontMetrics fm = g2d.getFontMetrics();
+        for (int y=12;y<sh;y+=12) {
+            int x = 0;
+            while (x < sw) {
+                String s = (new Integer(++cnt)).toString();
+                g2d.drawString(s, x, y);
+                x+= fm.stringWidth(s);
+            }
+        }
+    }
+
+    ImageCanvas() {
+
+        opaqueImg = new BufferedImage(sw, sh, TYPE_INT_RGB);
+        Color o1 = new Color(0, 0, 0);
+        Color o2 = new Color(255, 255, 255);
+        paintImage(opaqueImg, o1, o2);
+
+        transImg = new BufferedImage(sw, sh, TYPE_INT_ARGB);
+        Color t1 = new Color(255, 255, 255, 220);
+        Color t2 = new Color(255, 200, 0, 220);
+        paintImage(transImg, t1, t2);
+
+        /* greyscale 2bpp */
+        byte[] arr2bpp =  {(byte)0, (byte)0x55, (byte)0xaa, (byte)0xff};
+        icm2 = new IndexColorModel(2, 4, arr2bpp, arr2bpp, arr2bpp);
+
+        /* color 4bpp */
+        int[] cmap = new int[16];
+        cmap[0] = black.getRGB();
+        cmap[1] = white.getRGB();
+        cmap[2] = gray.getRGB();
+        cmap[3] = lightGray.getRGB();
+        cmap[4] = red.getRGB();
+        cmap[5] = green.getRGB();
+        cmap[6] = blue.getRGB();
+        cmap[7] = yellow.getRGB();
+        cmap[8] = cyan.getRGB();
+        cmap[9] = magenta.getRGB();
+        cmap[10] = orange.getRGB();
+        cmap[11] = pink.getRGB();
+        cmap[12] = darkGray.getRGB();
+        cmap[13] = 192 << 16 ; // dark red.
+        cmap[14] = 192 << 8; // dark green
+        cmap[15] = 192; // dark blue
+
+        icm4 = new IndexColorModel(4, 16, cmap, 0, false, -1,
+                                   DataBuffer.TYPE_BYTE);
+
+    }
+
+
+    public int print(Graphics g, PageFormat pgFmt, int pgIndex) {
+
+        if (pgIndex > 0) {
+            return Printable.NO_SUCH_PAGE;
+        }
+        Graphics2D g2d = (Graphics2D)g;
+        g2d.translate(pgFmt.getImageableX(), pgFmt.getImageableY());
+        paint(g2d);
+        return Printable.PAGE_EXISTS;
+    }
+
+    private void drawImage(Graphics g, int biType, IndexColorModel icm) {
+
+        BufferedImage bi;
+        if (icm != null) {
+            bi = new BufferedImage(sw, sh, biType, icm);
+        } else {
+            bi = new BufferedImage(sw, sh, biType);
+        }
+
+        Graphics big = bi.getGraphics();
+        if (bi.getColorModel().getPixelSize() <=2) {
+            big.drawImage(opaqueImg, 0, 0, null);
+        } else {
+            big.drawImage(transImg, 0, 0, null);
+        }
+        g.drawImage(bi, 0, 0, null);
+    }
+
+    public void paint(Graphics g) {
+
+        int incX = sw+10, incY = sh+10;
+
+        g.translate(10, 10);
+
+        drawImage(g, TYPE_INT_RGB, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_INT_BGR, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_INT_ARGB, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_INT_ARGB_PRE, null);
+        g.translate(-3*incX, incY);
+
+        drawImage(g, TYPE_3BYTE_BGR, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_4BYTE_ABGR, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_4BYTE_ABGR_PRE, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_USHORT_555_RGB, null);
+        g.translate(-3*incX, incY);
+
+        drawImage(g, TYPE_USHORT_555_RGB, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_USHORT_GRAY, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_BYTE_GRAY, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_BYTE_INDEXED, null);
+        g.translate(-3*incX, incY);
+
+        drawImage(g, TYPE_BYTE_BINARY, null);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_BYTE_BINARY, icm2);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_BYTE_BINARY, icm4);
+        g.translate(incX, 0);
+
+        drawImage(g, TYPE_BYTE_INDEXED, icm2);
+        g.translate(-3*incX, incY);
+
+        drawImage(g, TYPE_BYTE_INDEXED, icm4);
+        g.translate(incX, 0);
+    }
+
+
+
+     /* Size is chosen to match default imageable width of a NA letter
+      * page. This means there will be clipping, what is clipped will
+      * depend on PageFormat orientation.
+      */
+     public Dimension getPreferredSize() {
+        return new Dimension(468, 600);
+    }
+
+}
--- a/test/java/dyn/ClassValueTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2010, 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
- * @summary tests for class-specific values
- * @compile ClassValueTest.java
- * @run junit/othervm test.java.dyn.ClassValueTest
- */
-
-/*
-  Manually:
-   $ $JAVA7X_HOME/bin/javac -d foo -cp $JUNIT4_JAR test/java/dyn/ClassValueTest.java
-   $ $JAVA7X_HOME/bin/java -cp foo:$JUNIT4_JAR org.junit.runner.JUnitCore test.java.dyn.ClassValueTest
-  Output: .testAdd => 1000 : Integer
- */
-
-package test.java.dyn;
-
-import java.util.*;
-
-import java.dyn.*;
-
-import org.junit.*;
-import static org.junit.Assert.*;
-
-/**
- * @author jrose
- */
-public class ClassValueTest {
-    static String nameForCV1(Class<?> type) {
-        return "CV1:" + type.getName();
-    }
-    static int countForCV1;
-    static final ClassValue<String> CV1 = new CV1();
-    private static class CV1 extends ClassValue<String> {
-        protected String computeValue(Class<?> type) {
-            countForCV1++;
-            return nameForCV1(type);
-        }
-    }
-
-    static final Class[] CLASSES = {
-        String.class,
-        Integer.class,
-        int.class,
-        boolean[].class,
-        char[][].class,
-        ClassValueTest.class
-    };
-
-    @Test
-    public void testGet() {
-        countForCV1 = 0;
-        for (Class c : CLASSES) {
-            assertEquals(nameForCV1(c), CV1.get(c));
-        }
-        assertEquals(CLASSES.length, countForCV1);
-        for (Class c : CLASSES) {
-            assertEquals(nameForCV1(c), CV1.get(c));
-        }
-        assertEquals(CLASSES.length, countForCV1);
-    }
-
-    @Test
-    public void testRemove() {
-        for (Class c : CLASSES) {
-            CV1.get(c);
-        }
-        countForCV1 = 0;
-        int REMCOUNT = 3;
-        for (int i = 0; i < REMCOUNT; i++) {
-            CV1.remove(CLASSES[i]);
-        }
-        assertEquals(0, countForCV1);  // no change
-        for (Class c : CLASSES) {
-            assertEquals(nameForCV1(c), CV1.get(c));
-        }
-        assertEquals(REMCOUNT, countForCV1);
-    }
-
-    static String nameForCVN(Class<?> type, int n) {
-        return "CV[" + n + "]" + type.getName();
-    }
-    static int countForCVN;
-    static class CVN extends ClassValue<String> {
-        final int n;
-        CVN(int n) { this.n = n; }
-        protected String computeValue(Class<?> type) {
-            countForCVN++;
-            return nameForCVN(type, n);
-        }
-    };
-
-    @Test
-    public void testGetMany() {
-        int CVN_COUNT1 = 100, CVN_COUNT2 = 100;
-        CVN cvns[] = new CVN[CVN_COUNT1 * CVN_COUNT2];
-        for (int n = 0; n < cvns.length; n++) {
-            cvns[n] = new CVN(n);
-        }
-        countForCVN = 0;
-        for (int pass = 0; pass <= 2; pass++) {
-            for (int i1 = 0; i1 < CVN_COUNT1; i1++) {
-                eachClass:
-                for (Class c : CLASSES) {
-                    for (int i2 = 0; i2 < CVN_COUNT2; i2++) {
-                        int n = i1*CVN_COUNT2 + i2;
-                        assertEquals(0, countForCVN);
-                        assertEquals(nameForCVN(c, n), cvns[n].get(c));
-                        cvns[n].get(c);  //get it again
-                        //System.out.println("getting "+n+":"+cvns[n].get(c));
-                        boolean doremove = (((i1 + i2) & 3) == 0);
-                        switch (pass) {
-                        case 0:
-                            assertEquals(1, countForCVN);
-                            break;
-                        case 1:
-                            // remove on middle pass
-                            assertEquals(0, countForCVN);
-                            if (doremove) {
-                                //System.out.println("removing "+n+":"+cvns[n].get(c));
-                                cvns[n].remove(c);
-                                assertEquals(0, countForCVN);
-                            }
-                            break;
-                        case 2:
-                            assertEquals(doremove ? 1 : 0, countForCVN);
-                            break;
-                        }
-                        countForCVN = 0;
-                        if (i1 > i2 && i1 < i2+5)  continue eachClass;  // leave diagonal gap
-                    }
-                }
-            }
-        }
-        assertEquals(countForCVN, 0);
-        for (int n = 0; n < cvns.length; n++) {
-            for (Class c : CLASSES) {
-                assertEquals(nameForCVN(c, n), cvns[n].get(c));
-            }
-        }
-    }
-}
--- a/test/java/dyn/InvokeDynamicPrintArgs.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2010, 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
- * @summary smoke test for invokedynamic instructions
- * @library indify
- * @compile InvokeDynamicPrintArgs.java
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic
- *      indify.Indify
- *      --verify-specifier-count=3 --transitionalJSR292=false
- *      --expand-properties --classpath ${test.classes}
- *      --java InvokeDynamicPrintArgs --check-output
- */
-
-import java.util.*;
-import java.io.*;
-
-import java.dyn.*;
-import static java.dyn.MethodHandles.*;
-import static java.dyn.MethodType.*;
-
-public class InvokeDynamicPrintArgs {
-    public static void main(String... av) throws Throwable {
-        if (av.length > 0)  openBuf();  // --check-output mode
-        System.out.println("Printing some argument lists, starting with a empty one:");
-        INDY_nothing().invokeExact();                 // BSM specifier #0 = {bsm}
-        INDY_bar().invokeExact("bar arg", 1);         // BSM specifier #1 = {bsm2, Void.class, "void type"}
-        INDY_bar2().invokeExact("bar2 arg", 222);     // BSM specifier #1 = (same)
-        INDY_baz().invokeExact("baz arg", 2, 3.14);   // BSM specifier #2 = {bsm2, 1234.5}
-        INDY_foo().invokeExact("foo arg");            // BSM specifier #0 = (same)
-        // Hence, BSM specifier count should be 3.  See "--verify-specifier-count=3" above.
-        System.out.println("Done printing argument lists.");
-        closeBuf();
-    }
-
-    private static PrintStream oldOut;
-    private static ByteArrayOutputStream buf;
-    private static void openBuf() {
-        oldOut = System.out;
-        buf = new ByteArrayOutputStream();
-        System.setOut(new PrintStream(buf));
-    }
-    private static void closeBuf() {
-        if (buf == null)  return;
-        System.out.flush();
-        System.setOut(oldOut);
-        String[] haveLines = new String(buf.toByteArray()).split("[\n\r]+");
-        for (String line : haveLines)  System.out.println(line);
-        Iterator<String> iter = Arrays.asList(haveLines).iterator();
-        for (String want : EXPECT_OUTPUT) {
-            String have = iter.hasNext() ? iter.next() : "[EOF]";
-            if (want.equals(have))  continue;
-            System.err.println("want line: "+want);
-            System.err.println("have line: "+have);
-            throw new AssertionError("unexpected output: "+have);
-        }
-        if (iter.hasNext())
-            throw new AssertionError("unexpected output: "+iter.next());
-    }
-    private static final String[] EXPECT_OUTPUT = {
-        "Printing some argument lists, starting with a empty one:",
-        "[InvokeDynamicPrintArgs, nothing, ()void][]",
-        "[InvokeDynamicPrintArgs, bar, (java.lang.String,int)void, class java.lang.Void, void type!, 1, 234.5, 67.5, 89][bar arg, 1]",
-        "[InvokeDynamicPrintArgs, bar2, (java.lang.String,int)void, class java.lang.Void, void type!, 1, 234.5, 67.5, 89][bar2 arg, 222]",
-        "[InvokeDynamicPrintArgs, baz, (java.lang.String,int,double)void, 1234.5][baz arg, 2, 3.14]",
-        "[InvokeDynamicPrintArgs, foo, (java.lang.String)void][foo arg]",
-        "Done printing argument lists."
-    };
-
-    private static void printArgs(Object bsmInfo, Object... args) {
-        System.out.println(bsmInfo+Arrays.deepToString(args));
-    }
-    private static MethodHandle MH_printArgs() throws ReflectiveOperationException {
-        shouldNotCallThis();
-        return lookup().findStatic(lookup().lookupClass(),
-                                   "printArgs", methodType(void.class, Object.class, Object[].class));
-    }
-
-    private static CallSite bsm(Lookup caller, String name, MethodType type) throws ReflectiveOperationException {
-        // ignore caller and name, but match the type:
-        Object bsmInfo = Arrays.asList(caller, name, type);
-        return new ConstantCallSite(MH_printArgs().bindTo(bsmInfo).asCollector(Object[].class, type.parameterCount()).asType(type));
-    }
-    private static MethodType MT_bsm() {
-        shouldNotCallThis();
-        return methodType(CallSite.class, Lookup.class, String.class, MethodType.class);
-    }
-    private static MethodHandle MH_bsm() throws ReflectiveOperationException {
-        shouldNotCallThis();
-        return lookup().findStatic(lookup().lookupClass(), "bsm", MT_bsm());
-    }
-
-    private static CallSite bsm2(Lookup caller, String name, MethodType type, Object arg) throws ReflectiveOperationException {
-        // ignore caller and name, but match the type:
-        List<Object> bsmInfo = new ArrayList<>(Arrays.asList(caller, name, type));
-        if (arg instanceof Object[])
-            bsmInfo.addAll(Arrays.asList((Object[])arg));
-        else
-            bsmInfo.add(arg);
-        return new ConstantCallSite(MH_printArgs().bindTo(bsmInfo).asCollector(Object[].class, type.parameterCount()).asType(type));
-    }
-    private static MethodType MT_bsm2() {
-        shouldNotCallThis();
-        return methodType(CallSite.class, Lookup.class, String.class, MethodType.class, Object.class);
-    }
-    private static MethodHandle MH_bsm2() throws ReflectiveOperationException {
-        shouldNotCallThis();
-        return lookup().findStatic(lookup().lookupClass(), "bsm2", MT_bsm2());
-    }
-
-    private static MethodHandle INDY_nothing() throws Throwable {
-        shouldNotCallThis();
-        return ((CallSite) MH_bsm().invokeGeneric(lookup(),
-                                                  "nothing", methodType(void.class)
-                                                  )).dynamicInvoker();
-    }
-    private static MethodHandle INDY_foo() throws Throwable {
-        shouldNotCallThis();
-        return ((CallSite) MH_bsm().invokeGeneric(lookup(),
-                                                  "foo", methodType(void.class, String.class)
-                                                  )).dynamicInvoker();
-    }
-    private static MethodHandle INDY_bar() throws Throwable {
-        shouldNotCallThis();
-        return ((CallSite) MH_bsm2().invokeGeneric(lookup(),
-                                                  "bar", methodType(void.class, String.class, int.class)
-                                                  , new Object[] { Void.class, "void type!",
-                                                                   1, 234.5F, 67.5, (long)89 }
-                                                  )).dynamicInvoker();
-    }
-    private static MethodHandle INDY_bar2() throws Throwable {
-        shouldNotCallThis();
-        return ((CallSite) MH_bsm2().invokeGeneric(lookup(),
-                                                  "bar2", methodType(void.class, String.class, int.class)
-                                                  , new Object[] { Void.class, "void type!",
-                                                                   1, 234.5F, 67.5, (long)89 }
-                                                  )).dynamicInvoker();
-    }
-    private static MethodHandle INDY_baz() throws Throwable {
-        shouldNotCallThis();
-        return ((CallSite) MH_bsm2().invokeGeneric(lookup(),
-                                                  "baz", methodType(void.class, String.class, int.class, double.class)
-                                                  , 1234.5
-                                                  )).dynamicInvoker();
-    }
-
-    private static void shouldNotCallThis() {
-        // if this gets called, the transformation has not taken place
-        if (System.getProperty("InvokeDynamicPrintArgs.allow-untransformed") != null)  return;
-        throw new AssertionError("this code should be statically transformed away by Indify");
-    }
-}
--- a/test/java/dyn/InvokeGenericTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,484 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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
- * @summary unit tests for java.dyn.MethodHandle.invokeGeneric
- * @compile -XDallowTransitionalJSR292=no -target 7 InvokeGenericTest.java
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.dyn.InvokeGenericTest
- */
-
-package test.java.dyn;
-
-import java.dyn.*;
-import static java.dyn.MethodHandles.*;
-import static java.dyn.MethodType.*;
-import java.lang.reflect.*;
-import java.util.*;
-import org.junit.*;
-import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
-
-/**
- *
- * @author jrose
- */
-public class InvokeGenericTest {
-    // How much output?
-    static int verbosity = 0;
-    static {
-        String vstr = System.getProperty("test.java.dyn.InvokeGenericTest.verbosity");
-        if (vstr != null)  verbosity = Integer.parseInt(vstr);
-    }
-
-    @Test
-    public void testFirst() throws Throwable {
-        verbosity += 9; try {
-            // left blank for debugging
-        } finally { printCounts(); verbosity -= 9; }
-    }
-
-    public InvokeGenericTest() {
-    }
-
-    @Before
-    public void checkImplementedPlatform() {
-        boolean platformOK = false;
-        Properties properties = System.getProperties();
-        String vers = properties.getProperty("java.vm.version");
-        String name = properties.getProperty("java.vm.name");
-        String arch = properties.getProperty("os.arch");
-        if ((arch.equals("amd64") || arch.equals("i386") || arch.equals("x86") ||
-             arch.equals("sparc") || arch.equals("sparcv9")) &&
-            (name.contains("Client") || name.contains("Server"))
-            ) {
-            platformOK = true;
-        } else {
-            System.err.println("Skipping tests for unsupported platform: "+Arrays.asList(vers, name, arch));
-        }
-        assumeTrue(platformOK);
-    }
-
-    String testName;
-    static int allPosTests, allNegTests;
-    int posTests, negTests;
-    @After
-    public void printCounts() {
-        if (verbosity >= 2 && (posTests | negTests) != 0) {
-            System.out.println();
-            if (posTests != 0)  System.out.println("=== "+testName+": "+posTests+" positive test cases run");
-            if (negTests != 0)  System.out.println("=== "+testName+": "+negTests+" negative test cases run");
-            allPosTests += posTests;
-            allNegTests += negTests;
-            posTests = negTests = 0;
-        }
-    }
-    void countTest(boolean positive) {
-        if (positive) ++posTests;
-        else          ++negTests;
-    }
-    void countTest() { countTest(true); }
-    void startTest(String name) {
-        if (testName != null)  printCounts();
-        if (verbosity >= 1)
-            System.out.println(name);
-        posTests = negTests = 0;
-        testName = name;
-    }
-
-    @BeforeClass
-    public static void setUpClass() throws Exception {
-        calledLog.clear();
-        calledLog.add(null);
-        nextArgVal = INITIAL_ARG_VAL;
-    }
-
-    @AfterClass
-    public static void tearDownClass() throws Exception {
-        int posTests = allPosTests, negTests = allNegTests;
-        if (verbosity >= 2 && (posTests | negTests) != 0) {
-            System.out.println();
-            if (posTests != 0)  System.out.println("=== "+posTests+" total positive test cases");
-            if (negTests != 0)  System.out.println("=== "+negTests+" total negative test cases");
-        }
-    }
-
-    static List<Object> calledLog = new ArrayList<Object>();
-    static Object logEntry(String name, Object... args) {
-        return Arrays.asList(name, Arrays.asList(args));
-    }
-    static Object called(String name, Object... args) {
-        Object entry = logEntry(name, args);
-        calledLog.add(entry);
-        return entry;
-    }
-    static void assertCalled(String name, Object... args) {
-        Object expected = logEntry(name, args);
-        Object actual   = calledLog.get(calledLog.size() - 1);
-        if (expected.equals(actual) && verbosity < 9)  return;
-        System.out.println("assertCalled "+name+":");
-        System.out.println("expected:   "+expected);
-        System.out.println("actual:     "+actual);
-        System.out.println("ex. types:  "+getClasses(expected));
-        System.out.println("act. types: "+getClasses(actual));
-        assertEquals("previous method call", expected, actual);
-    }
-    static void printCalled(MethodHandle target, String name, Object... args) {
-        if (verbosity >= 3)
-            System.out.println("calling MH="+target+" to "+name+Arrays.toString(args));
-    }
-
-    static Object castToWrapper(Object value, Class<?> dst) {
-        Object wrap = null;
-        if (value instanceof Number)
-            wrap = castToWrapperOrNull(((Number)value).longValue(), dst);
-        if (value instanceof Character)
-            wrap = castToWrapperOrNull((char)(Character)value, dst);
-        if (wrap != null)  return wrap;
-        return dst.cast(value);
-    }
-
-    static Object castToWrapperOrNull(long value, Class<?> dst) {
-        if (dst == int.class || dst == Integer.class)
-            return (int)(value);
-        if (dst == long.class || dst == Long.class)
-            return (long)(value);
-        if (dst == char.class || dst == Character.class)
-            return (char)(value);
-        if (dst == short.class || dst == Short.class)
-            return (short)(value);
-        if (dst == float.class || dst == Float.class)
-            return (float)(value);
-        if (dst == double.class || dst == Double.class)
-            return (double)(value);
-        if (dst == byte.class || dst == Byte.class)
-            return (byte)(value);
-        if (dst == boolean.class || dst == boolean.class)
-            return ((value % 29) & 1) == 0;
-        return null;
-    }
-
-    static final int ONE_MILLION = (1000*1000),  // first int value
-                     TEN_BILLION = (10*1000*1000*1000),  // scale factor to reach upper 32 bits
-                     INITIAL_ARG_VAL = ONE_MILLION << 1;  // <<1 makes space for sign bit;
-    static long nextArgVal;
-    static long nextArg(boolean moreBits) {
-        long val = nextArgVal++;
-        long sign = -(val & 1); // alternate signs
-        val >>= 1;
-        if (moreBits)
-            // Guarantee some bits in the high word.
-            // In any case keep the decimal representation simple-looking,
-            // with lots of zeroes, so as not to make the printed decimal
-            // strings unnecessarily noisy.
-            val += (val % ONE_MILLION) * TEN_BILLION;
-        return val ^ sign;
-    }
-    static int nextArg() {
-        // Produce a 32-bit result something like ONE_MILLION+(smallint).
-        // Example: 1_000_042.
-        return (int) nextArg(false);
-    }
-    static long nextArg(Class<?> kind) {
-        if (kind == long.class   || kind == Long.class ||
-            kind == double.class || kind == Double.class)
-            // produce a 64-bit result something like
-            // ((TEN_BILLION+1) * (ONE_MILLION+(smallint)))
-            // Example: 10_000_420_001_000_042.
-            return nextArg(true);
-        return (long) nextArg();
-    }
-
-    static Object randomArg(Class<?> param) {
-        Object wrap = castToWrapperOrNull(nextArg(param), param);
-        if (wrap != null) {
-            return wrap;
-        }
-//        import sun.dyn.util.Wrapper;
-//        Wrapper wrap = Wrapper.forBasicType(dst);
-//        if (wrap == Wrapper.OBJECT && Wrapper.isWrapperType(dst))
-//            wrap = Wrapper.forWrapperType(dst);
-//        if (wrap != Wrapper.OBJECT)
-//            return wrap.wrap(nextArg++);
-        if (param.isInterface()) {
-            for (Class<?> c : param.getClasses()) {
-                if (param.isAssignableFrom(c) && !c.isInterface())
-                    { param = c; break; }
-            }
-        }
-        if (param.isInterface() || param.isAssignableFrom(String.class))
-            return "#"+nextArg();
-        else
-            try {
-                return param.newInstance();
-            } catch (InstantiationException ex) {
-            } catch (IllegalAccessException ex) {
-            }
-        return null;  // random class not Object, String, Integer, etc.
-    }
-    static Object[] randomArgs(Class<?>... params) {
-        Object[] args = new Object[params.length];
-        for (int i = 0; i < args.length; i++)
-            args[i] = randomArg(params[i]);
-        return args;
-    }
-    static Object[] randomArgs(int nargs, Class<?> param) {
-        Object[] args = new Object[nargs];
-        for (int i = 0; i < args.length; i++)
-            args[i] = randomArg(param);
-        return args;
-    }
-
-    static final Object ANON_OBJ = new Object();
-    static Object zeroArg(Class<?> param) {
-        Object x = castToWrapperOrNull(0L, param);
-        if (x != null)  return x;
-        if (param.isInterface() || param.isAssignableFrom(String.class))  return "\"\"";
-        if (param == Object.class)  return ANON_OBJ;
-        if (param.getComponentType() != null)  return Array.newInstance(param.getComponentType(), 0);
-        return null;
-    }
-    static Object[] zeroArgs(Class<?>... params) {
-        Object[] args = new Object[params.length];
-        for (int i = 0; i < args.length; i++)
-            args[i] = zeroArg(params[i]);
-        return args;
-    }
-    static Object[] zeroArgs(List<Class<?>> params) {
-        return zeroArgs(params.toArray(new Class<?>[0]));
-    }
-
-    static <T, E extends T> T[] array(Class<T[]> atype, E... a) {
-        return Arrays.copyOf(a, a.length, atype);
-    }
-    static <T> T[] cat(T[] a, T... b) {
-        int alen = a.length, blen = b.length;
-        if (blen == 0)  return a;
-        T[] c = Arrays.copyOf(a, alen + blen);
-        System.arraycopy(b, 0, c, alen, blen);
-        return c;
-    }
-    static Integer[] boxAll(int... vx) {
-        Integer[] res = new Integer[vx.length];
-        for (int i = 0; i < res.length; i++) {
-            res[i] = vx[i];
-        }
-        return res;
-    }
-    static Object getClasses(Object x) {
-        if (x == null)  return x;
-        if (x instanceof String)  return x;  // keep the name
-        if (x instanceof List) {
-            // recursively report classes of the list elements
-            Object[] xa = ((List)x).toArray();
-            for (int i = 0; i < xa.length; i++)
-                xa[i] = getClasses(xa[i]);
-            return Arrays.asList(xa);
-        }
-        return x.getClass().getSimpleName();
-    }
-
-    static MethodHandle changeArgTypes(MethodHandle target, Class<?> argType) {
-        return changeArgTypes(target, 0, 999, argType);
-    }
-    static MethodHandle changeArgTypes(MethodHandle target,
-            int beg, int end, Class<?> argType) {
-        MethodType targetType = target.type();
-        end = Math.min(end, targetType.parameterCount());
-        ArrayList<Class<?>> argTypes = new ArrayList<Class<?>>(targetType.parameterList());
-        Collections.fill(argTypes.subList(beg, end), argType);
-        MethodType ttype2 = MethodType.methodType(targetType.returnType(), argTypes);
-        return MethodHandles.convertArguments(target, ttype2);
-    }
-
-    // This lookup is good for all members in and under InvokeGenericTest.
-    static final Lookup LOOKUP = MethodHandles.lookup();
-
-    Map<List<Class<?>>, MethodHandle> CALLABLES = new HashMap<List<Class<?>>, MethodHandle>();
-    MethodHandle callable(List<Class<?>> params) {
-        MethodHandle mh = CALLABLES.get(params);
-        if (mh == null) {
-            mh = collectArguments(collector_MH, methodType(Object.class, params));
-            CALLABLES.put(params, mh);
-        }
-        return mh;
-    }
-    MethodHandle callable(Class<?>... params) {
-        return callable(Arrays.asList(params));
-    }
-    private static Object collector(Object... args) {
-        return Arrays.asList(args);
-    }
-    private static final MethodHandle collector_MH;
-    static {
-        try {
-            collector_MH
-                = LOOKUP.findStatic(LOOKUP.lookupClass(),
-                                    "collector",
-                                    methodType(Object.class, Object[].class));
-        } catch (NoAccessException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    @Test
-    public void testSimple() throws Throwable {
-        startTest("testSimple");
-        countTest();
-        String[] args = { "one", "two" };
-        MethodHandle mh = callable(Object.class, String.class);
-        Object res; List resl;
-        res = resl = (List) mh.invokeGeneric((String)args[0], (Object)args[1]);
-        //System.out.println(res);
-        assertEquals(Arrays.asList(args), res);
-    }
-
-    @Test
-    public void testWrongArgumentCount() throws Throwable {
-        startTest("testWrongArgumentCount");
-        for (int i = 0; i <= 10; i++) {
-            testWrongArgumentCount(Collections.<Class<?>>nCopies(i, Integer.class));
-            if (i <= 4) {
-                testWrongArgumentCount(Collections.<Class<?>>nCopies(i, int.class));
-                testWrongArgumentCount(Collections.<Class<?>>nCopies(i, long.class));
-            }
-        }
-    }
-    public void testWrongArgumentCount(List<Class<?>> params) throws Throwable {
-        int max = params.size();
-        for (int i = 0; i < max; i++) {
-            List<Class<?>> params2 = params.subList(0, i);
-            for (int k = 0; k <= 2; k++) {
-                if (k == 1)  params  = methodType(Object.class,  params).generic().parameterList();
-                if (k == 2)  params2 = methodType(Object.class, params2).generic().parameterList();
-                testWrongArgumentCount(params, params2);
-                testWrongArgumentCount(params2, params);
-            }
-        }
-    }
-    public void testWrongArgumentCount(List<Class<?>> expect, List<Class<?>> observe) throws Throwable {
-        countTest(false);
-        if (expect.equals(observe))
-            assert(false);
-        MethodHandle target = callable(expect);
-        Object[] args = zeroArgs(observe);
-        Object junk;
-        try {
-            switch (args.length) {
-            case 0:
-                junk = target.invokeGeneric(); break;
-            case 1:
-                junk = target.invokeGeneric(args[0]); break;
-            case 2:
-                junk = target.invokeGeneric(args[0], args[1]); break;
-            case 3:
-                junk = target.invokeGeneric(args[0], args[1], args[2]); break;
-            case 4:
-                junk = target.invokeGeneric(args[0], args[1], args[2], args[3]); break;
-            default:
-                junk = target.invokeWithArguments(args); break;
-            }
-        } catch (WrongMethodTypeException ex) {
-            return;
-        } catch (Exception ex) {
-            throw new RuntimeException("wrong exception calling "+target+target.type()+" on "+Arrays.asList(args)+" : "+ex);
-        }
-        throw new RuntimeException("bad success calling "+target+target.type()+" on "+Arrays.asList(args));
-    }
-
-    /** Make a list of all combinations of the given types, with the given arities.
-     *  A void return type is possible iff the first type is void.class.
-     */
-    static List<MethodType> allMethodTypes(int minargc, int maxargc, Class<?>... types) {
-        ArrayList<MethodType> result = new ArrayList<MethodType>();
-        if (types.length > 0) {
-            ArrayList<MethodType> argcTypes = new ArrayList<MethodType>();
-            // build arity-zero types first
-            for (Class<?> rtype : types) {
-                argcTypes.add(MethodType.methodType(rtype));
-            }
-            if (types[0] == void.class)
-                // void is not an argument type
-                types = Arrays.copyOfRange(types, 1, types.length);
-            for (int argc = 0; argc <= maxargc; argc++) {
-                if (argc >= minargc)
-                    result.addAll(argcTypes);
-                if (argc >= maxargc)
-                    break;
-                ArrayList<MethodType> prevTypes = argcTypes;
-                argcTypes = new ArrayList<MethodType>();
-                for (MethodType prevType : prevTypes) {
-                    for (Class<?> ptype : types) {
-                        argcTypes.add(prevType.insertParameterTypes(argc, ptype));
-                    }
-                }
-            }
-        }
-        return Collections.unmodifiableList(result);
-    }
-    static List<MethodType> allMethodTypes(int argc, Class<?>... types) {
-        return allMethodTypes(argc, argc, types);
-    }
-
-    interface RandomInterface { }
-
-    MethodHandle toString_MH;
-
-    @Test
-    public void testReferenceConversions() throws Throwable {
-        startTest("testReferenceConversions");
-        toString_MH = LOOKUP.
-            findVirtual(Object.class, "toString", MethodType.methodType(String.class));
-        String[] args = { "one", "two" };
-        for (MethodType type : allMethodTypes(2, Object.class, String.class, RandomInterface.class)) {
-            testReferenceConversions(type, args);
-        }
-    }
-    public void testReferenceConversions(MethodType type, Object... args) throws Throwable {
-        countTest();
-        if (verbosity > 3)  System.out.println("target type: "+type);
-        MethodHandle mh = callable(type.parameterList());
-        MethodHandle tsdrop = MethodHandles.dropArguments(toString_MH, 1, type.parameterList());
-        mh = MethodHandles.foldArguments(tsdrop, mh);
-        mh = mh.asType(type);
-        Object res = mh.invokeGeneric((String)args[0], (Object)args[1]);
-        //System.out.println(res);
-        assertEquals(Arrays.asList(args).toString(), res);
-    }
-
-
-    @Test @Ignore("known failure pending 6939861")
-    public void testBoxConversions() throws Throwable {
-        startTest("testBoxConversions");
-        countTest();
-        Integer[] args = { 1, 2 };
-        MethodHandle mh = callable(Object.class, int.class);
-        Object res; List resl;
-        res = resl = (List) mh.invokeGeneric((int)args[0], (Object)args[1]);
-        //System.out.println(res);
-        assertEquals(Arrays.asList(args), res);
-    }
-
-}
--- a/test/java/dyn/JavaDocExamplesTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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
- * @summary example code used in javadoc for java.dyn API
- * @compile -XDallowTransitionalJSR292=no JavaDocExamplesTest.java
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.dyn.JavaDocExamplesTest
- */
-
-/*
----- To run outside jtreg:
-$ $JAVA7X_HOME/bin/javac -cp $JUNIT4_JAR -d /tmp/Classes \
-   $DAVINCI/sources/jdk/test/java/dyn/JavaDocExamplesTest.java
-$ $JAVA7X_HOME/bin/java   -cp $JUNIT4_JAR:/tmp/Classes \
-   -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles \
-   -Dtest.java.dyn.JavaDocExamplesTest.verbosity=1 \
-     test.java.dyn.JavaDocExamplesTest
-----
-*/
-
-package test.java.dyn;
-
-import java.dyn.*;
-import static java.dyn.MethodHandles.*;
-import static java.dyn.MethodType.*;
-
-import java.lang.reflect.*;
-import java.util.*;
-
-import org.junit.*;
-import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
-
-/**
- * @author jrose
- */
-public class JavaDocExamplesTest {
-    /** Wrapper for running the JUnit tests in this module.
-     *  Put JUnit on the classpath!
-     */
-    public static void main(String... ignore) {
-        org.junit.runner.JUnitCore.runClasses(JavaDocExamplesTest.class);
-    }
-    // How much output?
-    static int verbosity = Integer.getInteger("test.java.dyn.JavaDocExamplesTest.verbosity", 0);
-
-{}
-static final private Lookup LOOKUP = lookup();
-// static final private MethodHandle CONCAT_1 = LOOKUP.findVirtual(String.class,
-//     "concat", methodType(String.class, String.class));
-// static final private MethodHandle HASHCODE_1 = LOOKUP.findVirtual(Object.class,
-//     "hashCode", methodType(int.class));
-
-// form required if NoAccessException is intercepted:
-static final private MethodHandle CONCAT_2, HASHCODE_2;
-static {
-  try {
-    CONCAT_2 = LOOKUP.findVirtual(String.class,
-      "concat", methodType(String.class, String.class));
-    HASHCODE_2 = LOOKUP.findVirtual(Object.class,
-      "hashCode", methodType(int.class));
-   } catch (NoAccessException ex) {
-     throw new RuntimeException(ex);
-   }
-}
-{}
-
-    @Test public void testFindVirtual() throws Throwable {
-{}
-MethodHandle CONCAT_3 = LOOKUP.findVirtual(String.class,
-  "concat", methodType(String.class, String.class));
-MethodHandle HASHCODE_3 = LOOKUP.findVirtual(Object.class,
-  "hashCode", methodType(int.class));
-//assertEquals("xy", (String) CONCAT_1.invokeExact("x", "y"));
-assertEquals("xy", (String) CONCAT_2.invokeExact("x", "y"));
-assertEquals("xy", (String) CONCAT_3.invokeExact("x", "y"));
-//assertEquals("xy".hashCode(), (int) HASHCODE_1.invokeExact((Object)"xy"));
-assertEquals("xy".hashCode(), (int) HASHCODE_2.invokeExact((Object)"xy"));
-assertEquals("xy".hashCode(), (int) HASHCODE_3.invokeExact((Object)"xy"));
-{}
-    }
-    @Test public void testDropArguments() throws Throwable {
-        {{
-{} /// JAVADOC
-MethodHandle cat = lookup().findVirtual(String.class,
-  "concat", methodType(String.class, String.class));
-assertEquals("xy", (String) cat.invokeExact("x", "y"));
-MethodHandle d0 = dropArguments(cat, 0, String.class);
-assertEquals("yz", (String) d0.invokeExact("x", "y", "z"));
-MethodHandle d1 = dropArguments(cat, 1, String.class);
-assertEquals("xz", (String) d1.invokeExact("x", "y", "z"));
-MethodHandle d2 = dropArguments(cat, 2, String.class);
-assertEquals("xy", (String) d2.invokeExact("x", "y", "z"));
-MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
-assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
-            }}
-    }
-
-    @Test public void testFilterArguments() throws Throwable {
-        {{
-{} /// JAVADOC
-MethodHandle cat = lookup().findVirtual(String.class,
-  "concat", methodType(String.class, String.class));
-MethodHandle upcase = lookup().findVirtual(String.class,
-  "toUpperCase", methodType(String.class));
-assertEquals("xy", (String) cat.invokeExact("x", "y"));
-MethodHandle f0 = filterArguments(cat, 0, upcase);
-assertEquals("Xy", (String) f0.invokeExact("x", "y")); // Xy
-MethodHandle f1 = filterArguments(cat, 1, upcase);
-assertEquals("xY", (String) f1.invokeExact("x", "y")); // xY
-MethodHandle f2 = filterArguments(cat, 0, upcase, upcase);
-assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
-            }}
-    }
-
-    static void assertEquals(Object exp, Object act) {
-        if (verbosity > 0)
-            System.out.println("result: "+act);
-        Assert.assertEquals(exp, act);
-    }
-
-static MethodHandle asList;
-    @Test public void testWithTypeHandler() throws Throwable {
-        {{
-{} /// JAVADOC
-MethodHandle makeEmptyList = MethodHandles.constant(List.class, Arrays.asList());
-MethodHandle asList = lookup()
-  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class));
-
-JavaDocExamplesTest.asList = asList;
-/*
-static MethodHandle collectingTypeHandler(MethodHandle base, MethodType newType) {
-  return asList.asCollector(Object[].class, newType.parameterCount()).asType(newType);
-}
-*/
-
-MethodHandle collectingTypeHandler = lookup()
-  .findStatic(lookup().lookupClass(), "collectingTypeHandler",
-     methodType(MethodHandle.class, MethodHandle.class, MethodType.class));
-MethodHandle makeAnyList = makeEmptyList.withTypeHandler(collectingTypeHandler);
-
-assertEquals("[]", makeAnyList.invokeGeneric().toString());
-assertEquals("[1]", makeAnyList.invokeGeneric(1).toString());
-assertEquals("[two, too]", makeAnyList.invokeGeneric("two", "too").toString());
-            }}
-    }
-
-static MethodHandle collectingTypeHandler(MethodHandle base, MethodType newType) {
-    //System.out.println("Converting "+asList+" to "+newType);
-    MethodHandle conv = asList.asCollector(Object[].class, newType.parameterCount()).asType(newType);
-    //System.out.println(" =>"+conv);
-    return conv;
-}
-
-}
--- a/test/java/dyn/MethodHandlesTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2249 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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
- * @summary unit tests for java.dyn.MethodHandles
- * @compile -source 7 -target 7 -XDallowTransitionalJSR292=no MethodHandlesTest.java
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.dyn.MethodHandlesTest
- */
-
-package test.java.dyn;
-
-import java.dyn.*;
-import java.dyn.MethodHandles.Lookup;
-import java.lang.reflect.*;
-import java.util.*;
-import org.junit.*;
-import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
-
-/**
- *
- * @author jrose
- */
-public class MethodHandlesTest {
-    // How much output?
-    static int verbosity = 0;
-    static {
-        String vstr = System.getProperty("test.java.dyn.MethodHandlesTest.verbosity");
-        if (vstr != null)  verbosity = Integer.parseInt(vstr);
-    }
-
-    // Set this true during development if you want to fast-forward to
-    // a particular new, non-working test.  Tests which are known to
-    // work (or have recently worked) test this flag and return on true.
-    static boolean CAN_SKIP_WORKING = false;
-    //static { CAN_SKIP_WORKING = true; }
-
-    // Set true to test more calls.  If false, some tests are just
-    // lookups, without exercising the actual method handle.
-    static boolean DO_MORE_CALLS = true;
-
-    @Test
-    public void testFirst() throws Throwable {
-        verbosity += 9; try {
-            // left blank for debugging
-        } finally { printCounts(); verbosity -= 9; }
-    }
-
-    // current failures
-    @Test @Ignore("failure in call to makeRawRetypeOnly in ToGeneric")
-    public void testFail_1() throws Throwable {
-        // AMH.<init>: IllegalArgumentException: bad adapter (conversion=0xfffab300): adapter pushes too many parameters
-        testSpreadArguments(int.class, 0, 6);
-    }
-    @Test @Ignore("failure in JVM when expanding the stack using asm stub for _adapter_spread_args")
-    public void testFail_2() throws Throwable {
-        // if CONV_OP_IMPLEMENTED_MASK includes OP_SPREAD_ARGS, this crashes:
-        testSpreadArguments(Object.class, 0, 2);
-    }
-    @Test @Ignore("IllArgEx failure in call to ToGeneric.make")
-    public void testFail_3() throws Throwable {
-        // ToGeneric.<init>: UnsupportedOperationException: NYI: primitive parameters must follow references; entryType = (int,java.lang.Object)java.lang.Object
-        testSpreadArguments(int.class, 1, 2);
-    }
-    @Test @Ignore("IllArgEx failure in call to ToGeneric.make")
-    public void testFail_4() throws Throwable {
-        // ToGeneric.<init>: UnsupportedOperationException: NYI: primitive parameters must follow references; entryType = (int,java.lang.Object)java.lang.Object
-        testCollectArguments(int.class, 1, 2);
-    }
-    @Test @Ignore("cannot collect leading primitive types")
-    public void testFail_5() throws Throwable {
-        // ToGeneric.<init>: UnsupportedOperationException: NYI: primitive parameters must follow references; entryType = (int,java.lang.Object)java.lang.Object
-        testInvokers(MethodType.genericMethodType(2).changeParameterType(0, int.class));
-    }
-    @Test @Ignore("should not insert arguments beyond MethodHandlePushLimit")
-    public void testFail_6() throws Throwable {
-        // ValueConversions.varargsArray: UnsupportedOperationException: NYI: cannot form a varargs array of length 13
-        testInsertArguments(0, 0, MAX_ARG_INCREASE+10);
-    }
-    static final int MAX_ARG_INCREASE = 3;
-
-    public MethodHandlesTest() {
-    }
-
-    @Before
-    public void checkImplementedPlatform() {
-        boolean platformOK = false;
-        Properties properties = System.getProperties();
-        String vers = properties.getProperty("java.vm.version");
-        String name = properties.getProperty("java.vm.name");
-        String arch = properties.getProperty("os.arch");
-        if ((arch.equals("amd64") || arch.equals("i386") || arch.equals("x86") ||
-             arch.equals("sparc") || arch.equals("sparcv9")) &&
-            (name.contains("Client") || name.contains("Server"))
-            ) {
-            platformOK = true;
-        } else {
-            System.err.println("Skipping tests for unsupported platform: "+Arrays.asList(vers, name, arch));
-        }
-        assumeTrue(platformOK);
-    }
-
-    String testName;
-    static int allPosTests, allNegTests;
-    int posTests, negTests;
-    @After
-    public void printCounts() {
-        if (verbosity >= 2 && (posTests | negTests) != 0) {
-            System.out.println();
-            if (posTests != 0)  System.out.println("=== "+testName+": "+posTests+" positive test cases run");
-            if (negTests != 0)  System.out.println("=== "+testName+": "+negTests+" negative test cases run");
-            allPosTests += posTests;
-            allNegTests += negTests;
-            posTests = negTests = 0;
-        }
-    }
-    void countTest(boolean positive) {
-        if (positive) ++posTests;
-        else          ++negTests;
-    }
-    void countTest() { countTest(true); }
-    void startTest(String name) {
-        if (testName != null)  printCounts();
-        if (verbosity >= 1)
-            System.out.println(name);
-        posTests = negTests = 0;
-        testName = name;
-    }
-
-    @BeforeClass
-    public static void setUpClass() throws Exception {
-        calledLog.clear();
-        calledLog.add(null);
-        nextArgVal = INITIAL_ARG_VAL;
-    }
-
-    @AfterClass
-    public static void tearDownClass() throws Exception {
-        int posTests = allPosTests, negTests = allNegTests;
-        if (verbosity >= 2 && (posTests | negTests) != 0) {
-            System.out.println();
-            if (posTests != 0)  System.out.println("=== "+posTests+" total positive test cases");
-            if (negTests != 0)  System.out.println("=== "+negTests+" total negative test cases");
-        }
-    }
-
-    static List<Object> calledLog = new ArrayList<Object>();
-    static Object logEntry(String name, Object... args) {
-        return Arrays.asList(name, Arrays.asList(args));
-    }
-    static Object called(String name, Object... args) {
-        Object entry = logEntry(name, args);
-        calledLog.add(entry);
-        return entry;
-    }
-    static void assertCalled(String name, Object... args) {
-        Object expected = logEntry(name, args);
-        Object actual   = calledLog.get(calledLog.size() - 1);
-        if (expected.equals(actual) && verbosity < 9)  return;
-        System.out.println("assertCalled "+name+":");
-        System.out.println("expected:   "+expected);
-        System.out.println("actual:     "+actual);
-        System.out.println("ex. types:  "+getClasses(expected));
-        System.out.println("act. types: "+getClasses(actual));
-        assertEquals("previous method call", expected, actual);
-    }
-    static void printCalled(MethodHandle target, String name, Object... args) {
-        if (verbosity >= 3)
-            System.out.println("calling MH="+target+" to "+name+Arrays.toString(args));
-    }
-
-    static Object castToWrapper(Object value, Class<?> dst) {
-        Object wrap = null;
-        if (value instanceof Number)
-            wrap = castToWrapperOrNull(((Number)value).longValue(), dst);
-        if (value instanceof Character)
-            wrap = castToWrapperOrNull((char)(Character)value, dst);
-        if (wrap != null)  return wrap;
-        return dst.cast(value);
-    }
-
-    static Object castToWrapperOrNull(long value, Class<?> dst) {
-        if (dst == int.class || dst == Integer.class)
-            return (int)(value);
-        if (dst == long.class || dst == Long.class)
-            return (long)(value);
-        if (dst == char.class || dst == Character.class)
-            return (char)(value);
-        if (dst == short.class || dst == Short.class)
-            return (short)(value);
-        if (dst == float.class || dst == Float.class)
-            return (float)(value);
-        if (dst == double.class || dst == Double.class)
-            return (double)(value);
-        if (dst == byte.class || dst == Byte.class)
-            return (byte)(value);
-        if (dst == boolean.class || dst == boolean.class)
-            return ((value % 29) & 1) == 0;
-        return null;
-    }
-
-    static final int ONE_MILLION = (1000*1000),  // first int value
-                     TEN_BILLION = (10*1000*1000*1000),  // scale factor to reach upper 32 bits
-                     INITIAL_ARG_VAL = ONE_MILLION << 1;  // <<1 makes space for sign bit;
-    static long nextArgVal;
-    static long nextArg(boolean moreBits) {
-        long val = nextArgVal++;
-        long sign = -(val & 1); // alternate signs
-        val >>= 1;
-        if (moreBits)
-            // Guarantee some bits in the high word.
-            // In any case keep the decimal representation simple-looking,
-            // with lots of zeroes, so as not to make the printed decimal
-            // strings unnecessarily noisy.
-            val += (val % ONE_MILLION) * TEN_BILLION;
-        return val ^ sign;
-    }
-    static int nextArg() {
-        // Produce a 32-bit result something like ONE_MILLION+(smallint).
-        // Example: 1_000_042.
-        return (int) nextArg(false);
-    }
-    static long nextArg(Class<?> kind) {
-        if (kind == long.class   || kind == Long.class ||
-            kind == double.class || kind == Double.class)
-            // produce a 64-bit result something like
-            // ((TEN_BILLION+1) * (ONE_MILLION+(smallint)))
-            // Example: 10_000_420_001_000_042.
-            return nextArg(true);
-        return (long) nextArg();
-    }
-
-    static Object randomArg(Class<?> param) {
-        Object wrap = castToWrapperOrNull(nextArg(param), param);
-        if (wrap != null) {
-            return wrap;
-        }
-//        import sun.dyn.util.Wrapper;
-//        Wrapper wrap = Wrapper.forBasicType(dst);
-//        if (wrap == Wrapper.OBJECT && Wrapper.isWrapperType(dst))
-//            wrap = Wrapper.forWrapperType(dst);
-//        if (wrap != Wrapper.OBJECT)
-//            return wrap.wrap(nextArg++);
-        if (param.isInterface()) {
-            for (Class<?> c : param.getClasses()) {
-                if (param.isAssignableFrom(c) && !c.isInterface())
-                    { param = c; break; }
-            }
-        }
-        if (param.isInterface() || param.isAssignableFrom(String.class))
-            return "#"+nextArg();
-        else
-            try {
-                return param.newInstance();
-            } catch (InstantiationException ex) {
-            } catch (IllegalAccessException ex) {
-            }
-        return null;  // random class not Object, String, Integer, etc.
-    }
-    static Object[] randomArgs(Class<?>... params) {
-        Object[] args = new Object[params.length];
-        for (int i = 0; i < args.length; i++)
-            args[i] = randomArg(params[i]);
-        return args;
-    }
-    static Object[] randomArgs(int nargs, Class<?> param) {
-        Object[] args = new Object[nargs];
-        for (int i = 0; i < args.length; i++)
-            args[i] = randomArg(param);
-        return args;
-    }
-
-    static <T, E extends T> T[] array(Class<T[]> atype, E... a) {
-        return Arrays.copyOf(a, a.length, atype);
-    }
-    static <T> T[] cat(T[] a, T... b) {
-        int alen = a.length, blen = b.length;
-        if (blen == 0)  return a;
-        T[] c = Arrays.copyOf(a, alen + blen);
-        System.arraycopy(b, 0, c, alen, blen);
-        return c;
-    }
-    static Integer[] boxAll(int... vx) {
-        Integer[] res = new Integer[vx.length];
-        for (int i = 0; i < res.length; i++) {
-            res[i] = vx[i];
-        }
-        return res;
-    }
-    static Object getClasses(Object x) {
-        if (x == null)  return x;
-        if (x instanceof String)  return x;  // keep the name
-        if (x instanceof List) {
-            // recursively report classes of the list elements
-            Object[] xa = ((List)x).toArray();
-            for (int i = 0; i < xa.length; i++)
-                xa[i] = getClasses(xa[i]);
-            return Arrays.asList(xa);
-        }
-        return x.getClass().getSimpleName();
-    }
-
-    static MethodHandle changeArgTypes(MethodHandle target, Class<?> argType) {
-        return changeArgTypes(target, 0, 999, argType);
-    }
-    static MethodHandle changeArgTypes(MethodHandle target,
-            int beg, int end, Class<?> argType) {
-        MethodType targetType = target.type();
-        end = Math.min(end, targetType.parameterCount());
-        ArrayList<Class<?>> argTypes = new ArrayList<Class<?>>(targetType.parameterList());
-        Collections.fill(argTypes.subList(beg, end), argType);
-        MethodType ttype2 = MethodType.methodType(targetType.returnType(), argTypes);
-        return MethodHandles.convertArguments(target, ttype2);
-    }
-
-    // This lookup is good for all members in and under MethodHandlesTest.
-    static final Lookup PRIVATE = MethodHandles.lookup();
-    // This lookup is good for package-private members but not private ones.
-    static final Lookup PACKAGE = PackageSibling.lookup();
-    // This lookup is good only for public members.
-    static final Lookup PUBLIC  = MethodHandles.publicLookup();
-
-    // Subject methods...
-    static class Example implements IntExample {
-        final String name;
-        public Example() { name = "Example#"+nextArg(); }
-        protected Example(String name) { this.name = name; }
-        protected Example(int x) { this(); called("protected <init>", this, x); }
-        @Override public String toString() { return name; }
-
-        public void            v0()     { called("v0", this); }
-        void                   pkg_v0() { called("pkg_v0", this); }
-        private void           pri_v0() { called("pri_v0", this); }
-        public static void     s0()     { called("s0"); }
-        static void            pkg_s0() { called("pkg_s0"); }
-        private static void    pri_s0() { called("pri_s0"); }
-
-        public Object          v1(Object x) { return called("v1", this, x); }
-        public Object          v2(Object x, Object y) { return called("v2", this, x, y); }
-        public Object          v2(Object x, int    y) { return called("v2", this, x, y); }
-        public Object          v2(int    x, Object y) { return called("v2", this, x, y); }
-        public Object          v2(int    x, int    y) { return called("v2", this, x, y); }
-        public static Object   s1(Object x) { return called("s1", x); }
-        public static Object   s2(int x)    { return called("s2", x); }
-        public static Object   s3(long x)   { return called("s3", x); }
-        public static Object   s4(int x, int y) { return called("s4", x, y); }
-        public static Object   s5(long x, int y) { return called("s5", x, y); }
-        public static Object   s6(int x, long y) { return called("s6", x, y); }
-        public static Object   s7(float x, double y) { return called("s7", x, y); }
-
-        static final Lookup EXAMPLE = MethodHandles.lookup();  // for testing findSpecial
-    }
-    static final Lookup EXAMPLE = Example.EXAMPLE;
-    public static class PubExample extends Example {
-        public PubExample() { super("PubExample#"+nextArg()); }
-    }
-    static class SubExample extends Example {
-        @Override public void  v0()     { called("Sub/v0", this); }
-        @Override void         pkg_v0() { called("Sub/pkg_v0", this); }
-        private      SubExample(int x)  { called("<init>", this, x); }
-        public SubExample() { super("SubExample#"+nextArg()); }
-    }
-    public static interface IntExample {
-        public void            v0();
-        public static class Impl implements IntExample {
-            public void        v0()     { called("Int/v0", this); }
-            final String name;
-            public Impl() { name = "Impl#"+nextArg(); }
-            @Override public String toString() { return name; }
-        }
-    }
-
-    static final Object[][][] ACCESS_CASES = {
-        { { false, PUBLIC }, { false, PACKAGE }, { false, PRIVATE }, { false, EXAMPLE } }, //[0]: all false
-        { { false, PUBLIC }, { false, PACKAGE }, { true,  PRIVATE }, { true,  EXAMPLE } }, //[1]: only PRIVATE
-        { { false, PUBLIC }, { true,  PACKAGE }, { true,  PRIVATE }, { true,  EXAMPLE } }, //[2]: PUBLIC false
-        { { true,  PUBLIC }, { true,  PACKAGE }, { true,  PRIVATE }, { true,  EXAMPLE } }, //[3]: all true
-    };
-
-    static Object[][] accessCases(Class<?> defc, String name, boolean isSpecial) {
-        Object[][] cases;
-        if (name.contains("pri_") || isSpecial) {
-            cases = ACCESS_CASES[1]; // PRIVATE only
-        } else if (name.contains("pkg_") || !Modifier.isPublic(defc.getModifiers())) {
-            cases = ACCESS_CASES[2]; // not PUBLIC
-        } else {
-            assertTrue(name.indexOf('_') < 0);
-            boolean pubc = Modifier.isPublic(defc.getModifiers());
-            if (pubc)
-                cases = ACCESS_CASES[3]; // all access levels
-            else
-                cases = ACCESS_CASES[2]; // PACKAGE but not PUBLIC
-        }
-        if (defc != Example.class && cases[cases.length-1][1] == EXAMPLE)
-            cases = Arrays.copyOfRange(cases, 0, cases.length-1);
-        return cases;
-    }
-    static Object[][] accessCases(Class<?> defc, String name) {
-        return accessCases(defc, name, false);
-    }
-
-    @Test
-    public void testFindStatic() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("findStatic");
-        testFindStatic(PubExample.class, void.class, "s0");
-        testFindStatic(Example.class, void.class, "s0");
-        testFindStatic(Example.class, void.class, "pkg_s0");
-        testFindStatic(Example.class, void.class, "pri_s0");
-
-        testFindStatic(Example.class, Object.class, "s1", Object.class);
-        testFindStatic(Example.class, Object.class, "s2", int.class);
-        testFindStatic(Example.class, Object.class, "s3", long.class);
-        testFindStatic(Example.class, Object.class, "s4", int.class, int.class);
-        testFindStatic(Example.class, Object.class, "s5", long.class, int.class);
-        testFindStatic(Example.class, Object.class, "s6", int.class, long.class);
-        testFindStatic(Example.class, Object.class, "s7", float.class, double.class);
-
-        testFindStatic(false, PRIVATE, Example.class, void.class, "bogus");
-    }
-
-    void testFindStatic(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        for (Object[] ac : accessCases(defc, name)) {
-            testFindStatic((Boolean)ac[0], (Lookup)ac[1], defc, ret, name, params);
-        }
-    }
-    void testFindStatic(Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        testFindStatic(true, lookup, defc, ret, name, params);
-    }
-    void testFindStatic(boolean positive, Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        countTest(positive);
-        MethodType type = MethodType.methodType(ret, params);
-        MethodHandle target = null;
-        Exception noAccess = null;
-        try {
-            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
-            target = lookup.in(defc).findStatic(defc, name, type);
-        } catch (NoAccessException ex) {
-            noAccess = ex;
-        }
-        if (verbosity >= 3)
-            System.out.println("findStatic "+lookup+": "+defc.getName()+"."+name+"/"+type+" => "+target
-                    +(noAccess == null ? "" : " !! "+noAccess));
-        if (positive && noAccess != null)  throw noAccess;
-        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
-        if (!positive)  return; // negative test failed as expected
-        assertEquals(type, target.type());
-        assertNameStringContains(target, name);
-        if (!DO_MORE_CALLS && lookup != PRIVATE)  return;
-        Object[] args = randomArgs(params);
-        printCalled(target, name, args);
-        target.invokeWithArguments(args);
-        assertCalled(name, args);
-        if (verbosity >= 1)
-            System.out.print(':');
-    }
-
-    // rough check of name string
-    static void assertNameStringContains(Object x, String s) {
-        if (x.toString().contains(s))  return;
-        assertEquals(s, x);
-    }
-
-    @Test
-    public void testFindVirtual() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("findVirtual");
-        testFindVirtual(Example.class, void.class, "v0");
-        testFindVirtual(Example.class, void.class, "pkg_v0");
-        testFindVirtual(Example.class, void.class, "pri_v0");
-        testFindVirtual(Example.class, Object.class, "v1", Object.class);
-        testFindVirtual(Example.class, Object.class, "v2", Object.class, Object.class);
-        testFindVirtual(Example.class, Object.class, "v2", Object.class, int.class);
-        testFindVirtual(Example.class, Object.class, "v2", int.class, Object.class);
-        testFindVirtual(Example.class, Object.class, "v2", int.class, int.class);
-        testFindVirtual(false, PRIVATE, Example.class, Example.class, void.class, "bogus");
-        // test dispatch
-        testFindVirtual(SubExample.class,      SubExample.class, void.class, "Sub/v0");
-        testFindVirtual(SubExample.class,         Example.class, void.class, "Sub/v0");
-        testFindVirtual(SubExample.class,      IntExample.class, void.class, "Sub/v0");
-        testFindVirtual(SubExample.class,      SubExample.class, void.class, "Sub/pkg_v0");
-        testFindVirtual(SubExample.class,         Example.class, void.class, "Sub/pkg_v0");
-        testFindVirtual(Example.class,         IntExample.class, void.class, "v0");
-        testFindVirtual(IntExample.Impl.class, IntExample.class, void.class, "Int/v0");
-    }
-
-    void testFindVirtual(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        Class<?> rcvc = defc;
-        testFindVirtual(rcvc, defc, ret, name, params);
-    }
-    void testFindVirtual(Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        for (Object[] ac : accessCases(defc, name)) {
-            testFindVirtual((Boolean)ac[0], (Lookup)ac[1], rcvc, defc, ret, name, params);
-        }
-    }
-    void testFindVirtual(Lookup lookup, Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        testFindVirtual(true, lookup, rcvc, defc, ret, name, params);
-    }
-    void testFindVirtual(boolean positive, Lookup lookup, Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        countTest(positive);
-        String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
-        MethodType type = MethodType.methodType(ret, params);
-        MethodHandle target = null;
-        Exception noAccess = null;
-        try {
-            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
-            target = lookup.in(defc).findVirtual(defc, methodName, type);
-        } catch (NoAccessException ex) {
-            noAccess = ex;
-        }
-        if (verbosity >= 3)
-            System.out.println("findVirtual "+lookup+": "+defc.getName()+"."+name+"/"+type+" => "+target
-                    +(noAccess == null ? "" : " !! "+noAccess));
-        if (positive && noAccess != null)  throw noAccess;
-        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
-        if (!positive)  return; // negative test failed as expected
-        Class<?>[] paramsWithSelf = cat(array(Class[].class, (Class)defc), params);
-        MethodType typeWithSelf = MethodType.methodType(ret, paramsWithSelf);
-        assertEquals(typeWithSelf, target.type());
-        assertNameStringContains(target, methodName);
-        if (!DO_MORE_CALLS && lookup != PRIVATE)  return;
-        Object[] argsWithSelf = randomArgs(paramsWithSelf);
-        if (rcvc != defc)  argsWithSelf[0] = randomArg(rcvc);
-        printCalled(target, name, argsWithSelf);
-        target.invokeWithArguments(argsWithSelf);
-        assertCalled(name, argsWithSelf);
-        if (verbosity >= 1)
-            System.out.print(':');
-    }
-
-    @Test
-    public void testFindSpecial() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("findSpecial");
-        testFindSpecial(SubExample.class, Example.class, void.class, "v0");
-        testFindSpecial(SubExample.class, Example.class, void.class, "pkg_v0");
-        // Do some negative testing:
-        for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
-            testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
-            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
-            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
-            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "bogus");
-        }
-    }
-
-    void testFindSpecial(Class<?> specialCaller,
-                         Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        testFindSpecial(true,  EXAMPLE, specialCaller, defc, ret, name, params);
-        testFindSpecial(true,  PRIVATE, specialCaller, defc, ret, name, params);
-        testFindSpecial(false, PACKAGE, specialCaller, defc, ret, name, params);
-        testFindSpecial(false, PUBLIC,  specialCaller, defc, ret, name, params);
-    }
-    void testFindSpecial(boolean positive, Lookup lookup, Class<?> specialCaller,
-                         Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        countTest(positive);
-        MethodType type = MethodType.methodType(ret, params);
-        MethodHandle target = null;
-        Exception noAccess = null;
-        try {
-            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
-            if (verbosity >= 5)  System.out.println("  lookup => "+lookup.in(specialCaller));
-            target = lookup.in(specialCaller).findSpecial(defc, name, type, specialCaller);
-        } catch (NoAccessException ex) {
-            noAccess = ex;
-        }
-        if (verbosity >= 3)
-            System.out.println("findSpecial from "+specialCaller.getName()+" to "+defc.getName()+"."+name+"/"+type+" => "+target
-                               +(target == null ? "" : target.type())
-                               +(noAccess == null ? "" : " !! "+noAccess));
-        if (positive && noAccess != null)  throw noAccess;
-        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
-        if (!positive)  return; // negative test failed as expected
-        assertEquals(specialCaller, target.type().parameterType(0));
-        assertEquals(type,          target.type().dropParameterTypes(0,1));
-        Class<?>[] paramsWithSelf = cat(array(Class[].class, (Class)specialCaller), params);
-        MethodType typeWithSelf = MethodType.methodType(ret, paramsWithSelf);
-        assertNameStringContains(target, name);
-        if (!DO_MORE_CALLS && lookup != PRIVATE && lookup != EXAMPLE)  return;
-        Object[] args = randomArgs(paramsWithSelf);
-        printCalled(target, name, args);
-        target.invokeWithArguments(args);
-        assertCalled(name, args);
-    }
-
-    @Test
-    public void testBind() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("bind");
-        testBind(Example.class, void.class, "v0");
-        testBind(Example.class, void.class, "pkg_v0");
-        testBind(Example.class, void.class, "pri_v0");
-        testBind(Example.class, Object.class, "v1", Object.class);
-        testBind(Example.class, Object.class, "v2", Object.class, Object.class);
-        testBind(Example.class, Object.class, "v2", Object.class, int.class);
-        testBind(Example.class, Object.class, "v2", int.class, Object.class);
-        testBind(Example.class, Object.class, "v2", int.class, int.class);
-        testBind(false, PRIVATE, Example.class, void.class, "bogus");
-        testBind(SubExample.class, void.class, "Sub/v0");
-        testBind(SubExample.class, void.class, "Sub/pkg_v0");
-        testBind(IntExample.Impl.class, void.class, "Int/v0");
-    }
-
-    void testBind(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        for (Object[] ac : accessCases(defc, name)) {
-            testBind((Boolean)ac[0], (Lookup)ac[1], defc, ret, name, params);
-        }
-    }
-
-    void testBind(boolean positive, Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        countTest(positive);
-        String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
-        MethodType type = MethodType.methodType(ret, params);
-        Object receiver = randomArg(defc);
-        MethodHandle target = null;
-        Exception noAccess = null;
-        try {
-            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
-            target = lookup.in(defc).bind(receiver, methodName, type);
-        } catch (NoAccessException ex) {
-            noAccess = ex;
-        }
-        if (verbosity >= 3)
-            System.out.println("bind "+receiver+"."+name+"/"+type+" => "+target
-                    +(noAccess == null ? "" : " !! "+noAccess));
-        if (positive && noAccess != null)  throw noAccess;
-        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
-        if (!positive)  return; // negative test failed as expected
-        assertEquals(type, target.type());
-        Object[] args = randomArgs(params);
-        printCalled(target, name, args);
-        target.invokeWithArguments(args);
-        Object[] argsWithReceiver = cat(array(Object[].class, receiver), args);
-        assertCalled(name, argsWithReceiver);
-        if (verbosity >= 1)
-            System.out.print(':');
-    }
-
-    @Test
-    public void testUnreflect() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("unreflect");
-        testUnreflect(Example.class, true, void.class, "s0");
-        testUnreflect(Example.class, true, void.class, "pkg_s0");
-        testUnreflect(Example.class, true, void.class, "pri_s0");
-
-        testUnreflect(Example.class, true, Object.class, "s1", Object.class);
-        testUnreflect(Example.class, true, Object.class, "s2", int.class);
-        testUnreflect(Example.class, true, Object.class, "s3", long.class);
-        testUnreflect(Example.class, true, Object.class, "s4", int.class, int.class);
-        testUnreflect(Example.class, true, Object.class, "s5", long.class, int.class);
-        testUnreflect(Example.class, true, Object.class, "s6", int.class, long.class);
-
-        testUnreflect(Example.class, false, void.class, "v0");
-        testUnreflect(Example.class, false, void.class, "pkg_v0");
-        testUnreflect(Example.class, false, void.class, "pri_v0");
-        testUnreflect(Example.class, false, Object.class, "v1", Object.class);
-        testUnreflect(Example.class, false, Object.class, "v2", Object.class, Object.class);
-        testUnreflect(Example.class, false, Object.class, "v2", Object.class, int.class);
-        testUnreflect(Example.class, false, Object.class, "v2", int.class, Object.class);
-        testUnreflect(Example.class, false, Object.class, "v2", int.class, int.class);
-    }
-
-    void testUnreflect(Class<?> defc, boolean isStatic, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        for (Object[] ac : accessCases(defc, name)) {
-            testUnreflectMaybeSpecial(null, (Boolean)ac[0], (Lookup)ac[1], defc, (isStatic ? null : defc), ret, name, params);
-        }
-    }
-    void testUnreflect(Class<?> defc, Class<?> rcvc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        for (Object[] ac : accessCases(defc, name)) {
-            testUnreflectMaybeSpecial(null, (Boolean)ac[0], (Lookup)ac[1], defc, rcvc, ret, name, params);
-        }
-    }
-    void testUnreflectMaybeSpecial(Class<?> specialCaller,
-                                   boolean positive, Lookup lookup,
-                                   Class<?> defc, Class<?> rcvc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        countTest(positive);
-        MethodType type = MethodType.methodType(ret, params);
-        Method rmethod = null;
-        MethodHandle target = null;
-        Exception noAccess = null;
-        try {
-            rmethod = defc.getDeclaredMethod(name, params);
-        } catch (NoSuchMethodException ex) {
-            throw new NoAccessException(ex);
-        }
-        boolean isStatic = (rcvc == null);
-        boolean isSpecial = (specialCaller != null);
-        try {
-            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
-            if (isSpecial)
-                target = lookup.in(specialCaller).unreflectSpecial(rmethod, specialCaller);
-            else
-                target = lookup.in(defc).unreflect(rmethod);
-        } catch (NoAccessException ex) {
-            noAccess = ex;
-        }
-        if (verbosity >= 3)
-            System.out.println("unreflect"+(isSpecial?"Special":"")+" "+defc.getName()+"."+name+"/"+type
-                               +(!isSpecial ? "" : " specialCaller="+specialCaller)
-                               +( isStatic  ? "" : " receiver="+rcvc)
-                               +" => "+target
-                               +(noAccess == null ? "" : " !! "+noAccess));
-        if (positive && noAccess != null)  throw noAccess;
-        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
-        if (!positive)  return; // negative test failed as expected
-        assertEquals(isStatic, Modifier.isStatic(rmethod.getModifiers()));
-        Class<?>[] paramsMaybeWithSelf = params;
-        if (!isStatic) {
-            paramsMaybeWithSelf = cat(array(Class[].class, (Class)rcvc), params);
-        }
-        MethodType typeMaybeWithSelf = MethodType.methodType(ret, paramsMaybeWithSelf);
-        if (isStatic) {
-            assertEquals(typeMaybeWithSelf, target.type());
-        } else {
-            if (isSpecial)
-                assertEquals(specialCaller, target.type().parameterType(0));
-            else
-                assertEquals(defc, target.type().parameterType(0));
-            assertEquals(typeMaybeWithSelf, target.type().changeParameterType(0, rcvc));
-        }
-        Object[] argsMaybeWithSelf = randomArgs(paramsMaybeWithSelf);
-        printCalled(target, name, argsMaybeWithSelf);
-        target.invokeWithArguments(argsMaybeWithSelf);
-        assertCalled(name, argsMaybeWithSelf);
-        if (verbosity >= 1)
-            System.out.print(':');
-    }
-
-    void testUnreflectSpecial(Class<?> defc, Class<?> rcvc, Class<?> ret, String name, Class<?>... params) throws Throwable {
-        for (Object[] ac : accessCases(defc, name, true)) {
-            Class<?> specialCaller = rcvc;
-            testUnreflectMaybeSpecial(specialCaller, (Boolean)ac[0], (Lookup)ac[1], defc, rcvc, ret, name, params);
-        }
-    }
-
-    @Test
-    public void testUnreflectSpecial() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("unreflectSpecial");
-        testUnreflectSpecial(Example.class,    Example.class, void.class, "v0");
-        testUnreflectSpecial(Example.class, SubExample.class, void.class, "v0");
-        testUnreflectSpecial(Example.class,    Example.class, void.class, "pkg_v0");
-        testUnreflectSpecial(Example.class, SubExample.class, void.class, "pkg_v0");
-        testUnreflectSpecial(Example.class,    Example.class, Object.class, "v2", int.class, int.class);
-        testUnreflectSpecial(Example.class, SubExample.class, Object.class, "v2", int.class, int.class);
-        testUnreflectMaybeSpecial(Example.class, false, PRIVATE, Example.class, Example.class, void.class, "s0");
-    }
-
-    public static class HasFields {
-        boolean fZ = false;
-        byte fB = (byte)'B';
-        short fS = (short)'S';
-        char fC = 'C';
-        int fI = 'I';
-        long fJ = 'J';
-        float fF = 'F';
-        double fD = 'D';
-        static boolean sZ = true;
-        static byte sB = 1+(byte)'B';
-        static short sS = 1+(short)'S';
-        static char sC = 1+'C';
-        static int sI = 1+'I';
-        static long sJ = 1+'J';
-        static float sF = 1+'F';
-        static double sD = 1+'D';
-
-        Object fL = 'L';
-        String fR = "R";
-        static Object sL = 'M';
-        static String sR = "S";
-
-        static final Object[][] CASES;
-        static {
-            ArrayList<Object[]> cases = new ArrayList<Object[]>();
-            Object types[][] = {
-                {'L',Object.class}, {'R',String.class},
-                {'I',int.class}, {'J',long.class},
-                {'F',float.class}, {'D',double.class},
-                {'Z',boolean.class}, {'B',byte.class},
-                {'S',short.class}, {'C',char.class},
-            };
-            HasFields fields = new HasFields();
-            for (Object[] t : types) {
-                for (int kind = 0; kind <= 1; kind++) {
-                    boolean isStatic = (kind != 0);
-                    char btc = (Character)t[0];
-                    String name = (isStatic ? "s" : "f") + btc;
-                    Class<?> type = (Class<?>) t[1];
-                    Object value;
-                    Field field;
-                    try {
-                        field = HasFields.class.getDeclaredField(name);
-                    } catch (Exception ex) {
-                        throw new InternalError("no field HasFields."+name);
-                    }
-                    try {
-                        value = field.get(fields);
-                    } catch (Exception ex) {
-                        throw new InternalError("cannot fetch field HasFields."+name);
-                    }
-                    if (type == float.class) {
-                        float v = 'F';
-                        if (isStatic)  v++;
-                        assert(value.equals(v));
-                    }
-                    assert(name.equals(field.getName()));
-                    assert(type.equals(field.getType()));
-                    assert(isStatic == (Modifier.isStatic(field.getModifiers())));
-                    cases.add(new Object[]{ field, value });
-                }
-            }
-            CASES = cases.toArray(new Object[0][]);
-        }
-    }
-
-    static final int TEST_UNREFLECT = 1, TEST_FIND_FIELD = 2, TEST_FIND_STATIC_FIELD = 3;
-    static boolean testModeMatches(int testMode, boolean isStatic) {
-        switch (testMode) {
-        case TEST_FIND_STATIC_FIELD:    return isStatic;
-        case TEST_FIND_FIELD:           return !isStatic;
-        default:                        return true;  // unreflect matches both
-        }
-    }
-
-    @Test
-    public void testUnreflectGetter() throws Throwable {
-        startTest("unreflectGetter");
-        testGetter(TEST_UNREFLECT);
-    }
-    @Test
-    public void testFindGetter() throws Throwable {
-        startTest("findGetter");
-        testGetter(TEST_FIND_FIELD);
-    }
-    @Test
-    public void testFindStaticGetter() throws Throwable {
-        startTest("findStaticGetter");
-        testGetter(TEST_FIND_STATIC_FIELD);
-    }
-    public void testGetter(int testMode) throws Throwable {
-        Lookup lookup = PRIVATE;  // FIXME: test more lookups than this one
-        for (Object[] c : HasFields.CASES) {
-            Field f = (Field)c[0];
-            Object value = c[1];
-            Class<?> type = f.getType();
-            testGetter(lookup, f, type, value, testMode);
-        }
-    }
-    public void testGetter(MethodHandles.Lookup lookup,
-            Field f, Class<?> type, Object value, int testMode) throws Throwable {
-        boolean isStatic = Modifier.isStatic(f.getModifiers());
-        Class<?> fclass = f.getDeclaringClass();
-        String   fname  = f.getName();
-        Class<?> ftype  = f.getType();
-        if (!testModeMatches(testMode, isStatic))  return;
-        countTest(true);
-        MethodType expType = MethodType.methodType(type, HasFields.class);
-        if (isStatic)  expType = expType.dropParameterTypes(0, 1);
-        MethodHandle mh = lookup.unreflectGetter(f);
-        assertSame(mh.type(), expType);
-        assertNameStringContains(mh, fname);
-        HasFields fields = new HasFields();
-        Object sawValue;
-        Class<?> rtype = type;
-        if (type != int.class)  rtype = Object.class;
-        mh = MethodHandles.convertArguments(mh, mh.type().generic().changeReturnType(rtype));
-        Object expValue = value;
-        for (int i = 0; i <= 1; i++) {
-            if (isStatic) {
-                if (type == int.class)
-                    sawValue = (int) mh.invokeExact();  // do these exactly
-                else
-                    sawValue = mh.invokeExact();
-            } else {
-                if (type == int.class)
-                    sawValue = (int) mh.invokeExact((Object) fields);
-                else
-                    sawValue = mh.invokeExact((Object) fields);
-            }
-            assertEquals(sawValue, expValue);
-            Object random = randomArg(type);
-            f.set(fields, random);
-            expValue = random;
-        }
-        f.set(fields, value);  // put it back
-    }
-
-
-    @Test
-    public void testUnreflectSetter() throws Throwable {
-        startTest("unreflectSetter");
-        testSetter(TEST_UNREFLECT);
-    }
-    @Test
-    public void testFindSetter() throws Throwable {
-        startTest("findSetter");
-        testSetter(TEST_FIND_FIELD);
-    }
-    @Test
-    public void testFindStaticSetter() throws Throwable {
-        startTest("findStaticSetter");
-        testSetter(TEST_FIND_STATIC_FIELD);
-    }
-    public void testSetter(int testMode) throws Throwable {
-        Lookup lookup = PRIVATE;  // FIXME: test more lookups than this one
-        startTest("unreflectSetter");
-        for (Object[] c : HasFields.CASES) {
-            Field f = (Field)c[0];
-            Object value = c[1];
-            Class<?> type = f.getType();
-            testSetter(lookup, f, type, value, testMode);
-        }
-    }
-    public void testSetter(MethodHandles.Lookup lookup,
-            Field f, Class<?> type, Object value, int testMode) throws Throwable {
-        boolean isStatic = Modifier.isStatic(f.getModifiers());
-        Class<?> fclass = f.getDeclaringClass();
-        String   fname  = f.getName();
-        Class<?> ftype  = f.getType();
-        if (!testModeMatches(testMode, isStatic))  return;
-        countTest(true);
-        MethodType expType = MethodType.methodType(void.class, HasFields.class, type);
-        if (isStatic)  expType = expType.dropParameterTypes(0, 1);
-        MethodHandle mh;
-        if (testMode == TEST_UNREFLECT)
-            mh = lookup.unreflectSetter(f);
-        else if (testMode == TEST_FIND_FIELD)
-            mh = lookup.findSetter(fclass, fname, ftype);
-        else if (testMode == TEST_FIND_STATIC_FIELD)
-            mh = lookup.findStaticSetter(fclass, fname, ftype);
-        else  throw new InternalError();
-        assertSame(mh.type(), expType);
-        assertNameStringContains(mh, fname);
-        HasFields fields = new HasFields();
-        Object sawValue;
-        Class<?> vtype = type;
-        if (type != int.class)  vtype = Object.class;
-        int last = mh.type().parameterCount() - 1;
-        mh = MethodHandles.convertArguments(mh, mh.type().generic().changeReturnType(void.class).changeParameterType(last, vtype));
-        assertEquals(f.get(fields), value);  // clean to start with
-        for (int i = 0; i <= 1; i++) {
-            Object putValue = randomArg(type);
-            if (isStatic) {
-                if (type == int.class)
-                    mh.invokeExact((int)putValue);  // do these exactly
-                else
-                    mh.invokeExact(putValue);
-            } else {
-                if (type == int.class)
-                    mh.invokeExact((Object) fields, (int)putValue);
-                else
-                    mh.invokeExact((Object) fields, putValue);
-            }
-            assertEquals(f.get(fields), putValue);
-        }
-        f.set(fields, value);  // put it back
-    }
-
-    @Test
-    public void testArrayElementGetter() throws Throwable {
-        startTest("arrayElementGetter");
-        testArrayElementGetterSetter(false);
-    }
-
-    @Test
-    public void testArrayElementSetter() throws Throwable {
-        startTest("arrayElementSetter");
-        testArrayElementGetterSetter(true);
-    }
-
-    public void testArrayElementGetterSetter(boolean testSetter) throws Throwable {
-        testArrayElementGetterSetter(new Object[10], testSetter);
-        testArrayElementGetterSetter(new String[10], testSetter);
-        testArrayElementGetterSetter(new boolean[10], testSetter);
-        testArrayElementGetterSetter(new byte[10], testSetter);
-        testArrayElementGetterSetter(new char[10], testSetter);
-        testArrayElementGetterSetter(new short[10], testSetter);
-        testArrayElementGetterSetter(new int[10], testSetter);
-        testArrayElementGetterSetter(new float[10], testSetter);
-        testArrayElementGetterSetter(new long[10], testSetter);
-        testArrayElementGetterSetter(new double[10], testSetter);
-    }
-
-    public void testArrayElementGetterSetter(Object array, boolean testSetter) throws Throwable {
-        countTest(true);
-        if (verbosity >= 2)  System.out.println("array type = "+array.getClass().getComponentType().getName()+"["+Array.getLength(array)+"]");
-        Class<?> arrayType = array.getClass();
-        Class<?> elemType = arrayType.getComponentType();
-        MethodType expType = !testSetter
-                ? MethodType.methodType(elemType,   arrayType, int.class)
-                : MethodType.methodType(void.class, arrayType, int.class, elemType);
-        MethodHandle mh = !testSetter
-                ? MethodHandles.arrayElementGetter(arrayType)
-                : MethodHandles.arrayElementSetter(arrayType);
-        assertSame(mh.type(), expType);
-        if (elemType != int.class && elemType != boolean.class) {
-            MethodType gtype;
-            if (true) { // FIXME: remove this path (and remove <void> below in the mh.invokes)
-                gtype = mh.type().changeParameterType(0, Object.class);
-                if (testSetter)
-                    gtype = gtype.changeParameterType(2, Object.class);
-                else
-                    gtype = gtype.changeReturnType(Object.class);
-            } else
-                // FIXME: This simpler path hits a bug in convertArguments => ToGeneric
-                gtype = mh.type().generic().changeParameterType(1, int.class);
-            mh = MethodHandles.convertArguments(mh, gtype);
-        }
-        Object sawValue, expValue;
-        List<Object> model = array2list(array);
-        int length = Array.getLength(array);
-        for (int i = 0; i < length; i++) {
-            // update array element
-            Object random = randomArg(elemType);
-            model.set(i, random);
-            if (testSetter) {
-                if (elemType == int.class)
-                    mh.invokeExact((int[]) array, i, (int)random);
-                else if (elemType == boolean.class)
-                    mh.invokeExact((boolean[]) array, i, (boolean)random);
-                else
-                    mh.invokeExact(array, i, random);
-                assertEquals(model, array2list(array));
-            } else {
-                Array.set(array, i, random);
-            }
-            if (verbosity >= 5) {
-                List<Object> array2list = array2list(array);
-                System.out.println("a["+i+"]="+random+" => "+array2list);
-                if (!array2list.equals(model))
-                    System.out.println("***   != "+model);
-            }
-            // observe array element
-            sawValue = Array.get(array, i);
-            if (!testSetter) {
-                expValue = sawValue;
-                if (elemType == int.class)
-                    sawValue = (int) mh.invokeExact((int[]) array, i);
-                else if (elemType == boolean.class)
-                    sawValue = (boolean) mh.invokeExact((boolean[]) array, i);
-                else
-                    sawValue = mh.invokeExact(array, i);
-                assertEquals(sawValue, expValue);
-                assertEquals(model, array2list(array));
-            }
-        }
-    }
-
-    List<Object> array2list(Object array) {
-        int length = Array.getLength(array);
-        ArrayList<Object> model = new ArrayList<Object>(length);
-        for (int i = 0; i < length; i++)
-            model.add(Array.get(array, i));
-        return model;
-    }
-
-    static class Callee {
-        static Object id() { return called("id"); }
-        static Object id(Object x) { return called("id", x); }
-        static Object id(Object x, Object y) { return called("id", x, y); }
-        static Object id(Object x, Object y, Object z) { return called("id", x, y, z); }
-        static Object id(Object... vx) { return called("id", vx); }
-        static MethodHandle ofType(int n) {
-            return ofType(Object.class, n);
-        }
-        static MethodHandle ofType(Class<?> rtype, int n) {
-            if (n == -1)
-                return ofType(MethodType.methodType(rtype, Object[].class));
-            return ofType(MethodType.genericMethodType(n).changeReturnType(rtype));
-        }
-        static MethodHandle ofType(Class<?> rtype, Class<?>... ptypes) {
-            return ofType(MethodType.methodType(rtype, ptypes));
-        }
-        static MethodHandle ofType(MethodType type) {
-            Class<?> rtype = type.returnType();
-            String pfx = "";
-            if (rtype != Object.class)
-                pfx = rtype.getSimpleName().substring(0, 1).toLowerCase();
-            String name = pfx+"id";
-            try {
-                return PRIVATE.findStatic(Callee.class, name, type);
-            } catch (Exception ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-
-    static MethodHandle typeHandler2(MethodHandle target, MethodType newType) {
-        MethodType oldType = target.type();
-        int oldArity = oldType.parameterCount();
-        int newArity = newType.parameterCount();
-        if (newArity < oldArity)
-            return MethodHandles.insertArguments(target, oldArity, "OPTIONAL");
-        else if (newArity > oldArity)
-            return MethodHandles.dropArguments(target, oldArity-1, newType.parameterType(oldArity-1));
-        else
-            return target;  // attempt no further conversions
-    }
-
-    @Test
-    public void testConvertArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("convertArguments");
-        testConvert(Callee.ofType(1), null, "id", int.class);
-        testConvert(Callee.ofType(1), null, "id", String.class);
-        testConvert(Callee.ofType(1), null, "id", Integer.class);
-        testConvert(Callee.ofType(1), null, "id", short.class);
-        testConvert(Callee.ofType(1), null, "id", char.class);
-        testConvert(Callee.ofType(1), null, "id", byte.class);
-    }
-
-    void testConvert(MethodHandle id, Class<?> rtype, String name, Class<?>... params) throws Throwable {
-        testConvert(true, false, id, rtype, name, params);
-        testConvert(true, true,  id, rtype, name, params);
-    }
-
-    @Test
-    public void testTypeHandler() throws Throwable {
-        MethodHandle id = Callee.ofType(1);
-        MethodHandle th2 = PRIVATE.findStatic(MethodHandlesTest.class, "typeHandler2",
-                               MethodType.methodType(MethodHandle.class, MethodHandle.class, MethodType.class));
-        MethodHandle id2 = id.withTypeHandler(th2);
-        testConvert(true,  false, id2, null, "id", Object.class);
-        testConvert(true,  true,  id2, null, "id", Object.class);
-        if (true)  return;  //FIXME
-        testConvert(true,  false, id2, null, "id", String.class);  // FIXME: throws WMT
-        testConvert(false, true,  id2, null, "id", String.class);  // FIXME: should not succeed
-        testConvert(false, false, id2, null, "id", Object.class, String.class); //FIXME: array[1] line 1164
-        testConvert(true,  true,  id2, null, "id", Object.class, String.class);
-        testConvert(false, false, id2, null, "id");
-        testConvert(true,  true,  id2, null, "id");
-    }
-
-    void testConvert(boolean positive, boolean useAsType,
-                     MethodHandle id, Class<?> rtype, String name, Class<?>... params) throws Throwable {
-        countTest(positive);
-        MethodType idType = id.type();
-        if (rtype == null)  rtype = idType.returnType();
-        for (int i = 0; i < params.length; i++) {
-            if (params[i] == null)  params[i] = idType.parameterType(i);
-        }
-        // simulate the pairwise conversion
-        MethodType newType = MethodType.methodType(rtype, params);
-        Object[] args = randomArgs(newType.parameterArray());
-        Object[] convArgs = args.clone();
-        for (int i = 0; i < args.length; i++) {
-            Class<?> src = newType.parameterType(i);
-            Class<?> dst = idType.parameterType(i);
-            if (src != dst)
-                convArgs[i] = castToWrapper(convArgs[i], dst);
-        }
-        Object convResult = id.invokeWithArguments(convArgs);
-        {
-            Class<?> dst = newType.returnType();
-            Class<?> src = idType.returnType();
-            if (src != dst)
-                convResult = castToWrapper(convResult, dst);
-        }
-        MethodHandle target = null;
-        RuntimeException error = null;
-        try {
-            if (useAsType)
-                target = MethodHandles.convertArguments(id, newType);
-            else
-                target = id.asType(newType);
-        } catch (RuntimeException ex) {
-            error = ex;
-        }
-        if (verbosity >= 3)
-            System.out.println("convert "+id+ " to "+newType+" => "+target
-                    +(error == null ? "" : " !! "+error));
-        if (positive && error != null)  throw error;
-        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
-        if (!positive)  return; // negative test failed as expected
-        assertEquals(newType, target.type());
-        printCalled(target, id.toString(), args);
-        Object result = target.invokeWithArguments(args);
-        assertCalled(name, convArgs);
-        assertEquals(convResult, result);
-        if (verbosity >= 1)
-            System.out.print(':');
-    }
-
-    @Test
-    public void testPermuteArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("permuteArguments");
-        testPermuteArguments(4, Integer.class,  2, String.class,  0);
-        //testPermuteArguments(6, Integer.class,  0, null,         30);
-        //testPermuteArguments(4, Integer.class,  1, int.class,     6);
-    }
-    public void testPermuteArguments(int max, Class<?> type1, int t2c, Class<?> type2, int dilution) throws Throwable {
-        if (verbosity >= 2)
-            System.out.println("permuteArguments "+max+"*"+type1.getName()
-                    +(t2c==0?"":"/"+t2c+"*"+type2.getName())
-                    +(dilution > 0 ? " with dilution "+dilution : ""));
-        int t2pos = t2c == 0 ? 0 : 1;
-        for (int inargs = t2pos+1; inargs <= max; inargs++) {
-            Class<?>[] types = new Class<?>[inargs];
-            Arrays.fill(types, type1);
-            if (t2c != 0) {
-                // Fill in a middle range with type2:
-                Arrays.fill(types, t2pos, Math.min(t2pos+t2c, inargs), type2);
-            }
-            Object[] args = randomArgs(types);
-            int numcases = 1;
-            for (int outargs = 0; outargs <= max; outargs++) {
-                if (outargs - inargs >= MAX_ARG_INCREASE)  continue;
-                int[] reorder = new int[outargs];
-                int casStep = dilution + 1;
-                // Avoid some common factors:
-                while ((casStep > 2 && casStep % 2 == 0 && inargs % 2 == 0) ||
-                       (casStep > 3 && casStep % 3 == 0 && inargs % 3 == 0))
-                    casStep++;
-                for (int cas = 0; cas < numcases; cas += casStep) {
-                    for (int i = 0, c = cas; i < outargs; i++) {
-                        reorder[i] = c % inargs;
-                        c /= inargs;
-                    }
-                    testPermuteArguments(args, types, reorder);
-                }
-                numcases *= inargs;
-                if (dilution > 10 && outargs >= 4) {
-                    // Do some special patterns, which we probably missed.
-                    // Replication of a single argument or argument pair.
-                    for (int i = 0; i < inargs; i++) {
-                        Arrays.fill(reorder, i);
-                        testPermuteArguments(args, types, reorder);
-                        for (int d = 1; d <= 2; d++) {
-                            if (i + d >= inargs)  continue;
-                            for (int j = 1; j < outargs; j += 2)
-                                reorder[j] += 1;
-                            testPermuteArguments(args, types, reorder);
-                            testPermuteArguments(args, types, reverse(reorder));
-                        }
-                    }
-                    // Repetition of a sequence of 3 or more arguments.
-                    for (int i = 1; i < inargs; i++) {
-                        for (int len = 3; len <= inargs; len++) {
-                            for (int j = 0; j < outargs; j++)
-                                reorder[j] = (i + (j % len)) % inargs;
-                            testPermuteArguments(args, types, reorder);
-                            testPermuteArguments(args, types, reverse(reorder));
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    static int[] reverse(int[] reorder) {
-        reorder = reorder.clone();
-        for (int i = 0, imax = reorder.length / 2; i < imax; i++) {
-            int j = reorder.length - 1 - i;
-            int tem = reorder[i];
-            reorder[i] = reorder[j];
-            reorder[j] = tem;
-        }
-        return reorder;
-    }
-
-    void testPermuteArguments(Object[] args, Class<?>[] types, int[] reorder) throws Throwable {
-        countTest();
-        if (args == null && types == null) {
-            int max = 0;
-            for (int j : reorder) {
-                if (max < j)  max = j;
-            }
-            args = randomArgs(max+1, Integer.class);
-        }
-        if (args == null) {
-            args = randomArgs(types);
-        }
-        if (types == null) {
-            types = new Class<?>[args.length];
-            for (int i = 0; i < args.length; i++)
-                types[i] = args[i].getClass();
-        }
-        int inargs = args.length, outargs = reorder.length;
-        assert(inargs == types.length);
-        if (verbosity >= 3)
-            System.out.println("permuteArguments "+Arrays.toString(reorder));
-        Object[] permArgs = new Object[outargs];
-        Class<?>[] permTypes = new Class<?>[outargs];
-        for (int i = 0; i < outargs; i++) {
-            permArgs[i] = args[reorder[i]];
-            permTypes[i] = types[reorder[i]];
-        }
-        if (verbosity >= 4) {
-            System.out.println("in args:   "+Arrays.asList(args));
-            System.out.println("out args:  "+Arrays.asList(permArgs));
-            System.out.println("in types:  "+Arrays.asList(types));
-            System.out.println("out types: "+Arrays.asList(permTypes));
-        }
-        MethodType inType  = MethodType.methodType(Object.class, types);
-        MethodType outType = MethodType.methodType(Object.class, permTypes);
-        MethodHandle target = MethodHandles.convertArguments(ValueConversions.varargsList(outargs), outType);
-        MethodHandle newTarget = MethodHandles.permuteArguments(target, inType, reorder);
-        Object result = newTarget.invokeWithArguments(args);
-        Object expected = Arrays.asList(permArgs);
-        assertEquals(expected, result);
-    }
-
-
-    @Test
-    public void testSpreadArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("spreadArguments");
-        for (Class<?> argType : new Class[]{Object.class, Integer.class, int.class}) {
-            if (verbosity >= 3)
-                System.out.println("spreadArguments "+argType);
-            // FIXME: enable _adapter_spread_args and fix Fail_2
-            for (int nargs = 0; nargs < 10; nargs++) {
-                if (argType == int.class && nargs >= 6)  continue; // FIXME Fail_1
-                for (int pos = 0; pos < nargs; pos++) {
-                    if (argType == int.class && pos > 0)  continue; // FIXME Fail_3
-                     testSpreadArguments(argType, pos, nargs);
-                }
-            }
-        }
-    }
-    public void testSpreadArguments(Class<?> argType, int pos, int nargs) throws Throwable {
-        countTest();
-        MethodHandle target = ValueConversions.varargsArray(nargs);
-        MethodHandle target2 = changeArgTypes(target, argType);
-        if (verbosity >= 3)
-            System.out.println("spread into "+target2+" ["+pos+".."+nargs+"]");
-        Object[] args = randomArgs(target2.type().parameterArray());
-        // make sure the target does what we think it does:
-        if (pos == 0 && nargs < 5) {
-            Object[] check = (Object[]) target.invokeWithArguments(args);
-            assertArrayEquals(args, check);
-            switch (nargs) {
-                case 0:
-                    check = (Object[]) target.invokeExact();
-                    assertArrayEquals(args, check);
-                    break;
-                case 1:
-                    check = (Object[]) target.invokeExact(args[0]);
-                    assertArrayEquals(args, check);
-                    break;
-                case 2:
-                    check = (Object[]) target.invokeExact(args[0], args[1]);
-                    assertArrayEquals(args, check);
-                    break;
-            }
-        }
-        List<Class<?>> newParams = new ArrayList<Class<?>>(target2.type().parameterList());
-        {   // modify newParams in place
-            List<Class<?>> spreadParams = newParams.subList(pos, nargs);
-            spreadParams.clear(); spreadParams.add(Object[].class);
-        }
-        MethodType newType = MethodType.methodType(Object.class, newParams);
-        MethodHandle result = MethodHandles.spreadArguments(target2, newType);
-        Object[] returnValue;
-        if (pos == 0) {
-            // In the following line, the first cast implies
-            // normal Object return value for the MH call (Object[])->Object,
-            // while the second cast dynamically converts to an Object array.
-            // Such a double cast is typical of MH.invokeExact.
-            returnValue = (Object[]) (Object) result.invokeExact(args);
-        } else {
-            Object[] args1 = Arrays.copyOfRange(args, 0, pos+1);
-            args1[pos] = Arrays.copyOfRange(args, pos, args.length);
-            returnValue = (Object[]) result.invokeWithArguments(args1);
-        }
-        assertArrayEquals(args, returnValue);
-    }
-
-    @Test
-    public void testCollectArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("collectArguments");
-        for (Class<?> argType : new Class[]{Object.class, Integer.class, int.class}) {
-            if (verbosity >= 3)
-                System.out.println("collectArguments "+argType);
-            for (int nargs = 0; nargs < 10; nargs++) {
-                for (int pos = 0; pos < nargs; pos++) {
-                    if (argType == int.class)  continue; // FIXME Fail_4
-                    testCollectArguments(argType, pos, nargs);
-                }
-            }
-        }
-    }
-    public void testCollectArguments(Class<?> argType, int pos, int nargs) throws Throwable {
-        countTest();
-        // fake up a MH with the same type as the desired adapter:
-        MethodHandle fake = ValueConversions.varargsArray(nargs);
-        fake = changeArgTypes(fake, argType);
-        MethodType newType = fake.type();
-        Object[] args = randomArgs(newType.parameterArray());
-        // here is what should happen:
-        Object[] collectedArgs = Arrays.copyOfRange(args, 0, pos+1);
-        collectedArgs[pos] = Arrays.copyOfRange(args, pos, args.length);
-        // here is the MH which will witness the collected argument tail:
-        MethodHandle target = ValueConversions.varargsArray(pos+1);
-        target = changeArgTypes(target, 0, pos, argType);
-        target = changeArgTypes(target, pos, pos+1, Object[].class);
-        if (verbosity >= 3)
-            System.out.println("collect from "+Arrays.asList(args)+" ["+pos+".."+nargs+"]");
-        MethodHandle result = MethodHandles.collectArguments(target, newType);
-        Object[] returnValue = (Object[]) result.invokeWithArguments(args);
-//        assertTrue(returnValue.length == pos+1 && returnValue[pos] instanceof Object[]);
-//        returnValue[pos] = Arrays.asList((Object[]) returnValue[pos]);
-//        collectedArgs[pos] = Arrays.asList((Object[]) collectedArgs[pos]);
-        assertArrayEquals(collectedArgs, returnValue);
-    }
-
-    @Test
-    public void testInsertArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("insertArguments");
-        for (int nargs = 0; nargs <= 4; nargs++) {
-            for (int ins = 0; ins <= 4; ins++) {
-                if (ins > MAX_ARG_INCREASE)  continue;  // FIXME Fail_6
-                for (int pos = 0; pos <= nargs; pos++) {
-                    testInsertArguments(nargs, pos, ins);
-                }
-            }
-        }
-    }
-
-    void testInsertArguments(int nargs, int pos, int ins) throws Throwable {
-        countTest();
-        MethodHandle target = ValueConversions.varargsArray(nargs + ins);
-        Object[] args = randomArgs(target.type().parameterArray());
-        List<Object> resList = Arrays.asList(args);
-        List<Object> argsToPass = new ArrayList<Object>(resList);
-        List<Object> argsToInsert = argsToPass.subList(pos, pos + ins);
-        if (verbosity >= 3)
-            System.out.println("insert: "+argsToInsert+" into "+target);
-        MethodHandle target2 = MethodHandles.insertArguments(target, pos,
-                (Object[]) argsToInsert.toArray());
-        argsToInsert.clear();  // remove from argsToInsert
-        Object res2 = target2.invokeWithArguments(argsToPass);
-        Object res2List = Arrays.asList((Object[])res2);
-        if (verbosity >= 3)
-            System.out.println("result: "+res2List);
-        //if (!resList.equals(res2List))
-        //    System.out.println("*** fail at n/p/i = "+nargs+"/"+pos+"/"+ins+": "+resList+" => "+res2List);
-        assertEquals(resList, res2List);
-    }
-
-    @Test
-    public void testFilterArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("filterArguments");
-        for (int nargs = 1; nargs <= 6; nargs++) {
-            for (int pos = 0; pos < nargs; pos++) {
-                testFilterArguments(nargs, pos);
-            }
-        }
-    }
-
-    void testFilterArguments(int nargs, int pos) throws Throwable {
-        countTest();
-        MethodHandle target = ValueConversions.varargsList(nargs);
-        MethodHandle filter = ValueConversions.varargsList(1);
-        filter = MethodHandles.convertArguments(filter, filter.type().generic());
-        Object[] argsToPass = randomArgs(nargs, Object.class);
-        if (verbosity >= 3)
-            System.out.println("filter "+target+" at "+pos+" with "+filter);
-        MethodHandle target2 = MethodHandles.filterArguments(target, pos, filter);
-        // Simulate expected effect of filter on arglist:
-        Object[] filteredArgs = argsToPass.clone();
-        filteredArgs[pos] = filter.invokeExact(filteredArgs[pos]);
-        List<Object> expected = Arrays.asList(filteredArgs);
-        Object result = target2.invokeWithArguments(argsToPass);
-        if (verbosity >= 3)
-            System.out.println("result: "+result);
-        if (!expected.equals(result))
-            System.out.println("*** fail at n/p = "+nargs+"/"+pos+": "+argsToPass+" => "+result);
-        assertEquals(expected, result);
-    }
-
-    @Test
-    public void testFoldArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("foldArguments");
-        for (int nargs = 0; nargs <= 4; nargs++) {
-            for (int fold = 0; fold <= nargs; fold++) {
-                for (int pos = 0; pos <= nargs; pos++) {
-                    testFoldArguments(nargs, pos, fold);
-                }
-            }
-        }
-    }
-
-    void testFoldArguments(int nargs, int pos, int fold) throws Throwable {
-        if (pos != 0)  return;  // can fold only at pos=0 for now
-        countTest();
-        MethodHandle target = ValueConversions.varargsList(1 + nargs);
-        MethodHandle combine = ValueConversions.varargsList(fold).asType(MethodType.genericMethodType(fold));
-        List<Object> argsToPass = Arrays.asList(randomArgs(nargs, Object.class));
-        if (verbosity >= 3)
-            System.out.println("fold "+target+" with "+combine);
-        MethodHandle target2 = MethodHandles.foldArguments(target, combine);
-        // Simulate expected effect of combiner on arglist:
-        List<Object> expected = new ArrayList<Object>(argsToPass);
-        List<Object> argsToFold = expected.subList(pos, pos + fold);
-        if (verbosity >= 3)
-            System.out.println("fold: "+argsToFold+" into "+target2);
-        Object foldedArgs = combine.invokeWithArguments(argsToFold);
-        argsToFold.add(0, foldedArgs);
-        Object result = target2.invokeWithArguments(argsToPass);
-        if (verbosity >= 3)
-            System.out.println("result: "+result);
-        if (!expected.equals(result))
-            System.out.println("*** fail at n/p/f = "+nargs+"/"+pos+"/"+fold+": "+argsToPass+" => "+result);
-        assertEquals(expected, result);
-    }
-
-    @Test
-    public void testDropArguments() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("dropArguments");
-        for (int nargs = 0; nargs <= 4; nargs++) {
-            for (int drop = 1; drop <= 4; drop++) {
-                for (int pos = 0; pos <= nargs; pos++) {
-                    testDropArguments(nargs, pos, drop);
-                }
-            }
-        }
-    }
-
-    void testDropArguments(int nargs, int pos, int drop) throws Throwable {
-        countTest();
-        MethodHandle target = ValueConversions.varargsArray(nargs);
-        Object[] args = randomArgs(target.type().parameterArray());
-        MethodHandle target2 = MethodHandles.dropArguments(target, pos,
-                Collections.nCopies(drop, Object.class).toArray(new Class[0]));
-        List<Object> resList = Arrays.asList(args);
-        List<Object> argsToDrop = new ArrayList<Object>(resList);
-        for (int i = drop; i > 0; i--) {
-            argsToDrop.add(pos, "blort#"+i);
-        }
-        Object res2 = target2.invokeWithArguments(argsToDrop);
-        Object res2List = Arrays.asList((Object[])res2);
-        //if (!resList.equals(res2List))
-        //    System.out.println("*** fail at n/p/d = "+nargs+"/"+pos+"/"+drop+": "+argsToDrop+" => "+res2List);
-        assertEquals(resList, res2List);
-    }
-
-    @Test
-    public void testInvokers() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("exactInvoker, genericInvoker, varargsInvoker, dynamicInvoker");
-        // exactInvoker, genericInvoker, varargsInvoker[0..N], dynamicInvoker
-        Set<MethodType> done = new HashSet<MethodType>();
-        for (int i = 0; i <= 6; i++) {
-            MethodType gtype = MethodType.genericMethodType(i);
-            for (Class<?> argType : new Class[]{Object.class, Integer.class, int.class}) {
-                for (int j = -1; j < i; j++) {
-                    MethodType type = gtype;
-                    if (j < 0)
-                        type = type.changeReturnType(argType);
-                    else if (argType == void.class)
-                        continue;
-                    else
-                        type = type.changeParameterType(j, argType);
-                    if (argType.isPrimitive() && j != i-1)  continue; // FIXME Fail_5
-                    if (done.add(type))
-                        testInvokers(type);
-                    MethodType vtype = type.changeReturnType(void.class);
-                    if (done.add(vtype))
-                        testInvokers(vtype);
-                }
-            }
-        }
-    }
-
-    public void testInvokers(MethodType type) throws Throwable {
-        if (verbosity >= 3)
-            System.out.println("test invokers for "+type);
-        int nargs = type.parameterCount();
-        boolean testRetCode = type.returnType() != void.class;
-        MethodHandle target = PRIVATE.findStatic(MethodHandlesTest.class, "invokee",
-                                MethodType.genericMethodType(0, true));
-        target = MethodHandles.collectArguments(target, type);
-        Object[] args = randomArgs(type.parameterArray());
-        List<Object> targetPlusArgs = new ArrayList<Object>(Arrays.asList(args));
-        targetPlusArgs.add(0, target);
-        int code = (Integer) invokee(args);
-        Object log = logEntry("invokee", args);
-        assertEquals(log.hashCode(), code);
-        assertCalled("invokee", args);
-        MethodHandle inv;
-        Object result;
-        // exact invoker
-        countTest();
-        calledLog.clear();
-        inv = MethodHandles.exactInvoker(type);
-        result = inv.invokeWithArguments(targetPlusArgs);
-        if (testRetCode)  assertEquals(code, result);
-        assertCalled("invokee", args);
-        // generic invoker
-        countTest();
-        inv = MethodHandles.genericInvoker(type);
-        if (nargs <= 3) {
-            calledLog.clear();
-            switch (nargs) {
-            case 0:
-                result = inv.invokeExact(target);
-                break;
-            case 1:
-                result = inv.invokeExact(target, args[0]);
-                break;
-            case 2:
-                result = inv.invokeExact(target, args[0], args[1]);
-                break;
-            case 3:
-                result = inv.invokeExact(target, args[0], args[1], args[2]);
-                break;
-            }
-            if (testRetCode)  assertEquals(code, result);
-            assertCalled("invokee", args);
-        }
-        calledLog.clear();
-        result = inv.invokeWithArguments(targetPlusArgs);
-        if (testRetCode)  assertEquals(code, result);
-        assertCalled("invokee", args);
-        // varargs invoker #0
-        calledLog.clear();
-        inv = MethodHandles.varargsInvoker(type, 0);
-        result = inv.invokeExact(target, args);
-        if (testRetCode)  assertEquals(code, result);
-        assertCalled("invokee", args);
-        if (nargs >= 1) {
-            // varargs invoker #1
-            calledLog.clear();
-            inv = MethodHandles.varargsInvoker(type, 1);
-            result = inv.invokeExact(target, args[0], Arrays.copyOfRange(args, 1, nargs));
-            if (testRetCode)  assertEquals(code, result);
-            assertCalled("invokee", args);
-        }
-        if (nargs >= 2) {
-            // varargs invoker #2
-            calledLog.clear();
-            inv = MethodHandles.varargsInvoker(type, 2);
-            result = inv.invokeExact(target, args[0], args[1], Arrays.copyOfRange(args, 2, nargs));
-            if (testRetCode)  assertEquals(code, result);
-            assertCalled("invokee", args);
-        }
-        if (nargs >= 3) {
-            // varargs invoker #3
-            calledLog.clear();
-            inv = MethodHandles.varargsInvoker(type, 3);
-            result = inv.invokeExact(target, args[0], args[1], args[2], Arrays.copyOfRange(args, 3, nargs));
-            if (testRetCode)  assertEquals(code, result);
-            assertCalled("invokee", args);
-        }
-        for (int k = 0; k <= nargs; k++) {
-            // varargs invoker #0..N
-            countTest();
-            calledLog.clear();
-            inv = MethodHandles.varargsInvoker(type, k);
-            List<Object> targetPlusVarArgs = new ArrayList<Object>(targetPlusArgs);
-            List<Object> tailList = targetPlusVarArgs.subList(1+k, 1+nargs);
-            Object[] tail = tailList.toArray();
-            tailList.clear(); tailList.add(tail);
-            result = inv.invokeWithArguments(targetPlusVarArgs);
-            if (testRetCode)  assertEquals(code, result);
-            assertCalled("invokee", args);
-        }
-
-        // dynamic invoker
-        countTest();
-        CallSite site = new MutableCallSite(type);
-        inv = site.dynamicInvoker();
-
-        // see if we get the result of the original target:
-        try {
-            result = inv.invokeWithArguments(args);
-            assertTrue("should not reach here", false);
-        } catch (IllegalStateException ex) {
-            String msg = ex.getMessage();
-            assertTrue(msg, msg.contains("site"));
-        }
-
-        // set new target after invoker is created, to make sure we track target
-        site.setTarget(target);
-        calledLog.clear();
-        result = inv.invokeWithArguments(args);
-        if (testRetCode)  assertEquals(code, result);
-        assertCalled("invokee", args);
-    }
-
-    static Object invokee(Object... args) {
-        return called("invokee", args).hashCode();
-    }
-
-    private static final String MISSING_ARG = "missingArg";
-    static Object targetIfEquals() {
-        return called("targetIfEquals");
-    }
-    static Object fallbackIfNotEquals() {
-        return called("fallbackIfNotEquals");
-    }
-    static Object targetIfEquals(Object x) {
-        assertEquals(x, MISSING_ARG);
-        return called("targetIfEquals", x);
-    }
-    static Object fallbackIfNotEquals(Object x) {
-        assertFalse(x.toString(), x.equals(MISSING_ARG));
-        return called("fallbackIfNotEquals", x);
-    }
-    static Object targetIfEquals(Object x, Object y) {
-        assertEquals(x, y);
-        return called("targetIfEquals", x, y);
-    }
-    static Object fallbackIfNotEquals(Object x, Object y) {
-        assertFalse(x.toString(), x.equals(y));
-        return called("fallbackIfNotEquals", x, y);
-    }
-    static Object targetIfEquals(Object x, Object y, Object z) {
-        assertEquals(x, y);
-        return called("targetIfEquals", x, y, z);
-    }
-    static Object fallbackIfNotEquals(Object x, Object y, Object z) {
-        assertFalse(x.toString(), x.equals(y));
-        return called("fallbackIfNotEquals", x, y, z);
-    }
-
-    @Test
-    public void testGuardWithTest() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("guardWithTest");
-        for (int nargs = 0; nargs <= 3; nargs++) {
-            if (nargs != 2)  continue;  // FIXME: test more later
-            testGuardWithTest(nargs, Object.class);
-            testGuardWithTest(nargs, String.class);
-        }
-    }
-    void testGuardWithTest(int nargs, Class<?> argClass) throws Throwable {
-        countTest();
-        MethodHandle test = PRIVATE.findVirtual(Object.class, "equals", MethodType.methodType(boolean.class, Object.class));
-        MethodHandle target = PRIVATE.findStatic(MethodHandlesTest.class, "targetIfEquals", MethodType.genericMethodType(nargs));
-        MethodHandle fallback = PRIVATE.findStatic(MethodHandlesTest.class, "fallbackIfNotEquals", MethodType.genericMethodType(nargs));
-        while (test.type().parameterCount() < nargs)
-            test = MethodHandles.dropArguments(test, test.type().parameterCount()-1, Object.class);
-        while (test.type().parameterCount() > nargs)
-            test = MethodHandles.insertArguments(test, 0, MISSING_ARG);
-        if (argClass != Object.class) {
-            test = changeArgTypes(test, argClass);
-            target = changeArgTypes(target, argClass);
-            fallback = changeArgTypes(fallback, argClass);
-        }
-        MethodHandle mh = MethodHandles.guardWithTest(test, target, fallback);
-        assertEquals(target.type(), mh.type());
-        Object[][] argLists = {
-            { },
-            { "foo" }, { MISSING_ARG },
-            { "foo", "foo" }, { "foo", "bar" },
-            { "foo", "foo", "baz" }, { "foo", "bar", "baz" }
-        };
-        for (Object[] argList : argLists) {
-            if (argList.length != nargs)  continue;
-            boolean equals;
-            switch (nargs) {
-            case 0:   equals = true; break;
-            case 1:   equals = MISSING_ARG.equals(argList[0]); break;
-            default:  equals = argList[0].equals(argList[1]); break;
-            }
-            String willCall = (equals ? "targetIfEquals" : "fallbackIfNotEquals");
-            if (verbosity >= 3)
-                System.out.println(logEntry(willCall, argList));
-            Object result = mh.invokeWithArguments(argList);
-            assertCalled(willCall, argList);
-        }
-    }
-
-    @Test
-    public void testCatchException() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("catchException");
-        for (int nargs = 2; nargs <= 6; nargs++) {
-            for (int ti = 0; ti <= 1; ti++) {
-                boolean throwIt = (ti != 0);
-                testCatchException(int.class, new ClassCastException("testing"), throwIt, nargs);
-                testCatchException(void.class, new java.io.IOException("testing"), throwIt, nargs);
-                testCatchException(String.class, new LinkageError("testing"), throwIt, nargs);
-            }
-        }
-    }
-
-    private static <T extends Throwable>
-    Object throwOrReturn(Object normal, T exception) throws T {
-        if (exception != null)  throw exception;
-        return normal;
-    }
-
-    void testCatchException(Class<?> returnType, Throwable thrown, boolean throwIt, int nargs) throws Throwable {
-        countTest();
-        if (verbosity >= 3)
-            System.out.println("catchException rt="+returnType+" throw="+throwIt+" nargs="+nargs);
-        Class<? extends Throwable> exType = thrown.getClass();
-        MethodHandle throwOrReturn
-                = PRIVATE.findStatic(MethodHandlesTest.class, "throwOrReturn",
-                    MethodType.methodType(Object.class, Object.class, Throwable.class));
-        MethodHandle thrower = throwOrReturn.asType(MethodType.genericMethodType(2));
-        while (thrower.type().parameterCount() < nargs)
-            thrower = MethodHandles.dropArguments(thrower, thrower.type().parameterCount(), Object.class);
-        MethodHandle catcher = ValueConversions.varargsList(1+nargs).asType(MethodType.genericMethodType(1+nargs));
-        MethodHandle target = MethodHandles.catchException(thrower,
-                thrown.getClass(), catcher);
-        assertEquals(thrower.type(), target.type());
-        //System.out.println("catching with "+target+" : "+throwOrReturn);
-        Object[] args = randomArgs(nargs, Object.class);
-        args[1] = (throwIt ? thrown : null);
-        Object returned = target.invokeWithArguments(args);
-        //System.out.println("return from "+target+" : "+returned);
-        if (!throwIt) {
-            assertSame(args[0], returned);
-        } else {
-            List<Object> catchArgs = new ArrayList<Object>(Arrays.asList(args));
-            catchArgs.add(0, thrown);
-            assertEquals(catchArgs, returned);
-        }
-    }
-
-    @Test
-    public void testThrowException() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("throwException");
-        testThrowException(int.class, new ClassCastException("testing"));
-        testThrowException(void.class, new java.io.IOException("testing"));
-        testThrowException(String.class, new LinkageError("testing"));
-    }
-
-    void testThrowException(Class<?> returnType, Throwable thrown) throws Throwable {
-        countTest();
-        Class<? extends Throwable> exType = thrown.getClass();
-        MethodHandle target = MethodHandles.throwException(returnType, exType);
-        //System.out.println("throwing with "+target+" : "+thrown);
-        MethodType expectedType = MethodType.methodType(returnType, exType);
-        assertEquals(expectedType, target.type());
-        target = MethodHandles.convertArguments(target, target.type().generic());
-        Throwable caught = null;
-        try {
-            Object res = target.invokeExact((Object) thrown);
-            fail("got "+res+" instead of throwing "+thrown);
-        } catch (Throwable ex) {
-            if (ex != thrown) {
-                if (ex instanceof Error)  throw (Error)ex;
-                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
-            }
-            caught = ex;
-        }
-        assertSame(thrown, caught);
-    }
-
-    @Test
-    public void testCastFailure() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("testCastFailure");
-        testCastFailure("cast/argument", 11000);
-        testCastFailure("unbox/argument", 11000);
-        testCastFailure("cast/return", 11000);
-        testCastFailure("unbox/return", 11000);
-    }
-
-    static class Surprise {
-        public MethodHandle asMethodHandle() {
-            return VALUE.bindTo(this);
-        }
-        Object value(Object x) {
-            trace("value", x);
-            if (boo != null)  return boo;
-            return x;
-        }
-        Object boo;
-        void boo(Object x) { boo = x; }
-
-        static void trace(String x, Object y) {
-            if (verbosity > 8) System.out.println(x+"="+y);
-        }
-        static Object  refIdentity(Object x)  { trace("ref.x", x); return x; }
-        static Integer boxIdentity(Integer x) { trace("box.x", x); return x; }
-        static int     intIdentity(int x)     { trace("int.x", x); return x; }
-        static MethodHandle VALUE, REF_IDENTITY, BOX_IDENTITY, INT_IDENTITY;
-        static {
-            try {
-                VALUE = PRIVATE.findVirtual(
-                    Surprise.class, "value",
-                        MethodType.methodType(Object.class, Object.class));
-                REF_IDENTITY = PRIVATE.findStatic(
-                    Surprise.class, "refIdentity",
-                        MethodType.methodType(Object.class, Object.class));
-                BOX_IDENTITY = PRIVATE.findStatic(
-                    Surprise.class, "boxIdentity",
-                        MethodType.methodType(Integer.class, Integer.class));
-                INT_IDENTITY = PRIVATE.findStatic(
-                    Surprise.class, "intIdentity",
-                        MethodType.methodType(int.class, int.class));
-            } catch (Exception ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-
-    void testCastFailure(String mode, int okCount) throws Throwable {
-        countTest(false);
-        if (verbosity > 2)  System.out.println("mode="+mode);
-        Surprise boo = new Surprise();
-        MethodHandle identity = Surprise.REF_IDENTITY, surprise0 = boo.asMethodHandle(), surprise = surprise0;
-        if (mode.endsWith("/return")) {
-            if (mode.equals("unbox/return")) {
-                // fail on return to ((Integer)surprise).intValue
-                surprise = MethodHandles.convertArguments(surprise, MethodType.methodType(int.class, Object.class));
-                identity = MethodHandles.convertArguments(identity, MethodType.methodType(int.class, Object.class));
-            } else if (mode.equals("cast/return")) {
-                // fail on return to (Integer)surprise
-                surprise = MethodHandles.convertArguments(surprise, MethodType.methodType(Integer.class, Object.class));
-                identity = MethodHandles.convertArguments(identity, MethodType.methodType(Integer.class, Object.class));
-            }
-        } else if (mode.endsWith("/argument")) {
-            MethodHandle callee = null;
-            if (mode.equals("unbox/argument")) {
-                // fail on handing surprise to int argument
-                callee = Surprise.INT_IDENTITY;
-            } else if (mode.equals("cast/argument")) {
-                // fail on handing surprise to Integer argument
-                callee = Surprise.BOX_IDENTITY;
-            }
-            if (callee != null) {
-                callee = MethodHandles.convertArguments(callee, MethodType.genericMethodType(1));
-                surprise = MethodHandles.filterArguments(callee, 0, surprise);
-                identity = MethodHandles.filterArguments(callee, 0, identity);
-            }
-        }
-        assertNotSame(mode, surprise, surprise0);
-        identity = MethodHandles.convertArguments(identity, MethodType.genericMethodType(1));
-        surprise = MethodHandles.convertArguments(surprise, MethodType.genericMethodType(1));
-        Object x = 42;
-        for (int i = 0; i < okCount; i++) {
-            Object y = identity.invokeExact(x);
-            assertEquals(x, y);
-            Object z = surprise.invokeExact(x);
-            assertEquals(x, z);
-        }
-        boo.boo("Boo!");
-        Object y = identity.invokeExact(x);
-        assertEquals(x, y);
-        try {
-            Object z = surprise.invokeExact(x);
-            System.out.println("Failed to throw; got z="+z);
-            assertTrue(false);
-        } catch (Exception ex) {
-            if (verbosity > 2)
-                System.out.println("caught "+ex);
-            if (verbosity > 3)
-                ex.printStackTrace();
-            assertTrue(ex instanceof ClassCastException
-                    // FIXME: accept only one of the two for any given unit test
-                    || ex instanceof WrongMethodTypeException
-                    );
-        }
-    }
-
-    static Example userMethod(Object o, String s, int i) {
-        called("userMethod", o, s, i);
-        return null;
-    }
-
-    @Test
-    public void testUserClassInSignature() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        startTest("testUserClassInSignature");
-        Lookup lookup = MethodHandles.lookup();
-        String name; MethodType mt; MethodHandle mh;
-        Object[] args;
-
-        // Try a static method.
-        name = "userMethod";
-        mt = MethodType.methodType(Example.class, Object.class, String.class, int.class);
-        mh = lookup.findStatic(lookup.lookupClass(), name, mt);
-        assertEquals(mt, mh.type());
-        assertEquals(Example.class, mh.type().returnType());
-        args = randomArgs(mh.type().parameterArray());
-        mh.invokeWithArguments(args);
-        assertCalled(name, args);
-
-        // Try a virtual method.
-        name = "v2";
-        mt = MethodType.methodType(Object.class, Object.class, int.class);
-        mh = lookup.findVirtual(Example.class, name, mt);
-        assertEquals(mt, mh.type().dropParameterTypes(0,1));
-        assertTrue(mh.type().parameterList().contains(Example.class));
-        args = randomArgs(mh.type().parameterArray());
-        mh.invokeWithArguments(args);
-        assertCalled(name, args);
-    }
-
-    static void runForRunnable() {
-        called("runForRunnable");
-    }
-    private interface Fooable {
-        Object foo(Fooable x, Object y);
-        // this is for randomArg:
-        public class Impl implements Fooable {
-            public Object foo(Fooable x, Object y) {
-                throw new RuntimeException("do not call");
-            }
-            final String name;
-            public Impl() { name = "Fooable#"+nextArg(); }
-            @Override public String toString() { return name; }
-        }
-    }
-    static Object fooForFooable(Fooable x, Object y) {
-        return called("fooForFooable", x, y);
-    }
-    private static class MyCheckedException extends Exception {
-    }
-    private interface WillThrow {
-        void willThrow() throws MyCheckedException;
-    }
-
-    @Test
-    public void testAsInstance() throws Throwable {
-        if (CAN_SKIP_WORKING)  return;
-        Lookup lookup = MethodHandles.lookup();
-        {
-            MethodType mt = MethodType.methodType(void.class);
-            MethodHandle mh = lookup.findStatic(MethodHandlesTest.class, "runForRunnable", mt);
-            Runnable proxy = MethodHandles.asInstance(mh, Runnable.class);
-            proxy.run();
-            assertCalled("runForRunnable");
-        }
-        {
-            MethodType mt = MethodType.methodType(Object.class, Fooable.class, Object.class);
-            MethodHandle mh = lookup.findStatic(MethodHandlesTest.class, "fooForFooable", mt);
-            Fooable proxy = MethodHandles.asInstance(mh, Fooable.class);
-            Object[] args = randomArgs(mt.parameterArray());
-            Object result = proxy.foo((Fooable) args[0], args[1]);
-            assertCalled("fooForFooable", args);
-            assertEquals(result, logEntry("fooForFooable", args));
-        }
-        for (Throwable ex : new Throwable[] { new NullPointerException("ok"),
-                                              new InternalError("ok"),
-                                              new Throwable("fail"),
-                                              new Exception("fail"),
-                                              new MyCheckedException()
-                                            }) {
-            MethodHandle mh = MethodHandles.throwException(void.class, Throwable.class);
-            mh = MethodHandles.insertArguments(mh, 0, ex);
-            WillThrow proxy = MethodHandles.asInstance(mh, WillThrow.class);
-            try {
-                proxy.willThrow();
-                System.out.println("Failed to throw: "+ex);
-                assertTrue(false);
-            } catch (Throwable ex1) {
-                if (verbosity > 2) {
-                    System.out.println("throw "+ex);
-                    System.out.println("catch "+(ex == ex1 ? "UNWRAPPED" : ex1));
-                }
-                if (ex instanceof RuntimeException ||
-                    ex instanceof Error) {
-                    assertSame("must pass unchecked exception out without wrapping", ex, ex1);
-                } else if (ex instanceof MyCheckedException) {
-                    assertSame("must pass declared exception out without wrapping", ex, ex1);
-                } else {
-                    assertNotSame("must pass undeclared checked exception with wrapping", ex, ex1);
-                    UndeclaredThrowableException utex = (UndeclaredThrowableException) ex1;
-                    assertSame(ex, utex.getCause());
-                }
-            }
-        }
-        // Test error checking:
-        MethodHandle genericMH = ValueConversions.varargsArray(0);
-        genericMH = MethodHandles.convertArguments(genericMH, genericMH.type().generic());
-        for (Class<?> sam : new Class[] { Runnable.class,
-                                          Fooable.class,
-                                          Iterable.class }) {
-            try {
-                // Must throw, because none of these guys has generic type.
-                MethodHandles.asInstance(genericMH, sam);
-                System.out.println("Failed to throw");
-                assertTrue(false);
-            } catch (IllegalArgumentException ex) {
-            }
-        }
-        for (Class<?> nonSAM : new Class[] { Object.class,
-                                             String.class,
-                                             CharSequence.class,
-                                             Example.class }) {
-            try {
-                MethodHandles.asInstance(ValueConversions.varargsArray(0), nonSAM);
-                System.out.println("Failed to throw");
-                assertTrue(false);
-            } catch (IllegalArgumentException ex) {
-            }
-        }
-    }
-}
-// Local abbreviated copy of sun.dyn.util.ValueConversions
-class ValueConversions {
-    private static final Lookup IMPL_LOOKUP = MethodHandles.lookup();
-    private static final Object[] NO_ARGS_ARRAY = {};
-    private static Object[] makeArray(Object... args) { return args; }
-    private static Object[] array() { return NO_ARGS_ARRAY; }
-    private static Object[] array(Object a0)
-                { return makeArray(a0); }
-    private static Object[] array(Object a0, Object a1)
-                { return makeArray(a0, a1); }
-    private static Object[] array(Object a0, Object a1, Object a2)
-                { return makeArray(a0, a1, a2); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3)
-                { return makeArray(a0, a1, a2, a3); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4)
-                { return makeArray(a0, a1, a2, a3, a4); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5)
-                { return makeArray(a0, a1, a2, a3, a4, a5); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6, Object a7)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6, Object a7,
-                                  Object a8)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
-                                  Object a4, Object a5, Object a6, Object a7,
-                                  Object a8, Object a9)
-                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-    static MethodHandle[] makeArrays() {
-        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
-        MethodHandles.Lookup lookup = IMPL_LOOKUP;
-        for (;;) {
-            int nargs = arrays.size();
-            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(Object[].class);
-            String name = "array";
-            MethodHandle array = null;
-            try {
-                array = lookup.findStatic(ValueConversions.class, name, type);
-            } catch (NoAccessException ex) {
-            }
-            if (array == null)  break;
-            arrays.add(array);
-        }
-        assert(arrays.size() == 11);  // current number of methods
-        return arrays.toArray(new MethodHandle[0]);
-    }
-    static final MethodHandle[] ARRAYS = makeArrays();
-
-    /** Return a method handle that takes the indicated number of Object
-     *  arguments and returns an Object array of them, as if for varargs.
-     */
-    public static MethodHandle varargsArray(int nargs) {
-        if (nargs < ARRAYS.length)
-            return ARRAYS[nargs];
-        // else need to spin bytecode or do something else fancy
-        throw new UnsupportedOperationException("NYI: cannot form a varargs array of length "+nargs);
-    }
-
-    private static final List<Object> NO_ARGS_LIST = Arrays.asList(NO_ARGS_ARRAY);
-    private static List<Object> makeList(Object... args) { return Arrays.asList(args); }
-    private static List<Object> list() { return NO_ARGS_LIST; }
-    private static List<Object> list(Object a0)
-                { return makeList(a0); }
-    private static List<Object> list(Object a0, Object a1)
-                { return makeList(a0, a1); }
-    private static List<Object> list(Object a0, Object a1, Object a2)
-                { return makeList(a0, a1, a2); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3)
-                { return makeList(a0, a1, a2, a3); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4)
-                { return makeList(a0, a1, a2, a3, a4); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5)
-                { return makeList(a0, a1, a2, a3, a4, a5); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6, Object a7)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6, Object a7,
-                                     Object a8)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
-    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
-                                     Object a4, Object a5, Object a6, Object a7,
-                                     Object a8, Object a9)
-                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
-    static MethodHandle[] makeLists() {
-        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
-        MethodHandles.Lookup lookup = IMPL_LOOKUP;
-        for (;;) {
-            int nargs = arrays.size();
-            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(List.class);
-            String name = "list";
-            MethodHandle array = null;
-            try {
-                array = lookup.findStatic(ValueConversions.class, name, type);
-            } catch (NoAccessException ex) {
-            }
-            if (array == null)  break;
-            arrays.add(array);
-        }
-        assert(arrays.size() == 11);  // current number of methods
-        return arrays.toArray(new MethodHandle[0]);
-    }
-    static final MethodHandle[] LISTS = makeLists();
-
-    /** Return a method handle that takes the indicated number of Object
-     *  arguments and returns List.
-     */
-    public static MethodHandle varargsList(int nargs) {
-        if (nargs < LISTS.length)
-            return LISTS[nargs];
-        // else need to spin bytecode or do something else fancy
-        throw new UnsupportedOperationException("NYI");
-    }
-}
-// This guy tests access from outside the same package member, but inside
-// the package itself.
-class PackageSibling {
-    static Lookup lookup() {
-        return MethodHandles.lookup();
-    }
-}
--- a/test/java/dyn/indify/Indify.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1861 +0,0 @@
-/*
- * Copyright (c) 2010, 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 indify;
-
-import java.util.*;
-import java.io.*;
-import java.lang.reflect.Modifier;
-import java.util.regex.*;
-
-/**
- * Transform one or more class files to incorporate JSR 292 features,
- * such as {@code invokedynamic}.
- * <p>
- * This is a standalone program in a single source file.
- * In this form, it may be useful for test harnesses, small experiments, and javadoc examples.
- * Copies of this file may show up in multiple locations for standalone usage.
- * The primary maintained location of this file is as follows:
- * <a href="http://kenai.com/projects/ninja/sources/indify-repo/content/src/indify/Indify.java">
- * http://kenai.com/projects/ninja/sources/indify-repo/content/src/indify/Indify.java</a>
- * <p>
- * Static private methods named MH_x and MT_x (where x is arbitrary)
- * must be stereotyped generators of MethodHandle and MethodType
- * constants.  All calls to them are transformed to {@code CONSTANT_MethodHandle}
- * and {@code CONSTANT_MethodType} "ldc" instructions.
- * The stereotyped code must create method types by calls to {@code methodType} or
- * {@code fromMethodDescriptorString}.  The "lookup" argument must be created
- * by calls to {@code java.dyn.MethodHandles#lookup MethodHandles.lookup}.
- * The class and string arguments must be constant.
- * The following methods of {@code java.dyn.MethodHandle.Lookup Lookup} are
- * allowed for method handle creation: {@code findStatic}, {@code findVirtual},
- * {@code findConstructor}, {@code findSpecial},
- * {@code findGetter}, {@code findSetter},
- * {@code findStaticGetter}, or {@code findStaticSetter}.
- * The call to one of these methods must be followed immediately
- * by an {@code areturn} instruction.
- * The net result of the call to the MH_x or MT_x method must be
- * the creation of a constant method handle.  Thus, replacing calls
- * to MH_x or MT_x methods by {@code ldc} instructions should leave
- * the meaning of the program unchanged.
- * <p>
- * Static private methods named INDY_x must be stereotyped generators
- * of {@code invokedynamic} call sites.
- * All calls to them must be immediately followed by
- * {@code invokeExact} calls.
- * All such pairs of calls are transformed to {@code invokedynamic}
- * instructions.  Each INDY_x method must begin with a call to a
- * MH_x method, which is taken to be its bootstrap method.
- * The method must be immediately invoked (via {@code invokeGeneric}
- * on constant lookup, name, and type arguments.  An object array of
- * constants may also be appended to the {@code invokeGeneric call}.
- * This call must be cast to {@code CallSite}, and the result must be
- * immediately followed by a call to {@code dynamicInvoker}, with the
- * resulting method handle returned.
- * <p>
- * The net result of all of these actions is equivalent to the JVM's
- * execution of an {@code invokedynamic} instruction in the unlinked state.
- * Running this code once should produce the same results as running
- * the corresponding {@code invokedynamic} instruction.
- * In order to model the caching behavior, the code of an INDY_x
- * method is allowed to begin with getstatic, aaload, and if_acmpne
- * instructions which load a static method handle value and return it
- * if the value is non-null.
- * <p>
- * Example usage:
- * <blockquote><pre>
-$ JAVA_HOME=(some recent OpenJDK 7 build)
-$ ant
-$ $JAVA_HOME/bin/java -cp build/classes indify.Indify --overwrite --dest build/testout build/classes/indify/Example.class
-$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp build/classes indify.Example
-MT = (java.lang.Object)java.lang.Object
-MH = adder(int,int)java.lang.Integer
-adder(1,2) = 3
-calling indy:  42
-$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp build/testout indify.Example
-(same output as above)
- * </pre></blockquote>
- * <p>
- * Until the format of {@code CONSTANT_InvokeDynamic} entries is finalized,
- * the {@code --transitionalJSR292} switch is recommended (and turned on by default).
- * <p>
- * A version of this transformation built on top of <a href="http://asm.ow2.org/">http://asm.ow2.org/</a> would be welcome.
- * @author John Rose
- */
-public class Indify {
-    public static void main(String... av) throws IOException {
-        new Indify().run(av);
-    }
-
-    public File dest;
-    public String[] classpath = {"."};
-    public boolean keepgoing = false;
-    public boolean expandProperties = false;
-    public boolean overwrite = false;
-    public boolean quiet = false;
-    public boolean verbose = false;
-    public boolean transitionalJSR292 = true;  // default to false later
-    public boolean all = false;
-    public int verifySpecifierCount = -1;
-
-    public void run(String... av) throws IOException {
-        List<String> avl = new ArrayList<>(Arrays.asList(av));
-        parseOptions(avl);
-        if (avl.isEmpty())
-            throw new IllegalArgumentException("Usage: indify [--dest dir] [option...] file...");
-        if ("--java".equals(avl.get(0))) {
-            avl.remove(0);
-            try {
-                runApplication(avl.toArray(new String[0]));
-            } catch (Exception ex) {
-                if (ex instanceof RuntimeException)  throw (RuntimeException) ex;
-                throw new RuntimeException(ex);
-            }
-            return;
-        }
-        Exception err = null;
-        for (String a : avl) {
-            try {
-                indify(a);
-            } catch (Exception ex) {
-                if (err == null)  err = ex;
-                System.err.println("failure on "+a);
-                if (!keepgoing)  break;
-            }
-        }
-        if (err != null) {
-            if (err instanceof IOException)  throw (IOException) err;
-            throw (RuntimeException) err;
-        }
-    }
-
-    /** Execute the given application under a class loader which indifies all application classes. */
-    public void runApplication(String... av) throws Exception {
-        List<String> avl = new ArrayList<>(Arrays.asList(av));
-        String mainClassName = avl.remove(0);
-        av = avl.toArray(new String[0]);
-        Class<?> mainClass = Class.forName(mainClassName, true, makeClassLoader());
-        java.lang.reflect.Method main = mainClass.getMethod("main", String[].class);
-        main.invoke(null, (Object) av);
-    }
-
-    public void parseOptions(List<String> av) throws IOException {
-        for (; !av.isEmpty(); av.remove(0)) {
-            String a = av.get(0);
-            if (a.startsWith("-")) {
-                String a2 = null;
-                int eq = a.indexOf('=');
-                if (eq > 0) {
-                    a2 = maybeExpandProperties(a.substring(eq+1));
-                    a = a.substring(0, eq+1);
-                }
-                switch (a) {
-                case "--java":
-                    return;  // keep this argument
-                case "-d": case "--dest": case "-d=": case "--dest=":
-                    dest = new File(a2 != null ? a2 : maybeExpandProperties(av.remove(1)));
-                    break;
-                case "-cp": case "--classpath":
-                    classpath = maybeExpandProperties(av.remove(1)).split("["+File.pathSeparatorChar+"]");
-                    break;
-                case "-k": case "--keepgoing": case "--keepgoing=":
-                    keepgoing = booleanOption(a2);  // print errors but keep going
-                    break;
-                case "--expand-properties": case "--expand-properties=":
-                    expandProperties = booleanOption(a2);  // expand property references in subsequent arguments
-                    break;
-                case "--verify-specifier-count": case "--verify-specifier-count=":
-                    verifySpecifierCount = Integer.valueOf(a2);
-                    break;
-                case "--overwrite": case "--overwrite=":
-                    overwrite = booleanOption(a2);  // overwrite output files
-                    break;
-                case "--all": case "--all=":
-                    all = booleanOption(a2);  // copy all classes, even if no patterns
-                    break;
-                case "-q": case "--quiet": case "--quiet=":
-                    quiet = booleanOption(a2);  // less output
-                    break;
-                case "-v": case "--verbose": case "--verbose=":
-                    verbose = booleanOption(a2);  // more output
-                    break;
-                case "--transitionalJSR292": case "--transitionalJSR292=":
-                    transitionalJSR292 = booleanOption(a2);  // use older invokedynamic format
-                    break;
-                default:
-                    throw new IllegalArgumentException("unrecognized flag: "+a);
-                }
-                continue;
-            } else {
-                break;
-            }
-        }
-        if (dest == null && !overwrite)
-            throw new RuntimeException("no output specified; need --dest d or --overwrite");
-        if (expandProperties) {
-            for (int i = 0; i < av.size(); i++)
-                av.set(i, maybeExpandProperties(av.get(i)));
-        }
-    }
-
-    private boolean booleanOption(String s) {
-        if (s == null)  return true;
-        switch (s) {
-        case "true":  case "yes": case "1": return true;
-        case "false": case "no":  case "0": return false;
-        }
-        throw new IllegalArgumentException("unrecognized boolean flag="+s);
-    }
-
-    private String maybeExpandProperties(String s) {
-        if (!expandProperties)  return s;
-        Set<String> propsDone = new HashSet<>();
-        while (s.contains("${")) {
-            int lbrk = s.indexOf("${");
-            int rbrk = s.indexOf('}', lbrk);
-            if (rbrk < 0)  break;
-            String prop = s.substring(lbrk+2, rbrk);
-            if (!propsDone.add(prop))  break;
-            String value = System.getProperty(prop);
-            if (verbose)  System.err.println("expanding ${"+prop+"} => "+value);
-            if (value == null)  break;
-            s = s.substring(0, lbrk) + value + s.substring(rbrk+1);
-        }
-        return s;
-    }
-
-    public void indify(String a) throws IOException {
-        File f = new File(a);
-        String fn = f.getName();
-        if (fn.endsWith(".class") && f.isFile())
-            indifyFile(f, dest);
-        else if (fn.endsWith(".jar") && f.isFile())
-            indifyJar(f, dest);
-        else if (f.isDirectory())
-            indifyTree(f, dest);
-        else if (!keepgoing)
-            throw new RuntimeException("unrecognized file: "+a);
-    }
-
-    private void ensureDirectory(File dir) {
-        if (dir.mkdirs() && !quiet)
-            System.err.println("created "+dir);
-    }
-
-    public void indifyFile(File f, File dest) throws IOException {
-        if (verbose)  System.err.println("reading "+f);
-        ClassFile cf = new ClassFile(f);
-        Logic logic = new Logic(cf);
-        boolean changed = logic.transform();
-        logic.reportPatternMethods(quiet, keepgoing);
-        if (changed || all) {
-            File outfile;
-            if (dest != null) {
-                ensureDirectory(dest);
-                outfile = classPathFile(dest, cf.nameString());
-            } else {
-                outfile = f;  // overwrite input file, no matter where it is
-            }
-            cf.writeTo(outfile);
-            if (!quiet)  System.err.println("wrote "+outfile);
-        }
-    }
-
-    File classPathFile(File pathDir, String className) {
-        String qualname = className+".class";
-        qualname = qualname.replace('/', File.separatorChar);
-        return new File(pathDir, qualname);
-    }
-
-    public void indifyJar(File f, Object dest) throws IOException {
-        throw new UnsupportedOperationException("Not yet implemented");
-    }
-
-    public void indifyTree(File f, File dest) throws IOException {
-        if (verbose)  System.err.println("reading directory: "+f);
-        for (File f2 : f.listFiles(new FilenameFilter() {
-                public boolean accept(File dir, String name) {
-                    if (name.endsWith(".class"))  return true;
-                    if (name.contains("."))  return false;
-                    // return true if it might be a package name:
-                    return Character.isJavaIdentifierStart(name.charAt(0));
-                }})) {
-            if (f2.getName().endsWith(".class"))
-                indifyFile(f2, dest);
-            else if (f2.isDirectory())
-                indifyTree(f2, dest);
-        }
-    }
-
-    public ClassLoader makeClassLoader() {
-        return new Loader();
-    }
-    private class Loader extends ClassLoader {
-        Loader() {
-            this(Indify.class.getClassLoader());
-        }
-        Loader(ClassLoader parent) {
-            super(parent);
-        }
-        public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
-            File f = findClassInPath(name);
-            if (f != null) {
-                try {
-                    Class<?> c = transformAndLoadClass(f);
-                    if (c != null) {
-                        if (resolve)  resolveClass(c);
-                        return c;
-                    }
-                } catch (Exception ex) {
-                    if (ex instanceof IllegalArgumentException)
-                        // pass error from reportPatternMethods
-                        throw (IllegalArgumentException) ex;
-                }
-            }
-            return super.loadClass(name, resolve);
-        }
-        private File findClassInPath(String name) {
-            for (String s : classpath) {
-                File f = classPathFile(new File(s), name);
-                if (f.exists() && f.canRead()) {
-                    return f;
-                }
-            }
-            return null;
-        }
-        protected Class<?> findClass(String name) throws ClassNotFoundException {
-            try {
-                return transformAndLoadClass(findClassInPath(name));
-            } catch (IOException ex) {
-                throw new ClassNotFoundException("IO error", ex);
-            }
-        }
-        private Class<?> transformAndLoadClass(File f) throws ClassNotFoundException, IOException {
-            if (verbose)  System.out.println("Loading class from "+f);
-            ClassFile cf = new ClassFile(f);
-            Logic logic = new Logic(cf);
-            boolean changed = logic.transform();
-            if (verbose && !changed)  System.out.println("(no change)");
-            logic.reportPatternMethods(!verbose, keepgoing);
-            byte[] bytes = cf.toByteArray();
-            return defineClass(null, bytes, 0, bytes.length);
-        }
-    }
-
-    private class Logic {
-        // Indify logic, per se.
-        ClassFile cf;
-        final char[] poolMarks;
-        final Map<Method,Constant> constants = new HashMap<>();
-        final Map<Method,String> indySignatures = new HashMap<>();
-        Logic(ClassFile cf) {
-            this.cf = cf;
-            poolMarks = new char[cf.pool.size()];
-        }
-        boolean transform() {
-            if (!initializeMarks())  return false;
-            if (!findPatternMethods())  return false;
-            Pool pool = cf.pool;
-            //for (Constant c : cp)  System.out.println("  # "+c);
-            for (Method m : cf.methods) {
-                if (constants.containsKey(m))  continue;  // don't bother
-                // Transform references.
-                int blab = 0;
-                for (Instruction i = m.instructions(); i != null; i = i.next()) {
-                    if (i.bc != opc_invokestatic)  continue;
-                    int methi = i.u2At(1);
-                    if (poolMarks[methi] == 0)  continue;
-                    Short[] ref = pool.getMemberRef((short)methi);
-                    Method conm = findMember(cf.methods, ref[1], ref[2]);
-                    if (conm == null)  continue;
-                    Constant con = constants.get(conm);
-                    if (con == null)  continue;
-                    if (blab++ == 0 && !quiet)
-                        System.err.println("patching "+cf.nameString()+"."+m);
-                    //if (blab == 1) { for (Instruction j = m.instructions(); j != null; j = j.next()) System.out.println("  |"+j); }
-                    if (con.tag == CONSTANT_InvokeDynamic ||
-                        con.tag == CONSTANT_InvokeDynamic_17) {
-                        // need to patch the following instruction too,
-                        // but there are usually intervening argument pushes too
-                        Instruction i2 = findPop(i);
-                        Short[] ref2 = null;
-                        short ref2i = 0;
-                        if (i2 != null && i2.bc == opc_invokevirtual &&
-                                poolMarks[(char)(ref2i = (short) i2.u2At(1))] == 'D')
-                            ref2 = pool.getMemberRef(ref2i);
-                        if (ref2 == null || !"invokeExact".equals(pool.getString(ref2[1]))) {
-                            System.err.println(m+": failed to create invokedynamic at "+i.pc);
-                            continue;
-                        }
-                        String invType = pool.getString(ref2[2]);
-                        String bsmType = indySignatures.get(conm);
-                        if (!invType.equals(bsmType)) {
-                            System.err.println(m+": warning: "+conm+" call type and local invoke type differ: "
-                                    +bsmType+", "+invType);
-                        }
-                        assert(i.len == 3 || i2.len == 3);
-                        if (!quiet)  System.err.println(i+" "+conm+";...; "+i2+" => invokedynamic "+con);
-                        int start = i.pc + 3, end = i2.pc;
-                        System.arraycopy(i.codeBase, start, i.codeBase, i.pc, end-start);
-                        i.forceNext(0);  // force revisit of new instruction
-                        i2.u1AtPut(-3, opc_invokedynamic);
-                        i2.u2AtPut(-2, con.index);
-                        i2.u2AtPut(0, (short)0);
-                        i2.u1AtPut(2, opc_nop);
-                        //System.out.println(new Instruction(i.codeBase, i2.pc-3));
-                    } else {
-                        if (!quiet)  System.err.println(i+" "+conm+" => ldc "+con);
-                        assert(i.len == 3);
-                        i.u1AtPut(0, opc_ldc_w);
-                        i.u2AtPut(1, con.index);
-                    }
-                }
-                //if (blab >= 1) { for (Instruction j = m.instructions(); j != null; j = j.next()) System.out.println("    |"+j); }
-            }
-            cf.methods.removeAll(constants.keySet());
-            return true;
-        }
-
-        // Scan forward from the instruction to find where the stack p
-        // below the current sp at the instruction.
-        Instruction findPop(Instruction i) {
-            //System.out.println("findPop from "+i);
-            Pool pool = cf.pool;
-            JVMState jvm = new JVMState();
-        decode:
-            for (i = i.clone().next(); i != null; i = i.next()) {
-                String pops = INSTRUCTION_POPS[i.bc];
-                //System.out.println("  "+i+" "+jvm.stack+" : "+pops.replace("$", " => "));
-                if (pops == null)  break;
-                if (jvm.stackMotion(i.bc))  continue decode;
-                if (pops.indexOf('Q') >= 0) {
-                    Short[] ref = pool.getMemberRef((short) i.u2At(1));
-                    String type = simplifyType(pool.getString(CONSTANT_Utf8, ref[2]));
-                    switch (i.bc) {
-                    case opc_getstatic:
-                    case opc_getfield:
-                    case opc_putstatic:
-                    case opc_putfield:
-                        pops = pops.replace("Q", type);
-                        break;
-                    default:
-                        if (!type.startsWith("("))
-                            throw new InternalError(i.toString());
-                        pops = pops.replace("Q$Q", type.substring(1).replace(")","$"));
-                        break;
-                    }
-                    //System.out.println("special type: "+type+" => "+pops);
-                }
-                int npops = pops.indexOf('$');
-                if (npops < 0)  throw new InternalError();
-                if (npops > jvm.sp())  return i;
-                List<Object> args = jvm.args(npops);
-                int k = 0;
-                for (Object x : args) {
-                    char have = (Character) x;
-                    char want = pops.charAt(k++);
-                    if (have == 'X' || want == 'X')  continue;
-                    if (have != want)  break decode;
-                }
-                if (pops.charAt(k++) != '$')  break decode;
-                args.clear();
-                while (k < pops.length())
-                    args.add(pops.charAt(k++));
-            }
-            System.err.println("*** bailout on jvm: "+jvm.stack+" "+i);
-            return null;
-        }
-
-        boolean findPatternMethods() {
-            boolean found = false;
-            for (char mark : "THI".toCharArray()) {
-                for (Method m : cf.methods) {
-                    if (!Modifier.isPrivate(m.access))  continue;
-                    if (!Modifier.isStatic(m.access))  continue;
-                    if (nameAndTypeMark(m.name, m.type) == mark) {
-                        Constant con = scanPattern(m, mark);
-                        if (con == null)  continue;
-                        constants.put(m, con);
-                        found = true;
-                    }
-                }
-            }
-            return found;
-        }
-
-        void reportPatternMethods(boolean quietly, boolean allowMatchFailure) {
-            if (!quietly && !constants.keySet().isEmpty())
-                System.err.println("pattern methods removed: "+constants.keySet());
-            for (Method m : cf.methods) {
-                if (nameMark(cf.pool.getString(m.name)) != 0 &&
-                    constants.get(m) == null) {
-                    String failure = "method has special name but fails to match pattern: "+m;
-                    if (!allowMatchFailure)
-                        throw new IllegalArgumentException(failure);
-                    else if (!quietly)
-                        System.err.println("warning: "+failure);
-                }
-            }
-            if (verifySpecifierCount >= 0) {
-                List<Object[]> specs = bootstrapMethodSpecifiers(false);
-                int specsLen = (specs == null ? 0 : specs.size());
-                if (specsLen != verifySpecifierCount) {
-                    throw new IllegalArgumentException("BootstrapMethods length is "+specsLen+" but should be "+verifySpecifierCount);
-                }
-            }
-        }
-
-        // mark constant pool entries according to participation in patterns
-        boolean initializeMarks() {
-            boolean changed = false;
-            for (;;) {
-                boolean changed1 = false;
-                int cpindex = -1;
-                for (Constant e : cf.pool) {
-                    ++cpindex;
-                    if (e == null)  continue;
-                    char mark = poolMarks[cpindex];
-                    if (mark != 0)  continue;
-                    switch (e.tag) {
-                    case CONSTANT_Utf8:
-                        mark = nameMark(e.itemString()); break;
-                    case CONSTANT_NameAndType:
-                        mark = nameAndTypeMark(e.itemIndexes()); break;
-                    case CONSTANT_Class: {
-                        int n1 = e.itemIndex();
-                        char nmark = poolMarks[(char)n1];
-                        if ("DJ".indexOf(nmark) >= 0)
-                            mark = nmark;
-                        break;
-                    }
-                    case CONSTANT_Field:
-                    case CONSTANT_Method: {
-                        Short[] n12 = e.itemIndexes();
-                        short cl = n12[0];
-                        short nt = n12[1];
-                        char cmark = poolMarks[(char)cl];
-                        if (cmark != 0) {
-                            mark = cmark;  // it is a java.dyn.* or java.lang.* method
-                            break;
-                        }
-                        String cls = cf.pool.getString(CONSTANT_Class, cl);
-                        if (cls.equals(cf.nameString())) {
-                            switch (poolMarks[(char)nt]) {
-                            // it is a private MH/MT/INDY method
-                            case 'T': case 'H': case 'I':
-                                mark = poolMarks[(char)nt];
-                                break;
-                            }
-                        }
-                        break;
-                    }
-                    default:  break;
-                    }
-                    if (mark != 0) {
-                        poolMarks[cpindex] = mark;
-                        changed1 = true;
-                    }
-                }
-                if (!changed1)
-                    break;
-                changed = true;
-            }
-            return changed;
-        }
-        char nameMark(String s) {
-            if (s.startsWith("MT_"))                return 'T';
-            else if (s.startsWith("MH_"))           return 'H';
-            else if (s.startsWith("INDY_"))         return 'I';
-            else if (s.startsWith("java/dyn/"))     return 'D';
-            else if (s.startsWith("java/lang/"))    return 'J';
-            return 0;
-        }
-        char nameAndTypeMark(Short[] n12) {
-            return nameAndTypeMark(n12[0], n12[1]);
-        }
-        char nameAndTypeMark(short n1, short n2) {
-            char mark = poolMarks[(char)n1];
-            if (mark == 0)  return 0;
-            String descr = cf.pool.getString(CONSTANT_Utf8, n2);
-            String requiredType;
-            switch (poolMarks[(char)n1]) {
-            case 'H': requiredType = "()Ljava/dyn/MethodHandle;";  break;
-            case 'T': requiredType = "()Ljava/dyn/MethodType;";    break;
-            case 'I': requiredType = "()Ljava/dyn/MethodHandle;";  break;
-            default:  return 0;
-            }
-            if (descr.equals(requiredType))  return mark;
-            return 0;
-        }
-
-        private class JVMState {
-            final List<Object> stack = new ArrayList<>();
-            int sp() { return stack.size(); }
-            void push(Object x) { stack.add(x); }
-            void push2(Object x) { stack.add(EMPTY_SLOT); stack.add(x); }
-            void pushAt(int pos, Object x) { stack.add(stack.size()+pos, x); }
-            Object pop() { return stack.remove(sp()-1); }
-            Object top() { return stack.get(sp()-1); }
-            List<Object> args(boolean hasRecv, String type) {
-                return args(argsize(type) + (hasRecv ? 1 : 0));
-            }
-            List<Object> args(int argsize) {
-                return stack.subList(sp()-argsize, sp());
-            }
-            boolean stackMotion(int bc) {
-                switch (bc) {
-                case opc_pop:    pop();             break;
-                case opc_pop2:   pop(); pop();      break;
-                case opc_swap:   pushAt(-1, pop()); break;
-                case opc_dup:    push(top());       break;
-                case opc_dup_x1: pushAt(-2, top()); break;
-                case opc_dup_x2: pushAt(-3, top()); break;
-                // ? also: dup2{,_x1,_x2}
-                default:  return false;
-                }
-                return true;
-            }
-        }
-        private final String EMPTY_SLOT = "_";
-        private void removeEmptyJVMSlots(List<Object> args) {
-            for (;;) {
-                int i = args.indexOf(EMPTY_SLOT);
-                if (i >= 0 && i+1 < args.size()
-                    && (isConstant(args.get(i+1), CONSTANT_Long) ||
-                        isConstant(args.get(i+1), CONSTANT_Double)))
-                    args.remove(i);
-                else  break;
-            }
-        }
-
-        private Constant scanPattern(Method m, char patternMark) {
-            if (verbose)  System.err.println("scan "+m+" for pattern="+patternMark);
-            int wantTag;
-            switch (patternMark) {
-            case 'T': wantTag = CONSTANT_MethodType; break;
-            case 'H': wantTag = CONSTANT_MethodHandle; break;
-            case 'I': wantTag = CONSTANT_InvokeDynamic; break;
-            default: throw new InternalError();
-            }
-            Instruction i = m.instructions();
-            JVMState jvm = new JVMState();
-            Pool pool = cf.pool;
-            int branchCount = 0;
-            Object arg;
-            List<Object> args;
-            List<Object> bsmArgs = null;  // args to invokeGeneric
-        decode:
-            for (; i != null; i = i.next()) {
-                //System.out.println(jvm.stack+" "+i);
-                int bc = i.bc;
-                switch (bc) {
-                case opc_ldc:           jvm.push(pool.get(i.u1At(1)));   break;
-                case opc_ldc_w:         jvm.push(pool.get(i.u2At(1)));   break;
-                case opc_ldc2_w:        jvm.push2(pool.get(i.u2At(1)));  break;
-                case opc_aconst_null:   jvm.push(null);                  break;
-                case opc_bipush:        jvm.push((int)(byte) i.u1At(1)); break;
-                case opc_sipush:        jvm.push((int)(short)i.u2At(1)); break;
-
-                // these support creation of a restarg array
-                case opc_anewarray:
-                    arg = jvm.pop();
-                    if (!(arg instanceof Integer))  break decode;
-                    arg = Arrays.asList(new Object[(Integer)arg]);
-                    jvm.push(arg);
-                    break;
-                case opc_dup:
-                    jvm.push(jvm.top()); break;
-                case opc_aastore:
-                    args = jvm.args(3);  // array, index, value
-                    if (args.get(0) instanceof List &&
-                        args.get(1) instanceof Integer) {
-                        ((List<Object>)args.get(0)).set( (Integer)args.get(1), args.get(2) );
-                    }
-                    args.clear();
-                    break;
-
-                case opc_getstatic:
-                {
-                    // int.class compiles to getstatic Integer.TYPE
-                    int fieldi = i.u2At(1);
-                    char mark = poolMarks[fieldi];
-                    //System.err.println("getstatic "+fieldi+Arrays.asList(pool.getStrings(pool.getMemberRef((short)fieldi)))+mark);
-                    if (mark == 'J') {
-                        Short[] ref = pool.getMemberRef((short) fieldi);
-                        String name = pool.getString(CONSTANT_Utf8, ref[1]);
-                        if ("TYPE".equals(name)) {
-                            String wrapperName = pool.getString(CONSTANT_Class, ref[0]).replace('/', '.');
-                            // a primitive type descriptor
-                            Class<?> primClass;
-                            try {
-                                primClass = (Class<?>) Class.forName(wrapperName).getField(name).get(null);
-                            } catch (Exception ex) {
-                                throw new InternalError("cannot load "+wrapperName+"."+name);
-                            }
-                            jvm.push(primClass);
-                            break;
-                        }
-                    }
-                    // unknown field; keep going...
-                    jvm.push(UNKNOWN_CON);
-                    break;
-                }
-                case opc_putstatic:
-                {
-                    if (patternMark != 'I')  break decode;
-                    jvm.pop();
-                    // unknown field; keep going...
-                    break;
-                }
-
-                case opc_invokestatic:
-                case opc_invokevirtual:
-                {
-                    boolean hasRecv = (bc == opc_invokevirtual);
-                    int methi = i.u2At(1);
-                    char mark = poolMarks[methi];
-                    Short[] ref = pool.getMemberRef((short)methi);
-                    String type = pool.getString(CONSTANT_Utf8, ref[2]);
-                    //System.out.println("invoke "+pool.getString(CONSTANT_Utf8, ref[1])+" "+Arrays.asList(ref)+" : "+type);
-                    args = jvm.args(hasRecv, type);
-                    String intrinsic = null;
-                    Constant con;
-                    if (mark == 'D' || mark == 'J') {
-                        intrinsic = pool.getString(CONSTANT_Utf8, ref[1]);
-                        if (mark == 'J') {
-                            String cls = pool.getString(CONSTANT_Class, ref[0]);
-                            cls = cls.substring(1+cls.lastIndexOf('/'));
-                            intrinsic = cls+"."+intrinsic;
-                        }
-                        //System.out.println("recognized intrinsic "+intrinsic);
-                        byte refKind = -1;
-                        switch (intrinsic) {
-                        case "findGetter":          refKind = REF_getField;         break;
-                        case "findStaticGetter":    refKind = REF_getStatic;        break;
-                        case "findSetter":          refKind = REF_putField;         break;
-                        case "findStaticSetter":    refKind = REF_putStatic;        break;
-                        case "findVirtual":         refKind = REF_invokeVirtual;    break;
-                        case "findStatic":          refKind = REF_invokeStatic;     break;
-                        case "findSpecial":         refKind = REF_invokeSpecial;    break;
-                        case "findConstructor":     refKind = REF_newInvokeSpecial; break;
-                        }
-                        if (refKind >= 0 && (con = parseMemberLookup(refKind, args)) != null) {
-                            args.clear(); args.add(con);
-                            continue;
-                        }
-                    }
-                    Method ownMethod = null;
-                    if (mark == 'T' || mark == 'H' || mark == 'I') {
-                        ownMethod = findMember(cf.methods, ref[1], ref[2]);
-                    }
-                    switch (intrinsic == null ? "" : intrinsic) {
-                    case "fromMethodDescriptorString":
-                        con = makeMethodTypeCon(args.get(0));
-                        args.clear(); args.add(con);
-                        continue;
-                    case "methodType": {
-                        flattenVarargs(args);  // there are several overloadings, some with varargs
-                        StringBuilder buf = new StringBuilder();
-                        String rtype = null;
-                        for (Object typeArg : args) {
-                            if (typeArg instanceof Class) {
-                                Class<?> argClass = (Class<?>) typeArg;
-                                if (argClass.isPrimitive()) {
-                                    char tchar;
-                                    switch (argClass.getName()) {
-                                    case "void":    tchar = 'V'; break;
-                                    case "boolean": tchar = 'Z'; break;
-                                    case "byte":    tchar = 'B'; break;
-                                    case "char":    tchar = 'C'; break;
-                                    case "short":   tchar = 'S'; break;
-                                    case "int":     tchar = 'I'; break;
-                                    case "long":    tchar = 'J'; break;
-                                    case "float":   tchar = 'F'; break;
-                                    case "double":  tchar = 'D'; break;
-                                    default:  throw new InternalError(argClass.toString());
-                                    }
-                                    buf.append(tchar);
-                                } else {
-                                    // should not happen, but...
-                                    buf.append('L').append(argClass.getName().replace('.','/')).append(';');
-                                }
-                            } else if (typeArg instanceof Constant) {
-                                Constant argCon = (Constant) typeArg;
-                                if (argCon.tag == CONSTANT_Class) {
-                                    String cn = pool.get(argCon.itemIndex()).itemString();
-                                    if (cn.endsWith(";"))
-                                        buf.append(cn);
-                                    else
-                                        buf.append('L').append(cn).append(';');
-                                } else {
-                                    break decode;
-                                }
-                            } else {
-                                break decode;
-                            }
-                            if (rtype == null) {
-                                // first arg is treated differently
-                                rtype = buf.toString();
-                                buf.setLength(0);
-                                buf.append('(');
-                            }
-                        }
-                        buf.append(')').append(rtype);
-                        con = con = makeMethodTypeCon(buf.toString());
-                        args.clear(); args.add(con);
-                        continue;
-                    }
-                    case "lookup":
-                    case "dynamicInvoker":
-                        args.clear(); args.add(intrinsic);
-                        continue;
-                    case "lookupClass":
-                        if (args.equals(Arrays.asList("lookup"))) {
-                            // fold lookup().lookupClass() to the enclosing class
-                            args.clear(); args.add(pool.get(cf.thisc));
-                            continue;
-                        }
-                        break;
-                    case "invokeGeneric":
-                    case "invokeWithArguments":
-                        if (patternMark != 'I')  break decode;
-                        if ("invokeWithArguments".equals(intrinsic))
-                            flattenVarargs(args);
-                        bsmArgs = new ArrayList(args);
-                        args.clear(); args.add("invokeGeneric");
-                        continue;
-                    case "Integer.valueOf":
-                    case "Float.valueOf":
-                    case "Long.valueOf":
-                    case "Double.valueOf":
-                        removeEmptyJVMSlots(args);
-                        if (args.size() == 1) {
-                            arg = args.remove(0);
-                            assert(3456 == (CONSTANT_Integer*1000 + CONSTANT_Float*100 + CONSTANT_Long*10 + CONSTANT_Double));
-                            if (isConstant(arg, CONSTANT_Integer + "IFLD".indexOf(intrinsic.charAt(0)))
-                                || arg instanceof Number) {
-                                args.add(arg); continue;
-                            }
-                        }
-                        break decode;
-                    }
-                    if (!hasRecv && ownMethod != null && patternMark != 0) {
-                        con = constants.get(ownMethod);
-                        if (con == null)  break decode;
-                        args.clear(); args.add(con);
-                        continue;
-                    } else if (type.endsWith(")V")) {
-                        // allow calls like println("reached the pattern method")
-                        args.clear();
-                        continue;
-                    }
-                    break decode;  // bail out for most calls
-                }
-                case opc_areturn:
-                {
-                    ++branchCount;
-                    if (bsmArgs != null) {
-                        // parse bsmArgs as (MH, lookup, String, MT, [extra])
-                        Constant indyCon = makeInvokeDynamicCon(bsmArgs);
-                        if (indyCon != null) {
-                            Constant typeCon = (Constant) bsmArgs.get(3);
-                            indySignatures.put(m, pool.getString(typeCon.itemIndex()));
-                            return indyCon;
-                        }
-                        System.err.println(m+": inscrutable bsm arguments: "+bsmArgs);
-                        break decode;  // bail out
-                    }
-                    arg = jvm.pop();
-                    if (branchCount == 2 && UNKNOWN_CON.equals(arg))
-                        break;  // merge to next path
-                    if (isConstant(arg, wantTag))
-                        return (Constant) arg;
-                    break decode;  // bail out
-                }
-                default:
-                    if (jvm.stackMotion(i.bc))  break;
-                    if (bc >= opc_nconst_MIN && bc <= opc_nconst_MAX)
-                        { jvm.push(INSTRUCTION_CONSTANTS[bc - opc_nconst_MIN]); break; }
-                    if (patternMark == 'I') {
-                        // these support caching paths in INDY_x methods
-                        if (bc == opc_aload || bc >= opc_aload_0 && bc <= opc_aload_MAX)
-                            { jvm.push(UNKNOWN_CON); break; }
-                        if (bc == opc_astore || bc >= opc_astore_0 && bc <= opc_astore_MAX)
-                            { jvm.pop(); break; }
-                        switch (bc) {
-                        case opc_getfield:
-                        case opc_aaload:
-                            jvm.push(UNKNOWN_CON); break;
-                        case opc_ifnull:
-                        case opc_ifnonnull:
-                            // ignore branch target
-                            if (++branchCount != 1)  break decode;
-                            jvm.pop();
-                            break;
-                        case opc_checkcast:
-                            arg = jvm.top();
-                            if ("invokeWithArguments".equals(arg) ||
-                                "invokeGeneric".equals(arg))
-                                break;  // assume it is a helpful cast
-                            break decode;
-                        default:
-                            break decode;  // bail out
-                        }
-                        continue decode; // go to next instruction
-                    }
-                    break decode;  // bail out
-                } //end switch
-            }
-            System.err.println(m+": bailout on "+i+" jvm stack: "+jvm.stack);
-            return null;
-        }
-        private final String UNKNOWN_CON = "<unknown>";
-
-        private void flattenVarargs(List<Object> args) {
-            int size = args.size();
-            if (size > 0 && args.get(size-1) instanceof List)
-                args.addAll((List<Object>) args.remove(size-1));
-        }
-
-        private boolean isConstant(Object x, int tag) {
-            return x instanceof Constant && ((Constant)x).tag == tag;
-        }
-        private Constant makeMethodTypeCon(Object x) {
-            short utfIndex;
-            if (x instanceof String)
-                utfIndex = (short) cf.pool.addConstant(CONSTANT_Utf8, x).index;
-            else if (isConstant(x, CONSTANT_String))
-                utfIndex = ((Constant)x).itemIndex();
-            else  return null;
-            return cf.pool.addConstant(CONSTANT_MethodType, utfIndex);
-        }
-        private Constant parseMemberLookup(byte refKind, List<Object> args) {
-            // E.g.: lookup().findStatic(Foo.class, "name", MethodType)
-            if (args.size() != 4)  return null;
-            int argi = 0;
-            if (!"lookup".equals(args.get(argi++)))  return null;
-            short refindex, cindex, ntindex, nindex, tindex;
-            Object con;
-            if (!isConstant(con = args.get(argi++), CONSTANT_Class))  return null;
-            cindex = (short)((Constant)con).index;
-            if (!isConstant(con = args.get(argi++), CONSTANT_String))  return null;
-            nindex = ((Constant)con).itemIndex();
-            if (isConstant(con = args.get(argi++), CONSTANT_MethodType) ||
-                isConstant(con, CONSTANT_Class)) {
-                tindex = ((Constant)con).itemIndex();
-            } else return null;
-            ntindex = (short) cf.pool.addConstant(CONSTANT_NameAndType,
-                    new Short[]{ nindex, tindex }).index;
-            byte reftag = CONSTANT_Method;
-            if (refKind <= REF_putStatic)
-                reftag = CONSTANT_Field;
-            else if (refKind == REF_invokeInterface)
-                reftag = CONSTANT_InterfaceMethod;
-            Constant ref = cf.pool.addConstant(reftag, new Short[]{ cindex, ntindex });
-            return cf.pool.addConstant(CONSTANT_MethodHandle, new Object[]{ refKind, (short)ref.index });
-        }
-        private Constant makeInvokeDynamicCon(List<Object> args) {
-            // E.g.: MH_bsm.invokeGeneric(lookup(), "name", MethodType, "extraArg")
-            removeEmptyJVMSlots(args);
-            if (args.size() != 4 && args.size() != 5)  return null;
-            int argi = 0;
-            short nindex, tindex, ntindex, bsmindex;
-            Object con;
-            if (!isConstant(con = args.get(argi++), CONSTANT_MethodHandle))  return null;
-            bsmindex = (short) ((Constant)con).index;
-            if (!"lookup".equals(args.get(argi++)))  return null;
-            if (!isConstant(con = args.get(argi++), CONSTANT_String))  return null;
-            nindex = ((Constant)con).itemIndex();
-            if (!isConstant(con = args.get(argi++), CONSTANT_MethodType))  return null;
-            tindex = ((Constant)con).itemIndex();
-            ntindex = (short) cf.pool.addConstant(CONSTANT_NameAndType,
-                                                  new Short[]{ nindex, tindex }).index;
-            if (transitionalJSR292) {
-                if (argi != args.size()) {
-                    System.err.println("BSM specifier has extra arguments but transitionalJSR292=1");
-                    return null;
-                }
-                return cf.pool.addConstant(CONSTANT_InvokeDynamic_17,
-                        new Short[]{ bsmindex, ntindex });
-            }
-            List<Object> extraArgs = Collections.emptyList();
-            if (argi < args.size()) {
-                Object arg = args.get(argi);
-                if (arg instanceof List)
-                    extraArgs = (List<Object>) arg;
-                else
-                    extraArgs = Arrays.asList(arg);
-                removeEmptyJVMSlots(args);
-            }
-            List<Short> extraArgIndexes = new CountedList<>(Short.class);
-            for (Object x : extraArgs) {
-                if (x instanceof Number) {
-                    Object num = null; byte numTag = 0;
-                    if (x instanceof Integer) { num = x; numTag = CONSTANT_Integer; }
-                    if (x instanceof Float)   { num = Float.floatToRawIntBits((Float)x); numTag = CONSTANT_Float; }
-                    if (x instanceof Long)    { num = x; numTag = CONSTANT_Long; }
-                    if (x instanceof Double)  { num = Double.doubleToRawLongBits((Double)x); numTag = CONSTANT_Double; }
-                    if (num != null)  x = cf.pool.addConstant(numTag, x);
-                }
-                if (!(x instanceof Constant))  return null;
-                extraArgIndexes.add((short) ((Constant)x).index);
-            }
-            List<Object[]> specs = bootstrapMethodSpecifiers(true);
-            int specindex = -1;
-            Object[] spec = new Object[]{ bsmindex, extraArgIndexes };
-            for (Object[] spec1 : specs) {
-                if (Arrays.equals(spec1, spec)) {
-                    specindex = specs.indexOf(spec1);
-                    if (verbose)  System.err.println("reusing BSM specifier: "+spec1[0]+spec1[1]);
-                    break;
-                }
-            }
-            if (specindex == -1) {
-                specindex = (short) specs.size();
-                specs.add(spec);
-                if (verbose)  System.err.println("adding BSM specifier: "+spec[0]+spec[1]);
-            }
-            return cf.pool.addConstant(CONSTANT_InvokeDynamic,
-                        new Short[]{ (short)specindex, ntindex });
-        }
-
-        List<Object[]> bootstrapMethodSpecifiers(boolean createIfNotFound) {
-            Attr bsms = cf.findAttr("BootstrapMethods");
-            if (bsms == null) {
-                if (!createIfNotFound)  return null;
-                bsms = new Attr(cf, "BootstrapMethods", new byte[]{0,0});
-                assert(bsms == cf.findAttr("BootstrapMethods"));
-            }
-            if (bsms.item instanceof byte[]) {
-                // unflatten
-                List<Object[]> specs = new CountedList<>(Object[].class);
-                DataInputStream in = new DataInputStream(new ByteArrayInputStream((byte[]) bsms.item));
-                try {
-                    int len = (char) in.readShort();
-                    for (int i = 0; i < len; i++) {
-                        short bsm = in.readShort();
-                        int argc = (char) in.readShort();
-                        List<Short> argv = new CountedList<>(Short.class);
-                        for (int j = 0; j < argc; j++)
-                            argv.add(in.readShort());
-                        specs.add(new Object[]{ bsm, argv });
-                    }
-                } catch (IOException ex) { throw new InternalError(); }
-                bsms.item = specs;
-            }
-            return (List<Object[]>) bsms.item;
-        }
-    }
-
-    private DataInputStream openInput(File f) throws IOException {
-        return new DataInputStream(new BufferedInputStream(new FileInputStream(f)));
-    }
-
-    private DataOutputStream openOutput(File f) throws IOException {
-        if (!overwrite && f.exists())
-            throw new IOException("file already exists: "+f);
-        ensureDirectory(f.getParentFile());
-        return new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f)));
-    }
-
-    static byte[] readRawBytes(DataInputStream in, int size) throws IOException {
-        byte[] bytes = new byte[size];
-        int nr = in.read(bytes);
-        if (nr != size)
-            throw new InternalError("wrong size: "+nr);
-        return bytes;
-    }
-
-    private interface Chunk {
-        void readFrom(DataInputStream in) throws IOException;
-        void writeTo(DataOutputStream out) throws IOException;
-    }
-
-    private static class CountedList<T> extends ArrayList<T> implements Chunk {
-        final Class<? extends T> itemClass;
-        final int rowlen;
-        CountedList(Class<? extends T> itemClass, int rowlen) {
-            this.itemClass = itemClass;
-            this.rowlen = rowlen;
-        }
-        CountedList(Class<? extends T> itemClass) { this(itemClass, -1); }
-        public void readFrom(DataInputStream in) throws IOException {
-            int count = in.readUnsignedShort();
-            while (size() < count) {
-                if (rowlen < 0) {
-                    add(readInput(in, itemClass));
-                } else {
-                    Class<?> elemClass = itemClass.getComponentType();
-                    Object[] row = (Object[]) java.lang.reflect.Array.newInstance(elemClass, rowlen);
-                    for (int i = 0; i < rowlen; i++)
-                        row[i] = readInput(in, elemClass);
-                    add(itemClass.cast(row));
-                }
-            }
-        }
-        public void writeTo(DataOutputStream out) throws IOException {
-            out.writeShort((short)size());
-            for (T item : this) {
-                writeOutput(out, item);
-            }
-        }
-    }
-
-    private static <T> T readInput(DataInputStream in, Class<T> dataClass) throws IOException {
-        Object data;
-        if (dataClass == Integer.class) {
-            data = in.readInt();
-        } else if (dataClass == Short.class) {
-            data = in.readShort();
-        } else if (dataClass == Byte.class) {
-            data = in.readByte();
-        } else if (dataClass == String.class) {
-            data = in.readUTF();
-        } else if (Chunk.class.isAssignableFrom(dataClass)) {
-            T obj;
-            try { obj = dataClass.newInstance(); }
-                catch (Exception ex) { throw new RuntimeException(ex); }
-            ((Chunk)obj).readFrom(in);
-            data = obj;
-        } else {
-            throw new InternalError("bad input datum: "+dataClass);
-        }
-        return dataClass.cast(data);
-    }
-    private static <T> T readInput(byte[] bytes, Class<T> dataClass) {
-        try {
-            return readInput(new DataInputStream(new ByteArrayInputStream(bytes)), dataClass);
-        } catch (IOException ex) {
-            throw new InternalError();
-        }
-    }
-    private static void readInputs(DataInputStream in, Object... data) throws IOException {
-        for (Object x : data)  ((Chunk)x).readFrom(in);
-    }
-
-    private static void writeOutput(DataOutputStream out, Object data) throws IOException {
-        if (data == null) {
-            return;
-        } if (data instanceof Integer) {
-            out.writeInt((Integer)data);
-        } else if (data instanceof Long) {
-            out.writeLong((Long)data);
-        } else if (data instanceof Short) {
-            out.writeShort((Short)data);
-        } else if (data instanceof Byte) {
-            out.writeByte((Byte)data);
-        } else if (data instanceof String) {
-            out.writeUTF((String)data);
-        } else if (data instanceof byte[]) {
-            out.write((byte[])data);
-        } else if (data instanceof Object[]) {
-            for (Object x : (Object[]) data)
-                writeOutput(out, x);
-        } else if (data instanceof Chunk) {
-            Chunk x = (Chunk) data;
-            x.writeTo(out);
-        } else if (data instanceof List) {
-            for (Object x : (List<?>) data)
-                writeOutput(out, x);
-        } else {
-            throw new InternalError("bad output datum: "+data+" : "+data.getClass().getName());
-        }
-    }
-    private static void writeOutputs(DataOutputStream out, Object... data) throws IOException {
-        for (Object x : data)  writeOutput(out, x);
-    }
-
-    public static abstract class Outer {
-        public abstract List<? extends Inner> inners();
-        protected void linkInners() {
-            for (Inner i : inners()) {
-                i.linkOuter(this);
-                if (i instanceof Outer)
-                    ((Outer)i).linkInners();
-            }
-        }
-        public <T extends Outer> T outer(Class<T> c) {
-            for (Outer walk = this;; walk = ((Inner)walk).outer()) {
-                if (c.isInstance(walk))
-                    return c.cast(walk);
-                //if (!(walk instanceof Inner))  return null;
-            }
-        }
-
-        public abstract List<Attr> attrs();
-        public Attr findAttr(String name) {
-            return findAttr(outer(ClassFile.class).pool.stringIndex(name, false));
-        }
-        public Attr findAttr(int name) {
-            if (name == 0)  return null;
-            for (Attr a : attrs()) {
-                if (a.name == name)  return a;
-            }
-            return null;
-        }
-    }
-    public interface Inner { Outer outer(); void linkOuter(Outer o); }
-    public static abstract class InnerOuter extends Outer implements Inner {
-        public Outer outer;
-        public Outer outer() { return outer; }
-        public void linkOuter(Outer o) { assert(outer == null); outer = o; }
-    }
-    public static class Constant<T> implements Chunk {
-        public final byte tag;
-        public final T item;
-        public final int index;
-        public Constant(int index, byte tag, T item) {
-            this.index = index;
-            this.tag = tag;
-            this.item = item;
-        }
-        public Constant checkTag(byte tag) {
-            if (this.tag != tag)  throw new InternalError(this.toString());
-            return this;
-        }
-        public String itemString() { return (String)item; }
-        public Short itemIndex() { return (Short)item; }
-        public Short[] itemIndexes() { return (Short[])item; }
-        public void readFrom(DataInputStream in) throws IOException {
-            throw new InternalError("do not call");
-        }
-        public void writeTo(DataOutputStream out) throws IOException {
-            writeOutputs(out, tag, item);
-        }
-        public boolean equals(Object x) { return (x instanceof Constant && equals((Constant)x)); }
-        public boolean equals(Constant that) {
-            return (this.tag == that.tag && this.itemAsComparable().equals(that.itemAsComparable()));
-        }
-        public int hashCode() { return (tag * 31) + this.itemAsComparable().hashCode(); }
-        public Object itemAsComparable() {
-            switch (tag) {
-            case CONSTANT_Double:   return Double.longBitsToDouble((Long)item);
-            case CONSTANT_Float:    return Float.intBitsToFloat((Integer)item);
-            }
-            return (item instanceof Object[] ? Arrays.asList((Object[])item) : item);
-        }
-        public String toString() {
-            String itstr = String.valueOf(itemAsComparable());
-            return (index + ":" + tagName(tag) + (itstr.startsWith("[")?"":"=") + itstr);
-        }
-        private static String[] TAG_NAMES;
-        public static String tagName(byte tag) {  // used for error messages
-            if (TAG_NAMES == null)
-                TAG_NAMES = ("None Utf8 Unicode Integer Float Long Double Class String"
-                             +" Fieldref Methodref InterfaceMethodref NameAndType #13 #14"
-                             +" MethodHandle MethodType InvokeDynamic#17 InvokeDynamic").split(" ");
-            if ((tag & 0xFF) >= TAG_NAMES.length)  return "#"+(tag & 0xFF);
-            return TAG_NAMES[tag & 0xFF];
-        }
-    }
-
-    public static class Pool extends CountedList<Constant> implements Chunk {
-        private Map<String,Short> strings = new TreeMap<>();
-
-        public Pool() {
-            super(Constant.class);
-        }
-        public void readFrom(DataInputStream in) throws IOException {
-            int count = in.readUnsignedShort();
-            add(null);  // always ignore first item
-            while (size() < count) {
-                readConstant(in);
-            }
-        }
-        public <T> Constant<T> addConstant(byte tag, T item) {
-            Constant<T> con = new Constant<>(size(), tag, item);
-            int idx = indexOf(con);
-            if (idx >= 0)  return get(idx);
-            add(con);
-            if (tag == CONSTANT_Utf8)  strings.put((String)item, (short) con.index);
-            return con;
-        }
-        private void readConstant(DataInputStream in) throws IOException {
-            byte tag = in.readByte();
-            int index = size();
-            Object arg;
-            switch (tag) {
-            case CONSTANT_Utf8:
-                arg = in.readUTF();
-                strings.put((String) arg, (short) size());
-                break;
-            case CONSTANT_Integer:
-            case CONSTANT_Float:
-                arg = in.readInt(); break;
-            case CONSTANT_Long:
-            case CONSTANT_Double:
-                add(new Constant(index, tag, in.readLong()));
-                add(null);
-                return;
-            case CONSTANT_Class:
-            case CONSTANT_String:
-                arg = in.readShort(); break;
-            case CONSTANT_Field:
-            case CONSTANT_Method:
-            case CONSTANT_InterfaceMethod:
-            case CONSTANT_NameAndType:
-            case CONSTANT_InvokeDynamic_17:
-            case CONSTANT_InvokeDynamic:
-                // read an ordered pair
-                arg = new Short[] { in.readShort(), in.readShort() };
-                break;
-            case CONSTANT_MethodHandle:
-                // read an ordered pair; first part is a u1 (not u2)
-                arg = new Object[] { in.readByte(), in.readShort() };
-                break;
-            case CONSTANT_MethodType:
-                arg = in.readShort(); break;
-            default:
-                throw new InternalError("bad CP tag "+tag);
-            }
-            add(new Constant(index, tag, arg));
-        }
-
-        // Access:
-        public Constant get(int index) {
-            // extra 1-bits get into the shorts
-            return super.get((char) index);
-        }
-        String getString(byte tag, short index) {
-            get(index).checkTag(tag);
-            return getString(index);
-        }
-        String getString(short index) {
-            Object v = get(index).item;
-            if (v instanceof Short)
-                v = get((Short)v).checkTag(CONSTANT_Utf8).item;
-            return (String) v;
-        }
-        String[] getStrings(Short[] indexes) {
-            String[] res = new String[indexes.length];
-            for (int i = 0; i < indexes.length; i++)
-                res[i] = getString(indexes[i]);
-            return res;
-        }
-        int stringIndex(String name, boolean createIfNotFound) {
-            Short x = strings.get(name);
-            if (x != null)  return (char)(int) x;
-            if (!createIfNotFound)  return 0;
-            return addConstant(CONSTANT_Utf8, name).index;
-        }
-        Short[] getMemberRef(short index) {
-            Short[] cls_nnt = get(index).itemIndexes();
-            Short[] name_type = get(cls_nnt[1]).itemIndexes();
-            return new Short[]{ cls_nnt[0], name_type[0], name_type[1] };
-        }
-    }
-
-    public class ClassFile extends Outer implements Chunk {
-        ClassFile(File f) throws IOException {
-            DataInputStream in = openInput(f);
-            try {
-                readFrom(in);
-            } finally {
-                if (in != null)  in.close();
-            }
-        }
-
-        public int                magic, version;  // <min:maj>
-        public final Pool         pool       = new Pool();
-        public short              access, thisc, superc;
-        public final List<Short>  interfaces = new CountedList<>(Short.class);
-        public final List<Field>  fields     = new CountedList<>(Field.class);
-        public final List<Method> methods    = new CountedList<>(Method.class);
-        public final List<Attr>   attrs      = new CountedList<>(Attr.class);
-
-        public final void readFrom(DataInputStream in) throws IOException {
-            magic = in.readInt(); version = in.readInt();
-            if (magic != 0xCAFEBABE)  throw new IOException("bad magic number");
-            pool.readFrom(in);
-            Code_index = pool.stringIndex("Code", false);
-            access = in.readShort(); thisc = in.readShort(); superc = in.readShort();
-            readInputs(in, interfaces, fields, methods, attrs);
-            if (in.read() >= 0)  throw new IOException("junk after end of file");
-            linkInners();
-        }
-
-        void writeTo(File f) throws IOException {
-            DataOutputStream out = openOutput(f);
-            try {
-                writeTo(out);
-            } finally {
-                out.close();
-            }
-        }
-
-        public void writeTo(DataOutputStream out) throws IOException {
-            writeOutputs(out, magic, version, pool,
-                         access, thisc, superc, interfaces,
-                         fields, methods, attrs);
-        }
-
-        public byte[] toByteArray() {
-            try {
-                ByteArrayOutputStream buf = new ByteArrayOutputStream();
-                writeTo(new DataOutputStream(buf));
-                return buf.toByteArray();
-            } catch (IOException ex) {
-                throw new InternalError();
-            }
-        }
-
-        public List<Inner> inners() {
-            List<Inner> inns = new ArrayList<>();
-            inns.addAll(fields); inns.addAll(methods); inns.addAll(attrs);
-            return inns;
-        }
-        public List<Attr> attrs() { return attrs; }
-
-        // derived stuff:
-        public String nameString() { return pool.getString(CONSTANT_Class, thisc); }
-        int Code_index;
-    }
-
-    private static <T extends Member> T findMember(List<T> mems, int name, int type) {
-        if (name == 0 || type == 0)  return null;
-        for (T m : mems) {
-            if (m.name == name && m.type == type)  return m;
-        }
-        return null;
-    }
-
-    public static class Member extends InnerOuter implements Chunk {
-        public short access, name, type;
-        public final List<Attr> attrs = new CountedList<>(Attr.class);
-        public void readFrom(DataInputStream in) throws IOException {
-            access = in.readShort(); name = in.readShort(); type = in.readShort();
-            readInputs(in, attrs);
-        }
-        public void writeTo(DataOutputStream out) throws IOException {
-            writeOutputs(out, access, name, type, attrs);
-        }
-        public List<Attr> inners() { return attrs; }
-        public List<Attr> attrs() { return attrs; }
-        public ClassFile outer() { return (ClassFile) outer; }
-        public String nameString() { return outer().pool.getString(CONSTANT_Utf8, name); }
-        public String typeString() { return outer().pool.getString(CONSTANT_Utf8, type); }
-        public String toString() {
-            if (outer == null)  return super.toString();
-            return nameString() + (this instanceof Method ? "" : ":")
-                    + simplifyType(typeString());
-        }
-    }
-    public static class Field extends Member {
-    }
-    public static class Method extends Member {
-        public Code code() {
-            Attr a = findAttr("Code");
-            if (a == null)  return null;
-            return (Code) a.item;
-        }
-        public Instruction instructions() {
-            Code code = code();
-            if (code == null)  return null;
-            return code.instructions();
-        }
-    }
-
-    public static class Attr extends InnerOuter implements Chunk {
-        public short name;
-        public int size = -1;  // no pre-declared size
-        public Object item;
-
-        public Attr() {}
-        public Attr(Outer outer, String name, Object item) {
-            ClassFile cf = outer.outer(ClassFile.class);
-            linkOuter(outer);
-            this.name = (short) cf.pool.stringIndex(name, true);
-            this.item = item;
-            outer.attrs().add(this);
-        }
-        public void readFrom(DataInputStream in) throws IOException {
-            name = in.readShort();
-            size = in.readInt();
-            item = readRawBytes(in, size);
-        }
-        public void writeTo(DataOutputStream out) throws IOException {
-            out.writeShort(name);
-            // write the 4-byte size header and then the contents:
-            byte[] bytes;
-            int trueSize;
-            if (item instanceof byte[]) {
-                bytes = (byte[]) item;
-                out.writeInt(trueSize = bytes.length);
-                out.write(bytes);
-            } else {
-                trueSize = flatten(out);
-            }
-            if (trueSize != size && size >= 0)
-                System.err.println("warning: attribute size changed "+size+" to "+trueSize);
-        }
-        public void linkOuter(Outer o) {
-            super.linkOuter(o);
-            if (item instanceof byte[] &&
-                outer instanceof Method &&
-                ((Method)outer).outer().Code_index == name) {
-                    item = readInput((byte[])item, Code.class);
-            }
-        }
-        public List<Inner> inners() {
-            if (item instanceof Inner)
-                return Collections.nCopies(1, (Inner)item);
-            return Collections.emptyList();
-        }
-        public List<Attr> attrs() { return null; }  // Code overrides this
-        public byte[] flatten() {
-            ByteArrayOutputStream buf = new ByteArrayOutputStream(size);
-            flatten(buf);
-            return buf.toByteArray();
-        }
-        public int flatten(DataOutputStream out) throws IOException {
-            ByteArrayOutputStream buf = new ByteArrayOutputStream(Math.max(20, size));
-            int trueSize = flatten(buf);
-            out.writeInt(trueSize);
-            buf.writeTo(out);
-            return trueSize;
-        }
-        private int flatten(ByteArrayOutputStream buf) {
-            try {
-                writeOutput(new DataOutputStream(buf), item);
-                return buf.size();
-            } catch (IOException ex) {
-                throw new InternalError();
-            }
-        }
-        public String nameString() {
-            ClassFile cf = outer(ClassFile.class);
-            if (cf == null)  return "#"+name;
-            return cf.pool.getString(name);
-        }
-        public String toString() {
-            return nameString()+(size < 0 ? "=" : "["+size+"]=")+item;
-        }
-    }
-
-    public static class Code extends InnerOuter implements Chunk {
-        public short stacks, locals;
-        public byte[] bytes;
-        public final List<Short[]> etable = new CountedList<>(Short[].class, 4);
-        public final List<Attr> attrs = new CountedList<>(Attr.class);
-        // etable[N] = (N)*{ startpc, endpc, handlerpc, catchtype }
-        public void readFrom(DataInputStream in) throws IOException {
-            stacks = in.readShort(); locals = in.readShort();
-            bytes = readRawBytes(in, in.readInt());
-            readInputs(in, etable, attrs);
-        }
-        public void writeTo(DataOutputStream out) throws IOException {
-            writeOutputs(out, stacks, locals, bytes.length, bytes, etable, attrs);
-        }
-        public List<Attr> inners() { return attrs; }
-        public List<Attr> attrs() { return attrs; }
-        public Instruction instructions() {
-            return new Instruction(bytes, 0);
-        }
-    }
-
-    // lots of constants
-    private static final byte
-        CONSTANT_Utf8              = 1,
-        CONSTANT_Integer           = 3,
-        CONSTANT_Float             = 4,
-        CONSTANT_Long              = 5,
-        CONSTANT_Double            = 6,
-        CONSTANT_Class             = 7,
-        CONSTANT_String            = 8,
-        CONSTANT_Field             = 9,
-        CONSTANT_Method            = 10,
-        CONSTANT_InterfaceMethod   = 11,
-        CONSTANT_NameAndType       = 12,
-        CONSTANT_MethodHandle      = 15,  // JSR 292
-        CONSTANT_MethodType        = 16,  // JSR 292
-        CONSTANT_InvokeDynamic_17  = 17,  // JSR 292, only occurs in old class files
-        CONSTANT_InvokeDynamic     = 18;  // JSR 292
-    private static final byte
-        REF_getField               = 1,
-        REF_getStatic              = 2,
-        REF_putField               = 3,
-        REF_putStatic              = 4,
-        REF_invokeVirtual          = 5,
-        REF_invokeStatic           = 6,
-        REF_invokeSpecial          = 7,
-        REF_newInvokeSpecial       = 8,
-        REF_invokeInterface        = 9;
-
-    private static final int
-        opc_nop                    = 0,
-        opc_aconst_null            = 1,
-        opc_nconst_MIN             = 2,  // iconst_m1
-        opc_nconst_MAX             = 15, // dconst_1
-        opc_bipush                 = 16,
-        opc_sipush                 = 17,
-        opc_ldc                    = 18,
-        opc_ldc_w                  = 19,
-        opc_ldc2_w                 = 20,
-        opc_aload                  = 25,
-        opc_aload_0                = 42,
-        opc_aload_MAX              = 45,
-        opc_aaload                 = 50,
-        opc_astore                 = 58,
-        opc_astore_0               = 75,
-        opc_astore_MAX             = 78,
-        opc_aastore                = 83,
-        opc_pop                    = 87,
-        opc_pop2                   = 88,
-        opc_dup                    = 89,
-        opc_dup_x1                 = 90,
-        opc_dup_x2                 = 91,
-        opc_dup2                   = 92,
-        opc_dup2_x1                = 93,
-        opc_dup2_x2                = 94,
-        opc_swap                   = 95,
-        opc_tableswitch            = 170,
-        opc_lookupswitch           = 171,
-        opc_areturn                = 176,
-        opc_getstatic              = 178,
-        opc_putstatic              = 179,
-        opc_getfield               = 180,
-        opc_putfield               = 181,
-        opc_invokevirtual          = 182,
-        opc_invokespecial          = 183,
-        opc_invokestatic           = 184,
-        opc_invokeinterface        = 185,
-        opc_invokedynamic          = 186,
-        opc_anewarray              = 189,
-        opc_checkcast              = 192,
-        opc_ifnull                 = 198,
-        opc_ifnonnull              = 199,
-        opc_wide                   = 196;
-
-    private static final Object[] INSTRUCTION_CONSTANTS = {
-        -1, 0, 1, 2, 3, 4, 5, 0L, 1L, 0.0F, 1.0F, 2.0F, 0.0D, 1.0D
-    };
-
-    private static final String INSTRUCTION_FORMATS =
-        "nop$ aconst_null$L iconst_m1$I iconst_0$I iconst_1$I "+
-        "iconst_2$I iconst_3$I iconst_4$I iconst_5$I lconst_0$J_ "+
-        "lconst_1$J_ fconst_0$F fconst_1$F fconst_2$F dconst_0$D_ "+
-        "dconst_1$D_ bipush=bx$I sipush=bxx$I ldc=bk$X ldc_w=bkk$X "+
-        "ldc2_w=bkk$X_ iload=bl/wbll$I lload=bl/wbll$J_ fload=bl/wbll$F "+
-        "dload=bl/wbll$D_ aload=bl/wbll$L iload_0$I iload_1$I "+
-        "iload_2$I iload_3$I lload_0$J_ lload_1$J_ lload_2$J_ "+
-        "lload_3$J_ fload_0$F fload_1$F fload_2$F fload_3$F dload_0$D_ "+
-        "dload_1$D_ dload_2$D_ dload_3$D_ aload_0$L aload_1$L "+
-        "aload_2$L aload_3$L iaload$LI$I laload$LI$J_ faload$LI$F "+
-        "daload$LI$D_ aaload$LI$L baload$LI$I caload$LI$I saload$LI$I "+
-        "istore=bl/wbll$I$ lstore=bl/wbll$J_$ fstore=bl/wbll$F$ "+
-        "dstore=bl/wbll$D_$ astore=bl/wbll$L$ istore_0$I$ istore_1$I$ "+
-        "istore_2$I$ istore_3$I$ lstore_0$J_$ lstore_1$J_$ "+
-        "lstore_2$J_$ lstore_3$J_$ fstore_0$F$ fstore_1$F$ fstore_2$F$ "+
-        "fstore_3$F$ dstore_0$D_$ dstore_1$D_$ dstore_2$D_$ "+
-        "dstore_3$D_$ astore_0$L$ astore_1$L$ astore_2$L$ astore_3$L$ "+
-        "iastore$LII$ lastore$LIJ_$ fastore$LIF$ dastore$LID_$ "+
-        "aastore$LIL$ bastore$LII$ castore$LII$ sastore$LII$ pop$X$ "+
-        "pop2$XX$ dup$X$XX dup_x1$XX$XXX dup_x2$XXX$XXXX dup2$XX$XXXX "+
-        "dup2_x1$XXX$XXXXX dup2_x2$XXXX$XXXXXX swap$XX$XX "+
-        "iadd$II$I ladd$J_J_$J_ fadd$FF$F dadd$D_D_$D_ isub$II$I "+
-        "lsub$J_J_$J_ fsub$FF$F dsub$D_D_$D_ imul$II$I lmul$J_J_$J_ "+
-        "fmul$FF$F dmul$D_D_$D_ idiv$II$I ldiv$J_J_$J_ fdiv$FF$F "+
-        "ddiv$D_D_$D_ irem$II$I lrem$J_J_$J_ frem$FF$F drem$D_D_$D_ "+
-        "ineg$I$I lneg$J_$J_ fneg$F$F dneg$D_$D_ ishl$II$I lshl$J_I$J_ "+
-        "ishr$II$I lshr$J_I$J_ iushr$II$I lushr$J_I$J_ iand$II$I "+
-        "land$J_J_$J_ ior$II$I lor$J_J_$J_ ixor$II$I lxor$J_J_$J_ "+
-        "iinc=blx/wbllxx$ i2l$I$J_ i2f$I$F i2d$I$D_ l2i$J_$I l2f$J_$F "+
-        "l2d$J_$D_ f2i$F$I f2l$F$J_ f2d$F$D_ d2i$D_$I d2l$D_$J_ "+
-        "d2f$D_$F i2b$I$I i2c$I$I i2s$I$I lcmp fcmpl fcmpg dcmpl dcmpg "+
-        "ifeq=boo ifne=boo iflt=boo ifge=boo ifgt=boo ifle=boo "+
-        "if_icmpeq=boo if_icmpne=boo if_icmplt=boo if_icmpge=boo "+
-        "if_icmpgt=boo if_icmple=boo if_acmpeq=boo if_acmpne=boo "+
-        "goto=boo jsr=boo ret=bl/wbll tableswitch=* lookupswitch=* "+
-        "ireturn lreturn freturn dreturn areturn return "+
-        "getstatic=bkf$Q putstatic=bkf$Q$ getfield=bkf$L$Q "+
-        "putfield=bkf$LQ$ invokevirtual=bkm$LQ$Q "+
-        "invokespecial=bkm$LQ$Q invokestatic=bkm$Q$Q "+
-        "invokeinterface=bkixx$LQ$Q invokedynamic=bkd__$Q$Q new=bkc$L "+
-        "newarray=bx$I$L anewarray=bkc$I$L arraylength$L$I athrow "+
-        "checkcast=bkc$L$L instanceof=bkc$L$I monitorenter$L "+
-        "monitorexit$L wide=* multianewarray=bkcx ifnull=boo "+
-        "ifnonnull=boo goto_w=boooo jsr_w=boooo ";
-    private static final String[] INSTRUCTION_NAMES;
-    private static final String[] INSTRUCTION_POPS;
-    private static final int[] INSTRUCTION_INFO;
-    static {
-        String[] insns = INSTRUCTION_FORMATS.split(" ");
-        assert(insns[opc_lookupswitch].startsWith("lookupswitch"));
-        assert(insns[opc_tableswitch].startsWith("tableswitch"));
-        assert(insns[opc_wide].startsWith("wide"));
-        assert(insns[opc_invokedynamic].startsWith("invokedynamic"));
-        int[] info = new int[256];
-        String[] names = new String[256];
-        String[] pops = new String[256];
-        for (int i = 0; i < insns.length; i++) {
-            String insn = insns[i];
-            int dl = insn.indexOf('$');
-            if (dl > 0) {
-                String p = insn.substring(dl+1);
-                if (p.indexOf('$') < 0)  p = "$" + p;
-                pops[i] = p;
-                insn = insn.substring(0, dl);
-            }
-            int eq = insn.indexOf('=');
-            if (eq < 0) {
-                info[i] = 1;
-                names[i] = insn;
-                continue;
-            }
-            names[i] = insn.substring(0, eq);
-            String fmt = insn.substring(eq+1);
-            if (fmt.equals("*")) {
-                info[i] = 0;
-                continue;
-            }
-            int sl = fmt.indexOf('/');
-            if (sl < 0) {
-                info[i] = (char) fmt.length();
-            } else {
-                String wfmt = fmt.substring(sl+1);
-                fmt = fmt.substring(0, sl);
-                info[i] = (char)( fmt.length() + (wfmt.length() * 16) );
-            }
-        }
-        INSTRUCTION_INFO = info;
-        INSTRUCTION_NAMES = names;
-        INSTRUCTION_POPS = pops;
-    }
-
-    public static class Instruction implements Cloneable {
-        byte[] codeBase;
-        int pc;
-        int bc;
-        int info;
-        int wide;
-        int len;
-        Instruction(byte[] codeBase, int pc) {
-            this.codeBase = codeBase;
-            init(pc);
-        }
-        public Instruction clone() {
-            try {
-                return (Instruction) super.clone();
-            } catch (CloneNotSupportedException ex) {
-                throw new InternalError();
-            }
-        }
-        private Instruction init(int pc) {
-            this.pc = pc;
-            this.bc = codeBase[pc] & 0xFF;
-            this.info = INSTRUCTION_INFO[bc];
-            this.wide = 0;
-            this.len = (info & 0x0F);
-            if (len == 0)
-                computeLength();
-            return this;
-        }
-        Instruction next() {
-            if (len == 0 && bc != 0)  throw new InternalError();
-            int npc = pc + len;
-            if (npc == codeBase.length)
-                return null;
-            return init(npc);
-        }
-        void forceNext(int newLen) {
-            bc = opc_nop;
-            len = newLen;
-        }
-
-        public String toString() {
-            StringBuilder buf = new StringBuilder();
-            buf.append(pc).append(":").append(INSTRUCTION_NAMES[bc]);
-            switch (len) {
-            case 3: buf.append(" ").append(u2At(1)); break;
-            case 5: buf.append(" ").append(u2At(1)).append(" ").append(u2At(3)); break;
-            default:  for (int i = 1; i < len; i++)  buf.append(" ").append(u1At(1));
-            }
-            return buf.toString();
-        }
-
-        // these are the hard parts
-        private void computeLength() {
-            int cases;
-            switch (bc) {
-            case opc_wide:
-                bc = codeBase[pc + 1];
-                info = INSTRUCTION_INFO[bc];
-                len = ((info >> 4) & 0x0F);
-                if (len == 0)  throw new RuntimeException("misplaced wide bytecode: "+bc);
-                return;
-
-            case opc_tableswitch:
-                cases = (u4At(alignedIntOffset(2)) - u4At(alignedIntOffset(1)) + 1);
-                len = alignedIntOffset(3 + cases*1);
-                return;
-
-            case opc_lookupswitch:
-                cases = u4At(alignedIntOffset(1));
-                len = alignedIntOffset(2 + cases*2);
-                return;
-
-            default:
-                throw new RuntimeException("unknown bytecode: "+bc);
-            }
-        }
-        // switch code
-        // clget the Nth int (where 0 is the first after the opcode itself)
-        public int alignedIntOffset(int n) {
-            int pos = pc + 1;
-            pos += ((-pos) & 0x03);  // align it
-            pos += (n * 4);
-            return pos - pc;
-        }
-        public int u1At(int pos) {
-            return (codeBase[pc+pos] & 0xFF);
-        }
-        public int u2At(int pos) {
-            return (u1At(pos+0)<<8) + u1At(pos+1);
-        }
-        public int u4At(int pos) {
-            return (u2At(pos+0)<<16) + u2At(pos+2);
-        }
-        public void u1AtPut(int pos, int x) {
-            codeBase[pc+pos] = (byte)x;
-        }
-        public void u2AtPut(int pos, int x) {
-            codeBase[pc+pos+0] = (byte)(x >> 8);
-            codeBase[pc+pos+1] = (byte)(x >> 0);
-        }
-    }
-
-    static String simplifyType(String type) {
-        String simpleType = OBJ_SIGNATURE.matcher(type).replaceAll("L");
-        assert(simpleType.matches("^\\([A-Z]*\\)[A-Z]$"));
-        // change (DD)D to (D_D_)D_
-        simpleType = WIDE_SIGNATURE.matcher(simpleType).replaceAll("\\0_");
-        return simpleType;
-    }
-    static int argsize(String type) {
-        return simplifyType(type).length()-3;
-    }
-    private static final Pattern OBJ_SIGNATURE = Pattern.compile("\\[*L[^;]*;|\\[+[A-Z]");
-    private static final Pattern WIDE_SIGNATURE = Pattern.compile("[JD]");
-}
--- a/test/java/io/File/SetLastModified.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/File/SetLastModified.java	Wed Apr 20 04:38:36 2011 +0100
@@ -105,9 +105,9 @@
             System.getProperty("os.name").startsWith("Windows") ? 0L : 3L*G;
         long pos = 0L;
         while (pos <= MAX_POSITION) {
-            FileChannel fc = new FileOutputStream(f).getChannel();
-            fc.position(pos).write(ByteBuffer.wrap("x".getBytes()));
-            fc.close();
+            try (FileChannel fc = new FileOutputStream(f).getChannel()) {
+                fc.position(pos).write(ByteBuffer.wrap("x".getBytes()));
+            }
             ot = f.lastModified();
             System.out.format("check with file size: %d\n", f.length());
             if (!f.setLastModified(nt))
--- a/test/java/io/FileOutputStream/AtomicAppend.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/FileOutputStream/AtomicAppend.java	Wed Apr 20 04:38:36 2011 +0100
@@ -47,12 +47,12 @@
             for (int i = 0; i < nThreads; i++)
                 es.execute(new Runnable() { public void run() {
                     try {
-                        FileOutputStream s = new FileOutputStream(file, true);
-                        for (int j = 0; j < 1000; j++) {
-                            s.write((int) 'x');
-                            s.flush();
+                        try (FileOutputStream s = new FileOutputStream(file, true)) {
+                            for (int j = 0; j < 1000; j++) {
+                                s.write((int) 'x');
+                                s.flush();
+                            }
                         }
-                        s.close();
                     } catch (Throwable t) { unexpected(t); }}});
             es.shutdown();
             es.awaitTermination(10L, TimeUnit.MINUTES);
--- a/test/java/io/OutputStreamWriter/Encode.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/OutputStreamWriter/Encode.java	Wed Apr 20 04:38:36 2011 +0100
@@ -35,8 +35,9 @@
         new Encode();
     }
 
+    final ServerSocket ss = new ServerSocket(0);
+
     Encode() throws Exception {
-        ss = new ServerSocket(0);
         (new Thread(this)).start();
         String toEncode = "\uD800\uDC00 \uD801\uDC01 ";
         String enc1 = URLEncoder.encode(toEncode, "UTF-8");
@@ -47,27 +48,31 @@
             "/missing.nothtml";
         HttpURLConnection uc =  (HttpURLConnection)new URL(url).openConnection();
         uc.connect();
-        String enc2 = URLEncoder.encode(toEncode, "UTF-8");
-        if (!enc1.equals(enc2))
-            throw new RuntimeException("test failed");
-        uc.disconnect();
+        try {
+            String enc2 = URLEncoder.encode(toEncode, "UTF-8");
+            if (!enc1.equals(enc2)) {
+                System.out.println("test failed");
+                throw new RuntimeException("test failed");
+            }
+        } finally {
+            uc.disconnect();
+        }
     }
 
-    ServerSocket ss;
-
     public void run() {
-        try {
-            Socket s = ss.accept();
-            BufferedReader in = new BufferedReader(
-                new InputStreamReader(s.getInputStream()));
+        try (ServerSocket serv = ss;
+             Socket s = serv.accept();
+             BufferedReader in =
+                 new BufferedReader(new InputStreamReader(s.getInputStream())))
+        {
             String req = in.readLine();
-            PrintStream out = new PrintStream(new BufferedOutputStream(
-                s.getOutputStream()));
-            out.print("HTTP/1.1 403 Forbidden\r\n");
-            out.print("\r\n");
-            out.flush();
-            s.close();
-            ss.close();
+            try (OutputStream os = s.getOutputStream();
+                 BufferedOutputStream bos = new BufferedOutputStream(os);
+                 PrintStream out = new PrintStream(bos))
+            {
+                out.print("HTTP/1.1 403 Forbidden\r\n");
+                out.print("\r\n");
+            }
         } catch (Exception e) {
             e.printStackTrace();
         }
--- a/test/java/io/PrintStream/EncodingConstructor.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/PrintStream/EncodingConstructor.java	Wed Apr 20 04:38:36 2011 +0100
@@ -34,11 +34,11 @@
 
     public static void main(String args[]) throws Exception {
         ByteArrayOutputStream bo = new ByteArrayOutputStream();
-        PrintStream ps = new PrintStream(bo, false, "UTF-8");
         String s = "xyzzy";
         int n = s.length();
-        ps.print(s);
-        ps.close();
+        try (PrintStream ps = new PrintStream(bo, false, "UTF-8")) {
+            ps.print(s);
+        }
         byte[] ba = bo.toByteArray();
         if (ba.length != n)
             throw new Exception("Length mismatch: " + n + " " + ba.length);
--- a/test/java/io/PrintStream/FailingConstructors.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/PrintStream/FailingConstructors.java	Wed Apr 20 04:38:36 2011 +0100
@@ -35,6 +35,8 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 public class FailingConstructors {
     static final String fileName = "FailingConstructorsTest";
@@ -45,14 +47,13 @@
         test(false, new File(fileName));
 
         /* create the file and write its contents */
-        File file = File.createTempFile(fileName, null);
-        file.deleteOnExit();
-        FileOutputStream fos = new FileOutputStream(file);
-        fos.write(FILE_CONTENTS.getBytes());
-        fos.close();
-
-        test(true, file);
-        file.delete();
+        Path path = Files.createTempFile(fileName, null);
+        try {
+            Files.write(path, FILE_CONTENTS.getBytes());
+            test(true, path.toFile());
+        } finally {
+            Files.delete(path);
+        }
     }
 
     private static void test(boolean exists, File file) throws Throwable {
--- a/test/java/io/Serializable/evolution/RenamePackage/install/SerialDriver.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/Serializable/evolution/RenamePackage/install/SerialDriver.java	Wed Apr 20 04:38:36 2011 +0100
@@ -27,7 +27,7 @@
  * @build install/SerialDriver.java test/SerialDriver.java extension/ExtendedObjectInputStream.java
  * @summary Enable resolveClass() to accommodate package renaming.
  * This fix enables one to implement a resolveClass method that maps a
- * Serialiazable class within a serialization stream to the same class
+ * Serializable class within a serialization stream to the same class
  * in a different package within the JVM runtime. See run shell script
  * for instructions on how to run this test.
  */
@@ -86,16 +86,15 @@
         File f = new File("stream.ser");
         if (serialize) {
             // Serialize the subclass
-            try {
-                FileOutputStream fo = new FileOutputStream(f);
-                ObjectOutputStream so = new ObjectOutputStream(fo);
+            try (FileOutputStream fo = new FileOutputStream(f);
+                 ObjectOutputStream so = new ObjectOutputStream(fo))
+            {
                 so.writeObject(obj);
                 /* Skip arrays since they do not work with rename yet.
                    The serialVersionUID changes due to the name change
                    and there is no way to set the serialVersionUID for an
                    array. */
                 so.writeObject(array);
-                so.flush();
             } catch (Exception e) {
                 System.out.println(e);
                 throw e;
@@ -103,16 +102,14 @@
         }
         if (deserialize) {
             // Deserialize the subclass
-            try {
-                FileInputStream fi = new FileInputStream(f);
-                ExtendedObjectInputStream si =
-                    new ExtendedObjectInputStream(fi);
+            try (FileInputStream fi = new FileInputStream(f);
+                 ExtendedObjectInputStream si = new ExtendedObjectInputStream(fi))
+            {
                 si.addRenamedClassName("test.SerialDriver", "install.SerialDriver");
                 si.addRenamedClassName("[Ltest.SerialDriver;",
                                        "[Linstall.SerialDriver");
                 obj = (SerialDriver) si.readObject();
                 array = (SerialDriver[]) si.readObject();
-                si.close();
             } catch (Exception e) {
                 System.out.println(e);
                 throw e;
--- a/test/java/io/Serializable/evolution/RenamePackage/test/SerialDriver.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/io/Serializable/evolution/RenamePackage/test/SerialDriver.java	Wed Apr 20 04:38:36 2011 +0100
@@ -27,7 +27,7 @@
  * @build install/SerialDriver.java test/SerialDriver.java extension/ExtendedObjectInputStream.java
  * @summary Enable resolveClass() to accommodate package renaming.
  * This fix enables one to implement a resolveClass method that maps a
- * Serialiazable class within a serialization stream to the same class
+ * Serializable class within a serialization stream to the same class
  * in a different package within the JVM runtime. See run shell script
  * for instructions on how to run this test.
  */
@@ -83,14 +83,13 @@
         File f = new File("stream.ser");
         if (serialize) {
             // Serialize the subclass
-            try {
-                FileOutputStream fo = new FileOutputStream(f);
-                ObjectOutputStream so = new ObjectOutputStream(fo);
+            try (FileOutputStream fo = new FileOutputStream(f);
+                 ObjectOutputStream so = new ObjectOutputStream(fo))
+            {
                 so.writeObject(obj);
                 /* Comment out since renaming arrays does not work
                    since it changes the serialVersionUID. */
                 so.writeObject(array);
-                so.flush();
             } catch (Exception e) {
                 System.out.println(e);
                 throw e;
@@ -98,16 +97,15 @@
         }
         if (deserialize) {
             // Deserialize the subclass
-            try {
-                FileInputStream fi = new FileInputStream(f);
-                ExtendedObjectInputStream si = new ExtendedObjectInputStream(fi);
+            try (FileInputStream fi = new FileInputStream(f);
+                 ExtendedObjectInputStream si = new ExtendedObjectInputStream(fi))
+            {
                 si.addRenamedClassName("install.SerialDriver",
                                        "test.SerialDriver");
                 si.addRenamedClassName("[Linstall.SerialDriver;",
                                        "[Ltest.SerialDriver");
                 obj = (SerialDriver) si.readObject();
                 array = (SerialDriver[]) si.readObject();
-                si.close();
             } catch (Exception e) {
                 System.out.println(e);
                 throw e;
--- a/test/java/lang/Character/CheckScript.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/lang/Character/CheckScript.java	Wed Apr 20 04:38:36 2011 +0100
@@ -12,40 +12,43 @@
 
 public class CheckScript {
 
-    public static void main(String[] args) throws Exception {
-
-        BufferedReader sbfr = null;
+    static BufferedReader open(String[] args) throws FileNotFoundException {
         if (args.length == 0) {
-            sbfr = new BufferedReader(new FileReader(new File(System.getProperty("test.src", "."), "Scripts.txt")));
+            return new BufferedReader(new FileReader(new File(System.getProperty("test.src", "."), "Scripts.txt")));
         } else if (args.length == 1) {
-            sbfr = new BufferedReader(new FileReader(args[0]));
+            return new BufferedReader(new FileReader(args[0]));
         } else {
             System.out.println("java CharacterScript Scripts.txt");
             throw new RuntimeException("Datafile name should be specified.");
         }
+    }
+
+    public static void main(String[] args) throws Exception {
+
         Matcher m = Pattern.compile("(\\p{XDigit}+)(?:\\.{2}(\\p{XDigit}+))?\\s+;\\s+(\\w+)\\s+#.*").matcher("");
         String line = null;
         HashMap<String,ArrayList<Integer>> scripts = new HashMap<>();
-        while ((line = sbfr.readLine()) != null) {
-            if (line.length() <= 1 || line.charAt(0) == '#') {
-                continue;
-            }
-            m.reset(line);
-            if (m.matches()) {
-                int start = Integer.parseInt(m.group(1), 16);
-                int end = (m.group(2)==null)?start
-                                            :Integer.parseInt(m.group(2), 16);
-                String name = m.group(3).toLowerCase(Locale.ENGLISH);
-                ArrayList<Integer> ranges = scripts.get(name);
-                if (ranges == null) {
-                    ranges = new ArrayList<Integer>();
-                    scripts.put(name, ranges);
+        try (BufferedReader sbfr = open(args)) {
+            while ((line = sbfr.readLine()) != null) {
+                if (line.length() <= 1 || line.charAt(0) == '#') {
+                    continue;
                 }
-                ranges.add(start);
-                ranges.add(end);
+                m.reset(line);
+                if (m.matches()) {
+                    int start = Integer.parseInt(m.group(1), 16);
+                    int end = (m.group(2)==null)?start
+                                                :Integer.parseInt(m.group(2), 16);
+                    String name = m.group(3).toLowerCase(Locale.ENGLISH);
+                    ArrayList<Integer> ranges = scripts.get(name);
+                    if (ranges == null) {
+                        ranges = new ArrayList<Integer>();
+                        scripts.put(name, ranges);
+                    }
+                    ranges.add(start);
+                    ranges.add(end);
+                }
             }
         }
-        sbfr.close();
         // check all defined ranges
         Integer[] ZEROSIZEARRAY = new Integer[0];
         for (String name : scripts.keySet()) {
--- a/test/java/lang/ProcessBuilder/Basic.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/lang/ProcessBuilder/Basic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -26,7 +26,7 @@
  * @bug 4199068 4738465 4937983 4930681 4926230 4931433 4932663 4986689
  *      5026830 5023243 5070673 4052517 4811767 6192449 6397034 6413313
  *      6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958
- *      4947220
+ *      4947220 7018606
  * @summary Basic tests for Process and Environment Variable code
  * @run main/othervm/timeout=300 Basic
  * @author Martin Buchholz
@@ -47,6 +47,9 @@
 
 public class Basic {
 
+    /* used for Windows only */
+    static final String systemRoot = System.getenv("SystemRoot");
+
     private static String commandOutput(Reader r) throws Throwable {
         StringBuilder sb = new StringBuilder();
         int c;
@@ -1073,7 +1076,11 @@
         try {
             ProcessBuilder pb = new ProcessBuilder();
             pb.environment().clear();
-            equal(getenvInChild(pb), "");
+            String expected = Windows.is() ? "SystemRoot="+systemRoot+",": "";
+            if (Windows.is()) {
+                pb.environment().put("SystemRoot", systemRoot);
+            }
+            equal(getenvInChild(pb), expected);
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
@@ -1561,13 +1568,21 @@
             List<String> childArgs = new ArrayList<String>(javaChildArgs);
             childArgs.add("System.getenv()");
             String[] cmdp = childArgs.toArray(new String[childArgs.size()]);
-            String[] envp = {"=ExitValue=3", "=C:=\\"};
+            String[] envp;
+            String[] envpWin = {"=ExitValue=3", "=C:=\\", "SystemRoot="+systemRoot};
+            String[] envpOth = {"=ExitValue=3", "=C:=\\"};
+            if (Windows.is()) {
+                envp = envpWin;
+            } else {
+                envp = envpOth;
+            }
             Process p = Runtime.getRuntime().exec(cmdp, envp);
-            String expected = Windows.is() ? "=C:=\\,=ExitValue=3," : "=C:=\\,";
+            String expected = Windows.is() ? "=C:=\\,SystemRoot="+systemRoot+",=ExitValue=3," : "=C:=\\,";
             equal(commandOutput(p), expected);
             if (Windows.is()) {
                 ProcessBuilder pb = new ProcessBuilder(childArgs);
                 pb.environment().clear();
+                pb.environment().put("SystemRoot", systemRoot);
                 pb.environment().put("=ExitValue", "3");
                 pb.environment().put("=C:", "\\");
                 equal(commandOutput(pb), expected);
@@ -1591,10 +1606,18 @@
             List<String> childArgs = new ArrayList<String>(javaChildArgs);
             childArgs.add("System.getenv()");
             String[] cmdp = childArgs.toArray(new String[childArgs.size()]);
-            String[] envp = {"LC_ALL=C\u0000\u0000", // Yuck!
+            String[] envpWin = {"SystemRoot="+systemRoot, "LC_ALL=C\u0000\u0000", // Yuck!
+                             "FO\u0000=B\u0000R"};
+            String[] envpOth = {"LC_ALL=C\u0000\u0000", // Yuck!
                              "FO\u0000=B\u0000R"};
+            String[] envp;
+            if (Windows.is()) {
+                envp = envpWin;
+            } else {
+                envp = envpOth;
+            }
             Process p = Runtime.getRuntime().exec(cmdp, envp);
-            check(commandOutput(p).equals("LC_ALL=C,"),
+            check(commandOutput(p).equals(Windows.is() ? "SystemRoot="+systemRoot+",LC_ALL=C," : "LC_ALL=C,"),
                   "Incorrect handling of envstrings containing NULs");
         } catch (Throwable t) { unexpected(t); }
 
@@ -2144,6 +2167,7 @@
     static void equal(Object x, Object y) {
         if (x == null ? y == null : x.equals(y)) pass();
         else fail(x + " not equal to " + y);}
+
     public static void main(String[] args) throws Throwable {
         try {realMain(args);} catch (Throwable t) {unexpected(t);}
         System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
--- a/test/java/lang/Runtime/shutdown/ShutdownHooks.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/lang/Runtime/shutdown/ShutdownHooks.java	Wed Apr 20 04:38:36 2011 +0100
@@ -43,9 +43,9 @@
         file = new File(dir, args[1]);
         // write to file
         System.out.println("writing to "+ file);
-        PrintWriter pw = new PrintWriter(file);
-        pw.println("Shutdown begins");
-        pw.close();
+        try (PrintWriter pw = new PrintWriter(file)) {
+            pw.println("Shutdown begins");
+        }
     }
 
     public static class Cleaner extends Thread {
@@ -56,10 +56,8 @@
             // register the DeleteOnExitHook while the application
             // shutdown hook is running
             file.deleteOnExit();
-            try {
-                PrintWriter pw = new PrintWriter(file);
+            try (PrintWriter pw = new PrintWriter(file)) {
                 pw.println("file is being deleted");
-                pw.close();
             } catch (FileNotFoundException e) {
                 throw new RuntimeException(e);
             }
--- a/test/java/lang/Thread/StartOOMTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/lang/Thread/StartOOMTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,11 +22,14 @@
  */
 
 /*
- * @test
- * @bug 6379235
- * @ignore until 6721694 is fixed
- * @run main/othervm -server -Xmx32m -Xms32m -Xss256m StartOOMTest
- * @summary ThreadGroup accounting mistake possible with failure of Thread.start()
+ * This test is relatively useful for verifying 6379235, but
+ * is too resource intensive, especially on 64 bit systems,
+ * to be run automatically, see 6721694.
+ *
+ * When run it should be typically be run with the server vm
+ * and a relatively small java heap, and a large stack size
+ * ( to provoke the OOM quicker ).
+ *    java -server -Xmx32m -Xms32m -Xss256m StartOOMTest
  */
 
 import java.util.*;
--- a/test/java/lang/Thread/StopBeforeStart.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2005, 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     4519200
- * @summary Confirm a Thread.stop before start complies with the spec
- * @author  Pete Soper
- *
- * Confirm that a thread that had its stop method invoked before start
- * does properly terminate with expected exception behavior. NOTE that
- * arbitrary application threads could return from their run methods faster
- * than the VM can throw an async exception.
- */
-public class StopBeforeStart {
-
-    private static final int JOIN_TIMEOUT=10000;
-
-    private class MyThrowable extends Throwable {
-    }
-
-    private class Catcher implements Thread.UncaughtExceptionHandler {
-        private boolean nullaryStop;
-        private Throwable theThrowable;
-        private Throwable expectedThrowable;
-        private boolean exceptionThrown;
-
-        Catcher(boolean nullaryStop) {
-            this.nullaryStop = nullaryStop;
-            if (!nullaryStop) {
-                expectedThrowable = new MyThrowable();
-            }
-        }
-
-        public void uncaughtException(Thread t, Throwable th) {
-            exceptionThrown = true;
-            theThrowable = th;
-        }
-
-        void check(String label) throws Throwable {
-            if (!exceptionThrown) {
-                throw new RuntimeException(label +
-                        " test:" + " missing uncaught exception");
-            }
-
-            if (nullaryStop) {
-                if (! (theThrowable instanceof ThreadDeath)) {
-                    throw new RuntimeException(label +
-                        " test:" + " expected ThreadDeath in uncaught handler");
-                }
-            } else if (theThrowable != expectedThrowable) {
-                throw new RuntimeException(label +
-                        " test:" + " wrong Throwable in uncaught handler");
-            }
-        }
-    }
-
-    private class MyRunnable implements Runnable {
-        public void run() {
-            while(true)
-                ;
-        }
-    }
-
-    private class MyThread extends Thread {
-        public void run() {
-            while(true)
-                ;
-        }
-    }
-
-
-    public static void main(String args[]) throws Throwable {
-        (new StopBeforeStart()).doit();
-        System.out.println("Test passed");
-    }
-
-    private void doit() throws Throwable {
-
-        runit(false, new Thread(new MyRunnable()),"Thread");
-        runit(true, new Thread(new MyRunnable()),"Thread");
-        runit(false, new MyThread(),"Runnable");
-        runit(true, new MyThread(),"Runnable");
-    }
-
-    private void runit(boolean nullaryStop, Thread thread,
-                        String type) throws Throwable {
-
-        Catcher c = new Catcher(nullaryStop);
-        thread.setUncaughtExceptionHandler(c);
-
-        if (nullaryStop) {
-            thread.stop();
-        } else {
-            thread.stop(c.expectedThrowable);
-        }
-
-        thread.start();
-        thread.join(JOIN_TIMEOUT);
-
-        if (thread.getState() != Thread.State.TERMINATED) {
-
-            thread.stop();
-
-            // Under high load this could be a false positive
-            throw new RuntimeException(type +
-                        " test:" + " app thread did not terminate");
-        }
-
-        c.check(type);
-    }
-}
--- a/test/java/lang/instrument/BootClassPath/Setup.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/lang/instrument/BootClassPath/Setup.java	Wed Apr 20 04:38:36 2011 +0100
@@ -62,31 +62,33 @@
          * Create manifest file with Boot-Class-Path encoding the
          * sub-directory name.
          */
-        FileOutputStream out = new FileOutputStream(manifestFile);
-        out.write("Manifest-Version: 1.0\n".getBytes("UTF-8"));
+        try (FileOutputStream out = new FileOutputStream(manifestFile)) {
+            out.write("Manifest-Version: 1.0\n".getBytes("UTF-8"));
 
-        byte[] premainBytes = ("Premain-Class: " + premainClass + "\n").getBytes("UTF-8");
-        out.write(premainBytes);
+            byte[] premainBytes =
+                ("Premain-Class: " + premainClass + "\n").getBytes("UTF-8");
+            out.write(premainBytes);
 
-        out.write( "Boot-Class-Path: ".getBytes("UTF-8") );
+            out.write( "Boot-Class-Path: ".getBytes("UTF-8") );
 
-        byte[] value = bootClassPath.getBytes("UTF-8");
-        for (int i=0; i<value.length; i++) {
-            int v = (int)value[i];
-            if (v < 0) v += 256;
-            byte[] escaped =  ("%" + Integer.toHexString(v)).getBytes("UTF-8");
-            out.write(escaped);
+            byte[] value = bootClassPath.getBytes("UTF-8");
+            for (int i=0; i<value.length; i++) {
+                int v = (int)value[i];
+                if (v < 0) v += 256;
+                byte[] escaped =
+                    ("%" + Integer.toHexString(v)).getBytes("UTF-8");
+                out.write(escaped);
+            }
+            out.write( "\n\n".getBytes("UTF-8") );
         }
-        out.write( "\n\n".getBytes("UTF-8") );
-        out.close();
 
         /*
          * Write the name of the boot dir to "boot.dir"
          */
         f = new File(workDir + fileSeparator + "boot.dir");
-        out = new FileOutputStream(f);
-        out.write(bootDir.getBytes(defaultEncoding));
-        out.close();
+        try (FileOutputStream out = new FileOutputStream(f)) {
+            out.write(bootDir.getBytes(defaultEncoding));
+        }
     }
 
     /* ported from test/sun/tools/launcher/UnicodeTest.java */
--- a/test/java/lang/instrument/ilib/Inject.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/lang/instrument/ilib/Inject.java	Wed Apr 20 04:38:36 2011 +0100
@@ -118,23 +118,24 @@
         }
 
         void dump(File outDir, String filename) throws IOException {
-            FileOutputStream fileOut = new FileOutputStream(new File(outDir, filename));
-            DataOutputStream dataOut = new DataOutputStream(fileOut);
-
-            String currentClassName = null;
+            try (FileOutputStream fileOut =
+                     new FileOutputStream(new File(outDir, filename));
+                 DataOutputStream dataOut = new DataOutputStream(fileOut))
+            {
+                String currentClassName = null;
 
-            dataOut.writeInt(infoList.size());
-            for (Iterator<Info> it = infoList.iterator(); it.hasNext(); ) {
-                Info info = it.next();
-                if (!info.className.equals(currentClassName)) {
-                    dataOut.writeInt(123456); // class name marker
-                    currentClassName = info.className;
-                    dataOut.writeUTF(currentClassName);
+                dataOut.writeInt(infoList.size());
+                for (Iterator<Info> it = infoList.iterator(); it.hasNext(); ) {
+                    Info info = it.next();
+                    if (!info.className.equals(currentClassName)) {
+                        dataOut.writeInt(123456); // class name marker
+                        currentClassName = info.className;
+                        dataOut.writeUTF(currentClassName);
+                    }
+                    dataOut.writeInt(info.location);
+                    dataOut.writeUTF(info.methodName);
                 }
-                dataOut.writeInt(info.location);
-                dataOut.writeUTF(info.methodName);
             }
-            dataOut.close();
         }
 
         public byte[] bytecodes(String className, String methodName, int location) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/6987555/Test6987555.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2010, 2011, 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 6987555
+ * @summary JSR 292 unboxing to a boolean value fails on big-endian SPARC
+ *
+ * @run main/othervm -Xint -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6987555
+ */
+
+import java.lang.invoke.*;
+
+public class Test6987555 {
+    private static final Class   CLASS = Test6987555.class;
+    private static final String  NAME  = "foo";
+    private static final boolean DEBUG = false;
+
+    public static void main(String[] args) throws Throwable {
+        testboolean();
+        testbyte();
+        testchar();
+        testshort();
+        testint();
+    }
+
+    // boolean
+    static void testboolean() throws Throwable {
+        doboolean(false);
+        doboolean(true);
+    }
+    static void doboolean(boolean x) throws Throwable {
+        if (DEBUG)  System.out.println("boolean=" + x);
+        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(boolean.class, boolean.class));
+        MethodHandle mh2 = mh1.asType(MethodType.methodType(boolean.class, Boolean.class));
+        boolean a = (boolean) mh1.invokeExact(x);
+        boolean b = (boolean) mh2.invokeExact(Boolean.valueOf(x));
+        assert a == b : a + " != " + b;
+    }
+
+    // byte
+    static void testbyte() throws Throwable {
+        byte[] a = new byte[] {
+            Byte.MIN_VALUE,
+            Byte.MIN_VALUE + 1,
+            -0x0F,
+            -1,
+            0,
+            1,
+            0x0F,
+            Byte.MAX_VALUE - 1,
+            Byte.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            dobyte(a[i]);
+        }
+    }
+    static void dobyte(byte x) throws Throwable {
+        if (DEBUG)  System.out.println("byte=" + x);
+        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(byte.class, byte.class));
+        MethodHandle mh2 = mh1.asType(MethodType.methodType(byte.class, Byte.class));
+        byte a = (byte) mh1.invokeExact(x);
+        byte b = (byte) mh2.invokeExact(Byte.valueOf(x));
+        assert a == b : a + " != " + b;
+    }
+
+    // char
+    static void testchar() throws Throwable {
+        char[] a = new char[] {
+            Character.MIN_VALUE,
+            Character.MIN_VALUE + 1,
+            0x000F,
+            0x00FF,
+            0x0FFF,
+            Character.MAX_VALUE - 1,
+            Character.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            dochar(a[i]);
+        }
+    }
+    static void dochar(char x) throws Throwable {
+        if (DEBUG)  System.out.println("char=" + x);
+        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(char.class, char.class));
+        MethodHandle mh2 = mh1.asType(MethodType.methodType(char.class, Character.class));
+        char a = (char) mh1.invokeExact(x);
+        char b = (char) mh2.invokeExact(Character.valueOf(x));
+        assert a == b : a + " != " + b;
+    }
+
+    // short
+    static void testshort() throws Throwable {
+        short[] a = new short[] {
+            Short.MIN_VALUE,
+            Short.MIN_VALUE + 1,
+            -0x0FFF,
+            -0x00FF,
+            -0x000F,
+            -1,
+            0,
+            1,
+            0x000F,
+            0x00FF,
+            0x0FFF,
+            Short.MAX_VALUE - 1,
+            Short.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            doshort(a[i]);
+        }
+    }
+    static void doshort(short x) throws Throwable {
+        if (DEBUG)  System.out.println("short=" + x);
+        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(short.class, short.class));
+        MethodHandle mh2 = mh1.asType(MethodType.methodType(short.class, Short.class));
+        short a = (short) mh1.invokeExact(x);
+        short b = (short) mh2.invokeExact(Short.valueOf(x));
+        assert a == b : a + " != " + b;
+    }
+
+    // int
+    static void testint() throws Throwable {
+        int[] a = new int[] {
+            Integer.MIN_VALUE,
+            Integer.MIN_VALUE + 1,
+            -0x00000FFF,
+            -0x000000FF,
+            -0x0000000F,
+            -1,
+            0,
+            1,
+            0x0000000F,
+            0x000000FF,
+            0x00000FFF,
+            Integer.MAX_VALUE - 1,
+            Integer.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            doint(a[i]);
+        }
+    }
+    static void doint(int x) throws Throwable {
+        if (DEBUG)  System.out.println("int=" + x);
+        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(int.class, int.class));
+        MethodHandle mh2 = mh1.asType(MethodType.methodType(int.class, Integer.class));
+        int a = (int) mh1.invokeExact(x);
+        int b = (int) mh2.invokeExact(Integer.valueOf(x));
+        assert a == b : a + " != " + b;
+    }
+
+    public static boolean foo(boolean i) { return i; }
+    public static byte    foo(byte    i) { return i; }
+    public static char    foo(char    i) { return i; }
+    public static short   foo(short   i) { return i; }
+    public static int     foo(int     i) { return i; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/6991596/Test6991596.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,465 @@
+/*
+ * Copyright (c) 2010, 2011, 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 6991596
+ * @summary JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC
+ *
+ * @run main/othervm -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6991596
+ */
+
+import java.lang.invoke.*;
+
+public class Test6991596 {
+    private static final Class   CLASS = Test6991596.class;
+    private static final String  NAME  = "foo";
+    private static final boolean DEBUG = System.getProperty("DEBUG", "false").equals("true");
+
+    public static void main(String[] args) throws Throwable {
+        testboolean();
+        testbyte();
+        testchar();
+        testshort();
+        testint();
+        testlong();
+    }
+
+    // Helpers to get various methods.
+    static MethodHandle getmh1(Class ret, Class arg) throws ReflectiveOperationException {
+        return MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(ret, arg));
+    }
+    static MethodHandle getmh2(MethodHandle mh1, Class ret, Class arg) {
+        return MethodHandles.convertArguments(mh1, MethodType.methodType(ret, arg));
+    }
+    static MethodHandle getmh3(MethodHandle mh1, Class ret, Class arg) {
+        return MethodHandles.convertArguments(mh1, MethodType.methodType(ret, arg));
+    }
+
+    // test adapter_opt_i2i
+    static void testboolean() throws Throwable {
+        boolean[] a = new boolean[] {
+            true,
+            false
+        };
+        for (int i = 0; i < a.length; i++) {
+            doboolean(a[i]);
+        }
+    }
+    static void doboolean(boolean x) throws Throwable {
+        if (DEBUG)  System.out.println("boolean=" + x);
+
+        // boolean
+        {
+            MethodHandle mh1 = getmh1(     boolean.class, boolean.class);
+            MethodHandle mh2 = getmh2(mh1, boolean.class, boolean.class);
+            // TODO add this for all cases when the bugs are fixed.
+            //MethodHandle mh3 = getmh3(mh1, boolean.class, boolean.class);
+            boolean a = (boolean) mh1.invokeExact((boolean) x);
+            boolean b = (boolean) mh2.invokeExact(x);
+            //boolean c = mh3.<boolean>invokeExact((boolean) x);
+            check(x, a, b);
+            //check(x, c, x);
+        }
+
+        // byte
+        {
+            MethodHandle mh1 = getmh1(     byte.class,    byte.class   );
+            MethodHandle mh2 = getmh2(mh1, byte.class,    boolean.class);
+            byte a = (byte) mh1.invokeExact((byte) (x ? 1 : 0));
+            byte b = (byte) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // char
+        {
+            MethodHandle mh1 = getmh1(     char.class, char.class);
+            MethodHandle mh2 = getmh2(mh1, char.class, boolean.class);
+            char a = (char) mh1.invokeExact((char) (x ? 1 : 0));
+            char b = (char) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // short
+        {
+            MethodHandle mh1 = getmh1(     short.class, short.class);
+            MethodHandle mh2 = getmh2(mh1, short.class, boolean.class);
+            short a = (short) mh1.invokeExact((short) (x ? 1 : 0));
+            short b = (short) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+    }
+
+    static void testbyte() throws Throwable {
+        byte[] a = new byte[] {
+            Byte.MIN_VALUE,
+            Byte.MIN_VALUE + 1,
+            -0x0F,
+            -1,
+            0,
+            1,
+            0x0F,
+            Byte.MAX_VALUE - 1,
+            Byte.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            dobyte(a[i]);
+        }
+    }
+    static void dobyte(byte x) throws Throwable {
+        if (DEBUG)  System.out.println("byte=" + x);
+
+        // boolean
+        {
+            MethodHandle mh1 = getmh1(     boolean.class, boolean.class);
+            MethodHandle mh2 = getmh2(mh1, boolean.class, byte.class);
+            boolean a = (boolean) mh1.invokeExact((x & 1) == 1);
+            boolean b = (boolean) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // byte
+        {
+            MethodHandle mh1 = getmh1(     byte.class, byte.class);
+            MethodHandle mh2 = getmh2(mh1, byte.class, byte.class);
+            byte a = (byte) mh1.invokeExact((byte) x);
+            byte b = (byte) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // char
+        {
+            MethodHandle mh1 = getmh1(     char.class, char.class);
+            MethodHandle mh2 = getmh2(mh1, char.class, byte.class);
+            char a = (char) mh1.invokeExact((char) x);
+            char b = (char) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // short
+        {
+            MethodHandle mh1 = getmh1(     short.class, short.class);
+            MethodHandle mh2 = getmh2(mh1, short.class, byte.class);
+            short a = (short) mh1.invokeExact((short) x);
+            short b = (short) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+    }
+
+    static void testchar() throws Throwable {
+        char[] a = new char[] {
+            Character.MIN_VALUE,
+            Character.MIN_VALUE + 1,
+            0x000F,
+            0x00FF,
+            0x0FFF,
+            Character.MAX_VALUE - 1,
+            Character.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            dochar(a[i]);
+        }
+    }
+    static void dochar(char x) throws Throwable {
+        if (DEBUG)  System.out.println("char=" + x);
+
+        // boolean
+        {
+            MethodHandle mh1 = getmh1(     boolean.class, boolean.class);
+            MethodHandle mh2 = getmh2(mh1, boolean.class, char.class);
+            boolean a = (boolean) mh1.invokeExact((x & 1) == 1);
+            boolean b = (boolean) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // byte
+        {
+            MethodHandle mh1 = getmh1(     byte.class, byte.class);
+            MethodHandle mh2 = getmh2(mh1, byte.class, char.class);
+            byte a = (byte) mh1.invokeExact((byte) x);
+            byte b = (byte) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // char
+        {
+            MethodHandle mh1 = getmh1(     char.class, char.class);
+            MethodHandle mh2 = getmh2(mh1, char.class, char.class);
+            char a = (char) mh1.invokeExact((char) x);
+            char b = (char) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // short
+        {
+            MethodHandle mh1 = getmh1(     short.class, short.class);
+            MethodHandle mh2 = getmh2(mh1, short.class, char.class);
+            short a = (short) mh1.invokeExact((short) x);
+            short b = (short) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+    }
+
+    static void testshort() throws Throwable {
+        short[] a = new short[] {
+            Short.MIN_VALUE,
+            Short.MIN_VALUE + 1,
+            -0x0FFF,
+            -0x00FF,
+            -0x000F,
+            -1,
+            0,
+            1,
+            0x000F,
+            0x00FF,
+            0x0FFF,
+            Short.MAX_VALUE - 1,
+            Short.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            doshort(a[i]);
+        }
+    }
+    static void doshort(short x) throws Throwable {
+        if (DEBUG)  System.out.println("short=" + x);
+
+        // boolean
+        {
+            MethodHandle mh1 = getmh1(     boolean.class, boolean.class);
+            MethodHandle mh2 = getmh2(mh1, boolean.class, short.class);
+            boolean a = (boolean) mh1.invokeExact((x & 1) == 1);
+            boolean b = (boolean) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // byte
+        {
+            MethodHandle mh1 = getmh1(     byte.class, byte.class);
+            MethodHandle mh2 = getmh2(mh1, byte.class, short.class);
+            byte a = (byte) mh1.invokeExact((byte) x);
+            byte b = (byte) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // char
+        {
+            MethodHandle mh1 = getmh1(     char.class, char.class);
+            MethodHandle mh2 = getmh2(mh1, char.class, short.class);
+            char a = (char) mh1.invokeExact((char) x);
+            char b = (char) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // short
+        {
+            MethodHandle mh1 = getmh1(     short.class, short.class);
+            MethodHandle mh2 = getmh2(mh1, short.class, short.class);
+            short a = (short) mh1.invokeExact((short) x);
+            short b = (short) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+    }
+
+    static void testint() throws Throwable {
+        int[] a = new int[] {
+            Integer.MIN_VALUE,
+            Integer.MIN_VALUE + 1,
+            -0x0FFFFFFF,
+            -0x00FFFFFF,
+            -0x000FFFFF,
+            -0x0000FFFF,
+            -0x00000FFF,
+            -0x000000FF,
+            -0x0000000F,
+            -1,
+            0,
+            1,
+            0x0000000F,
+            0x000000FF,
+            0x00000FFF,
+            0x0000FFFF,
+            0x000FFFFF,
+            0x00FFFFFF,
+            0x0FFFFFFF,
+            Integer.MAX_VALUE - 1,
+            Integer.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            doint(a[i]);
+        }
+    }
+    static void doint(int x) throws Throwable {
+        if (DEBUG)  System.out.println("int=" + x);
+
+        // boolean
+        {
+            MethodHandle mh1 = getmh1(     boolean.class, boolean.class);
+            MethodHandle mh2 = getmh2(mh1, boolean.class, int.class);
+            boolean a = (boolean) mh1.invokeExact((x & 1) == 1);
+            boolean b = (boolean) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // byte
+        {
+            MethodHandle mh1 = getmh1(     byte.class, byte.class);
+            MethodHandle mh2 = getmh2(mh1, byte.class, int.class);
+            byte a = (byte) mh1.invokeExact((byte) x);
+            byte b = (byte) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // char
+        {
+            MethodHandle mh1 = getmh1(     char.class, char.class);
+            MethodHandle mh2 = getmh2(mh1, char.class, int.class);
+            char a = (char) mh1.invokeExact((char) x);
+            char b = (char) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // short
+        {
+            MethodHandle mh1 = getmh1(     short.class, short.class);
+            MethodHandle mh2 = getmh2(mh1, short.class, int.class);
+            short a = (short) mh1.invokeExact((short) x);
+            short b = (short) mh2.invokeExact(x);
+            assert a == b : a + " != " + b;
+            check(x, a, b);
+        }
+
+        // int
+        {
+            MethodHandle mh1 = getmh1(     int.class, int.class);
+            MethodHandle mh2 = getmh2(mh1, int.class, int.class);
+            int a = (int) mh1.invokeExact((int) x);
+            int b = (int) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+    }
+
+    // test adapter_opt_l2i
+    static void testlong() throws Throwable {
+        long[] a = new long[] {
+            Long.MIN_VALUE,
+            Long.MIN_VALUE + 1,
+            -0x000000000FFFFFFFL,
+            -0x0000000000FFFFFFL,
+            -0x00000000000FFFFFL,
+            -0x000000000000FFFFL,
+            -0x0000000000000FFFL,
+            -0x00000000000000FFL,
+            -0x000000000000000FL,
+            -1L,
+            0L,
+            1L,
+            0x000000000000000FL,
+            0x00000000000000FFL,
+            0x0000000000000FFFL,
+            0x0000000000000FFFL,
+            0x000000000000FFFFL,
+            0x00000000000FFFFFL,
+            0x0000000000FFFFFFL,
+            0x000000000FFFFFFFL,
+            Long.MAX_VALUE - 1,
+            Long.MAX_VALUE
+        };
+        for (int i = 0; i < a.length; i++) {
+            dolong(a[i]);
+        }
+    }
+    static void dolong(long x) throws Throwable {
+        if (DEBUG)  System.out.println("long=" + x);
+
+        // boolean
+        {
+            MethodHandle mh1 = getmh1(     boolean.class, boolean.class);
+            MethodHandle mh2 = getmh2(mh1, boolean.class, long.class);
+            boolean a = (boolean) mh1.invokeExact((x & 1L) == 1L);
+            boolean b = (boolean) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // byte
+        {
+            MethodHandle mh1 = getmh1(     byte.class, byte.class);
+            MethodHandle mh2 = getmh2(mh1, byte.class, long.class);
+            byte a = (byte) mh1.invokeExact((byte) x);
+            byte b = (byte) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // char
+        {
+            MethodHandle mh1 = getmh1(     char.class, char.class);
+            MethodHandle mh2 = getmh2(mh1, char.class, long.class);
+            char a = (char) mh1.invokeExact((char) x);
+            char b = (char) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // short
+        {
+            MethodHandle mh1 = getmh1(     short.class, short.class);
+            MethodHandle mh2 = getmh2(mh1, short.class, long.class);
+            short a = (short) mh1.invokeExact((short) x);
+            short b = (short) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+
+        // int
+        {
+            MethodHandle mh1 = getmh1(     int.class, int.class);
+            MethodHandle mh2 = getmh2(mh1, int.class, long.class);
+            int a = (int) mh1.invokeExact((int) x);
+            int b = (int) mh2.invokeExact(x);
+            check(x, a, b);
+        }
+    }
+
+    static void check(boolean x, boolean e, boolean a) { p(z2h(x), z2h(e), z2h(a)); assert e == a : z2h(x) + ": " + z2h(e) + " != " + z2h(a); }
+    static void check(boolean x, byte    e, byte    a) { p(z2h(x), i2h(e), i2h(a)); assert e == a : z2h(x) + ": " + i2h(e) + " != " + i2h(a); }
+    static void check(boolean x, int     e, int     a) { p(z2h(x), i2h(e), i2h(a)); assert e == a : z2h(x) + ": " + i2h(e) + " != " + i2h(a); }
+
+    static void check(int     x, boolean e, boolean a) { p(i2h(x), z2h(e), z2h(a)); assert e == a : i2h(x) + ": " + z2h(e) + " != " + z2h(a); }
+    static void check(int     x, byte    e, byte    a) { p(i2h(x), i2h(e), i2h(a)); assert e == a : i2h(x) + ": " + i2h(e) + " != " + i2h(a); }
+    static void check(int     x, int     e, int     a) { p(i2h(x), i2h(e), i2h(a)); assert e == a : i2h(x) + ": " + i2h(e) + " != " + i2h(a); }
+
+    static void check(long    x, boolean e, boolean a) { p(l2h(x), z2h(e), z2h(a)); assert e == a : l2h(x) + ": " + z2h(e) + " != " + z2h(a); }
+    static void check(long    x, byte    e, byte    a) { p(l2h(x), i2h(e), i2h(a)); assert e == a : l2h(x) + ": " + i2h(e) + " != " + i2h(a); }
+    static void check(long    x, int     e, int     a) { p(l2h(x), i2h(e), i2h(a)); assert e == a : l2h(x) + ": " + i2h(e) + " != " + i2h(a); }
+
+    static void p(String x, String e, String a) { if (DEBUG)  System.out.println(x + ": expected: " + e + ", actual: " + a); }
+
+    static String z2h(boolean x) { return x ? "1" : "0"; }
+    static String i2h(int     x) { return Integer.toHexString(x); }
+    static String l2h(long    x) { return Long.toHexString(x); }
+
+    // to int
+    public static boolean foo(boolean i) { return i; }
+    public static byte    foo(byte    i) { return i; }
+    public static char    foo(char    i) { return i; }
+    public static short   foo(short   i) { return i; }
+    public static int     foo(int     i) { return i; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/ClassValueTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2011, 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
+ * @summary tests for class-specific values
+ * @compile ClassValueTest.java
+ * @run junit/othervm test.java.lang.invoke.ClassValueTest
+ */
+
+/*
+  Manually:
+   $ $JAVA7X_HOME/bin/javac -d foo -cp $JUNIT4_JAR test/java/lang/invoke/ClassValueTest.java
+   $ $JAVA7X_HOME/bin/java -cp foo:$JUNIT4_JAR org.junit.runner.JUnitCore test.java.lang.invoke.ClassValueTest
+  Output: .testAdd => 1000 : Integer
+ */
+
+package test.java.lang.invoke;
+
+import java.util.*;
+
+import java.lang.invoke.*;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * @author jrose
+ */
+public class ClassValueTest {
+    static String nameForCV1(Class<?> type) {
+        return "CV1:" + type.getName();
+    }
+    static int countForCV1;
+    static final ClassValue<String> CV1 = new CV1();
+    private static class CV1 extends ClassValue<String> {
+        protected String computeValue(Class<?> type) {
+            countForCV1++;
+            return nameForCV1(type);
+        }
+    }
+
+    static final Class[] CLASSES = {
+        String.class,
+        Integer.class,
+        int.class,
+        boolean[].class,
+        char[][].class,
+        ClassValueTest.class
+    };
+
+    @Test
+    public void testGet() {
+        countForCV1 = 0;
+        for (Class c : CLASSES) {
+            assertEquals(nameForCV1(c), CV1.get(c));
+        }
+        assertEquals(CLASSES.length, countForCV1);
+        for (Class c : CLASSES) {
+            assertEquals(nameForCV1(c), CV1.get(c));
+        }
+        assertEquals(CLASSES.length, countForCV1);
+    }
+
+    @Test
+    public void testRemove() {
+        for (Class c : CLASSES) {
+            CV1.get(c);
+        }
+        countForCV1 = 0;
+        int REMCOUNT = 3;
+        for (int i = 0; i < REMCOUNT; i++) {
+            CV1.remove(CLASSES[i]);
+        }
+        assertEquals(0, countForCV1);  // no change
+        for (Class c : CLASSES) {
+            assertEquals(nameForCV1(c), CV1.get(c));
+        }
+        assertEquals(REMCOUNT, countForCV1);
+    }
+
+    static String nameForCVN(Class<?> type, int n) {
+        return "CV[" + n + "]" + type.getName();
+    }
+    static int countForCVN;
+    static class CVN extends ClassValue<String> {
+        final int n;
+        CVN(int n) { this.n = n; }
+        protected String computeValue(Class<?> type) {
+            countForCVN++;
+            return nameForCVN(type, n);
+        }
+    };
+
+    @Test
+    public void testGetMany() {
+        int CVN_COUNT1 = 100, CVN_COUNT2 = 100;
+        CVN cvns[] = new CVN[CVN_COUNT1 * CVN_COUNT2];
+        for (int n = 0; n < cvns.length; n++) {
+            cvns[n] = new CVN(n);
+        }
+        countForCVN = 0;
+        for (int pass = 0; pass <= 2; pass++) {
+            for (int i1 = 0; i1 < CVN_COUNT1; i1++) {
+                eachClass:
+                for (Class c : CLASSES) {
+                    for (int i2 = 0; i2 < CVN_COUNT2; i2++) {
+                        int n = i1*CVN_COUNT2 + i2;
+                        assertEquals(0, countForCVN);
+                        assertEquals(nameForCVN(c, n), cvns[n].get(c));
+                        cvns[n].get(c);  //get it again
+                        //System.out.println("getting "+n+":"+cvns[n].get(c));
+                        boolean doremove = (((i1 + i2) & 3) == 0);
+                        switch (pass) {
+                        case 0:
+                            assertEquals(1, countForCVN);
+                            break;
+                        case 1:
+                            // remove on middle pass
+                            assertEquals(0, countForCVN);
+                            if (doremove) {
+                                //System.out.println("removing "+n+":"+cvns[n].get(c));
+                                cvns[n].remove(c);
+                                assertEquals(0, countForCVN);
+                            }
+                            break;
+                        case 2:
+                            assertEquals(doremove ? 1 : 0, countForCVN);
+                            break;
+                        }
+                        countForCVN = 0;
+                        if (i1 > i2 && i1 < i2+5)  continue eachClass;  // leave diagonal gap
+                    }
+                }
+            }
+        }
+        assertEquals(countForCVN, 0);
+        for (int n = 0; n < cvns.length; n++) {
+            for (Class c : CLASSES) {
+                assertEquals(nameForCVN(c, n), cvns[n].get(c));
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/InvokeDynamicPrintArgs.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2010, 2011, 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
+ * @summary smoke test for invokedynamic instructions
+ * @build indify.Indify
+ * @compile InvokeDynamicPrintArgs.java
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic
+ *      indify.Indify
+ *      --verify-specifier-count=3 --transitionalJSR292=false
+ *      --expand-properties --classpath ${test.classes}
+ *      --java test.java.lang.invoke.InvokeDynamicPrintArgs --check-output
+ */
+
+package test.java.lang.invoke;
+
+import org.junit.Test;
+
+import java.util.*;
+import java.io.*;
+
+import java.lang.invoke.*;
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+
+public class InvokeDynamicPrintArgs {
+    public static void main(String... av) throws Throwable {
+        if (av.length > 0)  openBuf();  // --check-output mode
+        System.out.println("Printing some argument lists, starting with a empty one:");
+        INDY_nothing().invokeExact();                 // BSM specifier #0 = {bsm}
+        INDY_bar().invokeExact("bar arg", 1);         // BSM specifier #1 = {bsm2, Void.class, "void type"}
+        INDY_bar2().invokeExact("bar2 arg", 222);     // BSM specifier #1 = (same)
+        INDY_baz().invokeExact("baz arg", 2, 3.14);   // BSM specifier #2 = {bsm2, 1234.5}
+        INDY_foo().invokeExact("foo arg");            // BSM specifier #0 = (same)
+        // Hence, BSM specifier count should be 3.  See "--verify-specifier-count=3" above.
+        System.out.println("Done printing argument lists.");
+        closeBuf();
+    }
+
+    @Test
+    public void testInvokeDynamicPrintArgs() throws IOException {
+        System.err.println(System.getProperties());
+        String testClassPath = System.getProperty("build.test.classes.dir");
+        if (testClassPath == null)  throw new RuntimeException();
+        String[] args = new String[]{
+            "--verify-specifier-count=3", "--transitionalJSR292=false",
+            "--expand-properties", "--classpath", testClassPath,
+            "--java", "test.java.lang.invoke.InvokeDynamicPrintArgs", "--check-output"
+        };
+        System.err.println("Indify: "+Arrays.toString(args));
+        indify.Indify.main(args);
+    }
+
+    private static PrintStream oldOut;
+    private static ByteArrayOutputStream buf;
+    private static void openBuf() {
+        oldOut = System.out;
+        buf = new ByteArrayOutputStream();
+        System.setOut(new PrintStream(buf));
+    }
+    private static void closeBuf() {
+        if (buf == null)  return;
+        System.out.flush();
+        System.setOut(oldOut);
+        String[] haveLines = new String(buf.toByteArray()).split("[\n\r]+");
+        for (String line : haveLines)  System.out.println(line);
+        Iterator<String> iter = Arrays.asList(haveLines).iterator();
+        for (String want : EXPECT_OUTPUT) {
+            String have = iter.hasNext() ? iter.next() : "[EOF]";
+            if (want.equals(have))  continue;
+            System.err.println("want line: "+want);
+            System.err.println("have line: "+have);
+            throw new AssertionError("unexpected output: "+have);
+        }
+        if (iter.hasNext())
+            throw new AssertionError("unexpected output: "+iter.next());
+    }
+    private static final String[] EXPECT_OUTPUT = {
+        "Printing some argument lists, starting with a empty one:",
+        "[test.java.lang.invoke.InvokeDynamicPrintArgs, nothing, ()void][]",
+        "[test.java.lang.invoke.InvokeDynamicPrintArgs, bar, (String,int)void, class java.lang.Void, void type!, 1, 234.5, 67.5, 89][bar arg, 1]",
+        "[test.java.lang.invoke.InvokeDynamicPrintArgs, bar2, (String,int)void, class java.lang.Void, void type!, 1, 234.5, 67.5, 89][bar2 arg, 222]",
+        "[test.java.lang.invoke.InvokeDynamicPrintArgs, baz, (String,int,double)void, 1234.5][baz arg, 2, 3.14]",
+        "[test.java.lang.invoke.InvokeDynamicPrintArgs, foo, (String)void][foo arg]",
+        "Done printing argument lists."
+    };
+
+    private static void printArgs(Object bsmInfo, Object... args) {
+        System.out.println(bsmInfo+Arrays.deepToString(args));
+    }
+    private static MethodHandle MH_printArgs() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findStatic(lookup().lookupClass(),
+                                   "printArgs", methodType(void.class, Object.class, Object[].class));
+    }
+
+    private static CallSite bsm(Lookup caller, String name, MethodType type) throws ReflectiveOperationException {
+        // ignore caller and name, but match the type:
+        Object bsmInfo = Arrays.asList(caller, name, type);
+        return new ConstantCallSite(MH_printArgs().bindTo(bsmInfo).asCollector(Object[].class, type.parameterCount()).asType(type));
+    }
+    private static MethodType MT_bsm() {
+        shouldNotCallThis();
+        return methodType(CallSite.class, Lookup.class, String.class, MethodType.class);
+    }
+    private static MethodHandle MH_bsm() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findStatic(lookup().lookupClass(), "bsm", MT_bsm());
+    }
+
+    private static CallSite bsm2(Lookup caller, String name, MethodType type, Object... arg) throws ReflectiveOperationException {
+        // ignore caller and name, but match the type:
+        List<Object> bsmInfo = new ArrayList<>(Arrays.asList(caller, name, type));
+        bsmInfo.addAll(Arrays.asList((Object[])arg));
+        return new ConstantCallSite(MH_printArgs().bindTo(bsmInfo).asCollector(Object[].class, type.parameterCount()).asType(type));
+    }
+    private static MethodType MT_bsm2() {
+        shouldNotCallThis();
+        return methodType(CallSite.class, Lookup.class, String.class, MethodType.class, Object[].class);
+    }
+    private static MethodHandle MH_bsm2() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findStatic(lookup().lookupClass(), "bsm2", MT_bsm2());
+    }
+
+    private static MethodHandle INDY_nothing() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invokeGeneric(lookup(),
+                                                  "nothing", methodType(void.class)
+                                                  )).dynamicInvoker();
+    }
+    private static MethodHandle INDY_foo() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invokeGeneric(lookup(),
+                                                  "foo", methodType(void.class, String.class)
+                                                  )).dynamicInvoker();
+    }
+    private static MethodHandle INDY_bar() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm2().invokeGeneric(lookup(),
+                                                  "bar", methodType(void.class, String.class, int.class)
+                                                  , new Object[] { Void.class, "void type!",
+                                                                   1, 234.5F, 67.5, (long)89 }
+                                                  )).dynamicInvoker();
+    }
+    private static MethodHandle INDY_bar2() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm2().invokeGeneric(lookup(),
+                                                  "bar2", methodType(void.class, String.class, int.class)
+                                                  , new Object[] { Void.class, "void type!",
+                                                                   1, 234.5F, 67.5, (long)89 }
+                                                  )).dynamicInvoker();
+    }
+    private static MethodHandle INDY_baz() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm2().invokeGeneric(lookup(),
+                                                  "baz", methodType(void.class, String.class, int.class, double.class)
+                                                  , 1234.5
+                                                  )).dynamicInvoker();
+    }
+
+    private static void shouldNotCallThis() {
+        // if this gets called, the transformation has not taken place
+        if (System.getProperty("InvokeDynamicPrintArgs.allow-untransformed") != null)  return;
+        throw new AssertionError("this code should be statically transformed away by Indify");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/InvokeGenericTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2009, 2011, 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
+ * @summary unit tests for java.lang.invoke.MethodHandle.invokeGeneric
+ * @compile -XDallowTransitionalJSR292=no -target 7 InvokeGenericTest.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.InvokeGenericTest
+ */
+
+package test.java.lang.invoke;
+
+import java.lang.invoke.*;
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+import java.lang.reflect.*;
+import java.util.*;
+import org.junit.*;
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+
+/**
+ *
+ * @author jrose
+ */
+public class InvokeGenericTest {
+    // How much output?
+    static int verbosity = 0;
+    static {
+        String vstr = System.getProperty("test.java.lang.invoke.InvokeGenericTest.verbosity");
+        if (vstr != null)  verbosity = Integer.parseInt(vstr);
+    }
+
+    @Test
+    public void testFirst() throws Throwable {
+        verbosity += 9; try {
+            // left blank for debugging
+        } finally { printCounts(); verbosity -= 9; }
+    }
+
+    public InvokeGenericTest() {
+    }
+
+    @Before
+    public void checkImplementedPlatform() {
+        boolean platformOK = false;
+        Properties properties = System.getProperties();
+        String vers = properties.getProperty("java.vm.version");
+        String name = properties.getProperty("java.vm.name");
+        String arch = properties.getProperty("os.arch");
+        if ((arch.equals("amd64") || arch.equals("i386") || arch.equals("x86") ||
+             arch.equals("sparc") || arch.equals("sparcv9")) &&
+            (name.contains("Client") || name.contains("Server"))
+            ) {
+            platformOK = true;
+        } else {
+            System.err.println("Skipping tests for unsupported platform: "+Arrays.asList(vers, name, arch));
+        }
+        assumeTrue(platformOK);
+    }
+
+    String testName;
+    static int allPosTests, allNegTests;
+    int posTests, negTests;
+    @After
+    public void printCounts() {
+        if (verbosity >= 2 && (posTests | negTests) != 0) {
+            System.out.println();
+            if (posTests != 0)  System.out.println("=== "+testName+": "+posTests+" positive test cases run");
+            if (negTests != 0)  System.out.println("=== "+testName+": "+negTests+" negative test cases run");
+            allPosTests += posTests;
+            allNegTests += negTests;
+            posTests = negTests = 0;
+        }
+    }
+    void countTest(boolean positive) {
+        if (positive) ++posTests;
+        else          ++negTests;
+    }
+    void countTest() { countTest(true); }
+    void startTest(String name) {
+        if (testName != null)  printCounts();
+        if (verbosity >= 1)
+            System.out.println(name);
+        posTests = negTests = 0;
+        testName = name;
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+        calledLog.clear();
+        calledLog.add(null);
+        nextArgVal = INITIAL_ARG_VAL;
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+        int posTests = allPosTests, negTests = allNegTests;
+        if (verbosity >= 2 && (posTests | negTests) != 0) {
+            System.out.println();
+            if (posTests != 0)  System.out.println("=== "+posTests+" total positive test cases");
+            if (negTests != 0)  System.out.println("=== "+negTests+" total negative test cases");
+        }
+    }
+
+    static List<Object> calledLog = new ArrayList<Object>();
+    static Object logEntry(String name, Object... args) {
+        return Arrays.asList(name, Arrays.asList(args));
+    }
+    static Object called(String name, Object... args) {
+        Object entry = logEntry(name, args);
+        calledLog.add(entry);
+        return entry;
+    }
+    static void assertCalled(String name, Object... args) {
+        Object expected = logEntry(name, args);
+        Object actual   = calledLog.get(calledLog.size() - 1);
+        if (expected.equals(actual) && verbosity < 9)  return;
+        System.out.println("assertCalled "+name+":");
+        System.out.println("expected:   "+expected);
+        System.out.println("actual:     "+actual);
+        System.out.println("ex. types:  "+getClasses(expected));
+        System.out.println("act. types: "+getClasses(actual));
+        assertEquals("previous method call", expected, actual);
+    }
+    static void printCalled(MethodHandle target, String name, Object... args) {
+        if (verbosity >= 3)
+            System.out.println("calling MH="+target+" to "+name+Arrays.toString(args));
+    }
+
+    static Object castToWrapper(Object value, Class<?> dst) {
+        Object wrap = null;
+        if (value instanceof Number)
+            wrap = castToWrapperOrNull(((Number)value).longValue(), dst);
+        if (value instanceof Character)
+            wrap = castToWrapperOrNull((char)(Character)value, dst);
+        if (wrap != null)  return wrap;
+        return dst.cast(value);
+    }
+
+    static Object castToWrapperOrNull(long value, Class<?> dst) {
+        if (dst == int.class || dst == Integer.class)
+            return (int)(value);
+        if (dst == long.class || dst == Long.class)
+            return (long)(value);
+        if (dst == char.class || dst == Character.class)
+            return (char)(value);
+        if (dst == short.class || dst == Short.class)
+            return (short)(value);
+        if (dst == float.class || dst == Float.class)
+            return (float)(value);
+        if (dst == double.class || dst == Double.class)
+            return (double)(value);
+        if (dst == byte.class || dst == Byte.class)
+            return (byte)(value);
+        if (dst == boolean.class || dst == boolean.class)
+            return ((value % 29) & 1) == 0;
+        return null;
+    }
+
+    static final int ONE_MILLION = (1000*1000),  // first int value
+                     TEN_BILLION = (10*1000*1000*1000),  // scale factor to reach upper 32 bits
+                     INITIAL_ARG_VAL = ONE_MILLION << 1;  // <<1 makes space for sign bit;
+    static long nextArgVal;
+    static long nextArg(boolean moreBits) {
+        long val = nextArgVal++;
+        long sign = -(val & 1); // alternate signs
+        val >>= 1;
+        if (moreBits)
+            // Guarantee some bits in the high word.
+            // In any case keep the decimal representation simple-looking,
+            // with lots of zeroes, so as not to make the printed decimal
+            // strings unnecessarily noisy.
+            val += (val % ONE_MILLION) * TEN_BILLION;
+        return val ^ sign;
+    }
+    static int nextArg() {
+        // Produce a 32-bit result something like ONE_MILLION+(smallint).
+        // Example: 1_000_042.
+        return (int) nextArg(false);
+    }
+    static long nextArg(Class<?> kind) {
+        if (kind == long.class   || kind == Long.class ||
+            kind == double.class || kind == Double.class)
+            // produce a 64-bit result something like
+            // ((TEN_BILLION+1) * (ONE_MILLION+(smallint)))
+            // Example: 10_000_420_001_000_042.
+            return nextArg(true);
+        return (long) nextArg();
+    }
+
+    static Object randomArg(Class<?> param) {
+        Object wrap = castToWrapperOrNull(nextArg(param), param);
+        if (wrap != null) {
+            return wrap;
+        }
+//        import sun.invoke.util.Wrapper;
+//        Wrapper wrap = Wrapper.forBasicType(dst);
+//        if (wrap == Wrapper.OBJECT && Wrapper.isWrapperType(dst))
+//            wrap = Wrapper.forWrapperType(dst);
+//        if (wrap != Wrapper.OBJECT)
+//            return wrap.wrap(nextArg++);
+        if (param.isInterface()) {
+            for (Class<?> c : param.getClasses()) {
+                if (param.isAssignableFrom(c) && !c.isInterface())
+                    { param = c; break; }
+            }
+        }
+        if (param.isInterface() || param.isAssignableFrom(String.class))
+            return "#"+nextArg();
+        else
+            try {
+                return param.newInstance();
+            } catch (InstantiationException ex) {
+            } catch (IllegalAccessException ex) {
+            }
+        return null;  // random class not Object, String, Integer, etc.
+    }
+    static Object[] randomArgs(Class<?>... params) {
+        Object[] args = new Object[params.length];
+        for (int i = 0; i < args.length; i++)
+            args[i] = randomArg(params[i]);
+        return args;
+    }
+    static Object[] randomArgs(int nargs, Class<?> param) {
+        Object[] args = new Object[nargs];
+        for (int i = 0; i < args.length; i++)
+            args[i] = randomArg(param);
+        return args;
+    }
+
+    static final Object ANON_OBJ = new Object();
+    static Object zeroArg(Class<?> param) {
+        Object x = castToWrapperOrNull(0L, param);
+        if (x != null)  return x;
+        if (param.isInterface() || param.isAssignableFrom(String.class))  return "\"\"";
+        if (param == Object.class)  return ANON_OBJ;
+        if (param.getComponentType() != null)  return Array.newInstance(param.getComponentType(), 0);
+        return null;
+    }
+    static Object[] zeroArgs(Class<?>... params) {
+        Object[] args = new Object[params.length];
+        for (int i = 0; i < args.length; i++)
+            args[i] = zeroArg(params[i]);
+        return args;
+    }
+    static Object[] zeroArgs(List<Class<?>> params) {
+        return zeroArgs(params.toArray(new Class<?>[0]));
+    }
+
+    static <T, E extends T> T[] array(Class<T[]> atype, E... a) {
+        return Arrays.copyOf(a, a.length, atype);
+    }
+    static <T> T[] cat(T[] a, T... b) {
+        int alen = a.length, blen = b.length;
+        if (blen == 0)  return a;
+        T[] c = Arrays.copyOf(a, alen + blen);
+        System.arraycopy(b, 0, c, alen, blen);
+        return c;
+    }
+    static Integer[] boxAll(int... vx) {
+        Integer[] res = new Integer[vx.length];
+        for (int i = 0; i < res.length; i++) {
+            res[i] = vx[i];
+        }
+        return res;
+    }
+    static Object getClasses(Object x) {
+        if (x == null)  return x;
+        if (x instanceof String)  return x;  // keep the name
+        if (x instanceof List) {
+            // recursively report classes of the list elements
+            Object[] xa = ((List)x).toArray();
+            for (int i = 0; i < xa.length; i++)
+                xa[i] = getClasses(xa[i]);
+            return Arrays.asList(xa);
+        }
+        return x.getClass().getSimpleName();
+    }
+
+    static MethodHandle changeArgTypes(MethodHandle target, Class<?> argType) {
+        return changeArgTypes(target, 0, 999, argType);
+    }
+    static MethodHandle changeArgTypes(MethodHandle target,
+            int beg, int end, Class<?> argType) {
+        MethodType targetType = target.type();
+        end = Math.min(end, targetType.parameterCount());
+        ArrayList<Class<?>> argTypes = new ArrayList<Class<?>>(targetType.parameterList());
+        Collections.fill(argTypes.subList(beg, end), argType);
+        MethodType ttype2 = MethodType.methodType(targetType.returnType(), argTypes);
+        return MethodHandles.convertArguments(target, ttype2);
+    }
+
+    // This lookup is good for all members in and under InvokeGenericTest.
+    static final Lookup LOOKUP = MethodHandles.lookup();
+
+    Map<List<Class<?>>, MethodHandle> CALLABLES = new HashMap<List<Class<?>>, MethodHandle>();
+    MethodHandle callable(List<Class<?>> params) {
+        MethodHandle mh = CALLABLES.get(params);
+        if (mh == null) {
+            mh = collector_MH.asType(methodType(Object.class, params));
+            CALLABLES.put(params, mh);
+        }
+        return mh;
+    }
+    MethodHandle callable(Class<?>... params) {
+        return callable(Arrays.asList(params));
+    }
+    private static Object collector(Object... args) {
+        return Arrays.asList(args);
+    }
+    private static final MethodHandle collector_MH;
+    static {
+        try {
+            collector_MH
+                = LOOKUP.findStatic(LOOKUP.lookupClass(),
+                                    "collector",
+                                    methodType(Object.class, Object[].class));
+        } catch (ReflectiveOperationException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    @Test
+    public void testSimple() throws Throwable {
+        startTest("testSimple");
+        countTest();
+        String[] args = { "one", "two" };
+        MethodHandle mh = callable(Object.class, String.class);
+        Object res; List resl;
+        res = resl = (List) mh.invokeGeneric((String)args[0], (Object)args[1]);
+        //System.out.println(res);
+        assertEquals(Arrays.asList(args), res);
+    }
+
+    @Test
+    public void testWrongArgumentCount() throws Throwable {
+        startTest("testWrongArgumentCount");
+        for (int i = 0; i <= 10; i++) {
+            testWrongArgumentCount(Collections.<Class<?>>nCopies(i, Integer.class));
+            if (i <= 4) {
+                testWrongArgumentCount(Collections.<Class<?>>nCopies(i, int.class));
+                testWrongArgumentCount(Collections.<Class<?>>nCopies(i, long.class));
+            }
+        }
+    }
+    public void testWrongArgumentCount(List<Class<?>> params) throws Throwable {
+        int max = params.size();
+        for (int i = 0; i < max; i++) {
+            List<Class<?>> params2 = params.subList(0, i);
+            for (int k = 0; k <= 2; k++) {
+                if (k == 1)  params  = methodType(Object.class,  params).generic().parameterList();
+                if (k == 2)  params2 = methodType(Object.class, params2).generic().parameterList();
+                testWrongArgumentCount(params, params2);
+                testWrongArgumentCount(params2, params);
+            }
+        }
+    }
+    public void testWrongArgumentCount(List<Class<?>> expect, List<Class<?>> observe) throws Throwable {
+        countTest(false);
+        if (expect.equals(observe))
+            assert(false);
+        MethodHandle target = callable(expect);
+        Object[] args = zeroArgs(observe);
+        Object junk;
+        try {
+            switch (args.length) {
+            case 0:
+                junk = target.invokeGeneric(); break;
+            case 1:
+                junk = target.invokeGeneric(args[0]); break;
+            case 2:
+                junk = target.invokeGeneric(args[0], args[1]); break;
+            case 3:
+                junk = target.invokeGeneric(args[0], args[1], args[2]); break;
+            case 4:
+                junk = target.invokeGeneric(args[0], args[1], args[2], args[3]); break;
+            default:
+                junk = target.invokeWithArguments(args); break;
+            }
+        } catch (WrongMethodTypeException ex) {
+            return;
+        } catch (Exception ex) {
+            throw new RuntimeException("wrong exception calling "+target+target.type()+" on "+Arrays.asList(args)+" : "+ex);
+        }
+        throw new RuntimeException("bad success calling "+target+target.type()+" on "+Arrays.asList(args));
+    }
+
+    /** Make a list of all combinations of the given types, with the given arities.
+     *  A void return type is possible iff the first type is void.class.
+     */
+    static List<MethodType> allMethodTypes(int minargc, int maxargc, Class<?>... types) {
+        ArrayList<MethodType> result = new ArrayList<MethodType>();
+        if (types.length > 0) {
+            ArrayList<MethodType> argcTypes = new ArrayList<MethodType>();
+            // build arity-zero types first
+            for (Class<?> rtype : types) {
+                argcTypes.add(MethodType.methodType(rtype));
+            }
+            if (types[0] == void.class)
+                // void is not an argument type
+                types = Arrays.copyOfRange(types, 1, types.length);
+            for (int argc = 0; argc <= maxargc; argc++) {
+                if (argc >= minargc)
+                    result.addAll(argcTypes);
+                if (argc >= maxargc)
+                    break;
+                ArrayList<MethodType> prevTypes = argcTypes;
+                argcTypes = new ArrayList<MethodType>();
+                for (MethodType prevType : prevTypes) {
+                    for (Class<?> ptype : types) {
+                        argcTypes.add(prevType.insertParameterTypes(argc, ptype));
+                    }
+                }
+            }
+        }
+        return Collections.unmodifiableList(result);
+    }
+    static List<MethodType> allMethodTypes(int argc, Class<?>... types) {
+        return allMethodTypes(argc, argc, types);
+    }
+
+    interface RandomInterface { }
+
+    MethodHandle toString_MH;
+
+    @Test
+    public void testReferenceConversions() throws Throwable {
+        startTest("testReferenceConversions");
+        toString_MH = LOOKUP.
+            findVirtual(Object.class, "toString", MethodType.methodType(String.class));
+        String[] args = { "one", "two" };
+        for (MethodType type : allMethodTypes(2, Object.class, String.class, RandomInterface.class)) {
+            testReferenceConversions(type, args);
+        }
+    }
+    public void testReferenceConversions(MethodType type, Object... args) throws Throwable {
+        countTest();
+        if (verbosity > 3)  System.out.println("target type: "+type);
+        MethodHandle mh = callable(type.parameterList());
+        MethodHandle tsdrop = MethodHandles.dropArguments(toString_MH, 1, type.parameterList());
+        mh = MethodHandles.foldArguments(tsdrop, mh);
+        mh = mh.asType(type);
+        Object res = mh.invokeGeneric((String)args[0], (Object)args[1]);
+        //System.out.println(res);
+        assertEquals(Arrays.asList(args).toString(), res);
+    }
+
+
+    @Test @Ignore("known failure pending 6939861")
+    public void testBoxConversions() throws Throwable {
+        startTest("testBoxConversions");
+        countTest();
+        Integer[] args = { 1, 2 };
+        MethodHandle mh = callable(Object.class, int.class);
+        Object res; List resl;
+        res = resl = (List) mh.invokeGeneric((int)args[0], (Object)args[1]);
+        //System.out.println(res);
+        assertEquals(Arrays.asList(args), res);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/JavaDocExamplesTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2009, 2011, 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
+ * @summary example code used in javadoc for java.lang.invoke API
+ * @compile -XDallowTransitionalJSR292=no JavaDocExamplesTest.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.JavaDocExamplesTest
+ */
+
+/*
+---- To run outside jtreg:
+$ $JAVA7X_HOME/bin/javac -cp $JUNIT4_JAR -d /tmp/Classes \
+   $DAVINCI/sources/jdk/test/java/lang/invoke/JavaDocExamplesTest.java
+$ $JAVA7X_HOME/bin/java   -cp $JUNIT4_JAR:/tmp/Classes \
+   -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles \
+   -Dtest.java.lang.invoke.JavaDocExamplesTest.verbosity=1 \
+     test.java.lang.invoke.JavaDocExamplesTest
+----
+*/
+
+package test.java.lang.invoke;
+
+import java.lang.invoke.*;
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+
+/**
+ * @author jrose
+ */
+public class JavaDocExamplesTest {
+    /** Wrapper for running the JUnit tests in this module.
+     *  Put JUnit on the classpath!
+     */
+    public static void main(String... ignore) {
+        org.junit.runner.JUnitCore.runClasses(JavaDocExamplesTest.class);
+    }
+    // How much output?
+    static int verbosity = Integer.getInteger("test.java.lang.invoke.JavaDocExamplesTest.verbosity", 0);
+
+{}
+static final private Lookup LOOKUP = lookup();
+// static final private MethodHandle CONCAT_1 = LOOKUP.findVirtual(String.class,
+//     "concat", methodType(String.class, String.class));
+// static final private MethodHandle HASHCODE_1 = LOOKUP.findVirtual(Object.class,
+//     "hashCode", methodType(int.class));
+
+// form required if ReflectiveOperationException is intercepted:
+static final private MethodHandle CONCAT_2, HASHCODE_2;
+static {
+  try {
+    CONCAT_2 = LOOKUP.findVirtual(String.class,
+      "concat", methodType(String.class, String.class));
+    HASHCODE_2 = LOOKUP.findVirtual(Object.class,
+      "hashCode", methodType(int.class));
+   } catch (ReflectiveOperationException ex) {
+     throw new RuntimeException(ex);
+   }
+}
+{}
+
+    @Test public void testFindVirtual() throws Throwable {
+{}
+MethodHandle CONCAT_3 = LOOKUP.findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle HASHCODE_3 = LOOKUP.findVirtual(Object.class,
+  "hashCode", methodType(int.class));
+//assertEquals("xy", (String) CONCAT_1.invokeExact("x", "y"));
+assertEquals("xy", (String) CONCAT_2.invokeExact("x", "y"));
+assertEquals("xy", (String) CONCAT_3.invokeExact("x", "y"));
+//assertEquals("xy".hashCode(), (int) HASHCODE_1.invokeExact((Object)"xy"));
+assertEquals("xy".hashCode(), (int) HASHCODE_2.invokeExact((Object)"xy"));
+assertEquals("xy".hashCode(), (int) HASHCODE_3.invokeExact((Object)"xy"));
+{}
+    }
+    @Test public void testDropArguments() throws Throwable {
+        {{
+{} /// JAVADOC
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodType bigType = cat.type().insertParameterTypes(0, int.class, String.class);
+MethodHandle d0 = dropArguments(cat, 0, bigType.parameterList().subList(0,2));
+assertEquals(bigType, d0.type());
+assertEquals("yz", (String) d0.invokeExact(123, "x", "y", "z"));
+            }}
+        {{
+{} /// JAVADOC
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodHandle d0 = dropArguments(cat, 0, String.class);
+assertEquals("yz", (String) d0.invokeExact("x", "y", "z"));
+MethodHandle d1 = dropArguments(cat, 1, String.class);
+assertEquals("xz", (String) d1.invokeExact("x", "y", "z"));
+MethodHandle d2 = dropArguments(cat, 2, String.class);
+assertEquals("xy", (String) d2.invokeExact("x", "y", "z"));
+MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
+assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
+            }}
+    }
+
+    @Test public void testFilterArguments() throws Throwable {
+        {{
+{} /// JAVADOC
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle upcase = lookup().findVirtual(String.class,
+  "toUpperCase", methodType(String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodHandle f0 = filterArguments(cat, 0, upcase);
+assertEquals("Xy", (String) f0.invokeExact("x", "y")); // Xy
+MethodHandle f1 = filterArguments(cat, 1, upcase);
+assertEquals("xY", (String) f1.invokeExact("x", "y")); // xY
+MethodHandle f2 = filterArguments(cat, 0, upcase, upcase);
+assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
+            }}
+    }
+
+    static void assertEquals(Object exp, Object act) {
+        if (verbosity > 0)
+            System.out.println("result: "+act);
+        Assert.assertEquals(exp, act);
+    }
+
+    @Test public void testMethodHandlesSummary() throws Throwable {
+        {{
+{} /// JAVADOC
+Object x, y; String s; int i;
+MethodType mt; MethodHandle mh;
+MethodHandles.Lookup lookup = MethodHandles.lookup();
+// mt is (char,char)String
+mt = MethodType.methodType(String.class, char.class, char.class);
+mh = lookup.findVirtual(String.class, "replace", mt);
+s = (String) mh.invokeExact("daddy",'d','n');
+// invokeExact(Ljava/lang/String;CC)Ljava/lang/String;
+assert(s.equals("nanny"));
+// weakly typed invocation (using MHs.invoke)
+s = (String) mh.invokeWithArguments("sappy", 'p', 'v');
+assert(s.equals("savvy"));
+// mt is (Object[])List
+mt = MethodType.methodType(java.util.List.class, Object[].class);
+mh = lookup.findStatic(java.util.Arrays.class, "asList", mt);
+assert(mh.isVarargsCollector());
+x = mh.invokeGeneric("one", "two");
+// invokeGeneric(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
+assert(x.equals(java.util.Arrays.asList("one","two")));
+// mt is (Object,Object,Object)Object
+mt = MethodType.genericMethodType(3);
+mh = mh.asType(mt);
+x = mh.invokeExact((Object)1, (Object)2, (Object)3);
+// invokeExact(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+assert(x.equals(java.util.Arrays.asList(1,2,3)));
+// mt is { =&gt; int}
+mt = MethodType.methodType(int.class);
+mh = lookup.findVirtual(java.util.List.class, "size", mt);
+i = (int) mh.invokeExact(java.util.Arrays.asList(1,2,3));
+// invokeExact(Ljava/util/List;)I
+assert(i == 3);
+mt = MethodType.methodType(void.class, String.class);
+mh = lookup.findVirtual(java.io.PrintStream.class, "println", mt);
+mh.invokeExact(System.out, "Hello, world.");
+// invokeExact(Ljava/io/PrintStream;Ljava/lang/String;)V
+{}
+            }}
+    }
+
+    @Test public void testAsVarargsCollector() throws Throwable {
+        {{
+{} /// JAVADOC
+MethodHandle asList = publicLookup()
+  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class))
+  .asVarargsCollector(Object[].class);
+assertEquals("[]", asList.invokeGeneric().toString());
+assertEquals("[1]", asList.invokeGeneric(1).toString());
+assertEquals("[two, too]", asList.invokeGeneric("two", "too").toString());
+Object[] argv = { "three", "thee", "tee" };
+assertEquals("[three, thee, tee]", asList.invokeGeneric(argv).toString());
+List ls = (List) asList.invokeGeneric((Object)argv);
+assertEquals(1, ls.size());
+assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0)));
+            }}
+    }
+
+    @Test public void testVarargsCollectorSuppression() throws Throwable {
+        {{
+{} /// JAVADOC
+MethodHandle vamh = publicLookup()
+  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class))
+  .asVarargsCollector(Object[].class);
+MethodHandle mh = MethodHandles.exactInvoker(vamh.type()).bindTo(vamh);
+assert(vamh.type().equals(mh.type()));
+assertEquals("[1, 2, 3]", vamh.invokeGeneric(1,2,3).toString());
+boolean failed = false;
+try { mh.invokeGeneric(1,2,3); }
+catch (WrongMethodTypeException ex) { failed = true; }
+assert(failed);
+{}
+            }}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/MethodHandlesTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,2400 @@
+/*
+ * Copyright (c) 2009, 2011, 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
+ * @summary unit tests for java.lang.invoke.MethodHandles
+ * @compile -source 7 -target 7 -XDallowTransitionalJSR292=no MethodHandlesTest.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.MethodHandlesTest
+ */
+
+package test.java.lang.invoke;
+
+import java.lang.invoke.*;
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.reflect.*;
+import java.util.*;
+import org.junit.*;
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+
+/**
+ *
+ * @author jrose
+ */
+public class MethodHandlesTest {
+    // How much output?
+    static int verbosity = 0;
+    static {
+        String vstr = System.getProperty("test.java.lang.invoke.MethodHandlesTest.verbosity");
+        if (vstr != null)  verbosity = Integer.parseInt(vstr);
+    }
+
+    // Set this true during development if you want to fast-forward to
+    // a particular new, non-working test.  Tests which are known to
+    // work (or have recently worked) test this flag and return on true.
+    static boolean CAN_SKIP_WORKING = false;
+    //static { CAN_SKIP_WORKING = true; }
+
+    // Set true to test more calls.  If false, some tests are just
+    // lookups, without exercising the actual method handle.
+    static boolean DO_MORE_CALLS = true;
+
+    @Test
+    public void testFirst() throws Throwable {
+        verbosity += 9; try {
+            // left blank for debugging
+        } finally { printCounts(); verbosity -= 9; }
+    }
+
+    // current failures
+    @Test @Ignore("failure in call to makeRawRetypeOnly in ToGeneric")
+    public void testFail_1() throws Throwable {
+        // AMH.<init>: IllegalArgumentException: bad adapter (conversion=0xfffab300): adapter pushes too many parameters
+        testSpreadArguments(int.class, 0, 6);
+    }
+    @Test @Ignore("failure in JVM when expanding the stack using asm stub for _adapter_spread_args")
+    public void testFail_2() throws Throwable {
+        // if CONV_OP_IMPLEMENTED_MASK includes OP_SPREAD_ARGS, this crashes:
+        testSpreadArguments(Object.class, 0, 2);
+    }
+    @Test @Ignore("IllArgEx failure in call to ToGeneric.make")
+    public void testFail_3() throws Throwable {
+        // ToGeneric.<init>: UnsupportedOperationException: NYI: primitive parameters must follow references; entryType = (int,java.lang.Object)java.lang.Object
+        testSpreadArguments(int.class, 1, 2);
+    }
+    @Test @Ignore("IllArgEx failure in call to ToGeneric.make")
+    public void testFail_4() throws Throwable {
+        // ToGeneric.<init>: UnsupportedOperationException: NYI: primitive parameters must follow references; entryType = (int,java.lang.Object)java.lang.Object
+        testCollectArguments(int.class, 1, 2);
+    }
+    @Test @Ignore("cannot collect leading primitive types")
+    public void testFail_5() throws Throwable {
+        // ToGeneric.<init>: UnsupportedOperationException: NYI: primitive parameters must follow references; entryType = (int,java.lang.Object)java.lang.Object
+        testInvokers(MethodType.genericMethodType(2).changeParameterType(0, int.class));
+    }
+    @Test @Ignore("should not insert arguments beyond MethodHandlePushLimit")
+    public void testFail_6() throws Throwable {
+        // ValueConversions.varargsArray: UnsupportedOperationException: NYI: cannot form a varargs array of length 13
+        testInsertArguments(0, 0, MAX_ARG_INCREASE+10);
+    }
+    static final int MAX_ARG_INCREASE = 3;
+
+    public MethodHandlesTest() {
+    }
+
+    @Before
+    public void checkImplementedPlatform() {
+        boolean platformOK = false;
+        Properties properties = System.getProperties();
+        String vers = properties.getProperty("java.vm.version");
+        String name = properties.getProperty("java.vm.name");
+        String arch = properties.getProperty("os.arch");
+        if ((arch.equals("amd64") || arch.equals("i386") || arch.equals("x86") ||
+             arch.equals("sparc") || arch.equals("sparcv9")) &&
+            (name.contains("Client") || name.contains("Server"))
+            ) {
+            platformOK = true;
+        } else {
+            System.err.println("Skipping tests for unsupported platform: "+Arrays.asList(vers, name, arch));
+        }
+        assumeTrue(platformOK);
+    }
+
+    String testName;
+    static int allPosTests, allNegTests;
+    int posTests, negTests;
+    @After
+    public void printCounts() {
+        if (verbosity >= 2 && (posTests | negTests) != 0) {
+            System.out.println();
+            if (posTests != 0)  System.out.println("=== "+testName+": "+posTests+" positive test cases run");
+            if (negTests != 0)  System.out.println("=== "+testName+": "+negTests+" negative test cases run");
+            allPosTests += posTests;
+            allNegTests += negTests;
+            posTests = negTests = 0;
+        }
+    }
+    void countTest(boolean positive) {
+        if (positive) ++posTests;
+        else          ++negTests;
+    }
+    void countTest() { countTest(true); }
+    void startTest(String name) {
+        if (testName != null)  printCounts();
+        if (verbosity >= 1)
+            System.out.println(name);
+        posTests = negTests = 0;
+        testName = name;
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+        calledLog.clear();
+        calledLog.add(null);
+        nextArgVal = INITIAL_ARG_VAL;
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+        int posTests = allPosTests, negTests = allNegTests;
+        if (verbosity >= 2 && (posTests | negTests) != 0) {
+            System.out.println();
+            if (posTests != 0)  System.out.println("=== "+posTests+" total positive test cases");
+            if (negTests != 0)  System.out.println("=== "+negTests+" total negative test cases");
+        }
+    }
+
+    static List<Object> calledLog = new ArrayList<Object>();
+    static Object logEntry(String name, Object... args) {
+        return Arrays.asList(name, Arrays.asList(args));
+    }
+    static Object called(String name, Object... args) {
+        Object entry = logEntry(name, args);
+        calledLog.add(entry);
+        return entry;
+    }
+    static void assertCalled(String name, Object... args) {
+        Object expected = logEntry(name, args);
+        Object actual   = calledLog.get(calledLog.size() - 1);
+        if (expected.equals(actual) && verbosity < 9)  return;
+        System.out.println("assertCalled "+name+":");
+        System.out.println("expected:   "+expected);
+        System.out.println("actual:     "+actual);
+        System.out.println("ex. types:  "+getClasses(expected));
+        System.out.println("act. types: "+getClasses(actual));
+        assertEquals("previous method call", expected, actual);
+    }
+    static void printCalled(MethodHandle target, String name, Object... args) {
+        if (verbosity >= 3)
+            System.out.println("calling MH="+target+" to "+name+Arrays.toString(args));
+    }
+
+    static Object castToWrapper(Object value, Class<?> dst) {
+        Object wrap = null;
+        if (value instanceof Number)
+            wrap = castToWrapperOrNull(((Number)value).longValue(), dst);
+        if (value instanceof Character)
+            wrap = castToWrapperOrNull((char)(Character)value, dst);
+        if (wrap != null)  return wrap;
+        return dst.cast(value);
+    }
+
+    static Object castToWrapperOrNull(long value, Class<?> dst) {
+        if (dst == int.class || dst == Integer.class)
+            return (int)(value);
+        if (dst == long.class || dst == Long.class)
+            return (long)(value);
+        if (dst == char.class || dst == Character.class)
+            return (char)(value);
+        if (dst == short.class || dst == Short.class)
+            return (short)(value);
+        if (dst == float.class || dst == Float.class)
+            return (float)(value);
+        if (dst == double.class || dst == Double.class)
+            return (double)(value);
+        if (dst == byte.class || dst == Byte.class)
+            return (byte)(value);
+        if (dst == boolean.class || dst == boolean.class)
+            return ((value % 29) & 1) == 0;
+        return null;
+    }
+
+    static final int ONE_MILLION = (1000*1000),  // first int value
+                     TEN_BILLION = (10*1000*1000*1000),  // scale factor to reach upper 32 bits
+                     INITIAL_ARG_VAL = ONE_MILLION << 1;  // <<1 makes space for sign bit;
+    static long nextArgVal;
+    static long nextArg(boolean moreBits) {
+        long val = nextArgVal++;
+        long sign = -(val & 1); // alternate signs
+        val >>= 1;
+        if (moreBits)
+            // Guarantee some bits in the high word.
+            // In any case keep the decimal representation simple-looking,
+            // with lots of zeroes, so as not to make the printed decimal
+            // strings unnecessarily noisy.
+            val += (val % ONE_MILLION) * TEN_BILLION;
+        return val ^ sign;
+    }
+    static int nextArg() {
+        // Produce a 32-bit result something like ONE_MILLION+(smallint).
+        // Example: 1_000_042.
+        return (int) nextArg(false);
+    }
+    static long nextArg(Class<?> kind) {
+        if (kind == long.class   || kind == Long.class ||
+            kind == double.class || kind == Double.class)
+            // produce a 64-bit result something like
+            // ((TEN_BILLION+1) * (ONE_MILLION+(smallint)))
+            // Example: 10_000_420_001_000_042.
+            return nextArg(true);
+        return (long) nextArg();
+    }
+
+    static Object randomArg(Class<?> param) {
+        Object wrap = castToWrapperOrNull(nextArg(param), param);
+        if (wrap != null) {
+            return wrap;
+        }
+//        import sun.invoke.util.Wrapper;
+//        Wrapper wrap = Wrapper.forBasicType(dst);
+//        if (wrap == Wrapper.OBJECT && Wrapper.isWrapperType(dst))
+//            wrap = Wrapper.forWrapperType(dst);
+//        if (wrap != Wrapper.OBJECT)
+//            return wrap.wrap(nextArg++);
+        if (param.isInterface()) {
+            for (Class<?> c : param.getClasses()) {
+                if (param.isAssignableFrom(c) && !c.isInterface())
+                    { param = c; break; }
+            }
+        }
+        if (param.isInterface() || param.isAssignableFrom(String.class))
+            return "#"+nextArg();
+        else
+            try {
+                return param.newInstance();
+            } catch (InstantiationException ex) {
+            } catch (IllegalAccessException ex) {
+            }
+        return null;  // random class not Object, String, Integer, etc.
+    }
+    static Object[] randomArgs(Class<?>... params) {
+        Object[] args = new Object[params.length];
+        for (int i = 0; i < args.length; i++)
+            args[i] = randomArg(params[i]);
+        return args;
+    }
+    static Object[] randomArgs(int nargs, Class<?> param) {
+        Object[] args = new Object[nargs];
+        for (int i = 0; i < args.length; i++)
+            args[i] = randomArg(param);
+        return args;
+    }
+
+    static <T, E extends T> T[] array(Class<T[]> atype, E... a) {
+        return Arrays.copyOf(a, a.length, atype);
+    }
+    static <T> T[] cat(T[] a, T... b) {
+        int alen = a.length, blen = b.length;
+        if (blen == 0)  return a;
+        T[] c = Arrays.copyOf(a, alen + blen);
+        System.arraycopy(b, 0, c, alen, blen);
+        return c;
+    }
+    static Integer[] boxAll(int... vx) {
+        Integer[] res = new Integer[vx.length];
+        for (int i = 0; i < res.length; i++) {
+            res[i] = vx[i];
+        }
+        return res;
+    }
+    static Object getClasses(Object x) {
+        if (x == null)  return x;
+        if (x instanceof String)  return x;  // keep the name
+        if (x instanceof List) {
+            // recursively report classes of the list elements
+            Object[] xa = ((List)x).toArray();
+            for (int i = 0; i < xa.length; i++)
+                xa[i] = getClasses(xa[i]);
+            return Arrays.asList(xa);
+        }
+        return x.getClass().getSimpleName();
+    }
+
+    /** Return lambda(arg...[arity]) { new Object[]{ arg... } } */
+    static MethodHandle varargsList(int arity) {
+        return ValueConversions.varargsList(arity);
+    }
+    /** Return lambda(arg...[arity]) { Arrays.asList(arg...) } */
+    static MethodHandle varargsArray(int arity) {
+        return ValueConversions.varargsArray(arity);
+    }
+    /** Variation of varargsList, but with the given rtype. */
+    static MethodHandle varargsList(int arity, Class<?> rtype) {
+        MethodHandle list = varargsList(arity);
+        MethodType listType = list.type().changeReturnType(rtype);
+        if (List.class.isAssignableFrom(rtype) || rtype == void.class || rtype == Object.class) {
+            // OK
+        } else if (rtype.isAssignableFrom(String.class)) {
+            if (LIST_TO_STRING == null)
+                try {
+                    LIST_TO_STRING = PRIVATE.findStatic(PRIVATE.lookupClass(), "listToString",
+                                                        MethodType.methodType(String.class, List.class));
+                } catch (Exception ex) { throw new RuntimeException(ex); }
+            list = MethodHandles.filterReturnValue(list, LIST_TO_STRING);
+        } else if (rtype.isPrimitive()) {
+            if (LIST_TO_INT == null)
+                try {
+                    LIST_TO_INT = PRIVATE.findStatic(PRIVATE.lookupClass(), "listToInt",
+                                                     MethodType.methodType(int.class, List.class));
+                } catch (Exception ex) { throw new RuntimeException(ex); }
+            list = MethodHandles.filterReturnValue(list, LIST_TO_INT);
+            list = MethodHandles.explicitCastArguments(list, listType);
+        } else {
+            throw new RuntimeException("varargsList: "+rtype);
+        }
+        return list.asType(listType);
+    }
+    private static MethodHandle LIST_TO_STRING, LIST_TO_INT;
+    private static String listToString(List x) { return x.toString(); }
+    private static int listToInt(List x) { return x.toString().hashCode(); }
+
+    static MethodHandle changeArgTypes(MethodHandle target, Class<?> argType) {
+        return changeArgTypes(target, 0, 999, argType);
+    }
+    static MethodHandle changeArgTypes(MethodHandle target,
+            int beg, int end, Class<?> argType) {
+        MethodType targetType = target.type();
+        end = Math.min(end, targetType.parameterCount());
+        ArrayList<Class<?>> argTypes = new ArrayList<Class<?>>(targetType.parameterList());
+        Collections.fill(argTypes.subList(beg, end), argType);
+        MethodType ttype2 = MethodType.methodType(targetType.returnType(), argTypes);
+        return MethodHandles.convertArguments(target, ttype2);
+    }
+
+    // This lookup is good for all members in and under MethodHandlesTest.
+    static final Lookup PRIVATE = MethodHandles.lookup();
+    // This lookup is good for package-private members but not private ones.
+    static final Lookup PACKAGE = PackageSibling.lookup();
+    // This lookup is good only for public members.
+    static final Lookup PUBLIC  = MethodHandles.publicLookup();
+
+    // Subject methods...
+    static class Example implements IntExample {
+        final String name;
+        public Example() { name = "Example#"+nextArg(); }
+        protected Example(String name) { this.name = name; }
+        protected Example(int x) { this(); called("protected <init>", this, x); }
+        @Override public String toString() { return name; }
+
+        public void            v0()     { called("v0", this); }
+        void                   pkg_v0() { called("pkg_v0", this); }
+        private void           pri_v0() { called("pri_v0", this); }
+        public static void     s0()     { called("s0"); }
+        static void            pkg_s0() { called("pkg_s0"); }
+        private static void    pri_s0() { called("pri_s0"); }
+
+        public Object          v1(Object x) { return called("v1", this, x); }
+        public Object          v2(Object x, Object y) { return called("v2", this, x, y); }
+        public Object          v2(Object x, int    y) { return called("v2", this, x, y); }
+        public Object          v2(int    x, Object y) { return called("v2", this, x, y); }
+        public Object          v2(int    x, int    y) { return called("v2", this, x, y); }
+        public static Object   s1(Object x) { return called("s1", x); }
+        public static Object   s2(int x)    { return called("s2", x); }
+        public static Object   s3(long x)   { return called("s3", x); }
+        public static Object   s4(int x, int y) { return called("s4", x, y); }
+        public static Object   s5(long x, int y) { return called("s5", x, y); }
+        public static Object   s6(int x, long y) { return called("s6", x, y); }
+        public static Object   s7(float x, double y) { return called("s7", x, y); }
+
+        static final Lookup EXAMPLE = MethodHandles.lookup();  // for testing findSpecial
+    }
+    static final Lookup EXAMPLE = Example.EXAMPLE;
+    public static class PubExample extends Example {
+        public PubExample() { super("PubExample#"+nextArg()); }
+    }
+    static class SubExample extends Example {
+        @Override public void  v0()     { called("Sub/v0", this); }
+        @Override void         pkg_v0() { called("Sub/pkg_v0", this); }
+        private      SubExample(int x)  { called("<init>", this, x); }
+        public SubExample() { super("SubExample#"+nextArg()); }
+    }
+    public static interface IntExample {
+        public void            v0();
+        public static class Impl implements IntExample {
+            public void        v0()     { called("Int/v0", this); }
+            final String name;
+            public Impl() { name = "Impl#"+nextArg(); }
+            @Override public String toString() { return name; }
+        }
+    }
+
+    static final Object[][][] ACCESS_CASES = {
+        { { false, PUBLIC }, { false, PACKAGE }, { false, PRIVATE }, { false, EXAMPLE } }, //[0]: all false
+        { { false, PUBLIC }, { false, PACKAGE }, { true,  PRIVATE }, { true,  EXAMPLE } }, //[1]: only PRIVATE
+        { { false, PUBLIC }, { true,  PACKAGE }, { true,  PRIVATE }, { true,  EXAMPLE } }, //[2]: PUBLIC false
+        { { true,  PUBLIC }, { true,  PACKAGE }, { true,  PRIVATE }, { true,  EXAMPLE } }, //[3]: all true
+    };
+
+    static Object[][] accessCases(Class<?> defc, String name, boolean isSpecial) {
+        Object[][] cases;
+        if (name.contains("pri_") || isSpecial) {
+            cases = ACCESS_CASES[1]; // PRIVATE only
+        } else if (name.contains("pkg_") || !Modifier.isPublic(defc.getModifiers())) {
+            cases = ACCESS_CASES[2]; // not PUBLIC
+        } else {
+            assertTrue(name.indexOf('_') < 0);
+            boolean pubc = Modifier.isPublic(defc.getModifiers());
+            if (pubc)
+                cases = ACCESS_CASES[3]; // all access levels
+            else
+                cases = ACCESS_CASES[2]; // PACKAGE but not PUBLIC
+        }
+        if (defc != Example.class && cases[cases.length-1][1] == EXAMPLE)
+            cases = Arrays.copyOfRange(cases, 0, cases.length-1);
+        return cases;
+    }
+    static Object[][] accessCases(Class<?> defc, String name) {
+        return accessCases(defc, name, false);
+    }
+
+    @Test
+    public void testFindStatic() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("findStatic");
+        testFindStatic(PubExample.class, void.class, "s0");
+        testFindStatic(Example.class, void.class, "s0");
+        testFindStatic(Example.class, void.class, "pkg_s0");
+        testFindStatic(Example.class, void.class, "pri_s0");
+
+        testFindStatic(Example.class, Object.class, "s1", Object.class);
+        testFindStatic(Example.class, Object.class, "s2", int.class);
+        testFindStatic(Example.class, Object.class, "s3", long.class);
+        testFindStatic(Example.class, Object.class, "s4", int.class, int.class);
+        testFindStatic(Example.class, Object.class, "s5", long.class, int.class);
+        testFindStatic(Example.class, Object.class, "s6", int.class, long.class);
+        testFindStatic(Example.class, Object.class, "s7", float.class, double.class);
+
+        testFindStatic(false, PRIVATE, Example.class, void.class, "bogus");
+    }
+
+    void testFindStatic(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        for (Object[] ac : accessCases(defc, name)) {
+            testFindStatic((Boolean)ac[0], (Lookup)ac[1], defc, ret, name, params);
+        }
+    }
+    void testFindStatic(Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        testFindStatic(true, lookup, defc, ret, name, params);
+    }
+    void testFindStatic(boolean positive, Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        countTest(positive);
+        MethodType type = MethodType.methodType(ret, params);
+        MethodHandle target = null;
+        Exception noAccess = null;
+        try {
+            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
+            target = lookup.in(defc).findStatic(defc, name, type);
+        } catch (ReflectiveOperationException ex) {
+            noAccess = ex;
+            if (name.contains("bogus"))
+                assertTrue(noAccess instanceof NoSuchMethodException);
+            else
+                assertTrue(noAccess instanceof IllegalAccessException);
+        }
+        if (verbosity >= 3)
+            System.out.println("findStatic "+lookup+": "+defc.getName()+"."+name+"/"+type+" => "+target
+                    +(noAccess == null ? "" : " !! "+noAccess));
+        if (positive && noAccess != null)  throw noAccess;
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
+        if (!positive)  return; // negative test failed as expected
+        assertEquals(type, target.type());
+        assertNameStringContains(target, name);
+        if (!DO_MORE_CALLS && lookup != PRIVATE)  return;
+        Object[] args = randomArgs(params);
+        printCalled(target, name, args);
+        target.invokeWithArguments(args);
+        assertCalled(name, args);
+        if (verbosity >= 1)
+            System.out.print(':');
+    }
+
+    // rough check of name string
+    static void assertNameStringContains(Object x, String s) {
+        if (x.toString().contains(s))  return;
+        assertEquals(s, x);
+    }
+
+    @Test
+    public void testFindVirtual() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("findVirtual");
+        testFindVirtual(Example.class, void.class, "v0");
+        testFindVirtual(Example.class, void.class, "pkg_v0");
+        testFindVirtual(Example.class, void.class, "pri_v0");
+        testFindVirtual(Example.class, Object.class, "v1", Object.class);
+        testFindVirtual(Example.class, Object.class, "v2", Object.class, Object.class);
+        testFindVirtual(Example.class, Object.class, "v2", Object.class, int.class);
+        testFindVirtual(Example.class, Object.class, "v2", int.class, Object.class);
+        testFindVirtual(Example.class, Object.class, "v2", int.class, int.class);
+        testFindVirtual(false, PRIVATE, Example.class, Example.class, void.class, "bogus");
+        // test dispatch
+        testFindVirtual(SubExample.class,      SubExample.class, void.class, "Sub/v0");
+        testFindVirtual(SubExample.class,         Example.class, void.class, "Sub/v0");
+        testFindVirtual(SubExample.class,      IntExample.class, void.class, "Sub/v0");
+        testFindVirtual(SubExample.class,      SubExample.class, void.class, "Sub/pkg_v0");
+        testFindVirtual(SubExample.class,         Example.class, void.class, "Sub/pkg_v0");
+        testFindVirtual(Example.class,         IntExample.class, void.class, "v0");
+        testFindVirtual(IntExample.Impl.class, IntExample.class, void.class, "Int/v0");
+    }
+
+    void testFindVirtual(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        Class<?> rcvc = defc;
+        testFindVirtual(rcvc, defc, ret, name, params);
+    }
+    void testFindVirtual(Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        for (Object[] ac : accessCases(defc, name)) {
+            testFindVirtual((Boolean)ac[0], (Lookup)ac[1], rcvc, defc, ret, name, params);
+        }
+    }
+    void testFindVirtual(Lookup lookup, Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        testFindVirtual(true, lookup, rcvc, defc, ret, name, params);
+    }
+    void testFindVirtual(boolean positive, Lookup lookup, Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        countTest(positive);
+        String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
+        MethodType type = MethodType.methodType(ret, params);
+        MethodHandle target = null;
+        Exception noAccess = null;
+        try {
+            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
+            target = lookup.in(defc).findVirtual(defc, methodName, type);
+        } catch (ReflectiveOperationException ex) {
+            noAccess = ex;
+            if (name.contains("bogus"))
+                assertTrue(noAccess instanceof NoSuchMethodException);
+            else
+                assertTrue(noAccess instanceof IllegalAccessException);
+        }
+        if (verbosity >= 3)
+            System.out.println("findVirtual "+lookup+": "+defc.getName()+"."+name+"/"+type+" => "+target
+                    +(noAccess == null ? "" : " !! "+noAccess));
+        if (positive && noAccess != null)  throw noAccess;
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
+        if (!positive)  return; // negative test failed as expected
+        Class<?>[] paramsWithSelf = cat(array(Class[].class, (Class)defc), params);
+        MethodType typeWithSelf = MethodType.methodType(ret, paramsWithSelf);
+        assertEquals(typeWithSelf, target.type());
+        assertNameStringContains(target, methodName);
+        if (!DO_MORE_CALLS && lookup != PRIVATE)  return;
+        Object[] argsWithSelf = randomArgs(paramsWithSelf);
+        if (rcvc != defc)  argsWithSelf[0] = randomArg(rcvc);
+        printCalled(target, name, argsWithSelf);
+        target.invokeWithArguments(argsWithSelf);
+        assertCalled(name, argsWithSelf);
+        if (verbosity >= 1)
+            System.out.print(':');
+    }
+
+    @Test
+    public void testFindSpecial() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("findSpecial");
+        testFindSpecial(SubExample.class, Example.class, void.class, "v0");
+        testFindSpecial(SubExample.class, Example.class, void.class, "pkg_v0");
+        // Do some negative testing:
+        testFindSpecial(false, EXAMPLE, SubExample.class, Example.class, void.class, "bogus");
+        testFindSpecial(false, PRIVATE, SubExample.class, Example.class, void.class, "bogus");
+        for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
+            testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
+            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
+            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
+        }
+    }
+
+    void testFindSpecial(Class<?> specialCaller,
+                         Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        testFindSpecial(true,  EXAMPLE, specialCaller, defc, ret, name, params);
+        testFindSpecial(true,  PRIVATE, specialCaller, defc, ret, name, params);
+        testFindSpecial(false, PACKAGE, specialCaller, defc, ret, name, params);
+        testFindSpecial(false, PUBLIC,  specialCaller, defc, ret, name, params);
+    }
+    void testFindSpecial(boolean positive, Lookup lookup, Class<?> specialCaller,
+                         Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        countTest(positive);
+        MethodType type = MethodType.methodType(ret, params);
+        MethodHandle target = null;
+        Exception noAccess = null;
+        try {
+            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
+            if (verbosity >= 5)  System.out.println("  lookup => "+lookup.in(specialCaller));
+            target = lookup.in(specialCaller).findSpecial(defc, name, type, specialCaller);
+        } catch (ReflectiveOperationException ex) {
+            noAccess = ex;
+            if (name.contains("bogus"))
+                assertTrue(noAccess instanceof NoSuchMethodException);
+            else
+                assertTrue(noAccess instanceof IllegalAccessException);
+        }
+        if (verbosity >= 3)
+            System.out.println("findSpecial from "+specialCaller.getName()+" to "+defc.getName()+"."+name+"/"+type+" => "+target
+                               +(target == null ? "" : target.type())
+                               +(noAccess == null ? "" : " !! "+noAccess));
+        if (positive && noAccess != null)  throw noAccess;
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
+        if (!positive)  return; // negative test failed as expected
+        assertEquals(specialCaller, target.type().parameterType(0));
+        assertEquals(type,          target.type().dropParameterTypes(0,1));
+        Class<?>[] paramsWithSelf = cat(array(Class[].class, (Class)specialCaller), params);
+        MethodType typeWithSelf = MethodType.methodType(ret, paramsWithSelf);
+        assertNameStringContains(target, name);
+        if (!DO_MORE_CALLS && lookup != PRIVATE && lookup != EXAMPLE)  return;
+        Object[] args = randomArgs(paramsWithSelf);
+        printCalled(target, name, args);
+        target.invokeWithArguments(args);
+        assertCalled(name, args);
+    }
+
+    @Test
+    public void testBind() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("bind");
+        testBind(Example.class, void.class, "v0");
+        testBind(Example.class, void.class, "pkg_v0");
+        testBind(Example.class, void.class, "pri_v0");
+        testBind(Example.class, Object.class, "v1", Object.class);
+        testBind(Example.class, Object.class, "v2", Object.class, Object.class);
+        testBind(Example.class, Object.class, "v2", Object.class, int.class);
+        testBind(Example.class, Object.class, "v2", int.class, Object.class);
+        testBind(Example.class, Object.class, "v2", int.class, int.class);
+        testBind(false, PRIVATE, Example.class, void.class, "bogus");
+        testBind(SubExample.class, void.class, "Sub/v0");
+        testBind(SubExample.class, void.class, "Sub/pkg_v0");
+        testBind(IntExample.Impl.class, void.class, "Int/v0");
+    }
+
+    void testBind(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        for (Object[] ac : accessCases(defc, name)) {
+            testBind((Boolean)ac[0], (Lookup)ac[1], defc, ret, name, params);
+        }
+    }
+
+    void testBind(boolean positive, Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        countTest(positive);
+        String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
+        MethodType type = MethodType.methodType(ret, params);
+        Object receiver = randomArg(defc);
+        MethodHandle target = null;
+        Exception noAccess = null;
+        try {
+            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
+            target = lookup.in(defc).bind(receiver, methodName, type);
+        } catch (ReflectiveOperationException ex) {
+            noAccess = ex;
+            if (name.contains("bogus"))
+                assertTrue(noAccess instanceof NoSuchMethodException);
+            else
+                assertTrue(noAccess instanceof IllegalAccessException);
+        }
+        if (verbosity >= 3)
+            System.out.println("bind "+receiver+"."+name+"/"+type+" => "+target
+                    +(noAccess == null ? "" : " !! "+noAccess));
+        if (positive && noAccess != null)  throw noAccess;
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
+        if (!positive)  return; // negative test failed as expected
+        assertEquals(type, target.type());
+        Object[] args = randomArgs(params);
+        printCalled(target, name, args);
+        target.invokeWithArguments(args);
+        Object[] argsWithReceiver = cat(array(Object[].class, receiver), args);
+        assertCalled(name, argsWithReceiver);
+        if (verbosity >= 1)
+            System.out.print(':');
+    }
+
+    @Test
+    public void testUnreflect() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("unreflect");
+        testUnreflect(Example.class, true, void.class, "s0");
+        testUnreflect(Example.class, true, void.class, "pkg_s0");
+        testUnreflect(Example.class, true, void.class, "pri_s0");
+
+        testUnreflect(Example.class, true, Object.class, "s1", Object.class);
+        testUnreflect(Example.class, true, Object.class, "s2", int.class);
+        testUnreflect(Example.class, true, Object.class, "s3", long.class);
+        testUnreflect(Example.class, true, Object.class, "s4", int.class, int.class);
+        testUnreflect(Example.class, true, Object.class, "s5", long.class, int.class);
+        testUnreflect(Example.class, true, Object.class, "s6", int.class, long.class);
+
+        testUnreflect(Example.class, false, void.class, "v0");
+        testUnreflect(Example.class, false, void.class, "pkg_v0");
+        testUnreflect(Example.class, false, void.class, "pri_v0");
+        testUnreflect(Example.class, false, Object.class, "v1", Object.class);
+        testUnreflect(Example.class, false, Object.class, "v2", Object.class, Object.class);
+        testUnreflect(Example.class, false, Object.class, "v2", Object.class, int.class);
+        testUnreflect(Example.class, false, Object.class, "v2", int.class, Object.class);
+        testUnreflect(Example.class, false, Object.class, "v2", int.class, int.class);
+    }
+
+    void testUnreflect(Class<?> defc, boolean isStatic, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        for (Object[] ac : accessCases(defc, name)) {
+            testUnreflectMaybeSpecial(null, (Boolean)ac[0], (Lookup)ac[1], defc, (isStatic ? null : defc), ret, name, params);
+        }
+    }
+    void testUnreflect(Class<?> defc, Class<?> rcvc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        for (Object[] ac : accessCases(defc, name)) {
+            testUnreflectMaybeSpecial(null, (Boolean)ac[0], (Lookup)ac[1], defc, rcvc, ret, name, params);
+        }
+    }
+    void testUnreflectMaybeSpecial(Class<?> specialCaller,
+                                   boolean positive, Lookup lookup,
+                                   Class<?> defc, Class<?> rcvc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        countTest(positive);
+        MethodType type = MethodType.methodType(ret, params);
+        Method rmethod = defc.getDeclaredMethod(name, params);
+        MethodHandle target = null;
+        Exception noAccess = null;
+        boolean isStatic = (rcvc == null);
+        boolean isSpecial = (specialCaller != null);
+        try {
+            if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
+            if (isSpecial)
+                target = lookup.in(specialCaller).unreflectSpecial(rmethod, specialCaller);
+            else
+                target = lookup.in(defc).unreflect(rmethod);
+        } catch (ReflectiveOperationException ex) {
+            noAccess = ex;
+            if (name.contains("bogus"))
+                assertTrue(noAccess instanceof NoSuchMethodException);
+            else
+                assertTrue(noAccess instanceof IllegalAccessException);
+        }
+        if (verbosity >= 3)
+            System.out.println("unreflect"+(isSpecial?"Special":"")+" "+defc.getName()+"."+name+"/"+type
+                               +(!isSpecial ? "" : " specialCaller="+specialCaller)
+                               +( isStatic  ? "" : " receiver="+rcvc)
+                               +" => "+target
+                               +(noAccess == null ? "" : " !! "+noAccess));
+        if (positive && noAccess != null)  throw noAccess;
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
+        if (!positive)  return; // negative test failed as expected
+        assertEquals(isStatic, Modifier.isStatic(rmethod.getModifiers()));
+        Class<?>[] paramsMaybeWithSelf = params;
+        if (!isStatic) {
+            paramsMaybeWithSelf = cat(array(Class[].class, (Class)rcvc), params);
+        }
+        MethodType typeMaybeWithSelf = MethodType.methodType(ret, paramsMaybeWithSelf);
+        if (isStatic) {
+            assertEquals(typeMaybeWithSelf, target.type());
+        } else {
+            if (isSpecial)
+                assertEquals(specialCaller, target.type().parameterType(0));
+            else
+                assertEquals(defc, target.type().parameterType(0));
+            assertEquals(typeMaybeWithSelf, target.type().changeParameterType(0, rcvc));
+        }
+        Object[] argsMaybeWithSelf = randomArgs(paramsMaybeWithSelf);
+        printCalled(target, name, argsMaybeWithSelf);
+        target.invokeWithArguments(argsMaybeWithSelf);
+        assertCalled(name, argsMaybeWithSelf);
+        if (verbosity >= 1)
+            System.out.print(':');
+    }
+
+    void testUnreflectSpecial(Class<?> defc, Class<?> rcvc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        for (Object[] ac : accessCases(defc, name, true)) {
+            Class<?> specialCaller = rcvc;
+            testUnreflectMaybeSpecial(specialCaller, (Boolean)ac[0], (Lookup)ac[1], defc, rcvc, ret, name, params);
+        }
+    }
+
+    @Test
+    public void testUnreflectSpecial() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("unreflectSpecial");
+        testUnreflectSpecial(Example.class,    Example.class, void.class, "v0");
+        testUnreflectSpecial(Example.class, SubExample.class, void.class, "v0");
+        testUnreflectSpecial(Example.class,    Example.class, void.class, "pkg_v0");
+        testUnreflectSpecial(Example.class, SubExample.class, void.class, "pkg_v0");
+        testUnreflectSpecial(Example.class,    Example.class, Object.class, "v2", int.class, int.class);
+        testUnreflectSpecial(Example.class, SubExample.class, Object.class, "v2", int.class, int.class);
+        testUnreflectMaybeSpecial(Example.class, false, PRIVATE, Example.class, Example.class, void.class, "s0");
+    }
+
+    public static class HasFields {
+        boolean fZ = false;
+        byte fB = (byte)'B';
+        short fS = (short)'S';
+        char fC = 'C';
+        int fI = 'I';
+        long fJ = 'J';
+        float fF = 'F';
+        double fD = 'D';
+        static boolean sZ = true;
+        static byte sB = 1+(byte)'B';
+        static short sS = 1+(short)'S';
+        static char sC = 1+'C';
+        static int sI = 1+'I';
+        static long sJ = 1+'J';
+        static float sF = 1+'F';
+        static double sD = 1+'D';
+
+        Object fL = 'L';
+        String fR = "R";
+        static Object sL = 'M';
+        static String sR = "S";
+
+        static final Object[][] CASES;
+        static {
+            ArrayList<Object[]> cases = new ArrayList<Object[]>();
+            Object types[][] = {
+                {'L',Object.class}, {'R',String.class},
+                {'I',int.class}, {'J',long.class},
+                {'F',float.class}, {'D',double.class},
+                {'Z',boolean.class}, {'B',byte.class},
+                {'S',short.class}, {'C',char.class},
+            };
+            HasFields fields = new HasFields();
+            for (Object[] t : types) {
+                for (int kind = 0; kind <= 1; kind++) {
+                    boolean isStatic = (kind != 0);
+                    char btc = (Character)t[0];
+                    String name = (isStatic ? "s" : "f") + btc;
+                    Class<?> type = (Class<?>) t[1];
+                    Object value;
+                    Field field;
+                    try {
+                        field = HasFields.class.getDeclaredField(name);
+                    } catch (Exception ex) {
+                        throw new InternalError("no field HasFields."+name);
+                    }
+                    try {
+                        value = field.get(fields);
+                    } catch (Exception ex) {
+                        throw new InternalError("cannot fetch field HasFields."+name);
+                    }
+                    if (type == float.class) {
+                        float v = 'F';
+                        if (isStatic)  v++;
+                        assertTrue(value.equals(v));
+                    }
+                    assertTrue(name.equals(field.getName()));
+                    assertTrue(type.equals(field.getType()));
+                    assertTrue(isStatic == (Modifier.isStatic(field.getModifiers())));
+                    cases.add(new Object[]{ field, value });
+                }
+            }
+            cases.add(new Object[]{ new Object[]{ false, HasFields.class, "bogus_fD", double.class }, Error.class });
+            cases.add(new Object[]{ new Object[]{ true,  HasFields.class, "bogus_sL", Object.class }, Error.class });
+            CASES = cases.toArray(new Object[0][]);
+        }
+    }
+
+    static final int TEST_UNREFLECT = 1, TEST_FIND_FIELD = 2, TEST_FIND_STATIC = 3, TEST_SETTER = 0x10;
+    static boolean testModeMatches(int testMode, boolean isStatic) {
+        switch (testMode) {
+        case TEST_FIND_STATIC:          return isStatic;
+        case TEST_FIND_FIELD:           return !isStatic;
+        case TEST_UNREFLECT:            return true;  // unreflect matches both
+        }
+        throw new InternalError("testMode="+testMode);
+    }
+
+    @Test
+    public void testUnreflectGetter() throws Throwable {
+        startTest("unreflectGetter");
+        testGetter(TEST_UNREFLECT);
+    }
+    @Test
+    public void testFindGetter() throws Throwable {
+        startTest("findGetter");
+        testGetter(TEST_FIND_FIELD);
+    }
+    @Test
+    public void testFindStaticGetter() throws Throwable {
+        startTest("findStaticGetter");
+        testGetter(TEST_FIND_STATIC);
+    }
+    public void testGetter(int testMode) throws Throwable {
+        Lookup lookup = PRIVATE;  // FIXME: test more lookups than this one
+        for (Object[] c : HasFields.CASES) {
+            boolean positive = (c[1] != Error.class);
+            testGetter(positive, lookup, c[0], c[1], testMode);
+        }
+        testGetter(true, lookup,
+                   new Object[]{ true,  System.class, "out", java.io.PrintStream.class },
+                   System.out, testMode);
+        for (int isStaticN = 0; isStaticN <= 1; isStaticN++) {
+            testGetter(false, lookup,
+                       new Object[]{ (isStaticN != 0), System.class, "bogus", char.class },
+                       null, testMode);
+        }
+    }
+    public void testGetter(boolean positive, MethodHandles.Lookup lookup,
+                           Object fieldRef, Object value, int testMode) throws Throwable {
+        testAccessor(positive, lookup, fieldRef, value, testMode);
+    }
+
+    public void testAccessor(boolean positive, MethodHandles.Lookup lookup,
+                             Object fieldRef, Object value, int testMode0) throws Throwable {
+        boolean isGetter = ((testMode0 & TEST_SETTER) == 0);
+        int testMode = testMode0 & ~TEST_SETTER;
+        boolean isStatic;
+        Class<?> fclass;
+        String   fname;
+        Class<?> ftype;
+        Field f = (fieldRef instanceof Field ? (Field)fieldRef : null);
+        if (f != null) {
+            isStatic = Modifier.isStatic(f.getModifiers());
+            fclass   = f.getDeclaringClass();
+            fname    = f.getName();
+            ftype    = f.getType();
+        } else {
+            Object[] scnt = (Object[]) fieldRef;
+            isStatic = (Boolean)  scnt[0];
+            fclass   = (Class<?>) scnt[1];
+            fname    = (String)   scnt[2];
+            ftype    = (Class<?>) scnt[3];
+            try {
+                f = fclass.getDeclaredField(fname);
+            } catch (ReflectiveOperationException ex) {
+                f = null;
+            }
+        }
+        if (!testModeMatches(testMode, isStatic))  return;
+        if (f == null && testMode == TEST_UNREFLECT)  return;
+        countTest(positive);
+        MethodType expType;
+        if (isGetter)
+            expType = MethodType.methodType(ftype, HasFields.class);
+        else
+            expType = MethodType.methodType(void.class, HasFields.class, ftype);
+        if (isStatic)  expType = expType.dropParameterTypes(0, 1);
+        Exception noAccess = null;
+        MethodHandle mh;
+        try {
+            switch (testMode0) {
+            case TEST_UNREFLECT:   mh = lookup.unreflectGetter(f);                      break;
+            case TEST_FIND_FIELD:  mh = lookup.findGetter(fclass, fname, ftype);        break;
+            case TEST_FIND_STATIC: mh = lookup.findStaticGetter(fclass, fname, ftype);  break;
+            case TEST_SETTER|
+                 TEST_UNREFLECT:   mh = lookup.unreflectSetter(f);                      break;
+            case TEST_SETTER|
+                 TEST_FIND_FIELD:  mh = lookup.findSetter(fclass, fname, ftype);        break;
+            case TEST_SETTER|
+                 TEST_FIND_STATIC: mh = lookup.findStaticSetter(fclass, fname, ftype);  break;
+            default:
+                throw new InternalError("testMode="+testMode);
+            }
+        } catch (ReflectiveOperationException ex) {
+            mh = null;
+            noAccess = ex;
+            if (fname.contains("bogus"))
+                assertTrue(noAccess instanceof NoSuchFieldException);
+            else
+                assertTrue(noAccess instanceof IllegalAccessException);
+        }
+        if (verbosity >= 3)
+            System.out.println("find"+(isStatic?"Static":"")+(isGetter?"Getter":"Setter")+" "+fclass.getName()+"."+fname+"/"+ftype
+                               +" => "+mh
+                               +(noAccess == null ? "" : " !! "+noAccess));
+        if (positive && noAccess != null)  throw new RuntimeException(noAccess);
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, mh != null);
+        if (!positive)  return; // negative test failed as expected
+        assertEquals((isStatic ? 0 : 1)+(isGetter ? 0 : 1), mh.type().parameterCount());
+
+
+        assertSame(mh.type(), expType);
+        assertNameStringContains(mh, fname);
+        HasFields fields = new HasFields();
+        Object sawValue;
+        Class<?> vtype = ftype;
+        if (ftype != int.class)  vtype = Object.class;
+        if (isGetter) {
+            mh = MethodHandles.convertArguments(mh, mh.type().generic()
+                                                .changeReturnType(vtype));
+        } else {
+            int last = mh.type().parameterCount() - 1;
+            mh = MethodHandles.convertArguments(mh, mh.type().generic()
+                                                .changeReturnType(void.class)
+                                                .changeParameterType(last, vtype));
+        }
+        if (f != null && f.getDeclaringClass() == HasFields.class) {
+            assertEquals(f.get(fields), value);  // clean to start with
+        }
+        if (isGetter) {
+            Object expValue = value;
+            for (int i = 0; i <= 1; i++) {
+                if (isStatic) {
+                    if (ftype == int.class)
+                        sawValue = (int) mh.invokeExact();  // do these exactly
+                    else
+                        sawValue = mh.invokeExact();
+                } else {
+                    if (ftype == int.class)
+                        sawValue = (int) mh.invokeExact((Object) fields);
+                    else
+                        sawValue = mh.invokeExact((Object) fields);
+                }
+                assertEquals(sawValue, expValue);
+                if (f != null && f.getDeclaringClass() == HasFields.class
+                    && !Modifier.isFinal(f.getModifiers())) {
+                    Object random = randomArg(ftype);
+                    f.set(fields, random);
+                    expValue = random;
+                } else {
+                    break;
+                }
+            }
+        } else {
+            for (int i = 0; i <= 1; i++) {
+                Object putValue = randomArg(ftype);
+                if (isStatic) {
+                    if (ftype == int.class)
+                        mh.invokeExact((int)putValue);  // do these exactly
+                    else
+                        mh.invokeExact(putValue);
+                } else {
+                    if (ftype == int.class)
+                        mh.invokeExact((Object) fields, (int)putValue);
+                    else
+                        mh.invokeExact((Object) fields, putValue);
+                }
+                if (f != null && f.getDeclaringClass() == HasFields.class) {
+                    assertEquals(f.get(fields), putValue);
+                }
+            }
+        }
+        if (f != null && f.getDeclaringClass() == HasFields.class) {
+            f.set(fields, value);  // put it back
+        }
+    }
+
+
+    @Test
+    public void testUnreflectSetter() throws Throwable {
+        startTest("unreflectSetter");
+        testSetter(TEST_UNREFLECT);
+    }
+    @Test
+    public void testFindSetter() throws Throwable {
+        startTest("findSetter");
+        testSetter(TEST_FIND_FIELD);
+    }
+    @Test
+    public void testFindStaticSetter() throws Throwable {
+        startTest("findStaticSetter");
+        testSetter(TEST_FIND_STATIC);
+    }
+    public void testSetter(int testMode) throws Throwable {
+        Lookup lookup = PRIVATE;  // FIXME: test more lookups than this one
+        startTest("unreflectSetter");
+        for (Object[] c : HasFields.CASES) {
+            boolean positive = (c[1] != Error.class);
+            testSetter(positive, lookup, c[0], c[1], testMode);
+        }
+        for (int isStaticN = 0; isStaticN <= 1; isStaticN++) {
+            testSetter(false, lookup,
+                       new Object[]{ (isStaticN != 0), System.class, "bogus", char.class },
+                       null, testMode);
+        }
+    }
+    public void testSetter(boolean positive, MethodHandles.Lookup lookup,
+                           Object fieldRef, Object value, int testMode) throws Throwable {
+        testAccessor(positive, lookup, fieldRef, value, testMode | TEST_SETTER);
+    }
+
+    @Test
+    public void testArrayElementGetter() throws Throwable {
+        startTest("arrayElementGetter");
+        testArrayElementGetterSetter(false);
+    }
+
+    @Test
+    public void testArrayElementSetter() throws Throwable {
+        startTest("arrayElementSetter");
+        testArrayElementGetterSetter(true);
+    }
+
+    public void testArrayElementGetterSetter(boolean testSetter) throws Throwable {
+        testArrayElementGetterSetter(new Object[10], testSetter);
+        testArrayElementGetterSetter(new String[10], testSetter);
+        testArrayElementGetterSetter(new boolean[10], testSetter);
+        testArrayElementGetterSetter(new byte[10], testSetter);
+        testArrayElementGetterSetter(new char[10], testSetter);
+        testArrayElementGetterSetter(new short[10], testSetter);
+        testArrayElementGetterSetter(new int[10], testSetter);
+        testArrayElementGetterSetter(new float[10], testSetter);
+        testArrayElementGetterSetter(new long[10], testSetter);
+        testArrayElementGetterSetter(new double[10], testSetter);
+    }
+
+    public void testArrayElementGetterSetter(Object array, boolean testSetter) throws Throwable {
+        countTest(true);
+        if (verbosity >= 2)  System.out.println("array type = "+array.getClass().getComponentType().getName()+"["+Array.getLength(array)+"]");
+        Class<?> arrayType = array.getClass();
+        Class<?> elemType = arrayType.getComponentType();
+        MethodType expType = !testSetter
+                ? MethodType.methodType(elemType,   arrayType, int.class)
+                : MethodType.methodType(void.class, arrayType, int.class, elemType);
+        MethodHandle mh = !testSetter
+                ? MethodHandles.arrayElementGetter(arrayType)
+                : MethodHandles.arrayElementSetter(arrayType);
+        assertSame(mh.type(), expType);
+        if (elemType != int.class && elemType != boolean.class) {
+            MethodType gtype;
+            if (true) { // FIXME: remove this path (and remove <void> below in the mh.invokes)
+                gtype = mh.type().changeParameterType(0, Object.class);
+                if (testSetter)
+                    gtype = gtype.changeParameterType(2, Object.class);
+                else
+                    gtype = gtype.changeReturnType(Object.class);
+            } else
+                // FIXME: This simpler path hits a bug in convertArguments => ToGeneric
+                gtype = mh.type().generic().changeParameterType(1, int.class);
+            mh = MethodHandles.convertArguments(mh, gtype);
+        }
+        Object sawValue, expValue;
+        List<Object> model = array2list(array);
+        int length = Array.getLength(array);
+        for (int i = 0; i < length; i++) {
+            // update array element
+            Object random = randomArg(elemType);
+            model.set(i, random);
+            if (testSetter) {
+                if (elemType == int.class)
+                    mh.invokeExact((int[]) array, i, (int)random);
+                else if (elemType == boolean.class)
+                    mh.invokeExact((boolean[]) array, i, (boolean)random);
+                else
+                    mh.invokeExact(array, i, random);
+                assertEquals(model, array2list(array));
+            } else {
+                Array.set(array, i, random);
+            }
+            if (verbosity >= 5) {
+                List<Object> array2list = array2list(array);
+                System.out.println("a["+i+"]="+random+" => "+array2list);
+                if (!array2list.equals(model))
+                    System.out.println("***   != "+model);
+            }
+            // observe array element
+            sawValue = Array.get(array, i);
+            if (!testSetter) {
+                expValue = sawValue;
+                if (elemType == int.class)
+                    sawValue = (int) mh.invokeExact((int[]) array, i);
+                else if (elemType == boolean.class)
+                    sawValue = (boolean) mh.invokeExact((boolean[]) array, i);
+                else
+                    sawValue = mh.invokeExact(array, i);
+                assertEquals(sawValue, expValue);
+                assertEquals(model, array2list(array));
+            }
+        }
+    }
+
+    List<Object> array2list(Object array) {
+        int length = Array.getLength(array);
+        ArrayList<Object> model = new ArrayList<Object>(length);
+        for (int i = 0; i < length; i++)
+            model.add(Array.get(array, i));
+        return model;
+    }
+
+    static class Callee {
+        static Object id() { return called("id"); }
+        static Object id(Object x) { return called("id", x); }
+        static Object id(Object x, Object y) { return called("id", x, y); }
+        static Object id(Object x, Object y, Object z) { return called("id", x, y, z); }
+        static Object id(Object... vx) { return called("id", vx); }
+        static MethodHandle ofType(int n) {
+            return ofType(Object.class, n);
+        }
+        static MethodHandle ofType(Class<?> rtype, int n) {
+            if (n == -1)
+                return ofType(MethodType.methodType(rtype, Object[].class));
+            return ofType(MethodType.genericMethodType(n).changeReturnType(rtype));
+        }
+        static MethodHandle ofType(Class<?> rtype, Class<?>... ptypes) {
+            return ofType(MethodType.methodType(rtype, ptypes));
+        }
+        static MethodHandle ofType(MethodType type) {
+            Class<?> rtype = type.returnType();
+            String pfx = "";
+            if (rtype != Object.class)
+                pfx = rtype.getSimpleName().substring(0, 1).toLowerCase();
+            String name = pfx+"id";
+            try {
+                return PRIVATE.findStatic(Callee.class, name, type);
+            } catch (Exception ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+    }
+
+    @Test
+    public void testConvertArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("convertArguments");
+        testConvert(Callee.ofType(1), null, "id", int.class);
+        testConvert(Callee.ofType(1), null, "id", String.class);
+        testConvert(Callee.ofType(1), null, "id", Integer.class);
+        testConvert(Callee.ofType(1), null, "id", short.class);
+        testConvert(Callee.ofType(1), null, "id", char.class);
+        testConvert(Callee.ofType(1), null, "id", byte.class);
+    }
+
+    void testConvert(MethodHandle id, Class<?> rtype, String name, Class<?>... params) throws Throwable {
+        testConvert(true, false, id, rtype, name, params);
+        testConvert(true, true,  id, rtype, name, params);
+    }
+
+    void testConvert(boolean positive, boolean useAsType,
+                     MethodHandle id, Class<?> rtype, String name, Class<?>... params) throws Throwable {
+        countTest(positive);
+        MethodType idType = id.type();
+        if (rtype == null)  rtype = idType.returnType();
+        for (int i = 0; i < params.length; i++) {
+            if (params[i] == null)  params[i] = idType.parameterType(i);
+        }
+        // simulate the pairwise conversion
+        MethodType newType = MethodType.methodType(rtype, params);
+        Object[] args = randomArgs(newType.parameterArray());
+        Object[] convArgs = args.clone();
+        for (int i = 0; i < args.length; i++) {
+            Class<?> src = newType.parameterType(i);
+            Class<?> dst = idType.parameterType(i);
+            if (src != dst)
+                convArgs[i] = castToWrapper(convArgs[i], dst);
+        }
+        Object convResult = id.invokeWithArguments(convArgs);
+        {
+            Class<?> dst = newType.returnType();
+            Class<?> src = idType.returnType();
+            if (src != dst)
+                convResult = castToWrapper(convResult, dst);
+        }
+        MethodHandle target = null;
+        RuntimeException error = null;
+        try {
+            if (useAsType)
+                target = id.asType(newType);
+            else
+                target = MethodHandles.convertArguments(id, newType);
+        } catch (RuntimeException ex) {
+            error = ex;
+        }
+        if (verbosity >= 3)
+            System.out.println("convert "+id+ " to "+newType+" => "+target
+                    +(error == null ? "" : " !! "+error));
+        if (positive && error != null)  throw error;
+        assertEquals(positive ? "positive test" : "negative test erroneously passed", positive, target != null);
+        if (!positive)  return; // negative test failed as expected
+        assertEquals(newType, target.type());
+        printCalled(target, id.toString(), args);
+        Object result = target.invokeWithArguments(args);
+        assertCalled(name, convArgs);
+        assertEquals(convResult, result);
+        if (verbosity >= 1)
+            System.out.print(':');
+    }
+
+    @Test
+    public void testVarargsCollector() throws Throwable {
+        MethodHandle vac0 = PRIVATE.findStatic(MethodHandlesTest.class, "called",
+                               MethodType.methodType(Object.class, String.class, Object[].class));
+        vac0 = vac0.bindTo("vac");
+        MethodHandle vac = vac0.asVarargsCollector(Object[].class);
+        testConvert(true,  true,  vac.asType(MethodType.genericMethodType(0)), null, "vac");
+        testConvert(true,  true,  vac.asType(MethodType.genericMethodType(0)), null, "vac");
+        for (Class<?> at : new Class[] { Object.class, String.class, Integer.class }) {
+            testConvert(true,  true,  vac.asType(MethodType.genericMethodType(1)), null, "vac", at);
+            testConvert(true,  true,  vac.asType(MethodType.genericMethodType(2)), null, "vac", at, at);
+        }
+    }
+
+    @Test
+    public void testPermuteArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("permuteArguments");
+        testPermuteArguments(4, Integer.class,  2, String.class,  0);
+        //testPermuteArguments(6, Integer.class,  0, null,         30);
+        //testPermuteArguments(4, Integer.class,  1, int.class,     6);
+    }
+    public void testPermuteArguments(int max, Class<?> type1, int t2c, Class<?> type2, int dilution) throws Throwable {
+        if (verbosity >= 2)
+            System.out.println("permuteArguments "+max+"*"+type1.getName()
+                    +(t2c==0?"":"/"+t2c+"*"+type2.getName())
+                    +(dilution > 0 ? " with dilution "+dilution : ""));
+        int t2pos = t2c == 0 ? 0 : 1;
+        for (int inargs = t2pos+1; inargs <= max; inargs++) {
+            Class<?>[] types = new Class<?>[inargs];
+            Arrays.fill(types, type1);
+            if (t2c != 0) {
+                // Fill in a middle range with type2:
+                Arrays.fill(types, t2pos, Math.min(t2pos+t2c, inargs), type2);
+            }
+            Object[] args = randomArgs(types);
+            int numcases = 1;
+            for (int outargs = 0; outargs <= max; outargs++) {
+                if (outargs - inargs >= MAX_ARG_INCREASE)  continue;
+                int[] reorder = new int[outargs];
+                int casStep = dilution + 1;
+                // Avoid some common factors:
+                while ((casStep > 2 && casStep % 2 == 0 && inargs % 2 == 0) ||
+                       (casStep > 3 && casStep % 3 == 0 && inargs % 3 == 0))
+                    casStep++;
+                for (int cas = 0; cas < numcases; cas += casStep) {
+                    for (int i = 0, c = cas; i < outargs; i++) {
+                        reorder[i] = c % inargs;
+                        c /= inargs;
+                    }
+                    testPermuteArguments(args, types, reorder);
+                }
+                numcases *= inargs;
+                if (dilution > 10 && outargs >= 4) {
+                    // Do some special patterns, which we probably missed.
+                    // Replication of a single argument or argument pair.
+                    for (int i = 0; i < inargs; i++) {
+                        Arrays.fill(reorder, i);
+                        testPermuteArguments(args, types, reorder);
+                        for (int d = 1; d <= 2; d++) {
+                            if (i + d >= inargs)  continue;
+                            for (int j = 1; j < outargs; j += 2)
+                                reorder[j] += 1;
+                            testPermuteArguments(args, types, reorder);
+                            testPermuteArguments(args, types, reverse(reorder));
+                        }
+                    }
+                    // Repetition of a sequence of 3 or more arguments.
+                    for (int i = 1; i < inargs; i++) {
+                        for (int len = 3; len <= inargs; len++) {
+                            for (int j = 0; j < outargs; j++)
+                                reorder[j] = (i + (j % len)) % inargs;
+                            testPermuteArguments(args, types, reorder);
+                            testPermuteArguments(args, types, reverse(reorder));
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    static int[] reverse(int[] reorder) {
+        reorder = reorder.clone();
+        for (int i = 0, imax = reorder.length / 2; i < imax; i++) {
+            int j = reorder.length - 1 - i;
+            int tem = reorder[i];
+            reorder[i] = reorder[j];
+            reorder[j] = tem;
+        }
+        return reorder;
+    }
+
+    void testPermuteArguments(Object[] args, Class<?>[] types, int[] reorder) throws Throwable {
+        countTest();
+        if (args == null && types == null) {
+            int max = 0;
+            for (int j : reorder) {
+                if (max < j)  max = j;
+            }
+            args = randomArgs(max+1, Integer.class);
+        }
+        if (args == null) {
+            args = randomArgs(types);
+        }
+        if (types == null) {
+            types = new Class<?>[args.length];
+            for (int i = 0; i < args.length; i++)
+                types[i] = args[i].getClass();
+        }
+        int inargs = args.length, outargs = reorder.length;
+        assertTrue(inargs == types.length);
+        if (verbosity >= 3)
+            System.out.println("permuteArguments "+Arrays.toString(reorder));
+        Object[] permArgs = new Object[outargs];
+        Class<?>[] permTypes = new Class<?>[outargs];
+        for (int i = 0; i < outargs; i++) {
+            permArgs[i] = args[reorder[i]];
+            permTypes[i] = types[reorder[i]];
+        }
+        if (verbosity >= 4) {
+            System.out.println("in args:   "+Arrays.asList(args));
+            System.out.println("out args:  "+Arrays.asList(permArgs));
+            System.out.println("in types:  "+Arrays.asList(types));
+            System.out.println("out types: "+Arrays.asList(permTypes));
+        }
+        MethodType inType  = MethodType.methodType(Object.class, types);
+        MethodType outType = MethodType.methodType(Object.class, permTypes);
+        MethodHandle target = MethodHandles.convertArguments(varargsList(outargs), outType);
+        MethodHandle newTarget = MethodHandles.permuteArguments(target, inType, reorder);
+        Object result = newTarget.invokeWithArguments(args);
+        Object expected = Arrays.asList(permArgs);
+        assertEquals(expected, result);
+    }
+
+
+    @Test
+    public void testSpreadArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("spreadArguments");
+        for (Class<?> argType : new Class[]{Object.class, Integer.class, int.class}) {
+            if (verbosity >= 3)
+                System.out.println("spreadArguments "+argType);
+            // FIXME: enable _adapter_spread_args and fix Fail_2
+            for (int nargs = 0; nargs < 10; nargs++) {
+                if (argType == int.class && nargs >= 6)  continue; // FIXME Fail_1
+                for (int pos = 0; pos < nargs; pos++) {
+                    if (argType == int.class && pos > 0)  continue; // FIXME Fail_3
+                     testSpreadArguments(argType, pos, nargs);
+                }
+            }
+        }
+    }
+    public void testSpreadArguments(Class<?> argType, int pos, int nargs) throws Throwable {
+        countTest();
+        MethodHandle target = varargsArray(nargs);
+        MethodHandle target2 = changeArgTypes(target, argType);
+        if (verbosity >= 3)
+            System.out.println("spread into "+target2+" ["+pos+".."+nargs+"]");
+        Object[] args = randomArgs(target2.type().parameterArray());
+        // make sure the target does what we think it does:
+        if (pos == 0 && nargs < 5) {
+            Object[] check = (Object[]) target.invokeWithArguments(args);
+            assertArrayEquals(args, check);
+            switch (nargs) {
+                case 0:
+                    check = (Object[]) target.invokeExact();
+                    assertArrayEquals(args, check);
+                    break;
+                case 1:
+                    check = (Object[]) target.invokeExact(args[0]);
+                    assertArrayEquals(args, check);
+                    break;
+                case 2:
+                    check = (Object[]) target.invokeExact(args[0], args[1]);
+                    assertArrayEquals(args, check);
+                    break;
+            }
+        }
+        List<Class<?>> newParams = new ArrayList<Class<?>>(target2.type().parameterList());
+        {   // modify newParams in place
+            List<Class<?>> spreadParams = newParams.subList(pos, nargs);
+            spreadParams.clear(); spreadParams.add(Object[].class);
+        }
+        MethodType newType = MethodType.methodType(Object.class, newParams);
+        MethodHandle result = target2.asSpreader(Object[].class, nargs-pos).asType(newType);
+        Object[] returnValue;
+        if (pos == 0) {
+            // In the following line, the first cast implies
+            // normal Object return value for the MH call (Object[])->Object,
+            // while the second cast dynamically converts to an Object array.
+            // Such a double cast is typical of MH.invokeExact.
+            returnValue = (Object[]) (Object) result.invokeExact(args);
+        } else {
+            Object[] args1 = Arrays.copyOfRange(args, 0, pos+1);
+            args1[pos] = Arrays.copyOfRange(args, pos, args.length);
+            returnValue = (Object[]) result.invokeWithArguments(args1);
+        }
+        assertArrayEquals(args, returnValue);
+    }
+
+    @Test
+    public void testCollectArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("collectArguments");
+        for (Class<?> argType : new Class[]{Object.class, Integer.class, int.class}) {
+            if (verbosity >= 3)
+                System.out.println("collectArguments "+argType);
+            for (int nargs = 0; nargs < 10; nargs++) {
+                for (int pos = 0; pos < nargs; pos++) {
+                    if (argType == int.class)  continue; // FIXME Fail_4
+                    testCollectArguments(argType, pos, nargs);
+                }
+            }
+        }
+    }
+    public void testCollectArguments(Class<?> argType, int pos, int nargs) throws Throwable {
+        countTest();
+        // fake up a MH with the same type as the desired adapter:
+        MethodHandle fake = varargsArray(nargs);
+        fake = changeArgTypes(fake, argType);
+        MethodType newType = fake.type();
+        Object[] args = randomArgs(newType.parameterArray());
+        // here is what should happen:
+        Object[] collectedArgs = Arrays.copyOfRange(args, 0, pos+1);
+        collectedArgs[pos] = Arrays.copyOfRange(args, pos, args.length);
+        // here is the MH which will witness the collected argument tail:
+        MethodHandle target = varargsArray(pos+1);
+        target = changeArgTypes(target, 0, pos, argType);
+        target = changeArgTypes(target, pos, pos+1, Object[].class);
+        if (verbosity >= 3)
+            System.out.println("collect from "+Arrays.asList(args)+" ["+pos+".."+nargs+"]");
+        MethodHandle result = target.asCollector(Object[].class, nargs-pos).asType(newType);
+        Object[] returnValue = (Object[]) result.invokeWithArguments(args);
+//        assertTrue(returnValue.length == pos+1 && returnValue[pos] instanceof Object[]);
+//        returnValue[pos] = Arrays.asList((Object[]) returnValue[pos]);
+//        collectedArgs[pos] = Arrays.asList((Object[]) collectedArgs[pos]);
+        assertArrayEquals(collectedArgs, returnValue);
+    }
+
+    @Test
+    public void testInsertArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("insertArguments");
+        for (int nargs = 0; nargs <= 4; nargs++) {
+            for (int ins = 0; ins <= 4; ins++) {
+                if (ins > MAX_ARG_INCREASE)  continue;  // FIXME Fail_6
+                for (int pos = 0; pos <= nargs; pos++) {
+                    testInsertArguments(nargs, pos, ins);
+                }
+            }
+        }
+    }
+
+    void testInsertArguments(int nargs, int pos, int ins) throws Throwable {
+        countTest();
+        MethodHandle target = varargsArray(nargs + ins);
+        Object[] args = randomArgs(target.type().parameterArray());
+        List<Object> resList = Arrays.asList(args);
+        List<Object> argsToPass = new ArrayList<Object>(resList);
+        List<Object> argsToInsert = argsToPass.subList(pos, pos + ins);
+        if (verbosity >= 3)
+            System.out.println("insert: "+argsToInsert+" into "+target);
+        MethodHandle target2 = MethodHandles.insertArguments(target, pos,
+                (Object[]) argsToInsert.toArray());
+        argsToInsert.clear();  // remove from argsToInsert
+        Object res2 = target2.invokeWithArguments(argsToPass);
+        Object res2List = Arrays.asList((Object[])res2);
+        if (verbosity >= 3)
+            System.out.println("result: "+res2List);
+        //if (!resList.equals(res2List))
+        //    System.out.println("*** fail at n/p/i = "+nargs+"/"+pos+"/"+ins+": "+resList+" => "+res2List);
+        assertEquals(resList, res2List);
+    }
+
+    @Test
+    public void testFilterReturnValue() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("filterReturnValue");
+        Class<?> classOfVCList = varargsList(1).invokeWithArguments(0).getClass();
+        assertTrue(List.class.isAssignableFrom(classOfVCList));
+        for (int nargs = 0; nargs <= 3; nargs++) {
+            for (Class<?> rtype : new Class[] { Object.class,
+                                                List.class,
+                                                int.class,
+                                                //byte.class, //FIXME: add this
+                                                //long.class, //FIXME: add this
+                                                CharSequence.class,
+                                                String.class }) {
+                testFilterReturnValue(nargs, rtype);
+            }
+        }
+    }
+
+    void testFilterReturnValue(int nargs, Class<?> rtype) throws Throwable {
+        countTest();
+        MethodHandle target = varargsList(nargs, rtype);
+        MethodHandle filter;
+        if (List.class.isAssignableFrom(rtype) || rtype.isAssignableFrom(List.class))
+            filter = varargsList(1);  // add another layer of list-ness
+        else
+            filter = MethodHandles.identity(rtype);
+        filter = filter.asType(MethodType.methodType(target.type().returnType(), rtype));
+        Object[] argsToPass = randomArgs(nargs, Object.class);
+        if (verbosity >= 3)
+            System.out.println("filter "+target+" to "+rtype.getSimpleName()+" with "+filter);
+        MethodHandle target2 = MethodHandles.filterReturnValue(target, filter);
+        if (verbosity >= 4)
+            System.out.println("filtered target: "+target2);
+        // Simulate expected effect of filter on return value:
+        Object unfiltered = target.invokeWithArguments(argsToPass);
+        Object expected = filter.invokeWithArguments(unfiltered);
+        if (verbosity >= 4)
+            System.out.println("unfiltered: "+unfiltered+" : "+unfiltered.getClass().getSimpleName());
+        if (verbosity >= 4)
+            System.out.println("expected: "+expected+" : "+expected.getClass().getSimpleName());
+        Object result = target2.invokeWithArguments(argsToPass);
+        if (verbosity >= 3)
+            System.out.println("result: "+result+" : "+result.getClass().getSimpleName());
+        if (!expected.equals(result))
+            System.out.println("*** fail at n/rt = "+nargs+"/"+rtype.getSimpleName()+": "+Arrays.asList(argsToPass)+" => "+result+" != "+expected);
+        assertEquals(expected, result);
+    }
+
+    @Test
+    public void testFilterArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("filterArguments");
+        for (int nargs = 1; nargs <= 6; nargs++) {
+            for (int pos = 0; pos < nargs; pos++) {
+                testFilterArguments(nargs, pos);
+            }
+        }
+    }
+
+    void testFilterArguments(int nargs, int pos) throws Throwable {
+        countTest();
+        MethodHandle target = varargsList(nargs);
+        MethodHandle filter = varargsList(1);
+        filter = MethodHandles.convertArguments(filter, filter.type().generic());
+        Object[] argsToPass = randomArgs(nargs, Object.class);
+        if (verbosity >= 3)
+            System.out.println("filter "+target+" at "+pos+" with "+filter);
+        MethodHandle target2 = MethodHandles.filterArguments(target, pos, filter);
+        // Simulate expected effect of filter on arglist:
+        Object[] filteredArgs = argsToPass.clone();
+        filteredArgs[pos] = filter.invokeExact(filteredArgs[pos]);
+        List<Object> expected = Arrays.asList(filteredArgs);
+        Object result = target2.invokeWithArguments(argsToPass);
+        if (verbosity >= 3)
+            System.out.println("result: "+result);
+        if (!expected.equals(result))
+            System.out.println("*** fail at n/p = "+nargs+"/"+pos+": "+Arrays.asList(argsToPass)+" => "+result+" != "+expected);
+        assertEquals(expected, result);
+    }
+
+    @Test
+    public void testFoldArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("foldArguments");
+        for (int nargs = 0; nargs <= 4; nargs++) {
+            for (int fold = 0; fold <= nargs; fold++) {
+                for (int pos = 0; pos <= nargs; pos++) {
+                    testFoldArguments(nargs, pos, fold);
+                }
+            }
+        }
+    }
+
+    void testFoldArguments(int nargs, int pos, int fold) throws Throwable {
+        if (pos != 0)  return;  // can fold only at pos=0 for now
+        countTest();
+        MethodHandle target = varargsList(1 + nargs);
+        MethodHandle combine = varargsList(fold).asType(MethodType.genericMethodType(fold));
+        List<Object> argsToPass = Arrays.asList(randomArgs(nargs, Object.class));
+        if (verbosity >= 3)
+            System.out.println("fold "+target+" with "+combine);
+        MethodHandle target2 = MethodHandles.foldArguments(target, combine);
+        // Simulate expected effect of combiner on arglist:
+        List<Object> expected = new ArrayList<Object>(argsToPass);
+        List<Object> argsToFold = expected.subList(pos, pos + fold);
+        if (verbosity >= 3)
+            System.out.println("fold: "+argsToFold+" into "+target2);
+        Object foldedArgs = combine.invokeWithArguments(argsToFold);
+        argsToFold.add(0, foldedArgs);
+        Object result = target2.invokeWithArguments(argsToPass);
+        if (verbosity >= 3)
+            System.out.println("result: "+result);
+        if (!expected.equals(result))
+            System.out.println("*** fail at n/p/f = "+nargs+"/"+pos+"/"+fold+": "+argsToPass+" => "+result+" != "+expected);
+        assertEquals(expected, result);
+    }
+
+    @Test
+    public void testDropArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("dropArguments");
+        for (int nargs = 0; nargs <= 4; nargs++) {
+            for (int drop = 1; drop <= 4; drop++) {
+                for (int pos = 0; pos <= nargs; pos++) {
+                    testDropArguments(nargs, pos, drop);
+                }
+            }
+        }
+    }
+
+    void testDropArguments(int nargs, int pos, int drop) throws Throwable {
+        countTest();
+        MethodHandle target = varargsArray(nargs);
+        Object[] args = randomArgs(target.type().parameterArray());
+        MethodHandle target2 = MethodHandles.dropArguments(target, pos,
+                Collections.nCopies(drop, Object.class).toArray(new Class[0]));
+        List<Object> resList = Arrays.asList(args);
+        List<Object> argsToDrop = new ArrayList<Object>(resList);
+        for (int i = drop; i > 0; i--) {
+            argsToDrop.add(pos, "blort#"+i);
+        }
+        Object res2 = target2.invokeWithArguments(argsToDrop);
+        Object res2List = Arrays.asList((Object[])res2);
+        //if (!resList.equals(res2List))
+        //    System.out.println("*** fail at n/p/d = "+nargs+"/"+pos+"/"+drop+": "+argsToDrop+" => "+res2List);
+        assertEquals(resList, res2List);
+    }
+
+    @Test
+    public void testInvokers() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("exactInvoker, genericInvoker, varargsInvoker, dynamicInvoker");
+        // exactInvoker, genericInvoker, varargsInvoker[0..N], dynamicInvoker
+        Set<MethodType> done = new HashSet<MethodType>();
+        for (int i = 0; i <= 6; i++) {
+            MethodType gtype = MethodType.genericMethodType(i);
+            for (Class<?> argType : new Class[]{Object.class, Integer.class, int.class}) {
+                for (int j = -1; j < i; j++) {
+                    MethodType type = gtype;
+                    if (j < 0)
+                        type = type.changeReturnType(argType);
+                    else if (argType == void.class)
+                        continue;
+                    else
+                        type = type.changeParameterType(j, argType);
+                    if (argType.isPrimitive() && j != i-1)  continue; // FIXME Fail_5
+                    if (done.add(type))
+                        testInvokers(type);
+                    MethodType vtype = type.changeReturnType(void.class);
+                    if (done.add(vtype))
+                        testInvokers(vtype);
+                }
+            }
+        }
+    }
+
+    public void testInvokers(MethodType type) throws Throwable {
+        if (verbosity >= 3)
+            System.out.println("test invokers for "+type);
+        int nargs = type.parameterCount();
+        boolean testRetCode = type.returnType() != void.class;
+        MethodHandle target = PRIVATE.findStatic(MethodHandlesTest.class, "invokee",
+                                MethodType.genericMethodType(0, true));
+        assertTrue(target.isVarargsCollector());
+        target = target.asType(type);
+        Object[] args = randomArgs(type.parameterArray());
+        List<Object> targetPlusArgs = new ArrayList<Object>(Arrays.asList(args));
+        targetPlusArgs.add(0, target);
+        int code = (Integer) invokee(args);
+        Object log = logEntry("invokee", args);
+        assertEquals(log.hashCode(), code);
+        assertCalled("invokee", args);
+        MethodHandle inv;
+        Object result;
+        // exact invoker
+        countTest();
+        calledLog.clear();
+        inv = MethodHandles.exactInvoker(type);
+        result = inv.invokeWithArguments(targetPlusArgs);
+        if (testRetCode)  assertEquals(code, result);
+        assertCalled("invokee", args);
+        // generic invoker
+        countTest();
+        inv = MethodHandles.genericInvoker(type);
+        if (nargs <= 3) {
+            calledLog.clear();
+            switch (nargs) {
+            case 0:
+                result = inv.invokeExact(target);
+                break;
+            case 1:
+                result = inv.invokeExact(target, args[0]);
+                break;
+            case 2:
+                result = inv.invokeExact(target, args[0], args[1]);
+                break;
+            case 3:
+                result = inv.invokeExact(target, args[0], args[1], args[2]);
+                break;
+            }
+            if (testRetCode)  assertEquals(code, result);
+            assertCalled("invokee", args);
+        }
+        calledLog.clear();
+        result = inv.invokeWithArguments(targetPlusArgs);
+        if (testRetCode)  assertEquals(code, result);
+        assertCalled("invokee", args);
+        // varargs invoker #0
+        calledLog.clear();
+        inv = MethodHandles.spreadInvoker(type, 0);
+        result = inv.invokeExact(target, args);
+        if (testRetCode)  assertEquals(code, result);
+        assertCalled("invokee", args);
+        if (nargs >= 1) {
+            // varargs invoker #1
+            calledLog.clear();
+            inv = MethodHandles.spreadInvoker(type, 1);
+            result = inv.invokeExact(target, args[0], Arrays.copyOfRange(args, 1, nargs));
+            if (testRetCode)  assertEquals(code, result);
+            assertCalled("invokee", args);
+        }
+        if (nargs >= 2) {
+            // varargs invoker #2
+            calledLog.clear();
+            inv = MethodHandles.spreadInvoker(type, 2);
+            result = inv.invokeExact(target, args[0], args[1], Arrays.copyOfRange(args, 2, nargs));
+            if (testRetCode)  assertEquals(code, result);
+            assertCalled("invokee", args);
+        }
+        if (nargs >= 3) {
+            // varargs invoker #3
+            calledLog.clear();
+            inv = MethodHandles.spreadInvoker(type, 3);
+            result = inv.invokeExact(target, args[0], args[1], args[2], Arrays.copyOfRange(args, 3, nargs));
+            if (testRetCode)  assertEquals(code, result);
+            assertCalled("invokee", args);
+        }
+        for (int k = 0; k <= nargs; k++) {
+            // varargs invoker #0..N
+            countTest();
+            calledLog.clear();
+            inv = MethodHandles.spreadInvoker(type, k);
+            List<Object> targetPlusVarArgs = new ArrayList<Object>(targetPlusArgs);
+            List<Object> tailList = targetPlusVarArgs.subList(1+k, 1+nargs);
+            Object[] tail = tailList.toArray();
+            tailList.clear(); tailList.add(tail);
+            result = inv.invokeWithArguments(targetPlusVarArgs);
+            if (testRetCode)  assertEquals(code, result);
+            assertCalled("invokee", args);
+        }
+
+        // dynamic invoker
+        countTest();
+        CallSite site = new MutableCallSite(type);
+        inv = site.dynamicInvoker();
+
+        // see if we get the result of the original target:
+        try {
+            result = inv.invokeWithArguments(args);
+            assertTrue("should not reach here", false);
+        } catch (IllegalStateException ex) {
+            String msg = ex.getMessage();
+            assertTrue(msg, msg.contains("site"));
+        }
+
+        // set new target after invoker is created, to make sure we track target
+        site.setTarget(target);
+        calledLog.clear();
+        result = inv.invokeWithArguments(args);
+        if (testRetCode)  assertEquals(code, result);
+        assertCalled("invokee", args);
+    }
+
+    static Object invokee(Object... args) {
+        return called("invokee", args).hashCode();
+    }
+
+    private static final String MISSING_ARG = "missingArg";
+    static Object targetIfEquals() {
+        return called("targetIfEquals");
+    }
+    static Object fallbackIfNotEquals() {
+        return called("fallbackIfNotEquals");
+    }
+    static Object targetIfEquals(Object x) {
+        assertEquals(x, MISSING_ARG);
+        return called("targetIfEquals", x);
+    }
+    static Object fallbackIfNotEquals(Object x) {
+        assertFalse(x.toString(), x.equals(MISSING_ARG));
+        return called("fallbackIfNotEquals", x);
+    }
+    static Object targetIfEquals(Object x, Object y) {
+        assertEquals(x, y);
+        return called("targetIfEquals", x, y);
+    }
+    static Object fallbackIfNotEquals(Object x, Object y) {
+        assertFalse(x.toString(), x.equals(y));
+        return called("fallbackIfNotEquals", x, y);
+    }
+    static Object targetIfEquals(Object x, Object y, Object z) {
+        assertEquals(x, y);
+        return called("targetIfEquals", x, y, z);
+    }
+    static Object fallbackIfNotEquals(Object x, Object y, Object z) {
+        assertFalse(x.toString(), x.equals(y));
+        return called("fallbackIfNotEquals", x, y, z);
+    }
+
+    @Test
+    public void testGuardWithTest() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("guardWithTest");
+        for (int nargs = 0; nargs <= 3; nargs++) {
+            if (nargs != 2)  continue;  // FIXME: test more later
+            testGuardWithTest(nargs, Object.class);
+            testGuardWithTest(nargs, String.class);
+        }
+    }
+    void testGuardWithTest(int nargs, Class<?> argClass) throws Throwable {
+        countTest();
+        MethodHandle test = PRIVATE.findVirtual(Object.class, "equals", MethodType.methodType(boolean.class, Object.class));
+        MethodHandle target = PRIVATE.findStatic(MethodHandlesTest.class, "targetIfEquals", MethodType.genericMethodType(nargs));
+        MethodHandle fallback = PRIVATE.findStatic(MethodHandlesTest.class, "fallbackIfNotEquals", MethodType.genericMethodType(nargs));
+        while (test.type().parameterCount() < nargs)
+            test = MethodHandles.dropArguments(test, test.type().parameterCount()-1, Object.class);
+        while (test.type().parameterCount() > nargs)
+            test = MethodHandles.insertArguments(test, 0, MISSING_ARG);
+        if (argClass != Object.class) {
+            test = changeArgTypes(test, argClass);
+            target = changeArgTypes(target, argClass);
+            fallback = changeArgTypes(fallback, argClass);
+        }
+        MethodHandle mh = MethodHandles.guardWithTest(test, target, fallback);
+        assertEquals(target.type(), mh.type());
+        Object[][] argLists = {
+            { },
+            { "foo" }, { MISSING_ARG },
+            { "foo", "foo" }, { "foo", "bar" },
+            { "foo", "foo", "baz" }, { "foo", "bar", "baz" }
+        };
+        for (Object[] argList : argLists) {
+            if (argList.length != nargs)  continue;
+            boolean equals;
+            switch (nargs) {
+            case 0:   equals = true; break;
+            case 1:   equals = MISSING_ARG.equals(argList[0]); break;
+            default:  equals = argList[0].equals(argList[1]); break;
+            }
+            String willCall = (equals ? "targetIfEquals" : "fallbackIfNotEquals");
+            if (verbosity >= 3)
+                System.out.println(logEntry(willCall, argList));
+            Object result = mh.invokeWithArguments(argList);
+            assertCalled(willCall, argList);
+        }
+    }
+
+    @Test
+    public void testCatchException() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("catchException");
+        for (int nargs = 2; nargs <= 6; nargs++) {
+            for (int ti = 0; ti <= 1; ti++) {
+                boolean throwIt = (ti != 0);
+                testCatchException(int.class, new ClassCastException("testing"), throwIt, nargs);
+                testCatchException(void.class, new java.io.IOException("testing"), throwIt, nargs);
+                testCatchException(String.class, new LinkageError("testing"), throwIt, nargs);
+            }
+        }
+    }
+
+    private static <T extends Throwable>
+    Object throwOrReturn(Object normal, T exception) throws T {
+        if (exception != null)  throw exception;
+        return normal;
+    }
+
+    void testCatchException(Class<?> returnType, Throwable thrown, boolean throwIt, int nargs) throws Throwable {
+        countTest();
+        if (verbosity >= 3)
+            System.out.println("catchException rt="+returnType+" throw="+throwIt+" nargs="+nargs);
+        Class<? extends Throwable> exType = thrown.getClass();
+        MethodHandle throwOrReturn
+                = PRIVATE.findStatic(MethodHandlesTest.class, "throwOrReturn",
+                    MethodType.methodType(Object.class, Object.class, Throwable.class));
+        MethodHandle thrower = throwOrReturn.asType(MethodType.genericMethodType(2));
+        while (thrower.type().parameterCount() < nargs)
+            thrower = MethodHandles.dropArguments(thrower, thrower.type().parameterCount(), Object.class);
+        MethodHandle catcher = varargsList(1+nargs).asType(MethodType.genericMethodType(1+nargs));
+        MethodHandle target = MethodHandles.catchException(thrower,
+                thrown.getClass(), catcher);
+        assertEquals(thrower.type(), target.type());
+        //System.out.println("catching with "+target+" : "+throwOrReturn);
+        Object[] args = randomArgs(nargs, Object.class);
+        args[1] = (throwIt ? thrown : null);
+        Object returned = target.invokeWithArguments(args);
+        //System.out.println("return from "+target+" : "+returned);
+        if (!throwIt) {
+            assertSame(args[0], returned);
+        } else {
+            List<Object> catchArgs = new ArrayList<Object>(Arrays.asList(args));
+            catchArgs.add(0, thrown);
+            assertEquals(catchArgs, returned);
+        }
+    }
+
+    @Test
+    public void testThrowException() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("throwException");
+        testThrowException(int.class, new ClassCastException("testing"));
+        testThrowException(void.class, new java.io.IOException("testing"));
+        testThrowException(String.class, new LinkageError("testing"));
+    }
+
+    void testThrowException(Class<?> returnType, Throwable thrown) throws Throwable {
+        countTest();
+        Class<? extends Throwable> exType = thrown.getClass();
+        MethodHandle target = MethodHandles.throwException(returnType, exType);
+        //System.out.println("throwing with "+target+" : "+thrown);
+        MethodType expectedType = MethodType.methodType(returnType, exType);
+        assertEquals(expectedType, target.type());
+        target = MethodHandles.convertArguments(target, target.type().generic());
+        Throwable caught = null;
+        try {
+            Object res = target.invokeExact((Object) thrown);
+            fail("got "+res+" instead of throwing "+thrown);
+        } catch (Throwable ex) {
+            if (ex != thrown) {
+                if (ex instanceof Error)  throw (Error)ex;
+                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
+            }
+            caught = ex;
+        }
+        assertSame(thrown, caught);
+    }
+
+    @Test
+    public void testCastFailure() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("testCastFailure");
+        testCastFailure("cast/argument", 11000);
+        testCastFailure("unbox/argument", 11000);
+        testCastFailure("cast/return", 11000);
+        testCastFailure("unbox/return", 11000);
+    }
+
+    static class Surprise {
+        public MethodHandle asMethodHandle() {
+            return VALUE.bindTo(this);
+        }
+        Object value(Object x) {
+            trace("value", x);
+            if (boo != null)  return boo;
+            return x;
+        }
+        Object boo;
+        void boo(Object x) { boo = x; }
+
+        static void trace(String x, Object y) {
+            if (verbosity > 8) System.out.println(x+"="+y);
+        }
+        static Object  refIdentity(Object x)  { trace("ref.x", x); return x; }
+        static Integer boxIdentity(Integer x) { trace("box.x", x); return x; }
+        static int     intIdentity(int x)     { trace("int.x", x); return x; }
+        static MethodHandle VALUE, REF_IDENTITY, BOX_IDENTITY, INT_IDENTITY;
+        static {
+            try {
+                VALUE = PRIVATE.findVirtual(
+                    Surprise.class, "value",
+                        MethodType.methodType(Object.class, Object.class));
+                REF_IDENTITY = PRIVATE.findStatic(
+                    Surprise.class, "refIdentity",
+                        MethodType.methodType(Object.class, Object.class));
+                BOX_IDENTITY = PRIVATE.findStatic(
+                    Surprise.class, "boxIdentity",
+                        MethodType.methodType(Integer.class, Integer.class));
+                INT_IDENTITY = PRIVATE.findStatic(
+                    Surprise.class, "intIdentity",
+                        MethodType.methodType(int.class, int.class));
+            } catch (Exception ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+    }
+
+    void testCastFailure(String mode, int okCount) throws Throwable {
+        countTest(false);
+        if (verbosity > 2)  System.out.println("mode="+mode);
+        Surprise boo = new Surprise();
+        MethodHandle identity = Surprise.REF_IDENTITY, surprise0 = boo.asMethodHandle(), surprise = surprise0;
+        if (mode.endsWith("/return")) {
+            if (mode.equals("unbox/return")) {
+                // fail on return to ((Integer)surprise).intValue
+                surprise = MethodHandles.convertArguments(surprise, MethodType.methodType(int.class, Object.class));
+                identity = MethodHandles.convertArguments(identity, MethodType.methodType(int.class, Object.class));
+            } else if (mode.equals("cast/return")) {
+                // fail on return to (Integer)surprise
+                surprise = MethodHandles.convertArguments(surprise, MethodType.methodType(Integer.class, Object.class));
+                identity = MethodHandles.convertArguments(identity, MethodType.methodType(Integer.class, Object.class));
+            }
+        } else if (mode.endsWith("/argument")) {
+            MethodHandle callee = null;
+            if (mode.equals("unbox/argument")) {
+                // fail on handing surprise to int argument
+                callee = Surprise.INT_IDENTITY;
+            } else if (mode.equals("cast/argument")) {
+                // fail on handing surprise to Integer argument
+                callee = Surprise.BOX_IDENTITY;
+            }
+            if (callee != null) {
+                callee = MethodHandles.convertArguments(callee, MethodType.genericMethodType(1));
+                surprise = MethodHandles.filterArguments(callee, 0, surprise);
+                identity = MethodHandles.filterArguments(callee, 0, identity);
+            }
+        }
+        assertNotSame(mode, surprise, surprise0);
+        identity = MethodHandles.convertArguments(identity, MethodType.genericMethodType(1));
+        surprise = MethodHandles.convertArguments(surprise, MethodType.genericMethodType(1));
+        Object x = 42;
+        for (int i = 0; i < okCount; i++) {
+            Object y = identity.invokeExact(x);
+            assertEquals(x, y);
+            Object z = surprise.invokeExact(x);
+            assertEquals(x, z);
+        }
+        boo.boo("Boo!");
+        Object y = identity.invokeExact(x);
+        assertEquals(x, y);
+        try {
+            Object z = surprise.invokeExact(x);
+            System.out.println("Failed to throw; got z="+z);
+            assertTrue(false);
+        } catch (Exception ex) {
+            if (verbosity > 2)
+                System.out.println("caught "+ex);
+            if (verbosity > 3)
+                ex.printStackTrace();
+            assertTrue(ex instanceof ClassCastException
+                    // FIXME: accept only one of the two for any given unit test
+                    || ex instanceof WrongMethodTypeException
+                    );
+        }
+    }
+
+    static Example userMethod(Object o, String s, int i) {
+        called("userMethod", o, s, i);
+        return null;
+    }
+
+    @Test
+    public void testUserClassInSignature() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("testUserClassInSignature");
+        Lookup lookup = MethodHandles.lookup();
+        String name; MethodType mt; MethodHandle mh;
+        Object[] args;
+
+        // Try a static method.
+        name = "userMethod";
+        mt = MethodType.methodType(Example.class, Object.class, String.class, int.class);
+        mh = lookup.findStatic(lookup.lookupClass(), name, mt);
+        assertEquals(mt, mh.type());
+        assertEquals(Example.class, mh.type().returnType());
+        args = randomArgs(mh.type().parameterArray());
+        mh.invokeWithArguments(args);
+        assertCalled(name, args);
+
+        // Try a virtual method.
+        name = "v2";
+        mt = MethodType.methodType(Object.class, Object.class, int.class);
+        mh = lookup.findVirtual(Example.class, name, mt);
+        assertEquals(mt, mh.type().dropParameterTypes(0,1));
+        assertTrue(mh.type().parameterList().contains(Example.class));
+        args = randomArgs(mh.type().parameterArray());
+        mh.invokeWithArguments(args);
+        assertCalled(name, args);
+    }
+
+    static void runForRunnable() {
+        called("runForRunnable");
+    }
+    private interface Fooable {
+        Object foo(Fooable x, Object y);
+        // this is for randomArg:
+        public class Impl implements Fooable {
+            public Object foo(Fooable x, Object y) {
+                throw new RuntimeException("do not call");
+            }
+            final String name;
+            public Impl() { name = "Fooable#"+nextArg(); }
+            @Override public String toString() { return name; }
+        }
+    }
+    static Object fooForFooable(Fooable x, Object y) {
+        return called("fooForFooable", x, y);
+    }
+    private static class MyCheckedException extends Exception {
+    }
+    private interface WillThrow {
+        void willThrow() throws MyCheckedException;
+    }
+
+    @Test
+    public void testAsInstance() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        Lookup lookup = MethodHandles.lookup();
+        {
+            MethodType mt = MethodType.methodType(void.class);
+            MethodHandle mh = lookup.findStatic(MethodHandlesTest.class, "runForRunnable", mt);
+            Runnable proxy = MethodHandles.asInstance(mh, Runnable.class);
+            proxy.run();
+            assertCalled("runForRunnable");
+        }
+        {
+            MethodType mt = MethodType.methodType(Object.class, Fooable.class, Object.class);
+            MethodHandle mh = lookup.findStatic(MethodHandlesTest.class, "fooForFooable", mt);
+            Fooable proxy = MethodHandles.asInstance(mh, Fooable.class);
+            Object[] args = randomArgs(mt.parameterArray());
+            Object result = proxy.foo((Fooable) args[0], args[1]);
+            assertCalled("fooForFooable", args);
+            assertEquals(result, logEntry("fooForFooable", args));
+        }
+        for (Throwable ex : new Throwable[] { new NullPointerException("ok"),
+                                              new InternalError("ok"),
+                                              new Throwable("fail"),
+                                              new Exception("fail"),
+                                              new MyCheckedException()
+                                            }) {
+            MethodHandle mh = MethodHandles.throwException(void.class, Throwable.class);
+            mh = MethodHandles.insertArguments(mh, 0, ex);
+            WillThrow proxy = MethodHandles.asInstance(mh, WillThrow.class);
+            try {
+                proxy.willThrow();
+                System.out.println("Failed to throw: "+ex);
+                assertTrue(false);
+            } catch (Throwable ex1) {
+                if (verbosity > 2) {
+                    System.out.println("throw "+ex);
+                    System.out.println("catch "+(ex == ex1 ? "UNWRAPPED" : ex1));
+                }
+                if (ex instanceof RuntimeException ||
+                    ex instanceof Error) {
+                    assertSame("must pass unchecked exception out without wrapping", ex, ex1);
+                } else if (ex instanceof MyCheckedException) {
+                    assertSame("must pass declared exception out without wrapping", ex, ex1);
+                } else {
+                    assertNotSame("must pass undeclared checked exception with wrapping", ex, ex1);
+                    UndeclaredThrowableException utex = (UndeclaredThrowableException) ex1;
+                    assertSame(ex, utex.getCause());
+                }
+            }
+        }
+        // Test error checking:
+        for (Class<?> nonSAM : new Class[] { Object.class,
+                                             String.class,
+                                             CharSequence.class,
+                                             Example.class }) {
+            try {
+                MethodHandles.asInstance(varargsArray(0), nonSAM);
+                System.out.println("Failed to throw");
+                assertTrue(false);
+            } catch (IllegalArgumentException ex) {
+            }
+        }
+    }
+}
+// Local abbreviated copy of sun.invoke.util.ValueConversions
+class ValueConversions {
+    private static final Lookup IMPL_LOOKUP = MethodHandles.lookup();
+    private static final Object[] NO_ARGS_ARRAY = {};
+    private static Object[] makeArray(Object... args) { return args; }
+    private static Object[] array() { return NO_ARGS_ARRAY; }
+    private static Object[] array(Object a0)
+                { return makeArray(a0); }
+    private static Object[] array(Object a0, Object a1)
+                { return makeArray(a0, a1); }
+    private static Object[] array(Object a0, Object a1, Object a2)
+                { return makeArray(a0, a1, a2); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3)
+                { return makeArray(a0, a1, a2, a3); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4)
+                { return makeArray(a0, a1, a2, a3, a4); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5)
+                { return makeArray(a0, a1, a2, a3, a4, a5); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6, Object a7)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6, Object a7,
+                                  Object a8)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+    private static Object[] array(Object a0, Object a1, Object a2, Object a3,
+                                  Object a4, Object a5, Object a6, Object a7,
+                                  Object a8, Object a9)
+                { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+    static MethodHandle[] makeArrays() {
+        ArrayList<MethodHandle> arrays = new ArrayList<MethodHandle>();
+        MethodHandles.Lookup lookup = IMPL_LOOKUP;
+        for (;;) {
+            int nargs = arrays.size();
+            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(Object[].class);
+            String name = "array";
+            MethodHandle array = null;
+            try {
+                array = lookup.findStatic(ValueConversions.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+                // break from loop!
+            }
+            if (array == null)  break;
+            arrays.add(array);
+        }
+        assertTrue(arrays.size() == 11);  // current number of methods
+        return arrays.toArray(new MethodHandle[0]);
+    }
+    static final MethodHandle[] ARRAYS = makeArrays();
+
+    /** Return a method handle that takes the indicated number of Object
+     *  arguments and returns an Object array of them, as if for varargs.
+     */
+    public static MethodHandle varargsArray(int nargs) {
+        if (nargs < ARRAYS.length)
+            return ARRAYS[nargs];
+        // else need to spin bytecode or do something else fancy
+        throw new UnsupportedOperationException("NYI: cannot form a varargs array of length "+nargs);
+    }
+
+    private static final List<Object> NO_ARGS_LIST = Arrays.asList(NO_ARGS_ARRAY);
+    private static List<Object> makeList(Object... args) { return Arrays.asList(args); }
+    private static List<Object> list() { return NO_ARGS_LIST; }
+    private static List<Object> list(Object a0)
+                { return makeList(a0); }
+    private static List<Object> list(Object a0, Object a1)
+                { return makeList(a0, a1); }
+    private static List<Object> list(Object a0, Object a1, Object a2)
+                { return makeList(a0, a1, a2); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3)
+                { return makeList(a0, a1, a2, a3); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4)
+                { return makeList(a0, a1, a2, a3, a4); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5)
+                { return makeList(a0, a1, a2, a3, a4, a5); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6, Object a7)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6, Object a7,
+                                     Object a8)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
+    private static List<Object> list(Object a0, Object a1, Object a2, Object a3,
+                                     Object a4, Object a5, Object a6, Object a7,
+                                     Object a8, Object a9)
+                { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+    static MethodHandle[] makeLists() {
+        ArrayList<MethodHandle> lists = new ArrayList<MethodHandle>();
+        MethodHandles.Lookup lookup = IMPL_LOOKUP;
+        for (;;) {
+            int nargs = lists.size();
+            MethodType type = MethodType.genericMethodType(nargs).changeReturnType(List.class);
+            String name = "list";
+            MethodHandle list = null;
+            try {
+                list = lookup.findStatic(ValueConversions.class, name, type);
+            } catch (ReflectiveOperationException ex) {
+                // break from loop!
+            }
+            if (list == null)  break;
+            lists.add(list);
+        }
+        assertTrue(lists.size() == 11);  // current number of methods
+        return lists.toArray(new MethodHandle[0]);
+    }
+    static final MethodHandle[] LISTS = makeLists();
+
+    /** Return a method handle that takes the indicated number of Object
+     *  arguments and returns List.
+     */
+    public static MethodHandle varargsList(int nargs) {
+        if (nargs < LISTS.length)
+            return LISTS[nargs];
+        // else need to spin bytecode or do something else fancy
+        throw new UnsupportedOperationException("NYI");
+    }
+}
+// This guy tests access from outside the same package member, but inside
+// the package itself.
+class PackageSibling {
+    static Lookup lookup() {
+        return MethodHandles.lookup();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/MethodTypeTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,567 @@
+/*
+ * Copyright 2008, 2011 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @summary unit tests for java.lang.invoke.MethodType
+ * @compile MethodTypeTest.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.MethodTypeTest
+ */
+
+package test.java.lang.invoke;
+
+import java.lang.invoke.MethodType;
+import java.lang.reflect.Method;
+
+import java.util.*;
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author jrose
+ */
+public class MethodTypeTest {
+
+    private Class<?> rtype;
+    private Class<?>[] ptypes;
+    private MethodType mt_viS, mt_OO, mt_OO2, mt_vv, mt_Vv, mt_Ov;
+    private MethodType mt_iSI, mt_ISi, mt_ISI, mt_iSi;
+    private MethodType mt_viO, mt_iO2, mt_OOi, mt_iOi;
+    private MethodType mt_VIO, mt_IO2, mt_OOI, mt_IOI, mt_VIS;
+    private MethodType mt_vOiSzA, mt_OO99;
+    private MethodType[] GALLERY;
+    private Method compareTo;
+
+    @Before
+    public void setUp() throws Exception {
+        rtype = void.class;
+        ptypes = new Class<?>[] { int.class, String.class };
+
+        mt_viS = MethodType.methodType(void.class, int.class, String.class);
+        mt_OO = MethodType.methodType(Object.class, Object.class);
+        mt_OO2 = MethodType.methodType(Object.class, Object.class, Object.class);
+        mt_vv = MethodType.methodType(void.class);
+        mt_Vv = MethodType.methodType(Void.class);
+        mt_Ov = MethodType.methodType(Object.class);
+        mt_iSI = MethodType.methodType(int.class, String.class, Integer.class);
+        mt_ISi = MethodType.methodType(Integer.class, String.class, int.class);
+        mt_ISI = MethodType.methodType(Integer.class, String.class, Integer.class);
+        mt_iSi = MethodType.methodType(int.class, String.class, int.class);
+
+        compareTo = String.class.getDeclaredMethod("compareTo", String.class);
+
+        mt_viO = MethodType.methodType(void.class, int.class, Object.class);
+        mt_iO2 = MethodType.methodType(int.class, Object.class, Object.class);
+        mt_OOi = MethodType.methodType(Object.class, Object.class, int.class);
+        mt_iOi = MethodType.methodType(int.class, Object.class, int.class);
+
+        mt_VIO = MethodType.methodType(Void.class, Integer.class, Object.class);
+        mt_IO2 = MethodType.methodType(Integer.class, Object.class, Object.class);
+        mt_OOI = MethodType.methodType(Object.class, Object.class, Integer.class);
+        mt_IOI = MethodType.methodType(Integer.class, Object.class, Integer.class);
+        mt_VIS = MethodType.methodType(Void.class, Integer.class, String.class);
+
+        mt_vOiSzA = MethodType.methodType(void.class, Object.class, int.class, String.class, boolean.class, Object[].class);
+        mt_OO99 = MethodType.genericMethodType(99);
+
+        GALLERY = new MethodType[] {
+            mt_viS, mt_OO, mt_OO2, mt_vv, mt_Vv, mt_Ov,
+            mt_iSI, mt_ISi, mt_ISI, mt_iSi,
+            mt_viO, mt_iO2, mt_OOi, mt_iOi,
+            mt_VIO, mt_IO2, mt_OOI, mt_IOI,
+            mt_VIS, mt_vOiSzA, mt_OO99
+        };
+    }
+
+    @After
+    public void tearDown() throws Exception {
+    }
+
+    /** Make sure the method types are all distinct. */
+    @Test
+    public void testDistinct() {
+        List<MethodType> gallery2 = new ArrayList<>();
+        for (MethodType mt : GALLERY) {
+            assertFalse(mt.toString(), gallery2.contains(mt));
+            gallery2.add(mt);
+        }
+        // check self-equality also:
+        assertEquals(Arrays.asList(GALLERY), gallery2);
+    }
+
+    /**
+     * Test of make method, of class MethodType.
+     */
+    @Test
+    public void testMake_Class_ClassArr() {
+        System.out.println("make (from type array)");
+        MethodType result = MethodType.methodType(rtype, ptypes);
+        assertSame(mt_viS, result);
+    }
+
+    /**
+     * Test of make method, of class MethodType.
+     */
+    @Test
+    public void testMake_Class_List() {
+        System.out.println("make (from type list)");
+        MethodType result = MethodType.methodType(rtype, Arrays.asList(ptypes));
+        assertSame(mt_viS, result);
+    }
+
+    /**
+     * Test of make method, of class MethodType.
+     */
+    @Test
+    public void testMake_3args() {
+        System.out.println("make (from type with varargs)");
+        MethodType result = MethodType.methodType(rtype, ptypes[0], ptypes[1]);
+        assertSame(mt_viS, result);
+    }
+
+    /**
+     * Test of make method, of class MethodType.
+     */
+    @Test
+    public void testMake_Class() {
+        System.out.println("make (from single type)");
+        Class<?> rt = Integer.class;
+        MethodType expResult = MethodType.methodType(rt, new Class<?>[0]);
+        MethodType result = MethodType.methodType(rt);
+        assertSame(expResult, result);
+    }
+
+    @Test
+    public void testMakeGeneric() {
+        System.out.println("makeGeneric");
+        int objectArgCount = 2;
+        MethodType expResult = mt_OO2;
+        MethodType result = MethodType.genericMethodType(objectArgCount);
+        assertSame(expResult, result);
+    }
+
+    /**
+     * Test of make method, of class MethodType.
+     */
+    @Test
+    public void testMake_MethodType() {
+        System.out.println("make (from rtype, MethodType)");
+        MethodType expResult = mt_iO2;
+        MethodType result = MethodType.methodType(int.class, mt_IO2);
+        assertSame(expResult, result);
+    }
+
+    /**
+     * Test of make method, of class MethodType.
+     */
+    @Test
+    public void testMake_String_ClassLoader() {
+        System.out.println("make (from bytecode signature)");
+        ClassLoader loader = null;
+        MethodType[] instances = {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        String obj = "Ljava/lang/Object;";
+        assertEquals(obj, concat(Object.class));
+        String[] expResults = {
+            "(ILjava/lang/String;)V",
+            concat("(", obj, 2, ")", Object.class),
+            "()V", "()"+obj,
+            concat("(", String.class, Integer.class, ")I"),
+            concat("(", String.class, "I)", Integer.class),
+            concat("(", String.class, Integer.class, ")", Integer.class),
+            concat("(", String.class, "I)I")
+        };
+        for (int i = 0; i < instances.length; i++) {
+            MethodType instance = instances[i];
+            String result = instance.toMethodDescriptorString();
+            assertEquals("#"+i, expResults[i], result);
+            MethodType parsed = MethodType.fromMethodDescriptorString(result, loader);
+            assertSame("--#"+i, instance, parsed);
+        }
+    }
+    private static String concat(Object... parts) {
+        StringBuilder sb = new StringBuilder();
+        Object prevPart = "";
+        for (Object part : parts) {
+            if (part instanceof Class) {
+                part = "L"+((Class)part).getName()+";";
+            }
+            if (part instanceof Integer) {
+                for (int n = (Integer) part; n > 1; n--)
+                    sb.append(prevPart);
+                part = "";
+            }
+            sb.append(part);
+            prevPart = part;
+        }
+        return sb.toString().replace('.', '/');
+    }
+
+    @Test
+    public void testHasPrimitives() {
+        System.out.println("hasPrimitives");
+        MethodType[] instances = {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        boolean[] expResults =   {true,   false,  true,  false, true,   true,   false,  true};
+        for (int i = 0; i < instances.length; i++) {
+            boolean result = instances[i].hasPrimitives();
+            assertEquals("#"+i, expResults[i], result);
+        }
+    }
+
+    @Test
+    public void testHasWrappers() {
+        System.out.println("hasWrappers");
+        MethodType[] instances = {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        boolean[] expResults =   {false,  false,  false, false, true,   true,   true,   false};
+        for (int i = 0; i < instances.length; i++) {
+            System.out.println("  hasWrappers "+instances[i]);
+            boolean result = instances[i].hasWrappers();
+            assertEquals("#"+i, expResults[i], result);
+        }
+    }
+
+    @Test
+    public void testErase() {
+        System.out.println("erase");
+        MethodType[] instances  = {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        MethodType[] expResults = {mt_viO, mt_OO2, mt_vv, mt_Ov, mt_iO2, mt_OOi, mt_OO2, mt_iOi};
+        for (int i = 0; i < instances.length; i++) {
+            MethodType result = instances[i].erase();
+            assertSame("#"+i, expResults[i], result);
+        }
+    }
+
+    @Test
+    public void testGeneric() {
+        System.out.println("generic");
+        MethodType[] instances =  {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        MethodType[] expResults = {mt_OO2, mt_OO2, mt_Ov, mt_Ov, mt_OO2, mt_OO2, mt_OO2, mt_OO2};
+        for (int i = 0; i < instances.length; i++) {
+            MethodType result = instances[i].generic();
+            assertSame("#"+i, expResults[i], result);
+        }
+    }
+
+    @Test
+    public void testWrap() {
+        System.out.println("wrap");
+        MethodType[] instances =  {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        MethodType[] expResults = {mt_VIS, mt_OO2, mt_Vv, mt_Ov, mt_ISI, mt_ISI, mt_ISI, mt_ISI};
+        for (int i = 0; i < instances.length; i++) {
+            MethodType result = instances[i].wrap();
+            assertSame("#"+i, expResults[i], result);
+        }
+    }
+
+    @Test
+    public void testUnwrap() {
+        System.out.println("unwrap");
+        MethodType[] instances =  {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        MethodType[] expResults = {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSi, mt_iSi, mt_iSi, mt_iSi};
+        for (int i = 0; i < instances.length; i++) {
+            MethodType result = instances[i].unwrap();
+            assertSame("#"+i, expResults[i], result);
+        }
+    }
+
+    /**
+     * Test of parameterType method, of class MethodType.
+     */
+    @Test
+    public void testParameterType() {
+        System.out.println("parameterType");
+        for (int num = 0; num < ptypes.length; num++) {
+            MethodType instance = mt_viS;
+            Class<?> expResult = ptypes[num];
+            Class<?> result = instance.parameterType(num);
+            assertSame(expResult, result);
+        }
+    }
+
+    /**
+     * Test of parameterCount method, of class MethodType.
+     */
+    @Test
+    public void testParameterCount() {
+        System.out.println("parameterCount");
+        MethodType instance = mt_viS;
+        int expResult = 2;
+        int result = instance.parameterCount();
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of returnType method, of class MethodType.
+     */
+    @Test
+    public void testReturnType() {
+        System.out.println("returnType");
+        MethodType instance = mt_viS;
+        Class<?> expResult = void.class;
+        Class<?> result = instance.returnType();
+        assertSame(expResult, result);
+    }
+
+    /**
+     * Test of parameterList method, of class MethodType.
+     */
+    @Test
+    public void testParameterList() {
+        System.out.println("parameterList");
+        MethodType instance = mt_viS;
+        List<Class<?>> expResult = Arrays.asList(ptypes);
+        List<Class<?>> result = instance.parameterList();
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of parameterArray method, of class MethodType.
+     */
+    @Test
+    public void testParameterArray() {
+        System.out.println("parameterArray");
+        MethodType instance = mt_viS;
+        Class<?>[] expResult = ptypes;
+        Class<?>[] result = instance.parameterArray();
+        assertEquals(Arrays.asList(expResult), Arrays.asList(result));
+    }
+
+    /**
+     * Test of equals method, of class MethodType.
+     */
+    @Test
+    public void testEquals_Object() {
+        System.out.println("equals");
+        Object x = null;
+        MethodType instance = mt_viS;
+        boolean expResult = false;
+        boolean result = instance.equals(x);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of equals method, of class MethodType.
+     */
+    @Test
+    public void testEquals_MethodType() {
+        System.out.println("equals");
+        MethodType that = mt_viS;
+        MethodType instance = mt_viS;
+        boolean expResult = true;
+        boolean result = instance.equals(that);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of hashCode method, of class MethodType.
+     */
+    @Test
+    public void testHashCode() {
+        System.out.println("hashCode");
+        MethodType instance = mt_viS;
+        ArrayList<Class<?>> types = new ArrayList<Class<?>>();
+        types.add(instance.returnType());
+        types.addAll(instance.parameterList());
+        int expResult = types.hashCode();
+        int result = instance.hashCode();
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of toString method, of class MethodType.
+     */
+    @Test
+    public void testToString() {
+        System.out.println("toString");
+        MethodType[] instances = {mt_viS, mt_OO2, mt_vv, mt_Ov, mt_iSI, mt_ISi, mt_ISI, mt_iSi};
+        //String expResult = "void[int, class java.lang.String]";
+        String[] expResults = {
+            "(int,String)void",
+            "(Object,Object)Object",
+            "()void",
+            "()Object",
+            "(String,Integer)int",
+            "(String,int)Integer",
+            "(String,Integer)Integer",
+            "(String,int)int"
+        };
+        for (int i = 0; i < instances.length; i++) {
+            MethodType instance = instances[i];
+            String result = instance.toString();
+            System.out.println("#"+i+":"+result);
+            assertEquals("#"+i, expResults[i], result);
+        }
+    }
+
+    private static byte[] writeSerial(Object x) throws java.io.IOException {
+        try (java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream();
+             java.io.ObjectOutputStream out = new java.io.ObjectOutputStream(bout)
+             ) {
+            out.writeObject(x);
+            out.flush();
+            return bout.toByteArray();
+        }
+    }
+    private static Object readSerial(byte[] wire) throws java.io.IOException, ClassNotFoundException {
+        try (java.io.ByteArrayInputStream bin = new java.io.ByteArrayInputStream(wire);
+             java.io.ObjectInputStream in = new java.io.ObjectInputStream(bin)) {
+            return in.readObject();
+        }
+    }
+    private static void testSerializedEquality(Object x) throws java.io.IOException, ClassNotFoundException {
+        if (x instanceof Object[])
+            x = Arrays.asList((Object[]) x);  // has proper equals method
+        byte[] wire = writeSerial(x);
+        Object y = readSerial(wire);
+        assertEquals(x, y);
+    }
+
+    /** Test (de-)serialization. */
+    @Test
+    public void testSerialization() throws Throwable {
+        System.out.println("serialization");
+        for (MethodType mt : GALLERY) {
+            testSerializedEquality(mt);
+        }
+        testSerializedEquality(GALLERY);
+
+        // Make a list of mixed objects:
+        List<Object> stuff = new ArrayList<>();
+        Collections.addAll(stuff, GALLERY);  // copy #1
+        Object[] triples = Arrays.copyOfRange(GALLERY, 0, GALLERY.length/2);
+        Collections.addAll(stuff, triples);  // copy #3 (partial)
+        for (MethodType mt : GALLERY) {
+            Collections.addAll(stuff, mt.parameterArray());
+        }
+        Collections.shuffle(stuff, new Random(292));
+        Collections.addAll(stuff, GALLERY);  // copy #2
+        testSerializedEquality(stuff);
+    }
+
+    /** Test serialization formats. */
+    @Test
+    public void testPortableSerialFormat() throws Throwable {
+        System.out.println("portable serial format");
+        boolean generateData = false;
+        //generateData = true;  // set this true to generate the following input data:
+        Object[][] cases = {
+            { mt_vv, new byte[] {  // ()void
+                    (byte)0xac, (byte)0xed, (byte)0x00, (byte)0x05, (byte)0x73, (byte)0x72, (byte)0x00, (byte)0x1b,
+                    (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e,
+                    (byte)0x67, (byte)0x2e, (byte)0x69, (byte)0x6e, (byte)0x76, (byte)0x6f, (byte)0x6b, (byte)0x65,
+                    (byte)0x2e, (byte)0x4d, (byte)0x65, (byte)0x74, (byte)0x68, (byte)0x6f, (byte)0x64, (byte)0x54,
+                    (byte)0x79, (byte)0x70, (byte)0x65, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x01, (byte)0x24, (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70,
+                    (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x6f, (byte)0x69, (byte)0x64,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70, (byte)0x75, (byte)0x72, (byte)0x00,
+                    (byte)0x12, (byte)0x5b, (byte)0x4c, (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e,
+                    (byte)0x6c, (byte)0x61, (byte)0x6e, (byte)0x67, (byte)0x2e, (byte)0x43, (byte)0x6c, (byte)0x61,
+                    (byte)0x73, (byte)0x73, (byte)0x3b, (byte)0xab, (byte)0x16, (byte)0xd7, (byte)0xae, (byte)0xcb,
+                    (byte)0xcd, (byte)0x5a, (byte)0x99, (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x78,
+                } },
+            { mt_OO, new byte[] {  // (Object)Object
+                    (byte)0xac, (byte)0xed, (byte)0x00, (byte)0x05, (byte)0x73, (byte)0x72, (byte)0x00, (byte)0x1b,
+                    (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e,
+                    (byte)0x67, (byte)0x2e, (byte)0x69, (byte)0x6e, (byte)0x76, (byte)0x6f, (byte)0x6b, (byte)0x65,
+                    (byte)0x2e, (byte)0x4d, (byte)0x65, (byte)0x74, (byte)0x68, (byte)0x6f, (byte)0x64, (byte)0x54,
+                    (byte)0x79, (byte)0x70, (byte)0x65, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x01, (byte)0x24, (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70,
+                    (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x10, (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61,
+                    (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e, (byte)0x67, (byte)0x2e, (byte)0x4f, (byte)0x62,
+                    (byte)0x6a, (byte)0x65, (byte)0x63, (byte)0x74, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x78,
+                    (byte)0x70, (byte)0x75, (byte)0x72, (byte)0x00, (byte)0x12, (byte)0x5b, (byte)0x4c, (byte)0x6a,
+                    (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e, (byte)0x67,
+                    (byte)0x2e, (byte)0x43, (byte)0x6c, (byte)0x61, (byte)0x73, (byte)0x73, (byte)0x3b, (byte)0xab,
+                    (byte)0x16, (byte)0xd7, (byte)0xae, (byte)0xcb, (byte)0xcd, (byte)0x5a, (byte)0x99, (byte)0x02,
+                    (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01,
+                    (byte)0x71, (byte)0x00, (byte)0x7e, (byte)0x00, (byte)0x03, (byte)0x78,
+                } },
+            { mt_vOiSzA, new byte[] {  // (Object,int,String,boolean,Object[])void
+                    (byte)0xac, (byte)0xed, (byte)0x00, (byte)0x05, (byte)0x73, (byte)0x72, (byte)0x00, (byte)0x1b,
+                    (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e,
+                    (byte)0x67, (byte)0x2e, (byte)0x69, (byte)0x6e, (byte)0x76, (byte)0x6f, (byte)0x6b, (byte)0x65,
+                    (byte)0x2e, (byte)0x4d, (byte)0x65, (byte)0x74, (byte)0x68, (byte)0x6f, (byte)0x64, (byte)0x54,
+                    (byte)0x79, (byte)0x70, (byte)0x65, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x01, (byte)0x24, (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70,
+                    (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x6f, (byte)0x69, (byte)0x64,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70, (byte)0x75, (byte)0x72, (byte)0x00,
+                    (byte)0x12, (byte)0x5b, (byte)0x4c, (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e,
+                    (byte)0x6c, (byte)0x61, (byte)0x6e, (byte)0x67, (byte)0x2e, (byte)0x43, (byte)0x6c, (byte)0x61,
+                    (byte)0x73, (byte)0x73, (byte)0x3b, (byte)0xab, (byte)0x16, (byte)0xd7, (byte)0xae, (byte)0xcb,
+                    (byte)0xcd, (byte)0x5a, (byte)0x99, (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x05, (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x10,
+                    (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e,
+                    (byte)0x67, (byte)0x2e, (byte)0x4f, (byte)0x62, (byte)0x6a, (byte)0x65, (byte)0x63, (byte)0x74,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70, (byte)0x76, (byte)0x72, (byte)0x00,
+                    (byte)0x03, (byte)0x69, (byte)0x6e, (byte)0x74, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x78,
+                    (byte)0x70, (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x10, (byte)0x6a, (byte)0x61, (byte)0x76,
+                    (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e, (byte)0x67, (byte)0x2e, (byte)0x53,
+                    (byte)0x74, (byte)0x72, (byte)0x69, (byte)0x6e, (byte)0x67, (byte)0xa0, (byte)0xf0, (byte)0xa4,
+                    (byte)0x38, (byte)0x7a, (byte)0x3b, (byte)0xb3, (byte)0x42, (byte)0x02, (byte)0x00, (byte)0x00,
+                    (byte)0x78, (byte)0x70, (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x07, (byte)0x62, (byte)0x6f,
+                    (byte)0x6f, (byte)0x6c, (byte)0x65, (byte)0x61, (byte)0x6e, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
+                    (byte)0x78, (byte)0x70, (byte)0x76, (byte)0x72, (byte)0x00, (byte)0x13, (byte)0x5b, (byte)0x4c,
+                    (byte)0x6a, (byte)0x61, (byte)0x76, (byte)0x61, (byte)0x2e, (byte)0x6c, (byte)0x61, (byte)0x6e,
+                    (byte)0x67, (byte)0x2e, (byte)0x4f, (byte)0x62, (byte)0x6a, (byte)0x65, (byte)0x63, (byte)0x74,
+                    (byte)0x3b, (byte)0x90, (byte)0xce, (byte)0x58, (byte)0x9f, (byte)0x10, (byte)0x73, (byte)0x29,
+                    (byte)0x6c, (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70, (byte)0x78,
+                } },
+        };
+        for (Object[] c : cases) {
+            MethodType mt = (MethodType) c[0];
+            System.out.println("deserialize "+mt);
+            byte[] wire = (byte[]) c[1];
+            if (generateData) {
+                System.out.println("<generateData>");
+                wire = writeSerial(mt);
+                final String INDENT = "                ";
+                System.out.print("{  // "+mt);
+                for (int i = 0; i < wire.length; i++) {
+                    if (i % 8 == 0) { System.out.println(); System.out.print(INDENT+"   "); }
+                    String hex = Integer.toHexString(wire[i] & 0xFF);
+                    if (hex.length() == 1)  hex = "0"+hex;
+                    System.out.print(" (byte)0x"+hex+",");
+                }
+                System.out.println();
+                System.out.println(INDENT+"}");
+                System.out.println("</generateData>");
+                System.out.flush();
+            }
+            Object decode;
+            try {
+                decode = readSerial(wire);
+            } catch (Exception ex) {
+                decode = ex;  // oops!
+            }
+            assertEquals(mt, decode);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/indify/Indify.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,1906 @@
+/*
+ * Copyright (c) 2010, 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 indify;
+
+import java.util.*;
+import java.io.*;
+import java.lang.reflect.Modifier;
+import java.util.regex.*;
+
+/**
+ * Transform one or more class files to incorporate JSR 292 features,
+ * such as {@code invokedynamic}.
+ * <p>
+ * This is a standalone program in a single source file.
+ * In this form, it may be useful for test harnesses, small experiments, and javadoc examples.
+ * Copies of this file may show up in multiple locations for standalone usage.
+ * The primary maintained location of this file is as follows:
+ * <a href="http://kenai.com/projects/ninja/sources/indify-repo/content/src/indify/Indify.java">
+ * http://kenai.com/projects/ninja/sources/indify-repo/content/src/indify/Indify.java</a>
+ * <p>
+ * Static private methods named MH_x and MT_x (where x is arbitrary)
+ * must be stereotyped generators of MethodHandle and MethodType
+ * constants.  All calls to them are transformed to {@code CONSTANT_MethodHandle}
+ * and {@code CONSTANT_MethodType} "ldc" instructions.
+ * The stereotyped code must create method types by calls to {@code methodType} or
+ * {@code fromMethodDescriptorString}.  The "lookup" argument must be created
+ * by calls to {@code java.lang.invoke.MethodHandles#lookup MethodHandles.lookup}.
+ * The class and string arguments must be constant.
+ * The following methods of {@code java.lang.invoke.MethodHandle.Lookup Lookup} are
+ * allowed for method handle creation: {@code findStatic}, {@code findVirtual},
+ * {@code findConstructor}, {@code findSpecial},
+ * {@code findGetter}, {@code findSetter},
+ * {@code findStaticGetter}, or {@code findStaticSetter}.
+ * The call to one of these methods must be followed immediately
+ * by an {@code areturn} instruction.
+ * The net result of the call to the MH_x or MT_x method must be
+ * the creation of a constant method handle.  Thus, replacing calls
+ * to MH_x or MT_x methods by {@code ldc} instructions should leave
+ * the meaning of the program unchanged.
+ * <p>
+ * Static private methods named INDY_x must be stereotyped generators
+ * of {@code invokedynamic} call sites.
+ * All calls to them must be immediately followed by
+ * {@code invokeExact} calls.
+ * All such pairs of calls are transformed to {@code invokedynamic}
+ * instructions.  Each INDY_x method must begin with a call to a
+ * MH_x method, which is taken to be its bootstrap method.
+ * The method must be immediately invoked (via {@code invokeGeneric}
+ * on constant lookup, name, and type arguments.  An object array of
+ * constants may also be appended to the {@code invokeGeneric call}.
+ * This call must be cast to {@code CallSite}, and the result must be
+ * immediately followed by a call to {@code dynamicInvoker}, with the
+ * resulting method handle returned.
+ * <p>
+ * The net result of all of these actions is equivalent to the JVM's
+ * execution of an {@code invokedynamic} instruction in the unlinked state.
+ * Running this code once should produce the same results as running
+ * the corresponding {@code invokedynamic} instruction.
+ * In order to model the caching behavior, the code of an INDY_x
+ * method is allowed to begin with getstatic, aaload, and if_acmpne
+ * instructions which load a static method handle value and return it
+ * if the value is non-null.
+ * <p>
+ * Example usage:
+ * <blockquote><pre>
+$ JAVA_HOME=(some recent OpenJDK 7 build)
+$ ant
+$ $JAVA_HOME/bin/java -cp build/classes indify.Indify --overwrite --dest build/testout build/classes/indify/Example.class
+$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp build/classes indify.Example
+MT = (java.lang.Object)java.lang.Object
+MH = adder(int,int)java.lang.Integer
+adder(1,2) = 3
+calling indy:  42
+$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp build/testout indify.Example
+(same output as above)
+ * </pre></blockquote>
+ * <p>
+ * Before OpenJDK build b123, the format of {@code CONSTANT_InvokeDynamic} is in transition,
+ * and the switch {@code --transitionalJSR292=yes} is recommended.
+ * It is turned <em>off</em> by default, but users of earlier builds may need to turn it on.
+ * <p>
+ * A version of this transformation built on top of <a href="http://asm.ow2.org/">http://asm.ow2.org/</a> would be welcome.
+ * @author John Rose
+ */
+public class Indify {
+    public static void main(String... av) throws IOException {
+        new Indify().run(av);
+    }
+
+    public File dest;
+    public String[] classpath = {"."};
+    public boolean keepgoing = false;
+    public boolean expandProperties = false;
+    public boolean overwrite = false;
+    public boolean quiet = false;
+    public boolean verbose = false;
+    public boolean transitionalJSR292 = false;  // final version is distributed
+    public boolean all = false;
+    public int verifySpecifierCount = -1;
+
+    public void run(String... av) throws IOException {
+        List<String> avl = new ArrayList<>(Arrays.asList(av));
+        parseOptions(avl);
+        if (avl.isEmpty())
+            throw new IllegalArgumentException("Usage: indify [--dest dir] [option...] file...");
+        if ("--java".equals(avl.get(0))) {
+            avl.remove(0);
+            try {
+                runApplication(avl.toArray(new String[0]));
+            } catch (Exception ex) {
+                if (ex instanceof RuntimeException)  throw (RuntimeException) ex;
+                throw new RuntimeException(ex);
+            }
+            return;
+        }
+        Exception err = null;
+        for (String a : avl) {
+            try {
+                indify(a);
+            } catch (Exception ex) {
+                if (err == null)  err = ex;
+                System.err.println("failure on "+a);
+                if (!keepgoing)  break;
+            }
+        }
+        if (err != null) {
+            if (err instanceof IOException)  throw (IOException) err;
+            throw (RuntimeException) err;
+        }
+    }
+
+    /** Execute the given application under a class loader which indifies all application classes. */
+    public void runApplication(String... av) throws Exception {
+        List<String> avl = new ArrayList<>(Arrays.asList(av));
+        String mainClassName = avl.remove(0);
+        av = avl.toArray(new String[0]);
+        Class<?> mainClass = Class.forName(mainClassName, true, makeClassLoader());
+        java.lang.reflect.Method main = mainClass.getMethod("main", String[].class);
+        try { main.setAccessible(true); } catch (SecurityException ex) { }
+        main.invoke(null, (Object) av);
+    }
+
+    public void parseOptions(List<String> av) throws IOException {
+        for (; !av.isEmpty(); av.remove(0)) {
+            String a = av.get(0);
+            if (a.startsWith("-")) {
+                String a2 = null;
+                int eq = a.indexOf('=');
+                if (eq > 0) {
+                    a2 = maybeExpandProperties(a.substring(eq+1));
+                    a = a.substring(0, eq+1);
+                }
+                switch (a) {
+                case "--java":
+                    return;  // keep this argument
+                case "-d": case "--dest": case "-d=": case "--dest=":
+                    dest = new File(a2 != null ? a2 : maybeExpandProperties(av.remove(1)));
+                    break;
+                case "-cp": case "--classpath":
+                    classpath = maybeExpandProperties(av.remove(1)).split("["+File.pathSeparatorChar+"]");
+                    break;
+                case "-k": case "--keepgoing": case "--keepgoing=":
+                    keepgoing = booleanOption(a2);  // print errors but keep going
+                    break;
+                case "--expand-properties": case "--expand-properties=":
+                    expandProperties = booleanOption(a2);  // expand property references in subsequent arguments
+                    break;
+                case "--verify-specifier-count": case "--verify-specifier-count=":
+                    verifySpecifierCount = Integer.valueOf(a2);
+                    break;
+                case "--overwrite": case "--overwrite=":
+                    overwrite = booleanOption(a2);  // overwrite output files
+                    break;
+                case "--all": case "--all=":
+                    all = booleanOption(a2);  // copy all classes, even if no patterns
+                    break;
+                case "-q": case "--quiet": case "--quiet=":
+                    quiet = booleanOption(a2);  // less output
+                    break;
+                case "-v": case "--verbose": case "--verbose=":
+                    verbose = booleanOption(a2);  // more output
+                    break;
+                case "--transitionalJSR292": case "--transitionalJSR292=":
+                    transitionalJSR292 = booleanOption(a2);  // use older invokedynamic format
+                    break;
+                default:
+                    throw new IllegalArgumentException("unrecognized flag: "+a);
+                }
+                continue;
+            } else {
+                break;
+            }
+        }
+        if (dest == null && !overwrite)
+            throw new RuntimeException("no output specified; need --dest d or --overwrite");
+        if (expandProperties) {
+            for (int i = 0; i < av.size(); i++)
+                av.set(i, maybeExpandProperties(av.get(i)));
+        }
+    }
+
+    private boolean booleanOption(String s) {
+        if (s == null)  return true;
+        switch (s) {
+        case "true":  case "yes": case "on":  case "1": return true;
+        case "false": case "no":  case "off": case "0": return false;
+        }
+        throw new IllegalArgumentException("unrecognized boolean flag="+s);
+    }
+
+    private String maybeExpandProperties(String s) {
+        if (!expandProperties)  return s;
+        Set<String> propsDone = new HashSet<>();
+        while (s.contains("${")) {
+            int lbrk = s.indexOf("${");
+            int rbrk = s.indexOf('}', lbrk);
+            if (rbrk < 0)  break;
+            String prop = s.substring(lbrk+2, rbrk);
+            if (!propsDone.add(prop))  break;
+            String value = System.getProperty(prop);
+            if (verbose)  System.err.println("expanding ${"+prop+"} => "+value);
+            if (value == null)  break;
+            s = s.substring(0, lbrk) + value + s.substring(rbrk+1);
+        }
+        return s;
+    }
+
+    public void indify(String a) throws IOException {
+        File f = new File(a);
+        String fn = f.getName();
+        if (fn.endsWith(".class") && f.isFile())
+            indifyFile(f, dest);
+        else if (fn.endsWith(".jar") && f.isFile())
+            indifyJar(f, dest);
+        else if (f.isDirectory())
+            indifyTree(f, dest);
+        else if (!keepgoing)
+            throw new RuntimeException("unrecognized file: "+a);
+    }
+
+    private void ensureDirectory(File dir) {
+        if (dir.mkdirs() && !quiet)
+            System.err.println("created "+dir);
+    }
+
+    public void indifyFile(File f, File dest) throws IOException {
+        if (verbose)  System.err.println("reading "+f);
+        ClassFile cf = new ClassFile(f);
+        Logic logic = new Logic(cf);
+        boolean changed = logic.transform();
+        logic.reportPatternMethods(quiet, keepgoing);
+        if (changed || all) {
+            File outfile;
+            if (dest != null) {
+                ensureDirectory(dest);
+                outfile = classPathFile(dest, cf.nameString());
+            } else {
+                outfile = f;  // overwrite input file, no matter where it is
+            }
+            cf.writeTo(outfile);
+            if (!quiet)  System.err.println("wrote "+outfile);
+        }
+    }
+
+    File classPathFile(File pathDir, String className) {
+        String qualname = className.replace('.','/')+".class";
+        qualname = qualname.replace('/', File.separatorChar);
+        return new File(pathDir, qualname);
+    }
+
+    public void indifyJar(File f, Object dest) throws IOException {
+        throw new UnsupportedOperationException("Not yet implemented");
+    }
+
+    public void indifyTree(File f, File dest) throws IOException {
+        if (verbose)  System.err.println("reading directory: "+f);
+        for (File f2 : f.listFiles(new FilenameFilter() {
+                public boolean accept(File dir, String name) {
+                    if (name.endsWith(".class"))  return true;
+                    if (name.contains("."))  return false;
+                    // return true if it might be a package name:
+                    return Character.isJavaIdentifierStart(name.charAt(0));
+                }})) {
+            if (f2.getName().endsWith(".class"))
+                indifyFile(f2, dest);
+            else if (f2.isDirectory())
+                indifyTree(f2, dest);
+        }
+    }
+
+    public ClassLoader makeClassLoader() {
+        return new Loader();
+    }
+    private class Loader extends ClassLoader {
+        Loader() {
+            this(Indify.class.getClassLoader());
+        }
+        Loader(ClassLoader parent) {
+            super(parent);
+        }
+        public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+            File f = findClassInPath(name);
+            if (f != null) {
+                try {
+                    Class<?> c = transformAndLoadClass(f);
+                    if (c != null) {
+                        if (resolve)  resolveClass(c);
+                        return c;
+                    }
+                } catch (Exception ex) {
+                    if (ex instanceof IllegalArgumentException)
+                        // pass error from reportPatternMethods
+                        throw (IllegalArgumentException) ex;
+                }
+            }
+            return super.loadClass(name, resolve);
+        }
+        private File findClassInPath(String name) {
+            for (String s : classpath) {
+                File f = classPathFile(new File(s), name);
+                //System.out.println("Checking for "+f);
+                if (f.exists() && f.canRead()) {
+                    return f;
+                }
+            }
+            return null;
+        }
+        protected Class<?> findClass(String name) throws ClassNotFoundException {
+            try {
+                File f = findClassInPath(name);
+                if (f != null) {
+                    Class<?> c = transformAndLoadClass(f);
+                    if (c != null)  return c;
+                }
+            } catch (IOException ex) {
+                throw new ClassNotFoundException("IO error", ex);
+            }
+            throw new ClassNotFoundException();
+        }
+        private Class<?> transformAndLoadClass(File f) throws ClassNotFoundException, IOException {
+            if (verbose)  System.err.println("Loading class from "+f);
+            ClassFile cf = new ClassFile(f);
+            Logic logic = new Logic(cf);
+            boolean changed = logic.transform();
+            if (verbose && !changed)  System.err.println("(no change)");
+            logic.reportPatternMethods(!verbose, keepgoing);
+            byte[] bytes = cf.toByteArray();
+            return defineClass(null, bytes, 0, bytes.length);
+        }
+    }
+
+    private class Logic {
+        // Indify logic, per se.
+        ClassFile cf;
+        final char[] poolMarks;
+        final Map<Method,Constant> constants = new HashMap<>();
+        final Map<Method,String> indySignatures = new HashMap<>();
+        Logic(ClassFile cf) {
+            this.cf = cf;
+            poolMarks = new char[cf.pool.size()];
+        }
+        boolean transform() {
+            if (!initializeMarks())  return false;
+            if (!findPatternMethods())  return false;
+            Pool pool = cf.pool;
+            //for (Constant c : cp)  System.out.println("  # "+c);
+            for (Method m : cf.methods) {
+                if (constants.containsKey(m))  continue;  // don't bother
+                // Transform references.
+                int blab = 0;
+                for (Instruction i = m.instructions(); i != null; i = i.next()) {
+                    if (i.bc != opc_invokestatic)  continue;
+                    int methi = i.u2At(1);
+                    if (poolMarks[methi] == 0)  continue;
+                    Short[] ref = pool.getMemberRef((short)methi);
+                    Method conm = findMember(cf.methods, ref[1], ref[2]);
+                    if (conm == null)  continue;
+                    Constant con = constants.get(conm);
+                    if (con == null)  continue;
+                    if (blab++ == 0 && !quiet)
+                        System.err.println("patching "+cf.nameString()+"."+m);
+                    //if (blab == 1) { for (Instruction j = m.instructions(); j != null; j = j.next()) System.out.println("  |"+j); }
+                    if (con.tag == CONSTANT_InvokeDynamic ||
+                        con.tag == CONSTANT_InvokeDynamic_17) {
+                        // need to patch the following instruction too,
+                        // but there are usually intervening argument pushes too
+                        Instruction i2 = findPop(i);
+                        Short[] ref2 = null;
+                        short ref2i = 0;
+                        if (i2 != null && i2.bc == opc_invokevirtual &&
+                                poolMarks[(char)(ref2i = (short) i2.u2At(1))] == 'D')
+                            ref2 = pool.getMemberRef(ref2i);
+                        if (ref2 == null || !"invokeExact".equals(pool.getString(ref2[1]))) {
+                            System.err.println(m+": failed to create invokedynamic at "+i.pc);
+                            continue;
+                        }
+                        String invType = pool.getString(ref2[2]);
+                        String bsmType = indySignatures.get(conm);
+                        if (!invType.equals(bsmType)) {
+                            System.err.println(m+": warning: "+conm+" call type and local invoke type differ: "
+                                    +bsmType+", "+invType);
+                        }
+                        assert(i.len == 3 || i2.len == 3);
+                        if (!quiet)  System.err.println(i+" "+conm+";...; "+i2+" => invokedynamic "+con);
+                        int start = i.pc + 3, end = i2.pc;
+                        System.arraycopy(i.codeBase, start, i.codeBase, i.pc, end-start);
+                        i.forceNext(0);  // force revisit of new instruction
+                        i2.u1AtPut(-3, opc_invokedynamic);
+                        i2.u2AtPut(-2, con.index);
+                        i2.u2AtPut(0, (short)0);
+                        i2.u1AtPut(2, opc_nop);
+                        //System.out.println(new Instruction(i.codeBase, i2.pc-3));
+                    } else {
+                        if (!quiet)  System.err.println(i+" "+conm+" => ldc "+con);
+                        assert(i.len == 3);
+                        i.u1AtPut(0, opc_ldc_w);
+                        i.u2AtPut(1, con.index);
+                    }
+                }
+                //if (blab >= 1) { for (Instruction j = m.instructions(); j != null; j = j.next()) System.out.println("    |"+j); }
+            }
+            cf.methods.removeAll(constants.keySet());
+            return true;
+        }
+
+        // Scan forward from the instruction to find where the stack p
+        // below the current sp at the instruction.
+        Instruction findPop(Instruction i) {
+            //System.out.println("findPop from "+i);
+            Pool pool = cf.pool;
+            JVMState jvm = new JVMState();
+        decode:
+            for (i = i.clone().next(); i != null; i = i.next()) {
+                String pops = INSTRUCTION_POPS[i.bc];
+                //System.out.println("  "+i+" "+jvm.stack+" : "+pops.replace("$", " => "));
+                if (pops == null)  break;
+                if (jvm.stackMotion(i.bc))  continue decode;
+                if (pops.indexOf('Q') >= 0) {
+                    Short[] ref = pool.getMemberRef((short) i.u2At(1));
+                    String type = simplifyType(pool.getString(CONSTANT_Utf8, ref[2]));
+                    switch (i.bc) {
+                    case opc_getstatic:
+                    case opc_getfield:
+                    case opc_putstatic:
+                    case opc_putfield:
+                        pops = pops.replace("Q", type);
+                        break;
+                    default:
+                        if (!type.startsWith("("))
+                            throw new InternalError(i.toString());
+                        pops = pops.replace("Q$Q", type.substring(1).replace(")","$"));
+                        break;
+                    }
+                    //System.out.println("special type: "+type+" => "+pops);
+                }
+                int npops = pops.indexOf('$');
+                if (npops < 0)  throw new InternalError();
+                if (npops > jvm.sp())  return i;
+                List<Object> args = jvm.args(npops);
+                int k = 0;
+                for (Object x : args) {
+                    char have = (Character) x;
+                    char want = pops.charAt(k++);
+                    if (have == 'X' || want == 'X')  continue;
+                    if (have != want)  break decode;
+                }
+                if (pops.charAt(k++) != '$')  break decode;
+                args.clear();
+                while (k < pops.length())
+                    args.add(pops.charAt(k++));
+            }
+            System.err.println("*** bailout on jvm: "+jvm.stack+" "+i);
+            return null;
+        }
+
+        boolean findPatternMethods() {
+            boolean found = false;
+            for (char mark : "THI".toCharArray()) {
+                for (Method m : cf.methods) {
+                    if (!Modifier.isPrivate(m.access))  continue;
+                    if (!Modifier.isStatic(m.access))  continue;
+                    if (nameAndTypeMark(m.name, m.type) == mark) {
+                        Constant con = scanPattern(m, mark);
+                        if (con == null)  continue;
+                        constants.put(m, con);
+                        found = true;
+                    }
+                }
+            }
+            return found;
+        }
+
+        void reportPatternMethods(boolean quietly, boolean allowMatchFailure) {
+            if (!quietly && !constants.keySet().isEmpty())
+                System.err.println("pattern methods removed: "+constants.keySet());
+            for (Method m : cf.methods) {
+                if (nameMark(cf.pool.getString(m.name)) != 0 &&
+                    constants.get(m) == null) {
+                    String failure = "method has special name but fails to match pattern: "+m;
+                    if (!allowMatchFailure)
+                        throw new IllegalArgumentException(failure);
+                    else if (!quietly)
+                        System.err.println("warning: "+failure);
+                }
+            }
+            if (verifySpecifierCount >= 0) {
+                List<Object[]> specs = bootstrapMethodSpecifiers(false);
+                int specsLen = (specs == null ? 0 : specs.size());
+                if (specsLen != verifySpecifierCount) {
+                    throw new IllegalArgumentException("BootstrapMethods length is "+specsLen+" but should be "+verifySpecifierCount);
+                }
+            }
+            if (!quiet)  System.err.flush();
+        }
+
+        // mark constant pool entries according to participation in patterns
+        boolean initializeMarks() {
+            boolean changed = false;
+            for (;;) {
+                boolean changed1 = false;
+                int cpindex = -1;
+                for (Constant e : cf.pool) {
+                    ++cpindex;
+                    if (e == null)  continue;
+                    char mark = poolMarks[cpindex];
+                    if (mark != 0)  continue;
+                    switch (e.tag) {
+                    case CONSTANT_Utf8:
+                        mark = nameMark(e.itemString()); break;
+                    case CONSTANT_NameAndType:
+                        mark = nameAndTypeMark(e.itemIndexes()); break;
+                    case CONSTANT_Class: {
+                        int n1 = e.itemIndex();
+                        char nmark = poolMarks[(char)n1];
+                        if ("DJ".indexOf(nmark) >= 0)
+                            mark = nmark;
+                        break;
+                    }
+                    case CONSTANT_Field:
+                    case CONSTANT_Method: {
+                        Short[] n12 = e.itemIndexes();
+                        short cl = n12[0];
+                        short nt = n12[1];
+                        char cmark = poolMarks[(char)cl];
+                        if (cmark != 0) {
+                            mark = cmark;  // it is a java.dyn.* or java.lang.* method
+                            break;
+                        }
+                        String cls = cf.pool.getString(CONSTANT_Class, cl);
+                        if (cls.equals(cf.nameString())) {
+                            switch (poolMarks[(char)nt]) {
+                            // it is a private MH/MT/INDY method
+                            case 'T': case 'H': case 'I':
+                                mark = poolMarks[(char)nt];
+                                break;
+                            }
+                        }
+                        break;
+                    }
+                    default:  break;
+                    }
+                    if (mark != 0) {
+                        poolMarks[cpindex] = mark;
+                        changed1 = true;
+                    }
+                }
+                if (!changed1)
+                    break;
+                changed = true;
+            }
+            return changed;
+        }
+        char nameMark(String s) {
+            if (s.startsWith("MT_"))                return 'T';
+            else if (s.startsWith("MH_"))           return 'H';
+            else if (s.startsWith("INDY_"))         return 'I';
+            else if (transitionalJSR292 &&
+                     s.startsWith("java/dyn/"))     return 'D';
+            else if (s.startsWith("java/lang/invoke/"))  return 'D';
+            else if (s.startsWith("java/lang/"))    return 'J';
+            return 0;
+        }
+        char nameAndTypeMark(Short[] n12) {
+            return nameAndTypeMark(n12[0], n12[1]);
+        }
+        char nameAndTypeMark(short n1, short n2) {
+            char mark = poolMarks[(char)n1];
+            if (mark == 0)  return 0;
+            String descr = cf.pool.getString(CONSTANT_Utf8, n2);
+            String requiredType;
+            switch (poolMarks[(char)n1]) {
+            case 'H': requiredType = "()Ljava/lang/invoke/MethodHandle;";  break;
+            case 'T': requiredType = "()Ljava/lang/invoke/MethodType;";    break;
+            case 'I': requiredType = "()Ljava/lang/invoke/MethodHandle;";  break;
+            default:  return 0;
+            }
+            if (matchType(descr, requiredType))  return mark;
+            return 0;
+        }
+
+        boolean matchType(String descr, String requiredType) {
+            if (descr.equals(requiredType))  return true;
+            if (transitionalJSR292) {
+                String oldType = requiredType.replace("Ljava/lang/invoke/", "Ljava/dyn/");
+                if (descr.equals(oldType))  return true;
+            }
+            return false;
+        }
+
+        private class JVMState {
+            final List<Object> stack = new ArrayList<>();
+            int sp() { return stack.size(); }
+            void push(Object x) { stack.add(x); }
+            void push2(Object x) { stack.add(EMPTY_SLOT); stack.add(x); }
+            void pushAt(int pos, Object x) { stack.add(stack.size()+pos, x); }
+            Object pop() { return stack.remove(sp()-1); }
+            Object top() { return stack.get(sp()-1); }
+            List<Object> args(boolean hasRecv, String type) {
+                return args(argsize(type) + (hasRecv ? 1 : 0));
+            }
+            List<Object> args(int argsize) {
+                return stack.subList(sp()-argsize, sp());
+            }
+            boolean stackMotion(int bc) {
+                switch (bc) {
+                case opc_pop:    pop();             break;
+                case opc_pop2:   pop(); pop();      break;
+                case opc_swap:   pushAt(-1, pop()); break;
+                case opc_dup:    push(top());       break;
+                case opc_dup_x1: pushAt(-2, top()); break;
+                case opc_dup_x2: pushAt(-3, top()); break;
+                // ? also: dup2{,_x1,_x2}
+                default:  return false;
+                }
+                return true;
+            }
+        }
+        private final String EMPTY_SLOT = "_";
+        private void removeEmptyJVMSlots(List<Object> args) {
+            for (;;) {
+                int i = args.indexOf(EMPTY_SLOT);
+                if (i >= 0 && i+1 < args.size()
+                    && (isConstant(args.get(i+1), CONSTANT_Long) ||
+                        isConstant(args.get(i+1), CONSTANT_Double)))
+                    args.remove(i);
+                else  break;
+            }
+        }
+
+        private Constant scanPattern(Method m, char patternMark) {
+            if (verbose)  System.err.println("scan "+m+" for pattern="+patternMark);
+            int wantTag;
+            switch (patternMark) {
+            case 'T': wantTag = CONSTANT_MethodType; break;
+            case 'H': wantTag = CONSTANT_MethodHandle; break;
+            case 'I': wantTag = CONSTANT_InvokeDynamic; break;
+            default: throw new InternalError();
+            }
+            Instruction i = m.instructions();
+            JVMState jvm = new JVMState();
+            Pool pool = cf.pool;
+            int branchCount = 0;
+            Object arg;
+            List<Object> args;
+            List<Object> bsmArgs = null;  // args to invokeGeneric
+        decode:
+            for (; i != null; i = i.next()) {
+                //System.out.println(jvm.stack+" "+i);
+                int bc = i.bc;
+                switch (bc) {
+                case opc_ldc:           jvm.push(pool.get(i.u1At(1)));   break;
+                case opc_ldc_w:         jvm.push(pool.get(i.u2At(1)));   break;
+                case opc_ldc2_w:        jvm.push2(pool.get(i.u2At(1)));  break;
+                case opc_aconst_null:   jvm.push(null);                  break;
+                case opc_bipush:        jvm.push((int)(byte) i.u1At(1)); break;
+                case opc_sipush:        jvm.push((int)(short)i.u2At(1)); break;
+
+                // these support creation of a restarg array
+                case opc_anewarray:
+                    arg = jvm.pop();
+                    if (!(arg instanceof Integer))  break decode;
+                    arg = Arrays.asList(new Object[(Integer)arg]);
+                    jvm.push(arg);
+                    break;
+                case opc_dup:
+                    jvm.push(jvm.top()); break;
+                case opc_aastore:
+                    args = jvm.args(3);  // array, index, value
+                    if (args.get(0) instanceof List &&
+                        args.get(1) instanceof Integer) {
+                        ((List<Object>)args.get(0)).set( (Integer)args.get(1), args.get(2) );
+                    }
+                    args.clear();
+                    break;
+
+                case opc_new:
+                {
+                    String type = pool.getString(CONSTANT_Class, (short)i.u2At(1));
+                    //System.out.println("new "+type);
+                    switch (type) {
+                    case "java/lang/StringBuilder":
+                        jvm.push("StringBuilder");
+                        continue decode;  // go to next instruction
+                    }
+                    break decode;  // bail out
+                }
+
+                case opc_getstatic:
+                {
+                    // int.class compiles to getstatic Integer.TYPE
+                    int fieldi = i.u2At(1);
+                    char mark = poolMarks[fieldi];
+                    //System.err.println("getstatic "+fieldi+Arrays.asList(pool.getStrings(pool.getMemberRef((short)fieldi)))+mark);
+                    if (mark == 'J') {
+                        Short[] ref = pool.getMemberRef((short) fieldi);
+                        String name = pool.getString(CONSTANT_Utf8, ref[1]);
+                        if ("TYPE".equals(name)) {
+                            String wrapperName = pool.getString(CONSTANT_Class, ref[0]).replace('/', '.');
+                            // a primitive type descriptor
+                            Class<?> primClass;
+                            try {
+                                primClass = (Class<?>) Class.forName(wrapperName).getField(name).get(null);
+                            } catch (Exception ex) {
+                                throw new InternalError("cannot load "+wrapperName+"."+name);
+                            }
+                            jvm.push(primClass);
+                            break;
+                        }
+                    }
+                    // unknown field; keep going...
+                    jvm.push(UNKNOWN_CON);
+                    break;
+                }
+                case opc_putstatic:
+                {
+                    if (patternMark != 'I')  break decode;
+                    jvm.pop();
+                    // unknown field; keep going...
+                    break;
+                }
+
+                case opc_invokestatic:
+                case opc_invokevirtual:
+                case opc_invokespecial:
+                {
+                    boolean hasRecv = (bc != opc_invokestatic);
+                    int methi = i.u2At(1);
+                    char mark = poolMarks[methi];
+                    Short[] ref = pool.getMemberRef((short)methi);
+                    String type = pool.getString(CONSTANT_Utf8, ref[2]);
+                    //System.out.println("invoke "+pool.getString(CONSTANT_Utf8, ref[1])+" "+Arrays.asList(ref)+" : "+type);
+                    args = jvm.args(hasRecv, type);
+                    String intrinsic = null;
+                    Constant con;
+                    if (mark == 'D' || mark == 'J') {
+                        intrinsic = pool.getString(CONSTANT_Utf8, ref[1]);
+                        if (mark == 'J') {
+                            String cls = pool.getString(CONSTANT_Class, ref[0]);
+                            cls = cls.substring(1+cls.lastIndexOf('/'));
+                            intrinsic = cls+"."+intrinsic;
+                        }
+                        //System.out.println("recognized intrinsic "+intrinsic);
+                        byte refKind = -1;
+                        switch (intrinsic) {
+                        case "findGetter":          refKind = REF_getField;         break;
+                        case "findStaticGetter":    refKind = REF_getStatic;        break;
+                        case "findSetter":          refKind = REF_putField;         break;
+                        case "findStaticSetter":    refKind = REF_putStatic;        break;
+                        case "findVirtual":         refKind = REF_invokeVirtual;    break;
+                        case "findStatic":          refKind = REF_invokeStatic;     break;
+                        case "findSpecial":         refKind = REF_invokeSpecial;    break;
+                        case "findConstructor":     refKind = REF_newInvokeSpecial; break;
+                        }
+                        if (refKind >= 0 && (con = parseMemberLookup(refKind, args)) != null) {
+                            args.clear(); args.add(con);
+                            continue;
+                        }
+                    }
+                    Method ownMethod = null;
+                    if (mark == 'T' || mark == 'H' || mark == 'I') {
+                        ownMethod = findMember(cf.methods, ref[1], ref[2]);
+                    }
+                    //if (intrinsic != null)  System.out.println("intrinsic = "+intrinsic);
+                    switch (intrinsic == null ? "" : intrinsic) {
+                    case "fromMethodDescriptorString":
+                        con = makeMethodTypeCon(args.get(0));
+                        args.clear(); args.add(con);
+                        continue;
+                    case "methodType": {
+                        flattenVarargs(args);  // there are several overloadings, some with varargs
+                        StringBuilder buf = new StringBuilder();
+                        String rtype = null;
+                        for (Object typeArg : args) {
+                            if (typeArg instanceof Class) {
+                                Class<?> argClass = (Class<?>) typeArg;
+                                if (argClass.isPrimitive()) {
+                                    char tchar;
+                                    switch (argClass.getName()) {
+                                    case "void":    tchar = 'V'; break;
+                                    case "boolean": tchar = 'Z'; break;
+                                    case "byte":    tchar = 'B'; break;
+                                    case "char":    tchar = 'C'; break;
+                                    case "short":   tchar = 'S'; break;
+                                    case "int":     tchar = 'I'; break;
+                                    case "long":    tchar = 'J'; break;
+                                    case "float":   tchar = 'F'; break;
+                                    case "double":  tchar = 'D'; break;
+                                    default:  throw new InternalError(argClass.toString());
+                                    }
+                                    buf.append(tchar);
+                                } else {
+                                    // should not happen, but...
+                                    buf.append('L').append(argClass.getName().replace('.','/')).append(';');
+                                }
+                            } else if (typeArg instanceof Constant) {
+                                Constant argCon = (Constant) typeArg;
+                                if (argCon.tag == CONSTANT_Class) {
+                                    String cn = pool.get(argCon.itemIndex()).itemString();
+                                    if (cn.endsWith(";"))
+                                        buf.append(cn);
+                                    else
+                                        buf.append('L').append(cn).append(';');
+                                } else {
+                                    break decode;
+                                }
+                            } else {
+                                break decode;
+                            }
+                            if (rtype == null) {
+                                // first arg is treated differently
+                                rtype = buf.toString();
+                                buf.setLength(0);
+                                buf.append('(');
+                            }
+                        }
+                        buf.append(')').append(rtype);
+                        con = con = makeMethodTypeCon(buf.toString());
+                        args.clear(); args.add(con);
+                        continue;
+                    }
+                    case "lookup":
+                    case "dynamicInvoker":
+                        args.clear(); args.add(intrinsic);
+                        continue;
+                    case "lookupClass":
+                        if (args.equals(Arrays.asList("lookup"))) {
+                            // fold lookup().lookupClass() to the enclosing class
+                            args.clear(); args.add(pool.get(cf.thisc));
+                            continue;
+                        }
+                        break;
+                    case "invokeGeneric":
+                    case "invokeWithArguments":
+                        if (patternMark != 'I')  break decode;
+                        if ("invokeWithArguments".equals(intrinsic))
+                            flattenVarargs(args);
+                        bsmArgs = new ArrayList(args);
+                        args.clear(); args.add("invokeGeneric");
+                        continue;
+                    case "Integer.valueOf":
+                    case "Float.valueOf":
+                    case "Long.valueOf":
+                    case "Double.valueOf":
+                        removeEmptyJVMSlots(args);
+                        if (args.size() == 1) {
+                            arg = args.remove(0);
+                            assert(3456 == (CONSTANT_Integer*1000 + CONSTANT_Float*100 + CONSTANT_Long*10 + CONSTANT_Double));
+                            if (isConstant(arg, CONSTANT_Integer + "IFLD".indexOf(intrinsic.charAt(0)))
+                                || arg instanceof Number) {
+                                args.add(arg); continue;
+                            }
+                        }
+                        break decode;
+                    case "StringBuilder.append":
+                        // allow calls like ("value = "+x)
+                        removeEmptyJVMSlots(args);
+                        args.subList(1, args.size()).clear();
+                        continue;
+                    case "StringBuilder.toString":
+                        args.clear();
+                        args.add(intrinsic);
+                        continue;
+                    }
+                    if (!hasRecv && ownMethod != null && patternMark != 0) {
+                        con = constants.get(ownMethod);
+                        if (con == null)  break decode;
+                        args.clear(); args.add(con);
+                        continue;
+                    } else if (type.endsWith(")V")) {
+                        // allow calls like println("reached the pattern method")
+                        args.clear();
+                        continue;
+                    }
+                    break decode;  // bail out for most calls
+                }
+                case opc_areturn:
+                {
+                    ++branchCount;
+                    if (bsmArgs != null) {
+                        // parse bsmArgs as (MH, lookup, String, MT, [extra])
+                        Constant indyCon = makeInvokeDynamicCon(bsmArgs);
+                        if (indyCon != null) {
+                            Constant typeCon = (Constant) bsmArgs.get(3);
+                            indySignatures.put(m, pool.getString(typeCon.itemIndex()));
+                            return indyCon;
+                        }
+                        System.err.println(m+": inscrutable bsm arguments: "+bsmArgs);
+                        break decode;  // bail out
+                    }
+                    arg = jvm.pop();
+                    if (branchCount == 2 && UNKNOWN_CON.equals(arg))
+                        break;  // merge to next path
+                    if (isConstant(arg, wantTag))
+                        return (Constant) arg;
+                    break decode;  // bail out
+                }
+                default:
+                    if (jvm.stackMotion(i.bc))  break;
+                    if (bc >= opc_nconst_MIN && bc <= opc_nconst_MAX)
+                        { jvm.push(INSTRUCTION_CONSTANTS[bc - opc_nconst_MIN]); break; }
+                    if (patternMark == 'I') {
+                        // these support caching paths in INDY_x methods
+                        if (bc == opc_aload || bc >= opc_aload_0 && bc <= opc_aload_MAX)
+                            { jvm.push(UNKNOWN_CON); break; }
+                        if (bc == opc_astore || bc >= opc_astore_0 && bc <= opc_astore_MAX)
+                            { jvm.pop(); break; }
+                        switch (bc) {
+                        case opc_getfield:
+                        case opc_aaload:
+                            jvm.push(UNKNOWN_CON); break;
+                        case opc_ifnull:
+                        case opc_ifnonnull:
+                            // ignore branch target
+                            if (++branchCount != 1)  break decode;
+                            jvm.pop();
+                            break;
+                        case opc_checkcast:
+                            arg = jvm.top();
+                            if ("invokeWithArguments".equals(arg) ||
+                                "invokeGeneric".equals(arg))
+                                break;  // assume it is a helpful cast
+                            break decode;
+                        default:
+                            break decode;  // bail out
+                        }
+                        continue decode; // go to next instruction
+                    }
+                    break decode;  // bail out
+                } //end switch
+            }
+            System.err.println(m+": bailout on "+i+" jvm stack: "+jvm.stack);
+            return null;
+        }
+        private final String UNKNOWN_CON = "<unknown>";
+
+        private void flattenVarargs(List<Object> args) {
+            int size = args.size();
+            if (size > 0 && args.get(size-1) instanceof List)
+                args.addAll((List<Object>) args.remove(size-1));
+        }
+
+        private boolean isConstant(Object x, int tag) {
+            return x instanceof Constant && ((Constant)x).tag == tag;
+        }
+        private Constant makeMethodTypeCon(Object x) {
+            short utfIndex;
+            if (x instanceof String)
+                utfIndex = (short) cf.pool.addConstant(CONSTANT_Utf8, x).index;
+            else if (isConstant(x, CONSTANT_String))
+                utfIndex = ((Constant)x).itemIndex();
+            else  return null;
+            return cf.pool.addConstant(CONSTANT_MethodType, utfIndex);
+        }
+        private Constant parseMemberLookup(byte refKind, List<Object> args) {
+            // E.g.: lookup().findStatic(Foo.class, "name", MethodType)
+            if (args.size() != 4)  return null;
+            int argi = 0;
+            if (!"lookup".equals(args.get(argi++)))  return null;
+            short refindex, cindex, ntindex, nindex, tindex;
+            Object con;
+            if (!isConstant(con = args.get(argi++), CONSTANT_Class))  return null;
+            cindex = (short)((Constant)con).index;
+            if (!isConstant(con = args.get(argi++), CONSTANT_String))  return null;
+            nindex = ((Constant)con).itemIndex();
+            if (isConstant(con = args.get(argi++), CONSTANT_MethodType) ||
+                isConstant(con, CONSTANT_Class)) {
+                tindex = ((Constant)con).itemIndex();
+            } else return null;
+            ntindex = (short) cf.pool.addConstant(CONSTANT_NameAndType,
+                    new Short[]{ nindex, tindex }).index;
+            byte reftag = CONSTANT_Method;
+            if (refKind <= REF_putStatic)
+                reftag = CONSTANT_Field;
+            else if (refKind == REF_invokeInterface)
+                reftag = CONSTANT_InterfaceMethod;
+            Constant ref = cf.pool.addConstant(reftag, new Short[]{ cindex, ntindex });
+            return cf.pool.addConstant(CONSTANT_MethodHandle, new Object[]{ refKind, (short)ref.index });
+        }
+        private Constant makeInvokeDynamicCon(List<Object> args) {
+            // E.g.: MH_bsm.invokeGeneric(lookup(), "name", MethodType, "extraArg")
+            removeEmptyJVMSlots(args);
+            if (args.size() != 4 && args.size() != 5)  return null;
+            int argi = 0;
+            short nindex, tindex, ntindex, bsmindex;
+            Object con;
+            if (!isConstant(con = args.get(argi++), CONSTANT_MethodHandle))  return null;
+            bsmindex = (short) ((Constant)con).index;
+            if (!"lookup".equals(args.get(argi++)))  return null;
+            if (!isConstant(con = args.get(argi++), CONSTANT_String))  return null;
+            nindex = ((Constant)con).itemIndex();
+            if (!isConstant(con = args.get(argi++), CONSTANT_MethodType))  return null;
+            tindex = ((Constant)con).itemIndex();
+            ntindex = (short) cf.pool.addConstant(CONSTANT_NameAndType,
+                                                  new Short[]{ nindex, tindex }).index;
+            if (transitionalJSR292) {
+                if (argi != args.size()) {
+                    System.err.println("BSM specifier has extra arguments but transitionalJSR292=1");
+                    return null;
+                }
+                return cf.pool.addConstant(CONSTANT_InvokeDynamic_17,
+                        new Short[]{ bsmindex, ntindex });
+            }
+            List<Object> extraArgs = Collections.emptyList();
+            if (argi < args.size()) {
+                Object arg = args.get(argi);
+                if (arg instanceof List)
+                    extraArgs = (List<Object>) arg;
+                else
+                    extraArgs = Arrays.asList(arg);
+                removeEmptyJVMSlots(args);
+            }
+            List<Short> extraArgIndexes = new CountedList<>(Short.class);
+            for (Object x : extraArgs) {
+                if (x instanceof Number) {
+                    Object num = null; byte numTag = 0;
+                    if (x instanceof Integer) { num = x; numTag = CONSTANT_Integer; }
+                    if (x instanceof Float)   { num = Float.floatToRawIntBits((Float)x); numTag = CONSTANT_Float; }
+                    if (x instanceof Long)    { num = x; numTag = CONSTANT_Long; }
+                    if (x instanceof Double)  { num = Double.doubleToRawLongBits((Double)x); numTag = CONSTANT_Double; }
+                    if (num != null)  x = cf.pool.addConstant(numTag, x);
+                }
+                if (!(x instanceof Constant))  return null;
+                extraArgIndexes.add((short) ((Constant)x).index);
+            }
+            List<Object[]> specs = bootstrapMethodSpecifiers(true);
+            int specindex = -1;
+            Object[] spec = new Object[]{ bsmindex, extraArgIndexes };
+            for (Object[] spec1 : specs) {
+                if (Arrays.equals(spec1, spec)) {
+                    specindex = specs.indexOf(spec1);
+                    if (verbose)  System.err.println("reusing BSM specifier: "+spec1[0]+spec1[1]);
+                    break;
+                }
+            }
+            if (specindex == -1) {
+                specindex = (short) specs.size();
+                specs.add(spec);
+                if (verbose)  System.err.println("adding BSM specifier: "+spec[0]+spec[1]);
+            }
+            return cf.pool.addConstant(CONSTANT_InvokeDynamic,
+                        new Short[]{ (short)specindex, ntindex });
+        }
+
+        List<Object[]> bootstrapMethodSpecifiers(boolean createIfNotFound) {
+            Attr bsms = cf.findAttr("BootstrapMethods");
+            if (bsms == null) {
+                if (!createIfNotFound)  return null;
+                bsms = new Attr(cf, "BootstrapMethods", new byte[]{0,0});
+                assert(bsms == cf.findAttr("BootstrapMethods"));
+            }
+            if (bsms.item instanceof byte[]) {
+                // unflatten
+                List<Object[]> specs = new CountedList<>(Object[].class);
+                DataInputStream in = new DataInputStream(new ByteArrayInputStream((byte[]) bsms.item));
+                try {
+                    int len = (char) in.readShort();
+                    for (int i = 0; i < len; i++) {
+                        short bsm = in.readShort();
+                        int argc = (char) in.readShort();
+                        List<Short> argv = new CountedList<>(Short.class);
+                        for (int j = 0; j < argc; j++)
+                            argv.add(in.readShort());
+                        specs.add(new Object[]{ bsm, argv });
+                    }
+                } catch (IOException ex) { throw new InternalError(); }
+                bsms.item = specs;
+            }
+            return (List<Object[]>) bsms.item;
+        }
+    }
+
+    private DataInputStream openInput(File f) throws IOException {
+        return new DataInputStream(new BufferedInputStream(new FileInputStream(f)));
+    }
+
+    private DataOutputStream openOutput(File f) throws IOException {
+        if (!overwrite && f.exists())
+            throw new IOException("file already exists: "+f);
+        ensureDirectory(f.getParentFile());
+        return new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f)));
+    }
+
+    static byte[] readRawBytes(DataInputStream in, int size) throws IOException {
+        byte[] bytes = new byte[size];
+        int nr = in.read(bytes);
+        if (nr != size)
+            throw new InternalError("wrong size: "+nr);
+        return bytes;
+    }
+
+    private interface Chunk {
+        void readFrom(DataInputStream in) throws IOException;
+        void writeTo(DataOutputStream out) throws IOException;
+    }
+
+    private static class CountedList<T> extends ArrayList<T> implements Chunk {
+        final Class<? extends T> itemClass;
+        final int rowlen;
+        CountedList(Class<? extends T> itemClass, int rowlen) {
+            this.itemClass = itemClass;
+            this.rowlen = rowlen;
+        }
+        CountedList(Class<? extends T> itemClass) { this(itemClass, -1); }
+        public void readFrom(DataInputStream in) throws IOException {
+            int count = in.readUnsignedShort();
+            while (size() < count) {
+                if (rowlen < 0) {
+                    add(readInput(in, itemClass));
+                } else {
+                    Class<?> elemClass = itemClass.getComponentType();
+                    Object[] row = (Object[]) java.lang.reflect.Array.newInstance(elemClass, rowlen);
+                    for (int i = 0; i < rowlen; i++)
+                        row[i] = readInput(in, elemClass);
+                    add(itemClass.cast(row));
+                }
+            }
+        }
+        public void writeTo(DataOutputStream out) throws IOException {
+            out.writeShort((short)size());
+            for (T item : this) {
+                writeOutput(out, item);
+            }
+        }
+    }
+
+    private static <T> T readInput(DataInputStream in, Class<T> dataClass) throws IOException {
+        Object data;
+        if (dataClass == Integer.class) {
+            data = in.readInt();
+        } else if (dataClass == Short.class) {
+            data = in.readShort();
+        } else if (dataClass == Byte.class) {
+            data = in.readByte();
+        } else if (dataClass == String.class) {
+            data = in.readUTF();
+        } else if (Chunk.class.isAssignableFrom(dataClass)) {
+            T obj;
+            try { obj = dataClass.newInstance(); }
+                catch (Exception ex) { throw new RuntimeException(ex); }
+            ((Chunk)obj).readFrom(in);
+            data = obj;
+        } else {
+            throw new InternalError("bad input datum: "+dataClass);
+        }
+        return dataClass.cast(data);
+    }
+    private static <T> T readInput(byte[] bytes, Class<T> dataClass) {
+        try {
+            return readInput(new DataInputStream(new ByteArrayInputStream(bytes)), dataClass);
+        } catch (IOException ex) {
+            throw new InternalError();
+        }
+    }
+    private static void readInputs(DataInputStream in, Object... data) throws IOException {
+        for (Object x : data)  ((Chunk)x).readFrom(in);
+    }
+
+    private static void writeOutput(DataOutputStream out, Object data) throws IOException {
+        if (data == null) {
+            return;
+        } if (data instanceof Integer) {
+            out.writeInt((Integer)data);
+        } else if (data instanceof Long) {
+            out.writeLong((Long)data);
+        } else if (data instanceof Short) {
+            out.writeShort((Short)data);
+        } else if (data instanceof Byte) {
+            out.writeByte((Byte)data);
+        } else if (data instanceof String) {
+            out.writeUTF((String)data);
+        } else if (data instanceof byte[]) {
+            out.write((byte[])data);
+        } else if (data instanceof Object[]) {
+            for (Object x : (Object[]) data)
+                writeOutput(out, x);
+        } else if (data instanceof Chunk) {
+            Chunk x = (Chunk) data;
+            x.writeTo(out);
+        } else if (data instanceof List) {
+            for (Object x : (List<?>) data)
+                writeOutput(out, x);
+        } else {
+            throw new InternalError("bad output datum: "+data+" : "+data.getClass().getName());
+        }
+    }
+    private static void writeOutputs(DataOutputStream out, Object... data) throws IOException {
+        for (Object x : data)  writeOutput(out, x);
+    }
+
+    public static abstract class Outer {
+        public abstract List<? extends Inner> inners();
+        protected void linkInners() {
+            for (Inner i : inners()) {
+                i.linkOuter(this);
+                if (i instanceof Outer)
+                    ((Outer)i).linkInners();
+            }
+        }
+        public <T extends Outer> T outer(Class<T> c) {
+            for (Outer walk = this;; walk = ((Inner)walk).outer()) {
+                if (c.isInstance(walk))
+                    return c.cast(walk);
+                //if (!(walk instanceof Inner))  return null;
+            }
+        }
+
+        public abstract List<Attr> attrs();
+        public Attr findAttr(String name) {
+            return findAttr(outer(ClassFile.class).pool.stringIndex(name, false));
+        }
+        public Attr findAttr(int name) {
+            if (name == 0)  return null;
+            for (Attr a : attrs()) {
+                if (a.name == name)  return a;
+            }
+            return null;
+        }
+    }
+    public interface Inner { Outer outer(); void linkOuter(Outer o); }
+    public static abstract class InnerOuter extends Outer implements Inner {
+        public Outer outer;
+        public Outer outer() { return outer; }
+        public void linkOuter(Outer o) { assert(outer == null); outer = o; }
+    }
+    public static class Constant<T> implements Chunk {
+        public final byte tag;
+        public final T item;
+        public final int index;
+        public Constant(int index, byte tag, T item) {
+            this.index = index;
+            this.tag = tag;
+            this.item = item;
+        }
+        public Constant checkTag(byte tag) {
+            if (this.tag != tag)  throw new InternalError(this.toString());
+            return this;
+        }
+        public String itemString() { return (String)item; }
+        public Short itemIndex() { return (Short)item; }
+        public Short[] itemIndexes() { return (Short[])item; }
+        public void readFrom(DataInputStream in) throws IOException {
+            throw new InternalError("do not call");
+        }
+        public void writeTo(DataOutputStream out) throws IOException {
+            writeOutputs(out, tag, item);
+        }
+        public boolean equals(Object x) { return (x instanceof Constant && equals((Constant)x)); }
+        public boolean equals(Constant that) {
+            return (this.tag == that.tag && this.itemAsComparable().equals(that.itemAsComparable()));
+        }
+        public int hashCode() { return (tag * 31) + this.itemAsComparable().hashCode(); }
+        public Object itemAsComparable() {
+            switch (tag) {
+            case CONSTANT_Double:   return Double.longBitsToDouble((Long)item);
+            case CONSTANT_Float:    return Float.intBitsToFloat((Integer)item);
+            }
+            return (item instanceof Object[] ? Arrays.asList((Object[])item) : item);
+        }
+        public String toString() {
+            String itstr = String.valueOf(itemAsComparable());
+            return (index + ":" + tagName(tag) + (itstr.startsWith("[")?"":"=") + itstr);
+        }
+        private static String[] TAG_NAMES;
+        public static String tagName(byte tag) {  // used for error messages
+            if (TAG_NAMES == null)
+                TAG_NAMES = ("None Utf8 Unicode Integer Float Long Double Class String"
+                             +" Fieldref Methodref InterfaceMethodref NameAndType #13 #14"
+                             +" MethodHandle MethodType InvokeDynamic#17 InvokeDynamic").split(" ");
+            if ((tag & 0xFF) >= TAG_NAMES.length)  return "#"+(tag & 0xFF);
+            return TAG_NAMES[tag & 0xFF];
+        }
+    }
+
+    public static class Pool extends CountedList<Constant> implements Chunk {
+        private Map<String,Short> strings = new TreeMap<>();
+
+        public Pool() {
+            super(Constant.class);
+        }
+        public void readFrom(DataInputStream in) throws IOException {
+            int count = in.readUnsignedShort();
+            add(null);  // always ignore first item
+            while (size() < count) {
+                readConstant(in);
+            }
+        }
+        public <T> Constant<T> addConstant(byte tag, T item) {
+            Constant<T> con = new Constant<>(size(), tag, item);
+            int idx = indexOf(con);
+            if (idx >= 0)  return get(idx);
+            add(con);
+            if (tag == CONSTANT_Utf8)  strings.put((String)item, (short) con.index);
+            return con;
+        }
+        private void readConstant(DataInputStream in) throws IOException {
+            byte tag = in.readByte();
+            int index = size();
+            Object arg;
+            switch (tag) {
+            case CONSTANT_Utf8:
+                arg = in.readUTF();
+                strings.put((String) arg, (short) size());
+                break;
+            case CONSTANT_Integer:
+            case CONSTANT_Float:
+                arg = in.readInt(); break;
+            case CONSTANT_Long:
+            case CONSTANT_Double:
+                add(new Constant(index, tag, in.readLong()));
+                add(null);
+                return;
+            case CONSTANT_Class:
+            case CONSTANT_String:
+                arg = in.readShort(); break;
+            case CONSTANT_Field:
+            case CONSTANT_Method:
+            case CONSTANT_InterfaceMethod:
+            case CONSTANT_NameAndType:
+            case CONSTANT_InvokeDynamic_17:
+            case CONSTANT_InvokeDynamic:
+                // read an ordered pair
+                arg = new Short[] { in.readShort(), in.readShort() };
+                break;
+            case CONSTANT_MethodHandle:
+                // read an ordered pair; first part is a u1 (not u2)
+                arg = new Object[] { in.readByte(), in.readShort() };
+                break;
+            case CONSTANT_MethodType:
+                arg = in.readShort(); break;
+            default:
+                throw new InternalError("bad CP tag "+tag);
+            }
+            add(new Constant(index, tag, arg));
+        }
+
+        // Access:
+        public Constant get(int index) {
+            // extra 1-bits get into the shorts
+            return super.get((char) index);
+        }
+        String getString(byte tag, short index) {
+            get(index).checkTag(tag);
+            return getString(index);
+        }
+        String getString(short index) {
+            Object v = get(index).item;
+            if (v instanceof Short)
+                v = get((Short)v).checkTag(CONSTANT_Utf8).item;
+            return (String) v;
+        }
+        String[] getStrings(Short[] indexes) {
+            String[] res = new String[indexes.length];
+            for (int i = 0; i < indexes.length; i++)
+                res[i] = getString(indexes[i]);
+            return res;
+        }
+        int stringIndex(String name, boolean createIfNotFound) {
+            Short x = strings.get(name);
+            if (x != null)  return (char)(int) x;
+            if (!createIfNotFound)  return 0;
+            return addConstant(CONSTANT_Utf8, name).index;
+        }
+        Short[] getMemberRef(short index) {
+            Short[] cls_nnt = get(index).itemIndexes();
+            Short[] name_type = get(cls_nnt[1]).itemIndexes();
+            return new Short[]{ cls_nnt[0], name_type[0], name_type[1] };
+        }
+    }
+
+    public class ClassFile extends Outer implements Chunk {
+        ClassFile(File f) throws IOException {
+            DataInputStream in = openInput(f);
+            try {
+                readFrom(in);
+            } finally {
+                if (in != null)  in.close();
+            }
+        }
+
+        public int                magic, version;  // <min:maj>
+        public final Pool         pool       = new Pool();
+        public short              access, thisc, superc;
+        public final List<Short>  interfaces = new CountedList<>(Short.class);
+        public final List<Field>  fields     = new CountedList<>(Field.class);
+        public final List<Method> methods    = new CountedList<>(Method.class);
+        public final List<Attr>   attrs      = new CountedList<>(Attr.class);
+
+        public final void readFrom(DataInputStream in) throws IOException {
+            magic = in.readInt(); version = in.readInt();
+            if (magic != 0xCAFEBABE)  throw new IOException("bad magic number");
+            pool.readFrom(in);
+            Code_index = pool.stringIndex("Code", false);
+            access = in.readShort(); thisc = in.readShort(); superc = in.readShort();
+            readInputs(in, interfaces, fields, methods, attrs);
+            if (in.read() >= 0)  throw new IOException("junk after end of file");
+            linkInners();
+        }
+
+        void writeTo(File f) throws IOException {
+            DataOutputStream out = openOutput(f);
+            try {
+                writeTo(out);
+            } finally {
+                out.close();
+            }
+        }
+
+        public void writeTo(DataOutputStream out) throws IOException {
+            writeOutputs(out, magic, version, pool,
+                         access, thisc, superc, interfaces,
+                         fields, methods, attrs);
+        }
+
+        public byte[] toByteArray() {
+            try {
+                ByteArrayOutputStream buf = new ByteArrayOutputStream();
+                writeTo(new DataOutputStream(buf));
+                return buf.toByteArray();
+            } catch (IOException ex) {
+                throw new InternalError();
+            }
+        }
+
+        public List<Inner> inners() {
+            List<Inner> inns = new ArrayList<>();
+            inns.addAll(fields); inns.addAll(methods); inns.addAll(attrs);
+            return inns;
+        }
+        public List<Attr> attrs() { return attrs; }
+
+        // derived stuff:
+        public String nameString() { return pool.getString(CONSTANT_Class, thisc); }
+        int Code_index;
+    }
+
+    private static <T extends Member> T findMember(List<T> mems, int name, int type) {
+        if (name == 0 || type == 0)  return null;
+        for (T m : mems) {
+            if (m.name == name && m.type == type)  return m;
+        }
+        return null;
+    }
+
+    public static class Member extends InnerOuter implements Chunk {
+        public short access, name, type;
+        public final List<Attr> attrs = new CountedList<>(Attr.class);
+        public void readFrom(DataInputStream in) throws IOException {
+            access = in.readShort(); name = in.readShort(); type = in.readShort();
+            readInputs(in, attrs);
+        }
+        public void writeTo(DataOutputStream out) throws IOException {
+            writeOutputs(out, access, name, type, attrs);
+        }
+        public List<Attr> inners() { return attrs; }
+        public List<Attr> attrs() { return attrs; }
+        public ClassFile outer() { return (ClassFile) outer; }
+        public String nameString() { return outer().pool.getString(CONSTANT_Utf8, name); }
+        public String typeString() { return outer().pool.getString(CONSTANT_Utf8, type); }
+        public String toString() {
+            if (outer == null)  return super.toString();
+            return nameString() + (this instanceof Method ? "" : ":")
+                    + simplifyType(typeString());
+        }
+    }
+    public static class Field extends Member {
+    }
+    public static class Method extends Member {
+        public Code code() {
+            Attr a = findAttr("Code");
+            if (a == null)  return null;
+            return (Code) a.item;
+        }
+        public Instruction instructions() {
+            Code code = code();
+            if (code == null)  return null;
+            return code.instructions();
+        }
+    }
+
+    public static class Attr extends InnerOuter implements Chunk {
+        public short name;
+        public int size = -1;  // no pre-declared size
+        public Object item;
+
+        public Attr() {}
+        public Attr(Outer outer, String name, Object item) {
+            ClassFile cf = outer.outer(ClassFile.class);
+            linkOuter(outer);
+            this.name = (short) cf.pool.stringIndex(name, true);
+            this.item = item;
+            outer.attrs().add(this);
+        }
+        public void readFrom(DataInputStream in) throws IOException {
+            name = in.readShort();
+            size = in.readInt();
+            item = readRawBytes(in, size);
+        }
+        public void writeTo(DataOutputStream out) throws IOException {
+            out.writeShort(name);
+            // write the 4-byte size header and then the contents:
+            byte[] bytes;
+            int trueSize;
+            if (item instanceof byte[]) {
+                bytes = (byte[]) item;
+                out.writeInt(trueSize = bytes.length);
+                out.write(bytes);
+            } else {
+                trueSize = flatten(out);
+                //if (!(item instanceof Code))  System.err.println("wrote complex attr name="+(int)(char)name+" size="+trueSize+" data="+Arrays.toString(flatten()));
+            }
+            if (trueSize != size && size >= 0)
+                System.err.println("warning: attribute size changed "+size+" to "+trueSize);
+        }
+        public void linkOuter(Outer o) {
+            super.linkOuter(o);
+            if (item instanceof byte[] &&
+                outer instanceof Method &&
+                ((Method)outer).outer().Code_index == name) {
+                    item = readInput((byte[])item, Code.class);
+            }
+        }
+        public List<Inner> inners() {
+            if (item instanceof Inner)
+                return Collections.nCopies(1, (Inner)item);
+            return Collections.emptyList();
+        }
+        public List<Attr> attrs() { return null; }  // Code overrides this
+        public byte[] flatten() {
+            ByteArrayOutputStream buf = new ByteArrayOutputStream(Math.max(20, size));
+            flatten(buf);
+            return buf.toByteArray();
+        }
+        public int flatten(DataOutputStream out) throws IOException {
+            ByteArrayOutputStream buf = new ByteArrayOutputStream(Math.max(20, size));
+            int trueSize = flatten(buf);
+            out.writeInt(trueSize);
+            buf.writeTo(out);
+            return trueSize;
+        }
+        private int flatten(ByteArrayOutputStream buf) {
+            try {
+                writeOutput(new DataOutputStream(buf), item);
+                return buf.size();
+            } catch (IOException ex) {
+                throw new InternalError();
+            }
+        }
+        public String nameString() {
+            ClassFile cf = outer(ClassFile.class);
+            if (cf == null)  return "#"+name;
+            return cf.pool.getString(name);
+        }
+        public String toString() {
+            return nameString()+(size < 0 ? "=" : "["+size+"]=")+item;
+        }
+    }
+
+    public static class Code extends InnerOuter implements Chunk {
+        public short stacks, locals;
+        public byte[] bytes;
+        public final List<Short[]> etable = new CountedList<>(Short[].class, 4);
+        public final List<Attr> attrs = new CountedList<>(Attr.class);
+        // etable[N] = (N)*{ startpc, endpc, handlerpc, catchtype }
+        public void readFrom(DataInputStream in) throws IOException {
+            stacks = in.readShort(); locals = in.readShort();
+            bytes = readRawBytes(in, in.readInt());
+            readInputs(in, etable, attrs);
+        }
+        public void writeTo(DataOutputStream out) throws IOException {
+            writeOutputs(out, stacks, locals, bytes.length, bytes, etable, attrs);
+        }
+        public List<Attr> inners() { return attrs; }
+        public List<Attr> attrs() { return attrs; }
+        public Instruction instructions() {
+            return new Instruction(bytes, 0);
+        }
+    }
+
+    // lots of constants
+    private static final byte
+        CONSTANT_Utf8              = 1,
+        CONSTANT_Integer           = 3,
+        CONSTANT_Float             = 4,
+        CONSTANT_Long              = 5,
+        CONSTANT_Double            = 6,
+        CONSTANT_Class             = 7,
+        CONSTANT_String            = 8,
+        CONSTANT_Field             = 9,
+        CONSTANT_Method            = 10,
+        CONSTANT_InterfaceMethod   = 11,
+        CONSTANT_NameAndType       = 12,
+        CONSTANT_MethodHandle      = 15,  // JSR 292
+        CONSTANT_MethodType        = 16,  // JSR 292
+        CONSTANT_InvokeDynamic_17  = 17,  // JSR 292, only occurs in old class files
+        CONSTANT_InvokeDynamic     = 18;  // JSR 292
+    private static final byte
+        REF_getField               = 1,
+        REF_getStatic              = 2,
+        REF_putField               = 3,
+        REF_putStatic              = 4,
+        REF_invokeVirtual          = 5,
+        REF_invokeStatic           = 6,
+        REF_invokeSpecial          = 7,
+        REF_newInvokeSpecial       = 8,
+        REF_invokeInterface        = 9;
+
+    private static final int
+        opc_nop                    = 0,
+        opc_aconst_null            = 1,
+        opc_nconst_MIN             = 2,  // iconst_m1
+        opc_nconst_MAX             = 15, // dconst_1
+        opc_bipush                 = 16,
+        opc_sipush                 = 17,
+        opc_ldc                    = 18,
+        opc_ldc_w                  = 19,
+        opc_ldc2_w                 = 20,
+        opc_aload                  = 25,
+        opc_aload_0                = 42,
+        opc_aload_MAX              = 45,
+        opc_aaload                 = 50,
+        opc_astore                 = 58,
+        opc_astore_0               = 75,
+        opc_astore_MAX             = 78,
+        opc_aastore                = 83,
+        opc_pop                    = 87,
+        opc_pop2                   = 88,
+        opc_dup                    = 89,
+        opc_dup_x1                 = 90,
+        opc_dup_x2                 = 91,
+        opc_dup2                   = 92,
+        opc_dup2_x1                = 93,
+        opc_dup2_x2                = 94,
+        opc_swap                   = 95,
+        opc_tableswitch            = 170,
+        opc_lookupswitch           = 171,
+        opc_areturn                = 176,
+        opc_getstatic              = 178,
+        opc_putstatic              = 179,
+        opc_getfield               = 180,
+        opc_putfield               = 181,
+        opc_invokevirtual          = 182,
+        opc_invokespecial          = 183,
+        opc_invokestatic           = 184,
+        opc_invokeinterface        = 185,
+        opc_invokedynamic          = 186,
+        opc_new                    = 187,
+        opc_anewarray              = 189,
+        opc_checkcast              = 192,
+        opc_ifnull                 = 198,
+        opc_ifnonnull              = 199,
+        opc_wide                   = 196;
+
+    private static final Object[] INSTRUCTION_CONSTANTS = {
+        -1, 0, 1, 2, 3, 4, 5, 0L, 1L, 0.0F, 1.0F, 2.0F, 0.0D, 1.0D
+    };
+
+    private static final String INSTRUCTION_FORMATS =
+        "nop$ aconst_null$L iconst_m1$I iconst_0$I iconst_1$I "+
+        "iconst_2$I iconst_3$I iconst_4$I iconst_5$I lconst_0$J_ "+
+        "lconst_1$J_ fconst_0$F fconst_1$F fconst_2$F dconst_0$D_ "+
+        "dconst_1$D_ bipush=bx$I sipush=bxx$I ldc=bk$X ldc_w=bkk$X "+
+        "ldc2_w=bkk$X_ iload=bl/wbll$I lload=bl/wbll$J_ fload=bl/wbll$F "+
+        "dload=bl/wbll$D_ aload=bl/wbll$L iload_0$I iload_1$I "+
+        "iload_2$I iload_3$I lload_0$J_ lload_1$J_ lload_2$J_ "+
+        "lload_3$J_ fload_0$F fload_1$F fload_2$F fload_3$F dload_0$D_ "+
+        "dload_1$D_ dload_2$D_ dload_3$D_ aload_0$L aload_1$L "+
+        "aload_2$L aload_3$L iaload$LI$I laload$LI$J_ faload$LI$F "+
+        "daload$LI$D_ aaload$LI$L baload$LI$I caload$LI$I saload$LI$I "+
+        "istore=bl/wbll$I$ lstore=bl/wbll$J_$ fstore=bl/wbll$F$ "+
+        "dstore=bl/wbll$D_$ astore=bl/wbll$L$ istore_0$I$ istore_1$I$ "+
+        "istore_2$I$ istore_3$I$ lstore_0$J_$ lstore_1$J_$ "+
+        "lstore_2$J_$ lstore_3$J_$ fstore_0$F$ fstore_1$F$ fstore_2$F$ "+
+        "fstore_3$F$ dstore_0$D_$ dstore_1$D_$ dstore_2$D_$ "+
+        "dstore_3$D_$ astore_0$L$ astore_1$L$ astore_2$L$ astore_3$L$ "+
+        "iastore$LII$ lastore$LIJ_$ fastore$LIF$ dastore$LID_$ "+
+        "aastore$LIL$ bastore$LII$ castore$LII$ sastore$LII$ pop$X$ "+
+        "pop2$XX$ dup$X$XX dup_x1$XX$XXX dup_x2$XXX$XXXX dup2$XX$XXXX "+
+        "dup2_x1$XXX$XXXXX dup2_x2$XXXX$XXXXXX swap$XX$XX "+
+        "iadd$II$I ladd$J_J_$J_ fadd$FF$F dadd$D_D_$D_ isub$II$I "+
+        "lsub$J_J_$J_ fsub$FF$F dsub$D_D_$D_ imul$II$I lmul$J_J_$J_ "+
+        "fmul$FF$F dmul$D_D_$D_ idiv$II$I ldiv$J_J_$J_ fdiv$FF$F "+
+        "ddiv$D_D_$D_ irem$II$I lrem$J_J_$J_ frem$FF$F drem$D_D_$D_ "+
+        "ineg$I$I lneg$J_$J_ fneg$F$F dneg$D_$D_ ishl$II$I lshl$J_I$J_ "+
+        "ishr$II$I lshr$J_I$J_ iushr$II$I lushr$J_I$J_ iand$II$I "+
+        "land$J_J_$J_ ior$II$I lor$J_J_$J_ ixor$II$I lxor$J_J_$J_ "+
+        "iinc=blx/wbllxx$ i2l$I$J_ i2f$I$F i2d$I$D_ l2i$J_$I l2f$J_$F "+
+        "l2d$J_$D_ f2i$F$I f2l$F$J_ f2d$F$D_ d2i$D_$I d2l$D_$J_ "+
+        "d2f$D_$F i2b$I$I i2c$I$I i2s$I$I lcmp fcmpl fcmpg dcmpl dcmpg "+
+        "ifeq=boo ifne=boo iflt=boo ifge=boo ifgt=boo ifle=boo "+
+        "if_icmpeq=boo if_icmpne=boo if_icmplt=boo if_icmpge=boo "+
+        "if_icmpgt=boo if_icmple=boo if_acmpeq=boo if_acmpne=boo "+
+        "goto=boo jsr=boo ret=bl/wbll tableswitch=* lookupswitch=* "+
+        "ireturn lreturn freturn dreturn areturn return "+
+        "getstatic=bkf$Q putstatic=bkf$Q$ getfield=bkf$L$Q "+
+        "putfield=bkf$LQ$ invokevirtual=bkm$LQ$Q "+
+        "invokespecial=bkm$LQ$Q invokestatic=bkm$Q$Q "+
+        "invokeinterface=bkixx$LQ$Q invokedynamic=bkd__$Q$Q new=bkc$L "+
+        "newarray=bx$I$L anewarray=bkc$I$L arraylength$L$I athrow "+
+        "checkcast=bkc$L$L instanceof=bkc$L$I monitorenter$L "+
+        "monitorexit$L wide=* multianewarray=bkcx ifnull=boo "+
+        "ifnonnull=boo goto_w=boooo jsr_w=boooo ";
+    private static final String[] INSTRUCTION_NAMES;
+    private static final String[] INSTRUCTION_POPS;
+    private static final int[] INSTRUCTION_INFO;
+    static {
+        String[] insns = INSTRUCTION_FORMATS.split(" ");
+        assert(insns[opc_lookupswitch].startsWith("lookupswitch"));
+        assert(insns[opc_tableswitch].startsWith("tableswitch"));
+        assert(insns[opc_wide].startsWith("wide"));
+        assert(insns[opc_invokedynamic].startsWith("invokedynamic"));
+        int[] info = new int[256];
+        String[] names = new String[256];
+        String[] pops = new String[256];
+        for (int i = 0; i < insns.length; i++) {
+            String insn = insns[i];
+            int dl = insn.indexOf('$');
+            if (dl > 0) {
+                String p = insn.substring(dl+1);
+                if (p.indexOf('$') < 0)  p = "$" + p;
+                pops[i] = p;
+                insn = insn.substring(0, dl);
+            }
+            int eq = insn.indexOf('=');
+            if (eq < 0) {
+                info[i] = 1;
+                names[i] = insn;
+                continue;
+            }
+            names[i] = insn.substring(0, eq);
+            String fmt = insn.substring(eq+1);
+            if (fmt.equals("*")) {
+                info[i] = 0;
+                continue;
+            }
+            int sl = fmt.indexOf('/');
+            if (sl < 0) {
+                info[i] = (char) fmt.length();
+            } else {
+                String wfmt = fmt.substring(sl+1);
+                fmt = fmt.substring(0, sl);
+                info[i] = (char)( fmt.length() + (wfmt.length() * 16) );
+            }
+        }
+        INSTRUCTION_INFO = info;
+        INSTRUCTION_NAMES = names;
+        INSTRUCTION_POPS = pops;
+    }
+
+    public static class Instruction implements Cloneable {
+        byte[] codeBase;
+        int pc;
+        int bc;
+        int info;
+        int wide;
+        int len;
+        Instruction(byte[] codeBase, int pc) {
+            this.codeBase = codeBase;
+            init(pc);
+        }
+        public Instruction clone() {
+            try {
+                return (Instruction) super.clone();
+            } catch (CloneNotSupportedException ex) {
+                throw new InternalError();
+            }
+        }
+        private Instruction init(int pc) {
+            this.pc = pc;
+            this.bc = codeBase[pc] & 0xFF;
+            this.info = INSTRUCTION_INFO[bc];
+            this.wide = 0;
+            this.len = (info & 0x0F);
+            if (len == 0)
+                computeLength();
+            return this;
+        }
+        Instruction next() {
+            if (len == 0 && bc != 0)  throw new InternalError();
+            int npc = pc + len;
+            if (npc == codeBase.length)
+                return null;
+            return init(npc);
+        }
+        void forceNext(int newLen) {
+            bc = opc_nop;
+            len = newLen;
+        }
+
+        public String toString() {
+            StringBuilder buf = new StringBuilder();
+            buf.append(pc).append(":").append(INSTRUCTION_NAMES[bc]);
+            switch (len) {
+            case 3: buf.append(" ").append(u2At(1)); break;
+            case 5: buf.append(" ").append(u2At(1)).append(" ").append(u2At(3)); break;
+            default:  for (int i = 1; i < len; i++)  buf.append(" ").append(u1At(1));
+            }
+            return buf.toString();
+        }
+
+        // these are the hard parts
+        private void computeLength() {
+            int cases;
+            switch (bc) {
+            case opc_wide:
+                bc = codeBase[pc + 1];
+                info = INSTRUCTION_INFO[bc];
+                len = ((info >> 4) & 0x0F);
+                if (len == 0)  throw new RuntimeException("misplaced wide bytecode: "+bc);
+                return;
+
+            case opc_tableswitch:
+                cases = (u4At(alignedIntOffset(2)) - u4At(alignedIntOffset(1)) + 1);
+                len = alignedIntOffset(3 + cases*1);
+                return;
+
+            case opc_lookupswitch:
+                cases = u4At(alignedIntOffset(1));
+                len = alignedIntOffset(2 + cases*2);
+                return;
+
+            default:
+                throw new RuntimeException("unknown bytecode: "+bc);
+            }
+        }
+        // switch code
+        // clget the Nth int (where 0 is the first after the opcode itself)
+        public int alignedIntOffset(int n) {
+            int pos = pc + 1;
+            pos += ((-pos) & 0x03);  // align it
+            pos += (n * 4);
+            return pos - pc;
+        }
+        public int u1At(int pos) {
+            return (codeBase[pc+pos] & 0xFF);
+        }
+        public int u2At(int pos) {
+            return (u1At(pos+0)<<8) + u1At(pos+1);
+        }
+        public int u4At(int pos) {
+            return (u2At(pos+0)<<16) + u2At(pos+2);
+        }
+        public void u1AtPut(int pos, int x) {
+            codeBase[pc+pos] = (byte)x;
+        }
+        public void u2AtPut(int pos, int x) {
+            codeBase[pc+pos+0] = (byte)(x >> 8);
+            codeBase[pc+pos+1] = (byte)(x >> 0);
+        }
+    }
+
+    static String simplifyType(String type) {
+        String simpleType = OBJ_SIGNATURE.matcher(type).replaceAll("L");
+        assert(simpleType.matches("^\\([A-Z]*\\)[A-Z]$"));
+        // change (DD)D to (D_D_)D_
+        simpleType = WIDE_SIGNATURE.matcher(simpleType).replaceAll("\\0_");
+        return simpleType;
+    }
+    static int argsize(String type) {
+        return simplifyType(type).length()-3;
+    }
+    private static final Pattern OBJ_SIGNATURE = Pattern.compile("\\[*L[^;]*;|\\[+[A-Z]");
+    private static final Pattern WIDE_SIGNATURE = Pattern.compile("[JD]");
+}
--- a/test/java/math/BigInteger/BigIntegerTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/math/BigInteger/BigIntegerTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -645,26 +645,17 @@
             BigInteger b2 = null;
 
             File f = new File("serialtest");
-            FileOutputStream fos = new FileOutputStream(f);
-            try {
-                ObjectOutputStream oos = new ObjectOutputStream(fos);
-                try {
+
+            try (FileOutputStream fos = new FileOutputStream(f)) {
+                try (ObjectOutputStream oos = new ObjectOutputStream(fos)) {
                     oos.writeObject(b1);
                     oos.flush();
-                } finally {
-                    oos.close();
                 }
 
-                FileInputStream fis = new FileInputStream(f);
-                try {
-                    ObjectInputStream ois = new ObjectInputStream(fis);
-                    try {
-                        b2 = (BigInteger)ois.readObject();
-                    } finally {
-                        ois.close();
-                    }
-                } finally {
-                    fis.close();
+                try (FileInputStream fis = new FileInputStream(f);
+                     ObjectInputStream ois = new ObjectInputStream(fis))
+                {
+                    b2 = (BigInteger)ois.readObject();
                 }
 
                 if (!b1.equals(b2) ||
@@ -673,8 +664,6 @@
                     System.err.println("Serialized failed for hex " +
                                        b1.toString(16));
                 }
-            } finally {
-                fos.close();
             }
             f.delete();
         }
@@ -683,29 +672,17 @@
             BigInteger b1 = fetchNumber(rnd.nextInt(100));
             BigInteger b2 = null;
             File f = new File("serialtest");
-            FileOutputStream fos = new FileOutputStream(f);
-            try {
-                ObjectOutputStream oos = new ObjectOutputStream(fos);
-                try {
+            try (FileOutputStream fos = new FileOutputStream(f)) {
+                try (ObjectOutputStream oos = new ObjectOutputStream(fos)) {
                     oos.writeObject(b1);
                     oos.flush();
-                } finally {
-                    oos.close();
                 }
 
-                FileInputStream fis = new FileInputStream(f);
-                try {
-                    ObjectInputStream ois = new ObjectInputStream(fis);
-                    try {
-                        b2 = (BigInteger)ois.readObject();
-                    } finally {
-                        ois.close();
-                    }
-                } finally {
-                    fis.close();
+                try (FileInputStream fis = new FileInputStream(f);
+                     ObjectInputStream ois = new ObjectInputStream(fis))
+                {
+                    b2 = (BigInteger)ois.readObject();
                 }
-            } finally {
-                fos.close();
             }
 
             if (!b1.equals(b2) ||
--- a/test/java/net/URI/Test.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/net/URI/Test.java	Wed Apr 20 04:38:36 2011 +0100
@@ -23,7 +23,7 @@
 
 /* @test
  * @summary Unit test for java.net.URI
- * @bug 4464135 4505046 4503239 4438319 4991359 4866303
+ * @bug 4464135 4505046 4503239 4438319 4991359 4866303 7023363
  * @author Mark Reinhold
  */
 
@@ -1050,6 +1050,13 @@
         test("http://1.2.3.4.5").psa().x().z();
         test("http://[1.2.3.4:5]").x().z();
         test("http://1:2:3:4:5:6:7:8").psa().x().z();
+        test("http://[1.2.3.4]/").x().z();
+        test("http://[1.2.3.4/").x().z();
+        test("http://[foo]/").x().z();
+        test("http://[foo/").x().z();
+        test("s", "[foo]", "/", null, null).x().z();
+        test("s", "[foo", "/", null, null).x().z();
+        test("s", "[::foo", "/", null, null).x().z();
 
         // Test hostnames that might initially look like IPv4 addresses
 
--- a/test/java/net/URLConnection/GetXmlContentType.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/net/URLConnection/GetXmlContentType.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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,8 +23,8 @@
 
 /*
  * @test
- * @bug 4160195
- * @summary Check for correct detection of XML content type
+ * @bug 4160195 7026346
+ * @summary Check for correct detection of XML content type, including BOM streams
  */
 
 import java.io.*;
@@ -34,6 +34,8 @@
 public class GetXmlContentType {
 
     static final String XML_MIME_TYPE = "application/xml";
+    static final String XML_HEADER = "<?xml";
+    static int passed, failed;
 
     // guess type from content and filename
     static final String goodFiles [] = {
@@ -50,52 +52,91 @@
         };
 
     public static void main(String[] args) throws Exception {
-        boolean sawError = false;
+        contentTypeFromFile();
+        contentTypeFromBOMStream();
 
-        //
+        if (failed > 0)
+            throw new RuntimeException (
+                "Test failed; passed = " + passed + ", failed = " + failed);
+    }
+
+    static void contentTypeFromFile() throws Exception {
         // POSITIVE tests:  good data --> good result
-        //
-        for (int i = 0; i < goodFiles.length; i++) {
-            String      result = getUrlContentType (goodFiles [i]);
+
+        for (String goodFile : goodFiles) {
+            String result = getUrlContentType(goodFile);
 
-            if (!XML_MIME_TYPE.equals (result)) {
-                System.out.println ("Wrong MIME type: "
-                    + goodFiles [i]
-                    + " --> " + result
-                    );
-                sawError = true;
+            if (!XML_MIME_TYPE.equals(result)) {
+                System.out.println("Wrong MIME type: " + goodFile + " --> " + result);
+                failed++;
+            } else {
+                passed++;
             }
         }
 
-        //
         // NEGATIVE tests:  bad data --> correct diagnostic
-        //
-        for (int i = 0; i < badFiles.length; i++) {
-            String      result = getUrlContentType (badFiles [i]);
+        for (String badFile : badFiles) {
+            String result = getUrlContentType(badFile);
+
+            if (XML_MIME_TYPE.equals(result)) {
+                System.out.println("Wrong MIME type: " + badFile + " --> " + result);
+                failed++;
+            } else {
+                passed++;
+            }
+        }
+    }
+
+    static String getUrlContentType(String name) throws IOException {
+        File file = new File(System.getProperty("test.src", "."), "xml");
+        URL u = new URL("file:"
+                         + file.getCanonicalPath()
+                         + file.separator
+                         + name);
+        URLConnection conn = u.openConnection();
+
+        return conn.getContentType();
+    }
 
-            if (XML_MIME_TYPE.equals (result)) {
-                System.out.println ("Wrong MIME type: "
-                    + badFiles [i]
-                    + " --> " + result
-                    );
-                sawError = true;
-            }
+    static void contentTypeFromBOMStream() throws Exception {
+        final String[] encodings = new  String[]
+                {"UTF-8", "UTF-16BE", "UTF-16LE", "UTF-32BE", "UTF-32LE"};
+        for (String encoding : encodings) {
+             try (InputStream is = new ByteArrayInputStream(toBOMBytes(encoding))) {
+                 String mime = URLConnection.guessContentTypeFromStream(is);
+                 if ( !XML_MIME_TYPE.equals(mime) ) {
+                     System.out.println("Wrong MIME type: " + encoding + " --> " + mime);
+                     failed++;
+                 } else {
+                     passed++;
+                 }
+             }
+         }
+    }
+
+    static byte[] toBOMBytes(String encoding) throws Exception {
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+        switch (encoding) {
+            case "UTF-8" :
+                bos.write(new  byte[] { (byte) 0xEF, (byte) 0xBB, (byte) 0xBF });
+                break;
+            case "UTF-16BE" :
+                bos.write(new  byte[] { (byte) 0xFE, (byte) 0xFF });
+                break;
+            case "UTF-16LE" :
+                bos.write(new  byte[] { (byte) 0xFF, (byte) 0xFE });
+                break;
+            case "UTF-32BE" :
+                bos.write(new  byte[] { (byte) 0x00, (byte) 0x00,
+                                        (byte) 0xFE, (byte) 0xFF });
+                break;
+            case "UTF-32LE" :
+                bos.write(new  byte[] { (byte) 0xFF, (byte) 0xFE,
+                                        (byte) 0x00, (byte) 0x00 });
         }
 
-        if (sawError)
-            throw new Exception (
-                "GetXmlContentType Test failed; see diagnostics.");
+        bos.write(XML_HEADER.getBytes(encoding));
+        return bos.toByteArray();
     }
-
-    static String getUrlContentType (String name) throws IOException {
-        File            file = new File(System.getProperty("test.src", "."), "xml");
-        URL             u = new URL ("file:"
-                            + file.getCanonicalPath()
-                            + file.separator
-                            + name);
-        URLConnection   conn = u.openConnection ();
-
-        return conn.getContentType ();
-    }
-
 }
--- a/test/java/net/URLConnection/RedirectLimit.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/net/URLConnection/RedirectLimit.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, 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,105 +36,81 @@
 import java.net.*;
 
 class RedirLimitServer extends Thread {
+    static final int TIMEOUT = 10 * 1000;
+    static final int NUM_REDIRECTS = 9;
 
-    ServerSocket s;
-    Socket   s1;
-    InputStream  is;
-    OutputStream os;
-    int port;
-    int nredirects = 9;
-
-    String reply1 = "HTTP/1.1 307 Temporary Redirect\r\n" +
+    static final String reply1 = "HTTP/1.1 307 Temporary Redirect\r\n" +
         "Date: Mon, 15 Jan 2001 12:18:21 GMT\r\n" +
         "Server: Apache/1.3.14 (Unix)\r\n" +
         "Location: http://localhost:";
-    String reply2 = ".html\r\n" +
+    static final String reply2 = ".html\r\n" +
         "Connection: close\r\n" +
         "Content-Type: text/html; charset=iso-8859-1\r\n\r\n" +
         "<html>Hello</html>";
-
-    RedirLimitServer (ServerSocket y) {
-        s = y;
-        port = s.getLocalPort();
-    }
-
-    String reply3 = "HTTP/1.1 200 Ok\r\n" +
+    static final String reply3 = "HTTP/1.1 200 Ok\r\n" +
         "Date: Mon, 15 Jan 2001 12:18:21 GMT\r\n" +
         "Server: Apache/1.3.14 (Unix)\r\n" +
         "Connection: close\r\n" +
         "Content-Type: text/html; charset=iso-8859-1\r\n\r\n" +
         "World";
 
-    public void run () {
+    final ServerSocket ss;
+    final int port;
+
+    RedirLimitServer(ServerSocket ss) {
+        this.ss = ss;
+        port = ss.getLocalPort();
+    }
+
+    public void run() {
         try {
-            s.setSoTimeout (2000);
-            for (int i=0; i<nredirects; i++) {
-                s1 = s.accept ();
-                s1.setSoTimeout (2000);
-                is = s1.getInputStream ();
-                os = s1.getOutputStream ();
-                is.read ();
-                String reply = reply1 + port + "/redirect" + i + reply2;
-                os.write (reply.getBytes());
-                os.close();
+            ss.setSoTimeout(TIMEOUT);
+            for (int i=0; i<NUM_REDIRECTS; i++) {
+                try (Socket s = ss.accept()) {
+                    s.setSoTimeout(TIMEOUT);
+                    InputStream is = s.getInputStream();
+                    OutputStream os = s.getOutputStream();
+                    is.read();
+                    String reply = reply1 + port + "/redirect" + i + reply2;
+                    os.write(reply.getBytes());
+                }
             }
-            s1 = s.accept ();
-            is = s1.getInputStream ();
-            os = s1.getOutputStream ();
-            is.read ();
-            os.write (reply3.getBytes());
-            os.close();
-        }
-        catch (Exception e) {
-            /* Just need thread to terminate */
+            try (Socket s = ss.accept()) {
+                InputStream is = s.getInputStream();
+                OutputStream os = s.getOutputStream();
+                is.read();
+                os.write(reply3.getBytes());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
         } finally {
-            try { s.close(); } catch (IOException unused) {}
+            try { ss.close(); } catch (IOException unused) {}
         }
     }
 };
 
-
 public class RedirectLimit {
-
-    public static final int DELAY = 10;
-
     public static void main(String[] args) throws Exception {
-        int nLoops = 1;
-        int nSize = 10;
-        int port, n =0;
-        byte b[] = new byte[nSize];
-        RedirLimitServer server;
-        ServerSocket sock;
+        ServerSocket ss = new ServerSocket (0);
+        int port = ss.getLocalPort();
+        RedirLimitServer server = new RedirLimitServer(ss);
+        server.start();
 
+        InputStream in = null;
         try {
-            sock = new ServerSocket (0);
-            port = sock.getLocalPort ();
-        }
-        catch (Exception e) {
-            System.out.println ("Exception: " + e);
-            return;
-        }
-
-        server = new RedirLimitServer(sock);
-        server.start ();
-
-        try  {
-
-            String s = "http://localhost:" + port;
-            URL url = new URL(s);
+            URL url = new URL("http://localhost:" + port);
             URLConnection conURL =  url.openConnection();
 
             conURL.setDoInput(true);
             conURL.setAllowUserInteraction(false);
             conURL.setUseCaches(false);
 
-            InputStream in = conURL.getInputStream();
+            in = conURL.getInputStream();
             if ((in.read() != (int)'W') || (in.read()!=(int)'o')) {
-                throw new RuntimeException ("Unexpected string read");
+                throw new RuntimeException("Unexpected string read");
             }
-        }
-        catch(IOException e) {
-            throw new RuntimeException ("Exception caught " + e);
+        } finally {
+            if ( in != null ) { in.close(); }
         }
     }
 }
--- a/test/java/nio/channels/AsynchronousSocketChannel/Basic.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/channels/AsynchronousSocketChannel/Basic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4607272 6842687 6878369
+ * @bug 4607272 6842687 6878369 6944810 7023403
  * @summary Unit test for AsynchronousSocketChannel
  * @run main/timeout=600 Basic
  */
--- a/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4527345
+ * @bug 4527345 7026376
  * @summary Unit test for DatagramChannel's multicast support
  * @build MulticastSendReceiveTests NetworkConfiguration
  * @run main MulticastSendReceiveTests
@@ -31,12 +31,19 @@
 import java.nio.ByteBuffer;
 import java.nio.channels.*;
 import java.net.*;
+import static java.net.StandardProtocolFamily.*;
 import java.util.*;
 import java.io.IOException;
 
 public class MulticastSendReceiveTests {
 
-    static Random rand = new Random();
+    static final Random rand = new Random();
+
+    static final ProtocolFamily UNSPEC = new ProtocolFamily() {
+        public String name() {
+            return "UNSPEC";
+        }
+    };
 
     /**
      * Send datagram from given local address to given multicast
@@ -130,75 +137,84 @@
     /**
      * Exercise multicast send/receive on given group/interface
      */
-    static void test(NetworkInterface nif, InetAddress group, InetAddress source)
+    static void test(ProtocolFamily family,
+                     NetworkInterface nif,
+                     InetAddress group,
+                     InetAddress source)
         throws IOException
     {
-        ProtocolFamily family = (group instanceof Inet6Address) ?
-            StandardProtocolFamily.INET6 : StandardProtocolFamily.INET;
-        System.out.format("create channel to %s socket\n", family.name());
-        DatagramChannel dc = DatagramChannel.open(family)
-            .setOption(StandardSocketOption.SO_REUSEADDR, true)
-            .bind(new InetSocketAddress(0));
-
-        // join group
-        System.out.format("join %s @ %s\n", group.getHostAddress(),
-            nif.getName());
-        MembershipKey key = dc.join(group, nif);
+        System.out.format("\nTest DatagramChannel to %s socket\n", family.name());
+        try (DatagramChannel dc = (family == UNSPEC) ?
+                DatagramChannel.open() : DatagramChannel.open(family)) {
+            dc.setOption(StandardSocketOption.SO_REUSEADDR, true)
+              .bind(new InetSocketAddress(0));
 
-        // send message to group
-        int port = ((InetSocketAddress)dc.getLocalAddress()).getPort();
-        int id = sendDatagram(source, nif, group, port);
-
-        // receive message and check id matches
-        receiveDatagram(dc, source, id);
+            // join group
+            System.out.format("join %s @ %s\n", group.getHostAddress(),
+                nif.getName());
+            MembershipKey key;
+            try {
+                key = dc.join(group, nif);
+            } catch (IllegalArgumentException iae) {
+                if (family == UNSPEC) {
+                    System.out.println("Not supported");
+                    return;
+                }
+                throw iae;
+            }
 
-        // exclude-mode filtering
-
-        try {
-            System.out.format("block %s\n", source.getHostAddress());
+            // send message to group
+            int port = ((InetSocketAddress)dc.getLocalAddress()).getPort();
+            int id = sendDatagram(source, nif, group, port);
 
-            // may throw UOE
-            key.block(source);
-            id = sendDatagram(source, nif, group, port);
-            receiveDatagram(dc, null, id);
+            // receive message and check id matches
+            receiveDatagram(dc, source, id);
+
+            // exclude-mode filtering
+
+            try {
+                System.out.format("block %s\n", source.getHostAddress());
 
-            // unblock source, send message, message should be received
-            System.out.format("unblock %s\n", source.getHostAddress());
-            key.unblock(source);
-            id = sendDatagram(source, nif, group, port);
-            receiveDatagram(dc, source, id);
-        } catch (UnsupportedOperationException x) {
-            System.out.println("Exclude-mode filtering not supported!");
-        }
+                // may throw UOE
+                key.block(source);
+                id = sendDatagram(source, nif, group, port);
+                receiveDatagram(dc, null, id);
 
-        key.drop();
+                // unblock source, send message, message should be received
+                System.out.format("unblock %s\n", source.getHostAddress());
+                key.unblock(source);
+                id = sendDatagram(source, nif, group, port);
+                receiveDatagram(dc, source, id);
+            } catch (UnsupportedOperationException x) {
+                System.out.println("Exclude-mode filtering not supported!");
+            }
 
-        // include-mode filtering
+            key.drop();
+
+            // include-mode filtering
 
-        InetAddress bogus = (group instanceof Inet6Address) ?
-            InetAddress.getByName("fe80::1234") :
-            InetAddress.getByName("1.2.3.4");
-        System.out.format("join %s @ %s only-source %s\n", group.getHostAddress(),
-            nif.getName(), bogus.getHostAddress());
-        try {
-            // may throw UOE
-            key = dc.join(group, nif, bogus);
-
-            id = sendDatagram(source, nif, group, port);
-            receiveDatagram(dc, null, id);
+            InetAddress bogus = (group instanceof Inet6Address) ?
+                InetAddress.getByName("fe80::1234") :
+                InetAddress.getByName("1.2.3.4");
+            System.out.format("join %s @ %s only-source %s\n", group.getHostAddress(),
+                nif.getName(), bogus.getHostAddress());
+            try {
+                // may throw UOE
+                key = dc.join(group, nif, bogus);
 
-            System.out.format("join %s @ %s only-source %s\n", group.getHostAddress(),
-                nif.getName(), source.getHostAddress());
-            key = dc.join(group, nif, source);
+                id = sendDatagram(source, nif, group, port);
+                receiveDatagram(dc, null, id);
+
+                System.out.format("join %s @ %s only-source %s\n", group.getHostAddress(),
+                    nif.getName(), source.getHostAddress());
+                key = dc.join(group, nif, source);
 
-            id = sendDatagram(source, nif, group, port);
-            receiveDatagram(dc, source, id);
-        } catch (UnsupportedOperationException x) {
-            System.out.println("Include-mode filtering not supported!");
+                id = sendDatagram(source, nif, group, port);
+                receiveDatagram(dc, source, id);
+            } catch (UnsupportedOperationException x) {
+                System.out.println("Include-mode filtering not supported!");
+            }
         }
-
-        // done
-        dc.close();
     }
 
     public static void main(String[] args) throws IOException {
@@ -210,12 +226,14 @@
 
         for (NetworkInterface nif: config.ip4Interfaces()) {
             InetAddress source = config.ip4Addresses(nif).iterator().next();
-            test(nif, ip4Group, source);
+            test(INET,   nif, ip4Group, source);
+            test(UNSPEC, nif, ip4Group, source);
         }
 
         for (NetworkInterface nif: config.ip6Interfaces()) {
             InetAddress source = config.ip6Addresses(nif).iterator().next();
-            test(nif, ip6Group, source);
+            test(INET6,  nif, ip6Group, source);
+            test(UNSPEC, nif, ip6Group, source);
         }
     }
 }
--- a/test/java/nio/channels/FileChannel/Position.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/channels/FileChannel/Position.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,13 +22,16 @@
  */
 
 /* @test
+ * @bug 4429043 6526860
  * @summary Test position method of FileChannel
  */
 
 import java.io.*;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.*;
+import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
+import java.nio.file.*;
+import static java.nio.file.StandardOpenOption.*;
+import java.nio.charset.Charset;
 import java.util.Random;
 
 
@@ -38,32 +41,42 @@
 
 public class Position {
 
-    private static PrintStream err = System.err;
-
-    private static Random generator = new Random();
+    private static final Charset ISO8859_1 = Charset.forName("8859_1");
 
-    private static int CHARS_PER_LINE = File.separatorChar == '/' ? 5 : 6;
-
-    private static File blah;
+    private static final Random generator = new Random();
 
     public static void main(String[] args) throws Exception {
-        blah = File.createTempFile("blah", null);
-        blah.deleteOnExit();
+        Path blah = Files.createTempFile("blah", null);
+        blah.toFile().deleteOnExit();
         initTestFile(blah);
 
-        FileInputStream fis = new FileInputStream(blah);
-        FileChannel c = fis.getChannel();
-
-        for(int i=0; i<100; i++) {
-            long newPos = generator.nextInt(1000);
-            c.position(newPos);
-            if (c.position() != newPos)
-                throw new RuntimeException("Position failed");
+        for (int i=0; i<10; i++) {
+            try (FileChannel fc = (generator.nextBoolean()) ?
+                    FileChannel.open(blah, READ) :
+                    new FileInputStream(blah.toFile()).getChannel()) {
+                for (int j=0; j<100; j++) {
+                    long newPos = generator.nextInt(1000);
+                    fc.position(newPos);
+                    if (fc.position() != newPos)
+                        throw new RuntimeException("Position failed");
+                }
+            }
         }
 
-        c.close();
-        fis.close();
-        blah.delete();
+        for (int i=0; i<10; i++) {
+            try (FileChannel fc = (generator.nextBoolean()) ?
+                     FileChannel.open(blah, APPEND) :
+                     new FileOutputStream(blah.toFile(), true).getChannel()) {
+                for (int j=0; j<10; j++) {
+                    if (fc.position() != fc.size())
+                        throw new RuntimeException("Position expected to be size");
+                    byte[] buf = new byte[generator.nextInt(100)];
+                    fc.write(ByteBuffer.wrap(buf));
+                }
+            }
+        }
+
+        Files.delete(blah);
     }
 
     /**
@@ -78,19 +91,15 @@
      * 3999
      *
      */
-    private static void initTestFile(File blah) throws Exception {
-        FileOutputStream fos = new FileOutputStream(blah);
-        BufferedWriter awriter
-            = new BufferedWriter(new OutputStreamWriter(fos, "8859_1"));
-
-        for(int i=0; i<4000; i++) {
-            String number = new Integer(i).toString();
-            for (int h=0; h<4-number.length(); h++)
-                awriter.write("0");
-            awriter.write(""+i);
-            awriter.newLine();
+    private static void initTestFile(Path blah) throws IOException {
+        try (BufferedWriter awriter = Files.newBufferedWriter(blah, ISO8859_1)) {
+            for(int i=0; i<4000; i++) {
+                String number = new Integer(i).toString();
+                for (int h=0; h<4-number.length(); h++)
+                    awriter.write("0");
+                awriter.write(""+i);
+                awriter.newLine();
+            }
         }
-       awriter.flush();
-       awriter.close();
     }
 }
--- a/test/java/nio/file/DirectoryStream/Basic.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/DirectoryStream/Basic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -69,7 +69,7 @@
             throw new RuntimeException("entry not found");
 
         // check filtering: f* should match foo
-        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<>() {
+        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {
             private PathMatcher matcher =
                 dir.getFileSystem().getPathMatcher("glob:f*");
             public boolean accept(Path file) {
--- a/test/java/nio/file/FileStore/Basic.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/FileStore/Basic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6873621 6979526 7006126
+ * @bug 4313887 6873621 6979526 7006126 7020517
  * @summary Unit test for java.nio.file.FileStore
  * @library ..
  */
--- a/test/java/nio/file/Files/FileAttributes.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/Files/FileAttributes.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6838333
+ * @bug 4313887 6838333 7017446
  * @summary Unit test for java.nio.file.Files
  * @library ..
  */
@@ -94,12 +94,6 @@
         assertTrue(map.size() == 2);
         checkEqual(attrs.size(), map.get("size"));
         checkEqual(attrs.lastModifiedTime(), map.get("lastModifiedTime"));
-
-        map = Files.readAttributes(file,
-            "basic:lastModifiedTime,lastAccessTime,ShouldNotExist");
-        assertTrue(map.size() == 2);
-        checkEqual(attrs.lastModifiedTime(), map.get("lastModifiedTime"));
-        checkEqual(attrs.lastAccessTime(), map.get("lastAccessTime"));
     }
 
     // Exercise getAttribute/setAttribute/readAttributes on posix attributes
@@ -132,7 +126,7 @@
         assertTrue(map.size() >= 12);
         checkEqual(attrs.permissions(), map.get("permissions")); // check one
 
-        map = Files.readAttributes(file, "posix:size,owner,ShouldNotExist");
+        map = Files.readAttributes(file, "posix:size,owner");
         assertTrue(map.size() == 2);
         checkEqual(attrs.size(), map.get("size"));
         checkEqual(attrs.owner(), map.get("owner"));
@@ -155,7 +149,7 @@
         map = Files.readAttributes(file, "unix:*");
         assertTrue(map.size() >= 20);
 
-        map = Files.readAttributes(file, "unix:size,uid,gid,ShouldNotExist");
+        map = Files.readAttributes(file, "unix:size,uid,gid");
         assertTrue(map.size() == 3);
         checkEqual(map.get("size"),
                    Files.readAttributes(file, BasicFileAttributes.class).size());
@@ -206,14 +200,65 @@
         assertTrue(map.size() >= 13);
         checkEqual(attrs.isReadOnly(), map.get("readonly")); // check one
 
-        map = Files.readAttributes(file, "dos:size,hidden,ShouldNotExist");
+        map = Files.readAttributes(file, "dos:size,hidden");
         assertTrue(map.size() == 2);
         checkEqual(attrs.size(), map.get("size"));
         checkEqual(attrs.isHidden(), map.get("hidden"));
     }
 
+    static void checkBadSet(Path file, String attribute, Object value)
+        throws IOException
+    {
+        try {
+            Files.setAttribute(file, attribute, 0);
+            throw new RuntimeException("IllegalArgumentException expected");
+        } catch (IllegalArgumentException ignore) { }
+    }
+
+    static void checkBadGet(Path file, String attribute) throws IOException {
+        try {
+            Files.getAttribute(file, attribute);
+            throw new RuntimeException("IllegalArgumentException expected");
+        } catch (IllegalArgumentException ignore) { }
+    }
+
+    static void checkBadRead(Path file, String attribute) throws IOException {
+        try {
+            Files.readAttributes(file, attribute);
+            throw new RuntimeException("IllegalArgumentException expected");
+        } catch (IllegalArgumentException ignore) { }
+    }
+
     static void miscTests(Path file) throws IOException {
-        // NPE tests
+        // unsupported views
+        try {
+            Files.setAttribute(file, "foo:bar", 0);
+            throw new RuntimeException("UnsupportedOperationException expected");
+        } catch (UnsupportedOperationException ignore) { }
+        try {
+            Files.getAttribute(file, "foo:bar");
+            throw new RuntimeException("UnsupportedOperationException expected");
+        } catch (UnsupportedOperationException ignore) { }
+        try {
+            Files.readAttributes(file, "foo:*");
+            throw new RuntimeException("UnsupportedOperationException expected");
+        } catch (UnsupportedOperationException ignore) { }
+
+        // bad args
+        checkBadSet(file, "", 0);
+        checkBadSet(file, "basic:", 0);
+        checkBadSet(file, "basic:foobar", 0);
+        checkBadGet(file, "");
+        checkBadGet(file, "basic:");
+        checkBadGet(file, "basic:foobar");
+        checkBadGet(file, "basic:size,lastModifiedTime");
+        checkBadGet(file, "basic:*");
+        checkBadRead(file, "");
+        checkBadRead(file, "basic:");
+        checkBadRead(file, "basic:foobar");
+        checkBadRead(file, "basic:size,foobar");
+
+        // nulls
         try {
             Files.getAttribute(file, null);
             throw new RuntimeException("NullPointerException expected");
--- a/test/java/nio/file/Files/TemporaryFiles.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/Files/TemporaryFiles.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6838333 7006126
+ * @bug 4313887 6838333 7006126 7023034
  * @summary Unit test for Files.createTempXXX
  * @library ..
  */
@@ -167,5 +167,31 @@
         testInvalidFileTemp("../blah", null);
         testInvalidFileTemp("dir/blah", null);
         testInvalidFileTemp("blah", ".dat/foo");
+
+        // nulls
+        try {
+            Files.createTempFile("blah", ".tmp", (FileAttribute<?>[])null);
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException ignore) { }
+        try {
+            Files.createTempFile("blah", ".tmp", new FileAttribute<?>[] { null });
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException ignore) { }
+        try {
+            Files.createTempDirectory("blah", (FileAttribute<?>[])null);
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException ignore) { }
+        try {
+            Files.createTempDirectory("blah", new FileAttribute<?>[] { null });
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException ignore) { }
+        try {
+            Files.createTempFile((Path)null, "blah", ".tmp");
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException ignore) { }
+        try {
+            Files.createTempDirectory((Path)null, "blah");
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException ignore) { }
     }
 }
--- a/test/java/nio/file/Files/walkFileTree/PrintFileTree.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/Files/walkFileTree/PrintFileTree.java	Wed Apr 20 04:38:36 2011 +0100
@@ -54,6 +54,7 @@
         if (followLinks)
             options.add(FileVisitOption.FOLLOW_LINKS);
 
+        final boolean follow = followLinks;
         final boolean reportCycles = printCycles;
         Files.walkFileTree(dir, options, Integer.MAX_VALUE, new FileVisitor<Path>() {
             @Override
@@ -63,8 +64,7 @@
             }
             @Override
             public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
-                if (!attrs.isDirectory() || reportCycles)
-                    System.out.println(file);
+                System.out.println(file);
                 return FileVisitResult.CONTINUE;
             }
             @Override
@@ -79,11 +79,13 @@
             public FileVisitResult visitFileFailed(Path file, IOException exc)
                 throws IOException
             {
-                if (reportCycles && (exc instanceof FileSystemLoopException)) {
-                    System.out.println(file);
+                if (follow && (exc instanceof FileSystemLoopException)) {
+                    if (reportCycles)
+                        System.out.println(file);
                     return FileVisitResult.CONTINUE;
+                } else {
+                    throw exc;
                 }
-                throw exc;
             }
         });
     }
--- a/test/java/nio/file/WatchService/Basic.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/WatchService/Basic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6838333
+ * @bug 4313887 6838333 7017446
  * @summary Unit test for java.nio.file.WatchService
  * @library ..
  * @run main/timeout=120 Basic
@@ -44,6 +44,8 @@
     static void checkKey(WatchKey key, Path dir) {
         if (!key.isValid())
             throw new RuntimeException("Key is not valid");
+        if (key.watchable() != dir)
+            throw new RuntimeException("Unexpected watchable");
     }
 
     static void takeExpectedKey(WatchService watcher, WatchKey expected) {
--- a/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java	Wed Apr 20 04:38:36 2011 +0100
@@ -141,9 +141,6 @@
         map = Files.readAttributes(file, "user:*");
         if (!Arrays.equals(valueAsBytes, (byte[])map.get(ATTR_NAME)))
             throw new RuntimeException("Unexpected attribute value");
-        map = Files.readAttributes(file, "user:DoesNotExist");
-        if (!map.isEmpty())
-            throw new RuntimeException("Map expected to be empty");
     }
 
     static void miscTests(final Path file) throws IOException {
--- a/test/java/security/cert/CertificateFactory/openssl/OpenSSLCert.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/security/cert/CertificateFactory/openssl/OpenSSLCert.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,8 @@
  */
 
 import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 import java.security.cert.CertificateFactory;
 
@@ -46,24 +48,20 @@
     }
 
     static void test(String... files) throws Exception {
-        FileOutputStream fout = new FileOutputStream(OUTFILE);
-        for (String file: files) {
-            FileInputStream fin = new FileInputStream(
-                new File(System.getProperty("test.src", "."), file));
-            byte[] buffer = new byte[4096];
-            while (true) {
-                int len = fin.read(buffer);
-                if (len < 0) break;
-                fout.write(buffer, 0, len);
+        try (FileOutputStream fout = new FileOutputStream(OUTFILE)) {
+            String here = System.getProperty("test.src", "");
+            for (String file: files) {
+                Files.copy(Paths.get(here, file), fout);
             }
-            fin.close();
         }
-        fout.close();
-        System.out.println("Testing " + Arrays.toString(files) + "...");
-        if (CertificateFactory.getInstance("X509")
-                .generateCertificates(new FileInputStream(OUTFILE))
-                .size() != files.length) {
-            throw new Exception("Not same number");
+        try (FileInputStream fin = new FileInputStream(OUTFILE)) {
+            System.out.println("Testing " + Arrays.toString(files) + "...");
+            if (CertificateFactory.getInstance("X509")
+                    .generateCertificates(fin)
+                    .size() != files.length) {
+                throw new Exception("Not same number");
+            }
         }
+        Files.delete(Paths.get(OUTFILE));
     }
 }
--- a/test/java/util/Collection/MOAT.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/Collection/MOAT.java	Wed Apr 20 04:38:36 2011 +0100
@@ -28,6 +28,8 @@
  *          6431845 4802633 6570566 6570575 6570631 6570924 6691185 6691215
  * @summary Run many tests on many Collection and Map implementations
  * @author  Martin Buchholz
+ * @run main MOAT
+ * @run main/othervm -XX:+AggressiveOpts MOAT
  */
 
 /* Mother Of All (Collection) Tests
--- a/test/java/util/Currency/ValidateISO4217.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/Currency/ValidateISO4217.java	Wed Apr 20 04:38:36 2011 +0100
@@ -111,57 +111,58 @@
 
     static void test1() throws Exception {
 
-        FileReader fr = new FileReader(new File(System.getProperty("test.src", "."), datafile));
-        BufferedReader in = new BufferedReader(fr);
-        String line;
-        SimpleDateFormat format = null;
+        try (FileReader fr = new FileReader(new File(System.getProperty("test.src", "."), datafile));
+             BufferedReader in = new BufferedReader(fr))
+        {
+            String line;
+            SimpleDateFormat format = null;
 
-        while ((line = in.readLine()) != null) {
-            if (line.length() == 0 || line.charAt(0) == '#') {
-                continue;
-            }
+            while ((line = in.readLine()) != null) {
+                if (line.length() == 0 || line.charAt(0) == '#') {
+                    continue;
+                }
 
-            StringTokenizer tokens = new StringTokenizer(line, "\t");
-            String country = tokens.nextToken();
-            if (country.length() != 2) {
-                continue;
-            }
+                StringTokenizer tokens = new StringTokenizer(line, "\t");
+                String country = tokens.nextToken();
+                if (country.length() != 2) {
+                    continue;
+                }
 
-            String currency;
-            String numeric;
-            String minorUnit;
-            int tokensCount = tokens.countTokens();
-            if (tokensCount < 3) {
-                currency = "";
-                numeric = "0";
-                minorUnit = "0";
-            } else {
-                currency = tokens.nextToken();
-                numeric = tokens.nextToken();
-                minorUnit = tokens.nextToken();
-                testCurrencies.add(Currency.getInstance(currency));
+                String currency;
+                String numeric;
+                String minorUnit;
+                int tokensCount = tokens.countTokens();
+                if (tokensCount < 3) {
+                    currency = "";
+                    numeric = "0";
+                    minorUnit = "0";
+                } else {
+                    currency = tokens.nextToken();
+                    numeric = tokens.nextToken();
+                    minorUnit = tokens.nextToken();
+                    testCurrencies.add(Currency.getInstance(currency));
 
-                // check for the cutover
-                if (tokensCount > 3) {
-                    if (format == null) {
-                        format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.US);
-                        format.setTimeZone(TimeZone.getTimeZone("GMT"));
-                        format.setLenient(false);
-                    }
-                    if (format.parse(tokens.nextToken()).getTime() <
-                        System.currentTimeMillis()) {
-                        currency = tokens.nextToken();
-                        numeric = tokens.nextToken();
-                        minorUnit = tokens.nextToken();
-                        testCurrencies.add(Currency.getInstance(currency));
+                    // check for the cutover
+                    if (tokensCount > 3) {
+                        if (format == null) {
+                            format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.US);
+                            format.setTimeZone(TimeZone.getTimeZone("GMT"));
+                            format.setLenient(false);
+                        }
+                        if (format.parse(tokens.nextToken()).getTime() <
+                            System.currentTimeMillis()) {
+                            currency = tokens.nextToken();
+                            numeric = tokens.nextToken();
+                            minorUnit = tokens.nextToken();
+                            testCurrencies.add(Currency.getInstance(currency));
+                        }
                     }
                 }
+                int index = toIndex(country);
+                testCountryCurrency(country, currency, Integer.parseInt(numeric),
+                    Integer.parseInt(minorUnit), index);
             }
-            int index = toIndex(country);
-            testCountryCurrency(country, currency, Integer.parseInt(numeric),
-                Integer.parseInt(minorUnit), index);
         }
-        in.close();
 
         for (int i = 0; i < additionalCodes.length; i++) {
             int index = toIndex(additionalCodes[i][0]);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/EnumSet/LargeEnumIteratorRemoveResilience.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2011 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.
+ */
+
+/*
+ * Portions Copyright (c) 2011 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 7014637
+ * @summary EnumSet's iterator.remove() can be resilient to set's modification.
+ * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ */
+
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.Set;
+
+public class LargeEnumIteratorRemoveResilience {
+    // enum with more than 64 values
+    private static enum LargeEnum {
+        e00, e01, e02, e03, e04, e05, e06, e07,
+        e08, e09, e0A, e0B, e0C, e0D, e0E, e0F,
+        e10, e11, e12, e13, e14, e15, e16, e17,
+        e18, e19, e1A, e1B, e1C, e1D, e1E, e1F,
+        e20, e21, e22, e23, e24, e25, e26, e27,
+        e28, e29, e2A, e2B, e2C, e2D, e2E, e2F,
+        e30, e31, e32, e33, e34, e35, e36, e37,
+        e38, e39, e3A, e3B, e3C, e3D, e3E, e3F,
+        e40, e41, e42, e43, e44, e45, e46, e47,
+        e48, e49, e4A, e4B, e4C, e4D, e4E, e4F,
+    }
+
+    public static void main(final String[] args) throws Exception {
+        final Set<LargeEnum> set = EnumSet.noneOf(LargeEnum.class);
+
+        set.add(LargeEnum.e2D);
+        set.add(LargeEnum.e42);
+
+        final Iterator<LargeEnum> iterator = set.iterator();
+
+        int size = set.size();
+        LargeEnum element = iterator.next();
+
+        iterator.remove();
+        checkSetAfterRemoval(set, size, element);
+
+        size = set.size();
+        element = iterator.next();
+
+        set.remove(element);
+        checkSetAfterRemoval(set, size, element);
+
+        // The Java API declares that the behaviour here - to call
+        // iterator.remove() after the underlying collection has been
+        // modified - is "unspecified".
+        // However, in the case of iterators for EnumSet, it is easy to
+        // implement their remove() operation such that the set is
+        // unmodified if it is called for an element that has already been
+        // removed from the set - this being the naturally "resilient"
+        // behaviour.
+        iterator.remove();
+        checkSetAfterRemoval(set, size, element);
+    }
+
+    private static void checkSetAfterRemoval(final Set<LargeEnum> set,
+            final int origSize, final LargeEnum removedElement)
+            throws Exception {
+        if (set.size() != (origSize - 1)) {
+            throw new Exception("Test FAILED: Unexpected set size after removal; expected '" + (origSize - 1) + "' but found '" + set.size() + "'");
+        }
+        if (set.contains(removedElement)) {
+            throw new Exception("Test FAILED: Element returned from iterator unexpectedly still in set after removal.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/EnumSet/SmallEnumIteratorRemoveResilience.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2011 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.
+ */
+
+/*
+ * Portions Copyright (c) 2011 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 7014637
+ * @summary EnumSet's iterator.remove() can be resilient to set's modification.
+ * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ */
+
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.Set;
+
+public class SmallEnumIteratorRemoveResilience {
+    // enum with less than 64 values
+    private static enum SmallEnum { e0, e1, e2 }
+
+    public static void main(final String[] args) throws Exception {
+        final Set<SmallEnum> set = EnumSet.noneOf(SmallEnum.class);
+
+        set.add(SmallEnum.e0);
+        set.add(SmallEnum.e1);
+
+        final Iterator<SmallEnum> iterator = set.iterator();
+
+        int size = set.size();
+        SmallEnum element = iterator.next();
+
+        iterator.remove();
+        checkSetAfterRemoval(set, size, element);
+
+        size = set.size();
+        element = iterator.next();
+
+        set.remove(element);
+        checkSetAfterRemoval(set, size, element);
+
+        // The Java API declares that the behaviour here - to call
+        // iterator.remove() after the underlying collection has been
+        // modified - is "unspecified".
+        // However, in the case of iterators for EnumSet, it is easy to
+        // implement their remove() operation such that the set is
+        // unmodified if it is called for an element that has already been
+        // removed from the set - this being the naturally "resilient"
+        // behaviour.
+        iterator.remove();
+        checkSetAfterRemoval(set, size, element);
+    }
+
+    private static void checkSetAfterRemoval(final Set<SmallEnum> set,
+            final int origSize, final SmallEnum removedElement)
+            throws Exception {
+        if (set.size() != (origSize - 1)) {
+            throw new Exception("Test FAILED: Unexpected set size after removal; expected '" + (origSize - 1) + "' but found '" + set.size() + "'");
+        }
+        if (set.contains(removedElement)) {
+            throw new Exception("Test FAILED: Element returned from iterator unexpectedly still in set after removal.");
+        }
+    }
+}
--- a/test/java/util/Formatter/FailingConstructors.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/Formatter/FailingConstructors.java	Wed Apr 20 04:38:36 2011 +0100
@@ -34,6 +34,7 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.nio.file.Files;
 import java.util.Formatter;
 
 public class FailingConstructors {
@@ -47,9 +48,7 @@
         /* create the file and write its contents */
         File file = File.createTempFile(fileName, null);
         file.deleteOnExit();
-        FileOutputStream fos = new FileOutputStream(file);
-        fos.write(FILE_CONTENTS.getBytes());
-        fos.close();
+        Files.write(file.toPath(), FILE_CONTENTS.getBytes());
 
         test(true, file);
         file.delete();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Hashtable/SerializationDeadlock.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2010, 2011 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.
+ *
+ * -------------------------------------------
+ *
+ * Portions Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 6927486
+ * @summary Serializing Hashtable objects which refer to each other should not be able to deadlock.
+ * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.concurrent.CyclicBarrier;
+
+public class SerializationDeadlock {
+    public static void main(final String[] args) throws Exception {
+        // Test for Hashtable serialization deadlock
+        final Hashtable<Object, Object> h1 = new Hashtable<>();
+        final Hashtable<Object, Object> h2 = new Hashtable<>();
+        final TestBarrier testStart = new TestBarrier(3);
+
+        // Populate the hashtables so that they refer to each other
+        h1.put(testStart, h2);
+        h2.put(testStart, h1);
+
+        final CyclicBarrier testEnd = new CyclicBarrier(3);
+        final TestThread t1 = new TestThread(h1, testEnd);
+        final TestThread t2 = new TestThread(h2, testEnd);
+
+        t1.start();
+        t2.start();
+
+        // Wait for both test threads to have initiated serialization
+        // of the 'testStart' object (and hence of both 'h1' and 'h2')
+        testStart.await();
+
+        // Wait for both test threads to successfully finish serialization
+        // of 'h1' and 'h2'.
+        System.out.println("Waiting for Hashtable serialization to complete ...");
+        System.out.println("(This test will hang if serialization deadlocks)");
+        testEnd.await();
+        System.out.println("Test PASSED: serialization completed successfully");
+
+        TestThread.handleExceptions();
+    }
+
+    static final class TestBarrier extends CyclicBarrier
+            implements Serializable {
+        public TestBarrier(final int count) {
+            super(count);
+        }
+
+        private void writeObject(final ObjectOutputStream oos)
+                throws IOException {
+            oos.defaultWriteObject();
+            // Wait until all test threads have started serializing data
+            try {
+                await();
+            } catch (final Exception e) {
+                throw new IOException("Test ERROR: Unexpected exception caught", e);
+            }
+        }
+    }
+
+    static final class TestThread extends Thread {
+        private static final List<Exception> exceptions = new ArrayList<>();
+
+        private final Hashtable<Object, Object> hashtable;
+        private final CyclicBarrier testEnd;
+
+        public TestThread(final Hashtable<Object, Object> hashtable,
+                final CyclicBarrier testEnd) {
+            this.hashtable = hashtable;
+            this.testEnd = testEnd;
+            setDaemon(true);
+        }
+
+        public void run() {
+            try {
+                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                final ObjectOutputStream oos = new ObjectOutputStream(baos);
+
+                oos.writeObject(hashtable);
+                oos.close();
+            } catch (final IOException ioe) {
+                addException(ioe);
+            } finally {
+                try {
+                    testEnd.await();
+                } catch (Exception e) {
+                    addException(e);
+                }
+            }
+        }
+
+        private static synchronized void addException(final Exception exception) {
+            exceptions.add(exception);
+        }
+
+        public static synchronized void handleExceptions() {
+            if (false == exceptions.isEmpty()) {
+                throw new RuntimeException(getErrorText(exceptions));
+            }
+        }
+
+        private static String getErrorText(final List<Exception> exceptions) {
+            final StringWriter sw = new StringWriter();
+            final PrintWriter pw = new PrintWriter(sw);
+
+            pw.println("Test ERROR: Unexpected exceptions thrown on test threads:");
+            for (Exception exception : exceptions) {
+                pw.print("\t");
+                pw.println(exception);
+                for (StackTraceElement element : exception.getStackTrace()) {
+                    pw.print("\t\tat ");
+                    pw.println(element);
+                }
+            }
+
+            pw.close();
+            return sw.toString();
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Hashtable/SimpleSerialization.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2010, 2011 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.
+ *
+ * -------------------------------------------
+ *
+ * Portions Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 6927486
+ * @summary A serialized Hashtable can be de-serialized properly.
+ * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Hashtable;
+
+public class SimpleSerialization {
+    public static void main(final String[] args) throws Exception {
+        Hashtable<String, String> h1 = new Hashtable<>();
+
+        h1.put("key", "value");
+
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final ObjectOutputStream oos = new ObjectOutputStream(baos);
+
+        oos.writeObject(h1);
+        oos.close();
+
+        final byte[] data = baos.toByteArray();
+        final ByteArrayInputStream bais = new ByteArrayInputStream(data);
+        final ObjectInputStream ois = new ObjectInputStream(bais);
+
+        final Object deserializedObject = ois.readObject();
+        ois.close();
+
+        if (false == h1.equals(deserializedObject)) {
+            throw new RuntimeException(getFailureText(h1, deserializedObject));
+        }
+    }
+
+    private static String getFailureText(final Object orig, final Object copy) {
+        final StringWriter sw = new StringWriter();
+        final PrintWriter pw = new PrintWriter(sw);
+
+        pw.println("Test FAILED: Deserialized object is not equal to the original object");
+        pw.print("\tOriginal: ");
+        printObject(pw, orig).println();
+        pw.print("\tCopy:     ");
+        printObject(pw, copy).println();
+
+        pw.close();
+        return sw.toString();
+    }
+
+    private static PrintWriter printObject(final PrintWriter pw, final Object o) {
+        pw.printf("%s@%08x", o.getClass().getName(), System.identityHashCode(o));
+        return pw;
+    }
+}
--- a/test/java/util/Locale/LocaleEnhanceTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/Locale/LocaleEnhanceTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -43,7 +43,7 @@
 
 /**
  * @test
- * @bug 6875847
+ * @bug 6875847 6992272 7002320 7015500 7023613
  * @summary test API changes to Locale
  */
 public class LocaleEnhanceTest extends LocaleTestFmwk {
@@ -83,7 +83,7 @@
             "en-Latn-US-NewYork", "en_US_NewYork_#Latn",
             "en-Latn-US", "en_US_#Latn",
             "en-Latn-NewYork", "en__NewYork_#Latn", // double underscore
-            "en-Latn", "en_#Latn",
+            "en-Latn", "en__#Latn", // double underscore
             "en-US-NewYork", "en_US_NewYork",
             "en-US", "en_US",
             "en-NewYork", "en__NewYork", // double underscore
@@ -1204,14 +1204,12 @@
                 locale = new Locale(lang, country, variant);
             }
 
-            // desrialize
-            try {
-                FileInputStream fis = new FileInputStream(testfile);
-                ObjectInputStream ois = new ObjectInputStream(fis);
-
+            // deserialize
+            try (FileInputStream fis = new FileInputStream(testfile);
+                 ObjectInputStream ois = new ObjectInputStream(fis))
+            {
                 Object o = ois.readObject();
                 assertEquals("Deserialize Java 6 Locale " + locale, o, locale);
-                ois.close();
             } catch (Exception e) {
                 errln("Exception while reading " + testfile.getAbsolutePath() + " - " + e.getMessage());
             }
@@ -1261,6 +1259,22 @@
         }
     }
 
+    public void testBug7023613() {
+        String[][] testdata = {
+            {"en-Latn", "en__#Latn"},
+            {"en-u-ca-japanese", "en__#u-ca-japanese"},
+        };
+
+        for (String[] data : testdata) {
+            String in = data[0];
+            String expected = (data.length == 1) ? data[0] : data[1];
+
+            Locale loc = Locale.forLanguageTag(in);
+            String out = loc.toString();
+            assertEquals("Empty country field with non-empty script/extension with input: " + in, expected, out);
+        }
+    }
+
     ///
     /// utility asserts
     ///
--- a/test/java/util/PriorityQueue/NoNulls.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/PriorityQueue/NoNulls.java	Wed Apr 20 04:38:36 2011 +0100
@@ -53,7 +53,7 @@
 public class NoNulls {
     void test(String[] args) throws Throwable {
         final Comparator<String> nullTolerantComparator
-            = new Comparator<>() {
+            = new Comparator<String>() {
             public int compare(String x, String y) {
                 return (x == null ? -1 :
                         y == null ? 1 :
@@ -65,7 +65,7 @@
         nullSortedSet.add(null);
 
         final PriorityQueue<String> nullPriorityQueue
-            = new PriorityQueue<>() {
+            = new PriorityQueue<String>() {
             public Object[] toArray() { return new Object[] { null };}};
 
         final Collection<String> nullCollection = new ArrayList<>();
--- a/test/java/util/ResourceBundle/Bug6204853.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/ResourceBundle/Bug6204853.java	Wed Apr 20 04:38:36 2011 +0100
@@ -39,24 +39,19 @@
 public final class Bug6204853 {
 
     public Bug6204853() {
-        try {
-            String srcDir = System.getProperty("test.src", ".");
-            FileInputStream  fis8859_1 =
-                new FileInputStream(new File(srcDir, "Bug6204853.properties"));
-            FileInputStream fisUtf8 =
-                new FileInputStream(new File(srcDir, "Bug6204853_Utf8.properties"));
-            InputStreamReader isrUtf8 = new InputStreamReader(fisUtf8, "UTF-8");
-
+        String srcDir = System.getProperty("test.src", ".");
+        try (FileInputStream fis8859_1 =
+                 new FileInputStream(new File(srcDir, "Bug6204853.properties"));
+             FileInputStream fisUtf8 =
+                 new FileInputStream(new File(srcDir, "Bug6204853_Utf8.properties"));
+             InputStreamReader isrUtf8 = new InputStreamReader(fisUtf8, "UTF-8"))
+        {
             PropertyResourceBundle bundleUtf8 = new PropertyResourceBundle(isrUtf8);
             PropertyResourceBundle bundle = new PropertyResourceBundle(fis8859_1);
 
             String[] arrayUtf8 = createKeyValueArray(bundleUtf8);
             String[] array = createKeyValueArray(bundle);
 
-            isrUtf8.close();
-            fisUtf8.close();
-            fis8859_1.close();
-
             if (!Arrays.equals(arrayUtf8, array)) {
                 throw new RuntimeException("PropertyResourceBundle constructed from a UTF-8 encoded property file is not equal to the one constructed from ISO-8859-1 encoded property file.");
             }
--- a/test/java/util/Scanner/FailingConstructors.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/Scanner/FailingConstructors.java	Wed Apr 20 04:38:36 2011 +0100
@@ -33,6 +33,7 @@
 import java.io.FileOutputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.nio.file.Files;
 import java.util.Scanner;
 
 public class FailingConstructors {
@@ -46,9 +47,7 @@
         /* create the file and write its contents */
         File file = File.createTempFile(fileName, null);
         file.deleteOnExit();
-        FileOutputStream fos = new FileOutputStream(file);
-        fos.write(FILE_CONTENTS.getBytes());
-        fos.close();
+        Files.write(file.toPath(), FILE_CONTENTS.getBytes());
 
         test(true, file);
         file.delete();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/TimeZone/Bug6772689.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2011, 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 6772689
+ * @summary Test for standard-to-daylight transitions at midnight:
+ * date stays on the given day.
+ */
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+import static java.util.GregorianCalendar.*;
+
+public class Bug6772689 {
+    private static final int BEGIN_YEAR = 2035;
+    private static final int END_YEAR = BEGIN_YEAR + 28;
+
+    public static void main(String[] args) {
+        TimeZone defaultTimeZone = TimeZone.getDefault();
+        int errors = 0;
+
+        Calendar cal = new GregorianCalendar(BEGIN_YEAR, MARCH, 1);
+        String[] tzids = TimeZone.getAvailableIDs();
+        try {
+            for (String id : tzids) {
+                TimeZone tz = TimeZone.getTimeZone(id);
+                if (!tz.useDaylightTime()) {
+                    continue;
+                }
+                TimeZone.setDefault(tz);
+
+              dateloop:
+                // Use future dates because sun.util.calendar.ZoneInfo
+                // delegates offset transition calculations to a SimpleTimeZone
+                // (after 2038 as of JDK7).
+                for (int year = BEGIN_YEAR; year < END_YEAR; year++) {
+                    for (int month = MARCH; month <= NOVEMBER; month++) {
+                        cal.set(year, month, 1, 15, 0, 0);
+                        int maxDom = cal.getActualMaximum(DAY_OF_MONTH);
+                        for (int dom = 1; dom <= maxDom; dom++) {
+                            Date date = new Date(year - 1900, month, dom);
+                            if (date.getYear()+1900 != year
+                                || date.getMonth() != month
+                                || date.getDate() != dom) {
+                                System.err.printf("%s: got %04d-%02d-%02d, expected %04d-%02d-%02d%n",
+                                                  id,
+                                                  date.getYear() + 1900,
+                                                  date.getMonth() + 1,
+                                                  date.getDate(),
+                                                  year,
+                                                  month + 1,
+                                                  dom);
+                                errors++;
+                                break dateloop;
+                            }
+                        }
+                    }
+                }
+            }
+        } finally {
+            // Restore the default TimeZone.
+            TimeZone.setDefault(defaultTimeZone);
+        }
+        if (errors > 0) {
+            throw new RuntimeException("Transition test failed");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/TimeZone/DaylightTimeTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2011, 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 6936350
+ * @summary Test case for TimeZone.observesDaylightTime()
+ */
+
+import java.util.*;
+import static java.util.GregorianCalendar.*;
+
+public class DaylightTimeTest {
+    private static final int ONE_HOUR = 60 * 60 * 1000; // one hour
+    private static final int INTERVAL = 24 * ONE_HOUR;  // one day
+    private static final String[] ZONES = TimeZone.getAvailableIDs();
+    private static int errors = 0;
+
+    public static void main(String[] args) {
+
+        // Test default TimeZone
+        for (String id : ZONES) {
+            TimeZone tz = TimeZone.getTimeZone(id);
+            long now = System.currentTimeMillis();
+            boolean observes = tz.observesDaylightTime();
+            boolean found = findDSTTransition(tz, now);
+            if (observes != found) {
+                // There's a critical section. If DST ends after the
+                // System.currentTimeMills() call, there should be
+                // inconsistency in the determination. Try the same
+                // thing again to see the inconsistency was due to the
+                // critical section.
+                now = System.currentTimeMillis();
+                observes = tz.observesDaylightTime();
+                found = findDSTTransition(tz, now);
+                if (observes != found) {
+                    System.err.printf("%s: observesDaylightTime() should return %s at %d%n",
+                                      tz.getID(), found, now);
+                    errors++;
+                }
+            }
+        }
+
+        // Test SimpleTimeZone in which observesDaylightTime() is
+        // equivalent to useDaylightTime().
+        testSimpleTimeZone(new SimpleTimeZone(-8*ONE_HOUR, "X",
+                                              APRIL, 1, -SUNDAY, 2*ONE_HOUR,
+                                              OCTOBER, -1, SUNDAY, 2*ONE_HOUR,
+                                              1*ONE_HOUR));
+        testSimpleTimeZone(new SimpleTimeZone(-8*ONE_HOUR, "Y"));
+
+        if (errors > 0) {
+            throw new RuntimeException("DaylightTimeTest: failed");
+        }
+    }
+
+    /**
+     * Returns true if it's `now' in DST or there's any
+     * standard-to-daylight transition within 50 years after `now'.
+     */
+    private static boolean findDSTTransition(TimeZone tz, long now) {
+        GregorianCalendar cal = new GregorianCalendar(tz, Locale.US);
+        cal.setTimeInMillis(now);
+        cal.add(YEAR, 50);
+        long end = cal.getTimeInMillis();
+
+        for (long t = now; t < end; t += INTERVAL) {
+            cal.setTimeInMillis(t);
+            if (cal.get(DST_OFFSET) > 0) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static void testSimpleTimeZone(SimpleTimeZone stz) {
+        if (stz.useDaylightTime() != stz.observesDaylightTime()) {
+            System.err.printf("Failed: useDaylightTime=%b, observesDaylightTime()=%b%n\t%s%n",
+                              stz.useDaylightTime(),stz.observesDaylightTime(), stz);
+            errors++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/TreeMap/EmptyMapAndNulls.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2011, 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 5045147
+ * @summary Test handling of null with empty Map
+ * @author Mike Duigou
+ */
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+import java.lang.reflect.*;
+
+public class EmptyMapAndNulls {
+
+    @SuppressWarnings("rawtypes")
+    static void realMain(String[] args) throws Throwable {
+        // No comparator
+        Map<String,String> comparable = new TreeMap<>();
+
+        // insert null into empty map (5045147 failure)
+        try {
+            comparable.put(null, "anything");
+            fail("null shouldn't be accepted");
+        } catch (NullPointerException failed) {
+            pass();
+        }
+
+        // insert non-null into empty map
+        try {
+            comparable.put("test", "anything");
+            pass();
+        } catch (NullPointerException failed) {
+            fail();
+        }
+
+        // insert null into non-empty map
+        try {
+            comparable.put(null, "anything");
+            fail("null shouldn't be accepted");
+        } catch (NullPointerException failed) {
+            pass();
+        }
+
+        // Comparator (String.CASE_INSENSITIVE_ORDER). Intentionally a raw type.
+        Map comparator = new TreeMap(String.CASE_INSENSITIVE_ORDER);
+
+        // insert null into empty map (5045147 failure)
+        try {
+            comparator.put(null, "anything");
+            fail("null shouldn't be accepted");
+        } catch (NullPointerException failed) {
+            pass();
+        }
+
+        // insert non-null into empty map
+        try {
+            comparator.put("test", "anything");
+            pass();
+        } catch (NullPointerException failed) {
+            fail();
+        }
+
+        // insert null into non-empty map
+        try {
+            comparator.put(null, "anything");
+            fail("null shouldn't be accepted");
+        } catch (NullPointerException failed) {
+            pass();
+        }
+
+        comparator.clear();
+
+        // insert non-String into empty map (5045147 failure)
+        try {
+            comparator.put(new Object(), "anything");
+            fail("Object shouldn't be accepted");
+        } catch (ClassCastException failed) {
+            pass();
+        }
+
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    static volatile int passed = 0, failed = 0;
+    static void pass() {passed++;}
+    static void fail() {failed++; Thread.dumpStack();}
+    static void fail(String msg) {System.out.println(msg); fail();}
+    static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    static void check(boolean cond) {if (cond) pass(); else fail();}
+    static void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        try {realMain(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Vector/SerializationDeadlock.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2010, 2011 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.
+ */
+
+/*
+ * Portions Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 6934356
+ * @summary Serializing Vector objects which refer to each other should not be able to deadlock.
+ * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+import java.util.concurrent.CyclicBarrier;
+
+public class SerializationDeadlock {
+    public static void main(final String[] args) throws Exception {
+        // Test for Vector serialization deadlock
+        final Vector<Object> v1 = new Vector<>();
+        final Vector<Object> v2 = new Vector<>();
+        final TestBarrier testStart = new TestBarrier(3);
+
+        // Populate the vectors so that they refer to each other
+        v1.add(testStart);
+        v1.add(v2);
+        v2.add(testStart);
+        v2.add(v1);
+
+        final CyclicBarrier testEnd = new CyclicBarrier(3);
+        final TestThread t1 = new TestThread(v1, testEnd);
+        final TestThread t2 = new TestThread(v2, testEnd);
+
+        t1.start();
+        t2.start();
+
+        // Wait for both test threads to have initiated serialization
+        // of the 'testStart' object (and hence of both 'v1' and 'v2')
+        testStart.await();
+
+        // Wait for both test threads to successfully finish serialization
+        // of 'v1' and 'v2'.
+        System.out.println("Waiting for Vector serialization to complete ...");
+        System.out.println("(This test will hang if serialization deadlocks)");
+        testEnd.await();
+        System.out.println("Test PASSED: serialization completed successfully");
+
+        TestThread.handleExceptions();
+    }
+
+    static final class TestBarrier extends CyclicBarrier
+            implements Serializable {
+        public TestBarrier(final int count) {
+            super(count);
+        }
+
+        private void writeObject(final ObjectOutputStream oos)
+                throws IOException {
+            oos.defaultWriteObject();
+            // Wait until all test threads have started serializing data
+            try {
+                await();
+            } catch (final Exception e) {
+                throw new IOException("Test ERROR: Unexpected exception caught", e);
+            }
+        }
+    }
+
+    static final class TestThread extends Thread {
+        private static final List<Exception> exceptions = new ArrayList<>();
+
+        private final Vector vector;
+        private final CyclicBarrier testEnd;
+
+        public TestThread(final Vector vector, final CyclicBarrier testEnd) {
+            this.vector = vector;
+            this.testEnd = testEnd;
+            setDaemon(true);
+        }
+
+        public void run() {
+            try {
+                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                final ObjectOutputStream oos = new ObjectOutputStream(baos);
+
+                oos.writeObject(vector);
+                oos.close();
+            } catch (final IOException ioe) {
+                addException(ioe);
+            } finally {
+                try {
+                    testEnd.await();
+                } catch (Exception e) {
+                    addException(e);
+                }
+            }
+        }
+
+        private static synchronized void addException(final Exception exception) {
+            exceptions.add(exception);
+        }
+
+        public static synchronized void handleExceptions() {
+            if (false == exceptions.isEmpty()) {
+                throw new RuntimeException(getErrorText(exceptions));
+            }
+        }
+
+        private static String getErrorText(final List<Exception> exceptions) {
+            final StringWriter sw = new StringWriter();
+            final PrintWriter pw = new PrintWriter(sw);
+
+            pw.println("Test ERROR: Unexpected exceptions thrown on test threads:");
+            for (Exception exception : exceptions) {
+                pw.print("\t");
+                pw.println(exception);
+                for (StackTraceElement element : exception.getStackTrace()) {
+                    pw.print("\t\tat ");
+                    pw.println(element);
+                }
+            }
+
+            pw.close();
+            return sw.toString();
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Vector/SimpleSerialization.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2010, 2011 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.
+ */
+
+/*
+ * Portions Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 6934356
+ * @summary A serialized Vector can be successfully de-serialized.
+ * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Vector;
+
+public class SimpleSerialization {
+    public static void main(final String[] args) throws Exception {
+        final Vector<String> v1 = new Vector<>();
+
+        v1.add("entry1");
+        v1.add("entry2");
+
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final ObjectOutputStream oos = new ObjectOutputStream(baos);
+
+        oos.writeObject(v1);
+        oos.close();
+
+        final byte[] data = baos.toByteArray();
+        final ByteArrayInputStream bais = new ByteArrayInputStream(data);
+        final ObjectInputStream ois = new ObjectInputStream(bais);
+
+        final Object deserializedObject = ois.readObject();
+        ois.close();
+
+        if (false == v1.equals(deserializedObject)) {
+            throw new RuntimeException(getFailureText(v1, deserializedObject));
+        }
+    }
+
+    private static String getFailureText(final Object orig, final Object copy) {
+        final StringWriter sw = new StringWriter();
+        final PrintWriter pw = new PrintWriter(sw);
+
+        pw.println("Test FAILED: Deserialized object is not equal to the original object");
+        pw.print("\tOriginal: ");
+        printObject(pw, orig).println();
+        pw.print("\tCopy:     ");
+        printObject(pw, copy).println();
+
+        pw.close();
+        return sw.toString();
+    }
+
+    private static PrintWriter printObject(final PrintWriter pw, final Object o) {
+        pw.printf("%s@%08x", o.getClass().getName(), System.identityHashCode(o));
+        return pw;
+    }
+}
--- a/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java	Wed Apr 20 04:38:36 2011 +0100
@@ -124,11 +124,11 @@
         oneRun(new ArrayBlockingQueue<Integer>(CAPACITY), pairs, iters);
         oneRun(new LinkedBlockingQueue<Integer>(CAPACITY), pairs, iters);
         oneRun(new LinkedBlockingDeque<Integer>(CAPACITY), pairs, iters);
-        oneRun(new LinkedTransferQueue<Integer>(), pairs, iters);
         oneRun(new SynchronousQueue<Integer>(), pairs, iters / 8);
 
-        /* PriorityBlockingQueue is unbounded
+        /* unbounded queue implementations are prone to OOME
         oneRun(new PriorityBlockingQueue<Integer>(iters / 2 * pairs), pairs, iters / 4);
+        oneRun(new LinkedTransferQueue<Integer>(), pairs, iters);
         */
     }
 
--- a/test/java/util/jar/JarEntry/GetMethodsReturnClones.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/jar/JarEntry/GetMethodsReturnClones.java	Wed Apr 20 04:38:36 2011 +0100
@@ -40,22 +40,21 @@
         System.getProperty("file.separator");
 
     public static void main(String[] args) throws Exception {
-        JarFile jf = new JarFile(BASE + "test.jar", true);
-
-        byte[] buffer = new byte[8192];
-        Enumeration<JarEntry> e = jf.entries();
-        List<JarEntry> entries = new ArrayList<JarEntry>();
-        while (e.hasMoreElements()) {
-            JarEntry je = e.nextElement();
-            entries.add(je);
-            InputStream is = jf.getInputStream(je);
-            while (is.read(buffer, 0, buffer.length) != -1) {
-                // we just read. this will throw a SecurityException
-                // if  a signature/digest check fails.
+        List<JarEntry> entries = new ArrayList<>();
+        try (JarFile jf = new JarFile(BASE + "test.jar", true)) {
+            byte[] buffer = new byte[8192];
+            Enumeration<JarEntry> e = jf.entries();
+            while (e.hasMoreElements()) {
+                JarEntry je = e.nextElement();
+                entries.add(je);
+                try (InputStream is = jf.getInputStream(je)) {
+                    while (is.read(buffer, 0, buffer.length) != -1) {
+                        // we just read. this will throw a SecurityException
+                        // if  a signature/digest check fails.
+                    }
+                }
             }
-            is.close();
         }
-        jf.close();
 
         for (JarEntry je : entries) {
             Certificate[] certs = je.getCertificates();
--- a/test/java/util/jar/JarFile/ScanSignedJar.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/jar/JarFile/ScanSignedJar.java	Wed Apr 20 04:38:36 2011 +0100
@@ -37,25 +37,25 @@
 public class ScanSignedJar {
 
     public static void main(String[] args) throws Exception {
-        JarFile file = new JarFile(new File(System.getProperty("test.src","."),
-            "bogus-signerinfo-attr.jar"));
-        byte[] buffer = new byte[8192];
         boolean isSigned = false;
+        try (JarFile file = new JarFile(new File(System.getProperty("test.src","."),
+                 "bogus-signerinfo-attr.jar"))) {
+            byte[] buffer = new byte[8192];
 
-        for (Enumeration entries = file.entries(); entries.hasMoreElements();) {
-            JarEntry entry = (JarEntry) entries.nextElement();
-            InputStream jis = file.getInputStream(entry);
-            while (jis.read(buffer, 0, buffer.length) != -1) {
-                // read the jar entry
+            for (Enumeration entries = file.entries(); entries.hasMoreElements();) {
+                JarEntry entry = (JarEntry) entries.nextElement();
+                try (InputStream jis = file.getInputStream(entry)) {
+                    while (jis.read(buffer, 0, buffer.length) != -1) {
+                        // read the jar entry
+                    }
+                }
+                if (entry.getCertificates() != null) {
+                    isSigned = true;
+                }
+                System.out.println((isSigned ? "[signed] " : "\t ") +
+                    entry.getName());
             }
-            jis.close();
-            if (entry.getCertificates() != null) {
-                isSigned = true;
-            }
-            System.out.println((isSigned ? "[signed] " : "\t ") +
-                entry.getName());
         }
-        file.close();
 
         if (isSigned) {
             System.out.println("\nJAR file has signed entries");
--- a/test/java/util/zip/Available.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/Available.java	Wed Apr 20 04:38:36 2011 +0100
@@ -44,14 +44,17 @@
         File f = new File(System.getProperty("test.src", "."), "input.jar");
 
         // test ZipInputStream
-        ZipInputStream z = new ZipInputStream(new FileInputStream(f));
-        z.getNextEntry();
-        tryAvail(z);
+        try (FileInputStream fis = new FileInputStream(f);
+             ZipInputStream z = new ZipInputStream(fis))
+        {
+            z.getNextEntry();
+            tryAvail(z);
+        }
 
         // test InflaterInputStream
-        ZipFile zfile = new ZipFile(f);
-        tryAvail(zfile.getInputStream(zfile.getEntry("Available.java")));
-        z.close();
+        try (ZipFile zfile = new ZipFile(f)) {
+            tryAvail(zfile.getInputStream(zfile.getEntry("Available.java")));
+        }
     }
 
     static void tryAvail(InputStream in) throws Exception {
@@ -67,20 +70,21 @@
     // To reproduce 4401122
     private static void test2() throws Exception {
         File f = new File(System.getProperty("test.src", "."), "input.jar");
-        ZipFile zf = new ZipFile(f);
-        InputStream in = zf.getInputStream(zf.getEntry("Available.java"));
+        try (ZipFile zf = new ZipFile(f)) {
+            InputStream in = zf.getInputStream(zf.getEntry("Available.java"));
 
-        int initialAvailable = in.available();
-        in.read();
-        if (in.available() != initialAvailable - 1)
-            throw new RuntimeException("Available not decremented.");
-        for(int j=0; j<initialAvailable-1; j++)
+            int initialAvailable = in.available();
             in.read();
-        if (in.available() != 0)
-            throw new RuntimeException();
-        in.close();
-        if (in.available() != 0)
-            throw new RuntimeException();
+            if (in.available() != initialAvailable - 1)
+                throw new RuntimeException("Available not decremented.");
+            for(int j=0; j<initialAvailable-1; j++)
+                in.read();
+            if (in.available() != 0)
+                throw new RuntimeException();
+            in.close();
+            if (in.available() != 0)
+                throw new RuntimeException();
+        }
     }
 
 }
--- a/test/java/util/zip/FileBuilder.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/FileBuilder.java	Wed Apr 20 04:38:36 2011 +0100
@@ -53,25 +53,24 @@
                filetype.equals("SlightlyCompressible")))
             usageError();
 
-        RandomAccessFile raf = new RandomAccessFile(filename, "rw");
+        try (RandomAccessFile raf = new RandomAccessFile(filename, "rw")) {
+            if (filetype.equals("SlightlyCompressible")) {
+                byte[] randomBytes = new byte[16384];
+                byte[] nullBytes   = new byte[randomBytes.length/10];
+                Random rand = new Random();
+                for (int i = 0; raf.length() < filesize; ++i) {
+                    rand.nextBytes(randomBytes);
+                    raf.write(nullBytes);
+                    raf.write(randomBytes);
+                }
+            }
 
-        if (filetype.equals("SlightlyCompressible")) {
-            byte[] randomBytes = new byte[16384];
-            byte[] nullBytes   = new byte[randomBytes.length/10];
-            Random rand = new Random();
-            for (int i = 0; raf.length() < filesize; ++i) {
-                rand.nextBytes(randomBytes);
-                raf.write(nullBytes);
-                raf.write(randomBytes);
-            }
+            // Make sure file is exactly the requested size, and that
+            // a unique identifying trailer is written.
+            byte[] filenameBytes = filename.getBytes("UTF8");
+            raf.seek(filesize-filenameBytes.length);
+            raf.write(filenameBytes);
+            raf.setLength(filesize);
         }
-
-        // Make sure file is exactly the requested size, and that
-        // a unique identifying trailer is written.
-        byte[] filenameBytes = filename.getBytes("UTF8");
-        raf.seek(filesize-filenameBytes.length);
-        raf.write(filenameBytes);
-        raf.setLength(filesize);
-        raf.close();
     }
 }
--- a/test/java/util/zip/GZIP/Accordion.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/GZIP/Accordion.java	Wed Apr 20 04:38:36 2011 +0100
@@ -64,16 +64,13 @@
         System.out.println("count="+count);
 
         Thread compressor = new Thread() { public void run() {
-            try {
-                final GZIPOutputStream s = new GZIPOutputStream(out);
+            try (GZIPOutputStream s = new GZIPOutputStream(out)) {
                 for (long i = 0; i < count; i++)
                     s.write(data, 0, data.length);
-                s.close();
             } catch (Throwable t) { trouble = t; }}};
 
         Thread uncompressor = new Thread() { public void run() {
-            try {
-                final GZIPInputStream s = new GZIPInputStream(in);
+            try (GZIPInputStream s = new GZIPInputStream(in)) {
                 final byte[] maybeBytes = new byte[data.length];
                 for (long i = 0; i < count; i++) {
                     readFully(s, maybeBytes);
@@ -82,7 +79,6 @@
                 }
                 if (s.read(maybeBytes, 0, 1) > 0)
                     throw new Exception("Unexpected NON-EOF");
-                s.close();
             } catch (Throwable t) { trouble = t; }}};
 
         compressor.start(); uncompressor.start();
--- a/test/java/util/zip/GZIP/GZIPInputStreamRead.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/GZIP/GZIPInputStreamRead.java	Wed Apr 20 04:38:36 2011 +0100
@@ -44,9 +44,9 @@
                 rnd.nextBytes(src);
                 srcBAOS.write(src);
 
-                GZIPOutputStream gzos = new GZIPOutputStream(dstBAOS);
-                gzos.write(src);
-                gzos.close();
+                try (GZIPOutputStream gzos = new GZIPOutputStream(dstBAOS)) {
+                    gzos.write(src);
+                }
             }
             byte[] srcBytes = srcBAOS.toByteArray();
             byte[] dstBytes = dstBAOS.toByteArray();
@@ -75,26 +75,26 @@
                              int readBufSize, int gzisBufSize)
         throws Throwable
     {
-        GZIPInputStream gzis = new GZIPInputStream(
-                                   new ByteArrayInputStream(dst),
-                                   gzisBufSize);
-        byte[] result = new byte[src.length + 10];
-        byte[] buf = new byte[readBufSize];
-        int n = 0;
-        int off = 0;
+        try (ByteArrayInputStream bais = new ByteArrayInputStream(dst);
+             GZIPInputStream gzis = new GZIPInputStream(bais, gzisBufSize))
+        {
+            byte[] result = new byte[src.length + 10];
+            byte[] buf = new byte[readBufSize];
+            int n = 0;
+            int off = 0;
 
-        while ((n = gzis.read(buf, 0, buf.length)) != -1) {
-            System.arraycopy(buf, 0, result, off, n);
-            off += n;
-            // no range check, if overflow, let it fail
+            while ((n = gzis.read(buf, 0, buf.length)) != -1) {
+                System.arraycopy(buf, 0, result, off, n);
+                off += n;
+                // no range check, if overflow, let it fail
+            }
+            if (off != src.length || gzis.available() != 0 ||
+                !Arrays.equals(src, Arrays.copyOf(result, off))) {
+                throw new RuntimeException(
+                    "GZIPInputStream reading failed! " +
+                    ", src.len=" + src.length +
+                    ", read=" + off);
+            }
         }
-        if (off != src.length || gzis.available() != 0 ||
-            !Arrays.equals(src, Arrays.copyOf(result, off))) {
-            throw new RuntimeException(
-                "GZIPInputStream reading failed! " +
-                ", src.len=" + src.length +
-                ", read=" + off);
-        }
-        gzis.close();
     }
 }
--- a/test/java/util/zip/InflateIn_DeflateOut.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/InflateIn_DeflateOut.java	Wed Apr 20 04:38:36 2011 +0100
@@ -134,14 +134,14 @@
 
         PairedOutputStream pos = new PairedOutputStream(pis);
         pis.setPairedOutputStream(pos);
-        DeflaterOutputStream dos = new DeflaterOutputStream(pos, true);
 
         byte[] data = new byte[random.nextInt(1024 * 1024)];
         byte[] buf = new byte[data.length];
         random.nextBytes(data);
 
-        dos.write(data);
-        dos.close();
+        try (DeflaterOutputStream dos = new DeflaterOutputStream(pos, true)) {
+            dos.write(data);
+        }
         check(readFully(iis, buf, buf.length));
         check(Arrays.equals(data, buf));
     }
--- a/test/java/util/zip/InfoZip.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/InfoZip.java	Wed Apr 20 04:38:36 2011 +0100
@@ -85,41 +85,37 @@
         //----------------------------------------------------------------
         File f = new File("InfoZip.zip");
 
-        OutputStream os = new FileOutputStream(f);
-        os.write(new byte[]
-            {'P', 'K', 3, 4, 10, 0, 0, 0, 0, 0, -68, 8, 'k',
-             '2', 'V', -7, 'm', 9, 20, 0, 0, 0, 20, 0, 0, 0,
-             8, 0, 21, 0, 's', 'o', 'm', 'e', 'F', 'i', 'l', 'e', 'U',
-             'T', 9, 0, 3, 't', '_', '1', 'B', 't', '_', '1', 'B', 'U',
-             'x', 4, 0, -14, 'v', 26, 4, 'M', 'e', 's', 's', 'a', 'g',
-             'e', ' ', 'i', 'n', ' ', 'a', ' ', 'B', 'o', 't', 't', 'l', 'e',
-             10, 'P', 'K', 1, 2, 23, 3, 10, 0, 0, 0, 0, 0,
-             -68, 8, 'k', '2', 'V', -7, 'm', 9, 20, 0, 0, 0, 20,
-             0, 0, 0, 8, 0, 13, 0, 0, 0, 0, 0, 1, 0,
-             0, 0, -92, -127, 0, 0, 0, 0, 's', 'o', 'm', 'e', 'F',
-             'i', 'l', 'e', 'U', 'T', 5, 0, 3, 't', '_', '1', 'B', 'U',
-             'x', 0, 0, 'P', 'K', 5, 6, 0, 0, 0, 0, 1, 0,
-             1, 0, 'C', 0, 0, 0, 'O', 0, 0, 0, 0, 0, });
-        os.close();
+        try (OutputStream os = new FileOutputStream(f)) {
+            os.write(new byte[]
+                {'P', 'K', 3, 4, 10, 0, 0, 0, 0, 0, -68, 8, 'k',
+                 '2', 'V', -7, 'm', 9, 20, 0, 0, 0, 20, 0, 0, 0,
+                 8, 0, 21, 0, 's', 'o', 'm', 'e', 'F', 'i', 'l', 'e', 'U',
+                 'T', 9, 0, 3, 't', '_', '1', 'B', 't', '_', '1', 'B', 'U',
+                 'x', 4, 0, -14, 'v', 26, 4, 'M', 'e', 's', 's', 'a', 'g',
+                 'e', ' ', 'i', 'n', ' ', 'a', ' ', 'B', 'o', 't', 't', 'l', 'e',
+                 10, 'P', 'K', 1, 2, 23, 3, 10, 0, 0, 0, 0, 0,
+                 -68, 8, 'k', '2', 'V', -7, 'm', 9, 20, 0, 0, 0, 20,
+                 0, 0, 0, 8, 0, 13, 0, 0, 0, 0, 0, 1, 0,
+                 0, 0, -92, -127, 0, 0, 0, 0, 's', 'o', 'm', 'e', 'F',
+                 'i', 'l', 'e', 'U', 'T', 5, 0, 3, 't', '_', '1', 'B', 'U',
+                 'x', 0, 0, 'P', 'K', 5, 6, 0, 0, 0, 0, 1, 0,
+                 1, 0, 'C', 0, 0, 0, 'O', 0, 0, 0, 0, 0, });
+        }
 
-        ZipFile zf = new ZipFile(f);
         ZipEntry ze = null;
-        try {
+        try (ZipFile zf = new ZipFile(f)) {
             Enumeration<? extends ZipEntry> entries = zf.entries();
             ze = entries.nextElement();
             check(! entries.hasMoreElements());
             checkZipEntry(ze, contents(zf, ze));
-        } finally {
-            zf.close();
         }
 
-        ZipInputStream is = new ZipInputStream(new FileInputStream(f));
-        try {
+        try (FileInputStream fis = new FileInputStream(f);
+             ZipInputStream is = new ZipInputStream(fis))
+        {
             ze = is.getNextEntry();
             checkZipEntry(ze, contents(is));
             check(is.getNextEntry() == null);
-        } finally {
-            is.close();
         }
         f.delete();
         System.out.printf("passed = %d, failed = %d%n", passed, failed);
--- a/test/java/util/zip/LargeZip.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/LargeZip.java	Wed Apr 20 04:38:36 2011 +0100
@@ -98,19 +98,21 @@
         }
         data = baos.toByteArray();
 
-        ZipOutputStream zos = new ZipOutputStream(
-            new BufferedOutputStream(new FileOutputStream(largeFile)));
-        long length = 0;
-        while (length < fileSize) {
-            ZipEntry ze = new ZipEntry("entry-" + length);
-            lastEntryName = ze.getName();
-            zos.putNextEntry(ze);
-            zos.write(data, 0, data.length);
-            zos.closeEntry();
-            length = largeFile.length();
+        try (FileOutputStream fos = new FileOutputStream(largeFile);
+             BufferedOutputStream bos = new BufferedOutputStream(fos);
+             ZipOutputStream zos = new ZipOutputStream(bos))
+        {
+            long length = 0;
+            while (length < fileSize) {
+                ZipEntry ze = new ZipEntry("entry-" + length);
+                lastEntryName = ze.getName();
+                zos.putNextEntry(ze);
+                zos.write(data, 0, data.length);
+                zos.closeEntry();
+                length = largeFile.length();
+            }
+            System.out.println("Last entry written is " + lastEntryName);
         }
-        System.out.println("Last entry written is " + lastEntryName);
-        zos.close();
     }
 
     static void readLargeZip1() throws Throwable {
@@ -143,33 +145,35 @@
 
 
     static void readLargeZip2() throws Throwable {
-        ZipInputStream zis = new ZipInputStream(
-            new BufferedInputStream(new FileInputStream(largeFile)));
-        ZipEntry entry = null;
-        String entryName = null;
-        int count = 0;
-        while ((entry = zis.getNextEntry()) != null) {
-            entryName = entry.getName();
-            if (entryName.equals(lastEntryName)) {
-                break;
+        try (FileInputStream fis = new FileInputStream(largeFile);
+             BufferedInputStream bis = new BufferedInputStream(fis);
+             ZipInputStream zis = new ZipInputStream(bis))
+        {
+            ZipEntry entry = null;
+            String entryName = null;
+            int count = 0;
+            while ((entry = zis.getNextEntry()) != null) {
+                entryName = entry.getName();
+                if (entryName.equals(lastEntryName)) {
+                    break;
+                }
+                count++;
             }
-            count++;
+            System.out.println("Number of entries read: " + count);
+            System.out.println("Last entry read is " + entryName);
+            check(!entry.isDirectory());
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+            byte buf[] = new byte[4096];
+            int len;
+            while ((len = zis.read(buf)) >= 0) {
+                baos.write(buf, 0, len);
+            }
+            baos.close();
+            check(Arrays.equals(data, baos.toByteArray()));
+            check(zis.getNextEntry() == null);
         }
-        System.out.println("Number of entries read: " + count);
-        System.out.println("Last entry read is " + entryName);
-        check(!entry.isDirectory());
-
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-        byte buf[] = new byte[4096];
-        int len;
-        while ((len = zis.read(buf)) >= 0) {
-            baos.write(buf, 0, len);
-        }
-        baos.close();
-        check(Arrays.equals(data, baos.toByteArray()));
-        check(zis.getNextEntry() == null);
-        zis.close();
     }
 
 
--- a/test/java/util/zip/TestEmptyZip.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/TestEmptyZip.java	Wed Apr 20 04:38:36 2011 +0100
@@ -78,67 +78,49 @@
                 pass();
             }
         }
-        ZipInputStream zis = null;
-        try {
-            zis = new ZipInputStream(new FileInputStream(f));
+        try (FileInputStream fis = new FileInputStream(f);
+             ZipInputStream zis = new ZipInputStream(fis))
+        {
             ZipEntry ze = zis.getNextEntry();
             check(ze == null);
         } catch (IOException ex) {
             unexpected(ex);
-        } finally {
-            if (zis != null) zis.close();
         }
     }
 
     static void write(File f) throws Exception {
-        ZipOutputStream zos = null;
-        try {
-            zos = new ZipOutputStream(new FileOutputStream(f));
+        try (FileOutputStream fis = new FileOutputStream(f);
+             ZipOutputStream zos = new ZipOutputStream(fis))
+        {
             zos.finish();
-            zos.close();
             pass();
         } catch (Exception ex) {
             unexpected(ex);
-        } finally {
-            if (zos != null) {
-                zos.close();
-            }
         }
     }
 
     static void readFile(File f) throws Exception {
-        ZipFile zf = null;
-        try {
-            zf = new ZipFile(f);
+        try (ZipFile zf = new ZipFile(f)) {
 
             Enumeration e = zf.entries();
             while (e.hasMoreElements()) {
                 ZipEntry entry = (ZipEntry) e.nextElement();
                 fail();
             }
-            zf.close();
             pass();
         } catch (Exception ex) {
             unexpected(ex);
-        } finally {
-            if (zf != null) {
-                zf.close();
-            }
         }
     }
 
     static void readStream(File f) throws Exception {
-        ZipInputStream zis = null;
-        try {
-            zis = new ZipInputStream(new FileInputStream(f));
+        try (FileInputStream fis = new FileInputStream(f);
+             ZipInputStream zis = new ZipInputStream(fis))
+        {
             ZipEntry ze = zis.getNextEntry();
             check(ze == null);
             byte[] buf = new byte[1024];
             check(zis.read(buf, 0, 1024) == -1);
-        } finally {
-            if (zis != null) {
-                zis.close();
-            }
         }
     }
 
--- a/test/java/util/zip/ZipCoding.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipCoding.java	Wed Apr 20 04:38:36 2011 +0100
@@ -57,59 +57,58 @@
                                    String name, String comment, byte[] bb)
         throws Exception
     {
-        ZipInputStream zis = new ZipInputStream(is, cs);
-        ZipEntry e = zis.getNextEntry();
-        if (e == null || ! name.equals(e.getName()))
-            throw new RuntimeException("ZipIS name doesn't match!");
-        byte[] bBuf = new byte[bb.length << 1];
-        int n = zis.read(bBuf, 0, bBuf.length);
-        if (n != bb.length ||
-            !Arrays.equals(bb, Arrays.copyOf(bBuf, n))) {
-            throw new RuntimeException("ZipIS content doesn't match!");
+        try (ZipInputStream zis = new ZipInputStream(is, cs)) {
+            ZipEntry e = zis.getNextEntry();
+            if (e == null || ! name.equals(e.getName()))
+                throw new RuntimeException("ZipIS name doesn't match!");
+            byte[] bBuf = new byte[bb.length << 1];
+            int n = zis.read(bBuf, 0, bBuf.length);
+            if (n != bb.length ||
+                !Arrays.equals(bb, Arrays.copyOf(bBuf, n))) {
+                throw new RuntimeException("ZipIS content doesn't match!");
+            }
         }
-        zis.close();
     }
 
     static void testZipFile(File f, Charset cs,
                             String name, String comment, byte[] bb)
         throws Exception
     {
-        ZipFile zf = new ZipFile(f, cs);
-        Enumeration<? extends ZipEntry> zes = zf.entries();
-        ZipEntry e = (ZipEntry)zes.nextElement();
-        if (! name.equals(e.getName()) ||
-            ! comment.equals(e.getComment()))
-            throw new RuntimeException("ZipFile: name/comment doesn't match!");
-        InputStream is = zf.getInputStream(e);
-        if (is == null)
-            throw new RuntimeException("ZipFile: getIS failed!");
-        byte[] bBuf = new byte[bb.length << 1];
-        int n = 0;
-        int nn =0;
-        while ((nn = is.read(bBuf, n, bBuf.length-n)) != -1) {
-            n += nn;
+        try (ZipFile zf = new ZipFile(f, cs)) {
+            Enumeration<? extends ZipEntry> zes = zf.entries();
+            ZipEntry e = (ZipEntry)zes.nextElement();
+            if (! name.equals(e.getName()) ||
+                ! comment.equals(e.getComment()))
+                throw new RuntimeException("ZipFile: name/comment doesn't match!");
+            InputStream is = zf.getInputStream(e);
+            if (is == null)
+                throw new RuntimeException("ZipFile: getIS failed!");
+            byte[] bBuf = new byte[bb.length << 1];
+            int n = 0;
+            int nn =0;
+            while ((nn = is.read(bBuf, n, bBuf.length-n)) != -1) {
+                n += nn;
+            }
+            if (n != bb.length ||
+                !Arrays.equals(bb, Arrays.copyOf(bBuf, n))) {
+                throw new RuntimeException("ZipFile content doesn't match!");
+            }
         }
-        if (n != bb.length ||
-            !Arrays.equals(bb, Arrays.copyOf(bBuf, n))) {
-            throw new RuntimeException("ZipFile content doesn't match!");
-        }
-        zf.close();
     }
 
     static void test(String csn, String name, String comment)
         throws Exception
     {
-        byte[] bb = "This is the conent of the zipfile".getBytes("ISO-8859-1");
+        byte[] bb = "This is the content of the zipfile".getBytes("ISO-8859-1");
         Charset cs = Charset.forName(csn);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ZipOutputStream zos = new ZipOutputStream(baos, cs);
-
-        ZipEntry e = new ZipEntry(name);
-        e.setComment(comment);
-        zos.putNextEntry(e);
-        zos.write(bb, 0, bb.length);
-        zos.closeEntry();
-        zos.close();
+        try (ZipOutputStream zos = new ZipOutputStream(baos, cs)) {
+            ZipEntry e = new ZipEntry(name);
+            e.setComment(comment);
+            zos.putNextEntry(e);
+            zos.write(bb, 0, bb.length);
+            zos.closeEntry();
+        }
         ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
         testZipInputStream(bis, cs, name, comment, bb);
 
@@ -121,9 +120,9 @@
 
         File f = new File(new File(System.getProperty("test.dir", ".")),
                           "zfcoding.zip");
-        FileOutputStream fos = new FileOutputStream(f);
-        baos.writeTo(fos);
-        fos.close();
+        try (FileOutputStream fos = new FileOutputStream(f)) {
+            baos.writeTo(fos);
+        }
         testZipFile(f, cs, name, comment, bb);
         if ("utf-8".equals(csn)) {
             testZipFile(f, Charset.forName("MS932"), name, comment, bb);
--- a/test/java/util/zip/ZipFile/Assortment.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/Assortment.java	Wed Apr 20 04:38:36 2011 +0100
@@ -201,13 +201,12 @@
         //----------------------------------------------------------------
         // Write zip file using ZipOutputStream
         //----------------------------------------------------------------
-        ZipOutputStream zos = new ZipOutputStream(
-            new FileOutputStream(zipName));
-
-        for (Entry e : entries)
-            e.write(zos);
-
-        zos.close();
+        try (FileOutputStream fos = new FileOutputStream(zipName);
+             ZipOutputStream zos = new ZipOutputStream(fos))
+        {
+            for (Entry e : entries)
+                e.write(zos);
+        }
 
         //----------------------------------------------------------------
         // Verify zip file contents using JarFile class
--- a/test/java/util/zip/ZipFile/Comment.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/Comment.java	Wed Apr 20 04:38:36 2011 +0100
@@ -57,16 +57,15 @@
     private static void writeZipFile(String name, String comment)
         throws IOException
     {
-        ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(name));
-        try {
+        try (FileOutputStream fos = new FileOutputStream(name);
+             ZipOutputStream zos = new ZipOutputStream(fos))
+        {
             zos.setComment(comment);
             ZipEntry ze = new ZipEntry(entryName);
             ze.setMethod(ZipEntry.DEFLATED);
             zos.putNextEntry(ze);
             new DataOutputStream(zos).writeUTF(entryContents);
             zos.closeEntry();
-        } finally {
-            zos.close();
         }
     }
 
@@ -74,30 +73,30 @@
         throws Exception
     {
         // Check that Zip entry was correctly written.
-        ZipFile zipFile = new ZipFile(name);
-        ZipEntry zipEntry = zipFile.getEntry(entryName);
-        InputStream is = zipFile.getInputStream(zipEntry);
-        String result = new DataInputStream(is).readUTF();
-        if (!result.equals(entryContents))
-            throw new Exception("Entry contents corrupted");
+        try (ZipFile zipFile = new ZipFile(name)) {
+            ZipEntry zipEntry = zipFile.getEntry(entryName);
+            InputStream is = zipFile.getInputStream(zipEntry);
+            String result = new DataInputStream(is).readUTF();
+            if (!result.equals(entryContents))
+                throw new Exception("Entry contents corrupted");
+        }
 
-        // Check that comment length was correctly written.
-        RandomAccessFile file = new RandomAccessFile(name, "r");
-        file.seek(file.length() - comment.length()
-                  - ZipFile.ENDHDR + ZipFile.ENDCOM);
-        int b1 = file.readUnsignedByte();
-        int b2 = file.readUnsignedByte();
-        if (b1 + (b2 << 8) != comment.length())
-            throw new Exception("Zip file comment length corrupted");
+        try (RandomAccessFile file = new RandomAccessFile(name, "r")) {
+            // Check that comment length was correctly written.
+            file.seek(file.length() - comment.length()
+                      - ZipFile.ENDHDR + ZipFile.ENDCOM);
+            int b1 = file.readUnsignedByte();
+            int b2 = file.readUnsignedByte();
+            if (b1 + (b2 << 8) != comment.length())
+                throw new Exception("Zip file comment length corrupted");
 
-        // Check that comment was correctly written.
-        file.seek(file.length() - comment.length());
-        byte [] bytes = new byte [comment.length()];
-        file.readFully(bytes);
-        zipFile.close();
-        file.close();
-        if (! comment.equals(new String(bytes, "UTF8")))
-            throw new Exception("Zip file comment corrupted");
+            // Check that comment was correctly written.
+            file.seek(file.length() - comment.length());
+            byte [] bytes = new byte [comment.length()];
+            file.readFully(bytes);
+            if (! comment.equals(new String(bytes, "UTF8")))
+                throw new Exception("Zip file comment corrupted");
+        }
     }
 
     private static String buildComment(int length) {
--- a/test/java/util/zip/ZipFile/CopyJar.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/CopyJar.java	Wed Apr 20 04:38:36 2011 +0100
@@ -31,18 +31,18 @@
 
 public class CopyJar {
     public static void main(String args[]) throws Exception {
-        ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
-                                          "input.jar"));
-        ZipEntry ze = zf.getEntry("ReleaseInflater.java");
-        ZipOutputStream zos = new ZipOutputStream(new ByteArrayOutputStream());
-        InputStream in = zf.getInputStream(ze);
-        byte[] b = new byte[128];
-        int n;
-        zos.putNextEntry(ze);
-        while((n = in.read(b)) != -1) {
-            zos.write(b, 0, n);
+        try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
+                                               "input.jar"))) {
+            ZipEntry ze = zf.getEntry("ReleaseInflater.java");
+            ZipOutputStream zos = new ZipOutputStream(new ByteArrayOutputStream());
+            InputStream in = zf.getInputStream(ze);
+            byte[] b = new byte[128];
+            int n;
+            zos.putNextEntry(ze);
+            while((n = in.read(b)) != -1) {
+                zos.write(b, 0, n);
+            }
+            zos.close();
         }
-        zos.close();
-        zf.close();
     }
 }
--- a/test/java/util/zip/ZipFile/CorruptedZipFiles.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/CorruptedZipFiles.java	Wed Apr 20 04:38:36 2011 +0100
@@ -47,21 +47,19 @@
     }
 
     public static void main(String[] args) throws Exception {
-        ZipOutputStream zos = new ZipOutputStream(new FileOutputStream("x.zip"));
-        try {
+        try (FileOutputStream fos = new FileOutputStream("x.zip");
+             ZipOutputStream zos = new ZipOutputStream(fos))
+        {
             ZipEntry e = new ZipEntry("x");
             zos.putNextEntry(e);
             zos.write((int)'x');
-        } finally {
-            zos.close();
         }
 
         int len = (int)(new File("x.zip").length());
         byte[] good = new byte[len];
-        FileInputStream fis = new FileInputStream("x.zip");
-        fis.read(good);
-        fis.close();
-        fis = null;
+        try (FileInputStream fis = new FileInputStream("x.zip")) {
+            fis.read(good);
+        }
         new File("x.zip").delete();
 
         int endpos = len - ENDHDR;
@@ -150,17 +148,14 @@
                                       boolean getInputStream) {
         String zipName = "bad" + (uniquifier++) + ".zip";
         try {
-            FileOutputStream fos = new FileOutputStream(zipName);
-            fos.write(data);
-            fos.close();
-            ZipFile zf = new ZipFile(zipName);
-            try {
+            try (FileOutputStream fos = new FileOutputStream(zipName)) {
+                fos.write(data);
+            }
+            try (ZipFile zf = new ZipFile(zipName)) {
                 if (getInputStream) {
                     InputStream is = zf.getInputStream(new ZipEntry("x"));
                     is.read();
                 }
-            } finally {
-                zf.close();
             }
             fail("Failed to throw expected ZipException");
         } catch (ZipException e) {
@@ -170,8 +165,7 @@
                 unexpected(e);
         } catch (Throwable t) {
             unexpected(t);
-        }
-        finally {
+        } finally {
             new File(zipName).delete();
         }
     }
--- a/test/java/util/zip/ZipFile/DeleteTempJar.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/DeleteTempJar.java	Wed Apr 20 04:38:36 2011 +0100
@@ -53,34 +53,34 @@
     {
         final File zf = File.createTempFile("deletetemp", ".jar");
         zf.deleteOnExit();
-        JarOutputStream jos = new JarOutputStream(
-                new FileOutputStream(zf));
-        JarEntry je = new JarEntry("entry");
-        jos.putNextEntry(je);
-        jos.write("hello, world".getBytes("ASCII"));
-        jos.close();
+        try (FileOutputStream fos = new FileOutputStream(zf);
+             JarOutputStream jos = new JarOutputStream(fos))
+        {
+            JarEntry je = new JarEntry("entry");
+            jos.putNextEntry(je);
+            jos.write("hello, world".getBytes("ASCII"));
+        }
 
         HttpServer server = HttpServer.create(
                 new InetSocketAddress((InetAddress) null, 0), 0);
         HttpContext context = server.createContext("/",
             new HttpHandler() {
                 public void handle(HttpExchange e) {
-                try {
-                    FileInputStream fis = new FileInputStream(zf);
-                    e.sendResponseHeaders(200, zf.length());
-                    OutputStream os = e.getResponseBody();
-                    byte[] buf = new byte[1024];
-                    int count = 0;
-                    while ((count = fis.read(buf)) != -1) {
-                        os.write(buf, 0, count);
+                    try (FileInputStream fis = new FileInputStream(zf)) {
+                        e.sendResponseHeaders(200, zf.length());
+                        OutputStream os = e.getResponseBody();
+                        byte[] buf = new byte[1024];
+                        int count = 0;
+                        while ((count = fis.read(buf)) != -1) {
+                            os.write(buf, 0, count);
+                        }
+                    } catch (Exception ex) {
+                        unexpected(ex);
+                    } finally {
+                        e.close();
                     }
-                    fis.close();
-                    e.close();
-                } catch (Exception ex) {
-                    unexpected(ex);
                 }
-            }
-        });
+            });
         server.start();
 
         URL url = new URL("jar:http://localhost:"
--- a/test/java/util/zip/ZipFile/EnumAfterClose.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/EnumAfterClose.java	Wed Apr 20 04:38:36 2011 +0100
@@ -33,10 +33,12 @@
 
 public class EnumAfterClose {
     public static void main(String args[]) throws Exception {
-        ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
-                                          "input.zip"));
-        Enumeration e = zf.entries();
-        zf.close();
+        Enumeration e;
+        try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
+                                               "input.zip"))) {
+            e = zf.entries();
+        }
+        // ensure that the ZipFile is closed before checking the Enumeration
         try {
             if (e.hasMoreElements()) {
                 ZipEntry ze = (ZipEntry)e.nextElement();
--- a/test/java/util/zip/ZipFile/GetDirEntry.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/GetDirEntry.java	Wed Apr 20 04:38:36 2011 +0100
@@ -32,12 +32,12 @@
 
 public class GetDirEntry {
     public static void main(String args[]) throws Exception {
-        ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
-                                          "input.jar"));
-        ZipEntry ze = zf.getEntry("META-INF");
-        if (ze == null) {
-            throw new Exception("failed to find a directory entry");
+        try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
+                                               "input.jar"))) {
+            ZipEntry ze = zf.getEntry("META-INF");
+            if (ze == null) {
+                throw new Exception("failed to find a directory entry");
+            }
         }
-        zf.close();
     }
 }
--- a/test/java/util/zip/ZipFile/LargeZipFile.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/LargeZipFile.java	Wed Apr 20 04:38:36 2011 +0100
@@ -93,51 +93,50 @@
             baos.write(bb.array(), 0, DATA_SIZE);
         }
         data = baos.toByteArray();
-
-        ZipOutputStream zos = new ZipOutputStream(
-            new BufferedOutputStream(new FileOutputStream(largeFile)));
-        long length = 0;
-        while (length < fileSize) {
-            ZipEntry ze = new ZipEntry("entry-" + length);
-            lastEntryName = ze.getName();
-            zos.putNextEntry(ze);
-            zos.write(data, 0, data.length);
-            zos.closeEntry();
-            length = largeFile.length();
+        try (FileOutputStream fos = new FileOutputStream(largeFile);
+             BufferedOutputStream bos = new BufferedOutputStream(fos);
+             ZipOutputStream zos = new ZipOutputStream(bos))
+        {
+            long length = 0;
+            while (length < fileSize) {
+                ZipEntry ze = new ZipEntry("entry-" + length);
+                lastEntryName = ze.getName();
+                zos.putNextEntry(ze);
+                zos.write(data, 0, data.length);
+                zos.closeEntry();
+                length = largeFile.length();
+            }
+            System.out.println("Last entry written is " + lastEntryName);
         }
-        System.out.println("Last entry written is " + lastEntryName);
-        zos.close();
     }
 
     static void readLargeZip() throws Throwable {
-        ZipFile zipFile = new ZipFile(largeFile);
-        ZipEntry entry = null;
-        String entryName = null;
-        int count = 0;
-        Enumeration<? extends ZipEntry> entries = zipFile.entries();
-        while (entries.hasMoreElements()) {
-            entry = entries.nextElement();
-            entryName = entry.getName();
-            count++;
+        try (ZipFile zipFile = new ZipFile(largeFile)) {
+            ZipEntry entry = null;
+            String entryName = null;
+            int count = 0;
+            Enumeration<? extends ZipEntry> entries = zipFile.entries();
+            while (entries.hasMoreElements()) {
+                entry = entries.nextElement();
+                entryName = entry.getName();
+                count++;
+            }
+            System.out.println("Number of entries read: " + count);
+            System.out.println("Last entry read is " + entryName);
+            check(!entry.isDirectory());
+            if (check(entryName.equals(lastEntryName))) {
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                InputStream is = zipFile.getInputStream(entry);
+                byte buf[] = new byte[4096];
+                int len;
+                while ((len = is.read(buf)) >= 0) {
+                    baos.write(buf, 0, len);
+                }
+                baos.close();
+                is.close();
+                check(Arrays.equals(data, baos.toByteArray()));
+            }
         }
-        System.out.println("Number of entries read: " + count);
-        System.out.println("Last entry read is " + entryName);
-        check(!entry.isDirectory());
-        if (check(entryName.equals(lastEntryName))) {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            InputStream is = zipFile.getInputStream(entry);
-            byte buf[] = new byte[4096];
-            int len;
-            while ((len = is.read(buf)) >= 0) {
-                baos.write(buf, 0, len);
-            }
-            baos.close();
-            is.close();
-            check(Arrays.equals(data, baos.toByteArray()));
-        }
-        try {
-          zipFile.close();
-        } catch (IOException ioe) {/* what can you do */ }
     }
 
     //--------------------- Infrastructure ---------------------------
--- a/test/java/util/zip/ZipFile/ManyEntries.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/ManyEntries.java	Wed Apr 20 04:38:36 2011 +0100
@@ -55,10 +55,10 @@
         File zipFile = new File(++uniquifier + ".zip");
         try {
             zipFile.delete();
-            ZipOutputStream zos = new ZipOutputStream(
-                new BufferedOutputStream(
-                    new FileOutputStream(zipFile)));
-            try {
+            try (FileOutputStream fos = new FileOutputStream(zipFile);
+                 BufferedOutputStream bos = new BufferedOutputStream(fos);
+                 ZipOutputStream zos = new ZipOutputStream(bos))
+            {
                 for (int i = 0; i < N; i++) {
                     ZipEntry e = new ZipEntry("DIR/"+i);
                     e.setMethod(method);
@@ -75,13 +75,9 @@
                     zos.putNextEntry(e);
                     zos.write(i);
                 }
-            } finally {
-                zos.close();
-                zos = null;
             }
 
-            ZipFile zip = zip = new ZipFile(zipFile);
-            try {
+            try (ZipFile zip = new ZipFile(zipFile)) {
                 if (! (zip.size() == N))
                     throw new Exception("Bad ZipFile size: " + zip.size());
                 Enumeration entries = zip.entries();
@@ -104,11 +100,8 @@
                 }
                 if (entries.hasMoreElements())
                     throw new Exception("too many elements");
-            } finally {
-                zip.close();
             }
-        }
-        finally {
+        } finally {
             zipFile.delete();
         }
     }
--- a/test/java/util/zip/ZipFile/ManyZipFiles.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/ManyZipFiles.java	Wed Apr 20 04:38:36 2011 +0100
@@ -51,14 +51,14 @@
 
         // Create some zip data
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ZipOutputStream zos = new ZipOutputStream(baos);
-        ZipEntry ze = new ZipEntry("test");
-        zos.putNextEntry(ze);
-        byte[] hello = "hello, world".getBytes("ASCII");
-        zos.write(hello, 0, hello.length);
-        zos.closeEntry();
-        zos.finish();
-        zos.close();
+        try (ZipOutputStream zos = new ZipOutputStream(baos)) {
+            ZipEntry ze = new ZipEntry("test");
+            zos.putNextEntry(ze);
+            byte[] hello = "hello, world".getBytes("ASCII");
+            zos.write(hello, 0, hello.length);
+            zos.closeEntry();
+            zos.finish();
+        }
         byte[] data = baos.toByteArray();
 
         ZipFile zips[] = new ZipFile[numFiles];
@@ -90,9 +90,9 @@
             for (int i = 0; i < numFiles; i++) {
                 File f = File.createTempFile("test", ".zip", tmpdir);
                 f.deleteOnExit();
-                FileOutputStream fos = new FileOutputStream(f);
-                fos.write(data, 0, data.length);
-                fos.close();
+                try (FileOutputStream fos = new FileOutputStream(f)) {
+                    fos.write(data, 0, data.length);
+                }
                 try {
                     zips[i] = new ZipFile(f);
                 } catch (Throwable t) {
@@ -102,11 +102,12 @@
                 }
             }
         } finally {
-            // This finally block is due to bug 4171239.  On windows, if the
+            // This finally block is due to bug 4171239.  On Windows, if the
             // file is still open at the end of the VM, deleteOnExit won't
             // take place.  "new ZipFile(...)" opens the zip file, so we have
-            // to explicity close those opened above.  This finally block can
-            // be removed when 4171239 is fixed.
+            // to explicitly close those opened above.  This finally block can
+            // be removed when 4171239 is fixed. See also 6357433, against which
+            // 4171239 was closed as a duplicate.
             for (int i = 0; i < numFiles; i++) {
                 if (zips[i] != null) {
                     try {
--- a/test/java/util/zip/ZipFile/ReadAfterClose.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/ReadAfterClose.java	Wed Apr 20 04:38:36 2011 +0100
@@ -34,10 +34,13 @@
 
 public class ReadAfterClose {
     public static void main(String[] argv) throws Exception {
-        ZipFile zf = new ZipFile(new File(System.getProperty("test.src","."),"crash.jar"));
-        ZipEntry zent = zf.getEntry("Test.java");
-        InputStream in = zf.getInputStream(zent);
-        zf.close();
+        InputStream in;
+        try (ZipFile zf = new ZipFile(
+                 new File(System.getProperty("test.src","."),"crash.jar"))) {
+            ZipEntry zent = zf.getEntry("Test.java");
+            in = zf.getInputStream(zent);
+        }
+        // ensure zf is closed at this point
         try {
             in.read();
         } catch (IOException e) {
--- a/test/java/util/zip/ZipFile/ReadZip.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/ReadZip.java	Wed Apr 20 04:38:36 2011 +0100
@@ -27,6 +27,10 @@
  */
 
 import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.nio.file.StandardOpenOption;
 import java.util.zip.*;
 
 public class ReadZip {
@@ -38,71 +42,62 @@
     }
 
     public static void main(String args[]) throws Exception {
-        ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
-                                          "input.zip"));
-
-        // Make sure we throw NPE on null objects
-        try { unreached (zf.getEntry(null)); }
-        catch (NullPointerException e) {}
+        try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
+                                               "input.zip"))) {
+            // Make sure we throw NPE on null objects
+            try { unreached (zf.getEntry(null)); }
+            catch (NullPointerException e) {}
 
-        try { unreached (zf.getInputStream(null)); }
-        catch (NullPointerException e) {}
+            try { unreached (zf.getInputStream(null)); }
+            catch (NullPointerException e) {}
 
-        ZipEntry ze = zf.getEntry("ReadZip.java");
-        if (ze == null) {
-            throw new Exception("cannot read from zip file");
+            ZipEntry ze = zf.getEntry("ReadZip.java");
+            if (ze == null) {
+                throw new Exception("cannot read from zip file");
+            }
         }
-        zf.close();
 
         // Make sure we can read the zip file that has some garbage
         // bytes padded at the end.
-        FileInputStream fis = new FileInputStream(
-                                   new File(System.getProperty("test.src", "."),
-                                            "input.zip"));
-        File newZip = new File(System.getProperty("test.dir", "."),
-                               "input2.zip");
-        FileOutputStream fos = new FileOutputStream(newZip);
+        File newZip = new File(System.getProperty("test.dir", "."), "input2.zip");
+        Files.copy(Paths.get(System.getProperty("test.src", ""), "input.zip"),
+                   newZip.toPath(), StandardCopyOption.REPLACE_EXISTING);
 
-        byte[] buf = new byte[1024];
-        int n = 0;
-        while ((n = fis.read(buf)) != -1) {
-            fos.write(buf, 0, n);
+        // pad some bytes
+        try (OutputStream os = Files.newOutputStream(newZip.toPath(),
+                                                     StandardOpenOption.APPEND)) {
+            os.write(1); os.write(3); os.write(5); os.write(7);
         }
-        fis.close();
-        // pad some bytes
-        fos.write(1); fos.write(3); fos.write(5); fos.write(7);
-        fos.close();
-        try {
-            zf = new ZipFile(newZip);
-            ze = zf.getEntry("ReadZip.java");
+
+        try (ZipFile zf = new ZipFile(newZip)) {
+            ZipEntry ze = zf.getEntry("ReadZip.java");
             if (ze == null) {
                 throw new Exception("cannot read from zip file");
             }
         } finally {
-            zf.close();
             newZip.delete();
         }
 
         // Read zip file comment
         try {
+            try (FileOutputStream fos = new FileOutputStream(newZip);
+                 ZipOutputStream zos = new ZipOutputStream(fos))
+            {
+                ZipEntry ze = new ZipEntry("ZipEntry");
+                zos.putNextEntry(ze);
+                zos.write(1); zos.write(2); zos.write(3); zos.write(4);
+                zos.closeEntry();
+                zos.setComment("This is the comment for testing");
+            }
 
-            ZipOutputStream zos = new ZipOutputStream(
-                                      new FileOutputStream(newZip));
-            ze = new ZipEntry("ZipEntry");
-            zos.putNextEntry(ze);
-            zos.write(1); zos.write(2); zos.write(3); zos.write(4);
-            zos.closeEntry();
-            zos.setComment("This is the comment for testing");
-            zos.close();
-
-            zf = new ZipFile(newZip);
-            ze = zf.getEntry("ZipEntry");
-            if (ze == null)
-                throw new Exception("cannot read entry from zip file");
-            if (!"This is the comment for testing".equals(zf.getComment()))
-                throw new Exception("cannot read comment from zip file");
+            try (ZipFile zf = new ZipFile(newZip)) {
+                ZipEntry ze = zf.getEntry("ZipEntry");
+                if (ze == null)
+                    throw new Exception("cannot read entry from zip file");
+                if (!"This is the comment for testing".equals(zf.getComment()))
+                    throw new Exception("cannot read comment from zip file");
+            }
         } finally {
-            zf.close();
             newZip.delete();
         }
 
--- a/test/java/util/zip/ZipFile/ShortRead.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/ZipFile/ShortRead.java	Wed Apr 20 04:38:36 2011 +0100
@@ -38,27 +38,29 @@
         try {
             final String entryName = "abc";
             final String data = "Data disponible";
-            final ZipOutputStream zos =
-                new ZipOutputStream(new FileOutputStream(zFile));
-            zos.putNextEntry(new ZipEntry(entryName));
-            zos.write(data.getBytes("ASCII"));
-            zos.closeEntry();
-            zos.close();
+            try (FileOutputStream fos = new FileOutputStream(zFile);
+                 ZipOutputStream zos = new ZipOutputStream(fos))
+            {
+                zos.putNextEntry(new ZipEntry(entryName));
+                zos.write(data.getBytes("ASCII"));
+                zos.closeEntry();
+            }
 
-            final ZipFile zipFile = new ZipFile(zFile);
-            final ZipEntry zentry = zipFile.getEntry(entryName);
-            final InputStream inputStream = zipFile.getInputStream(zentry);
-            System.out.printf("size=%d csize=%d available=%d%n",
-                              zentry.getSize(),
-                              zentry.getCompressedSize(),
-                              inputStream.available());
-            byte[] buf = new byte[data.length()];
-            final int count = inputStream.read(buf);
-            if (! new String(buf, "ASCII").equals(data) ||
-                count != data.length())
-                throw new Exception("short read?");
-            zipFile.close();
+            try (ZipFile zipFile = new ZipFile(zFile)) {
+                final ZipEntry zentry = zipFile.getEntry(entryName);
+                final InputStream inputStream = zipFile.getInputStream(zentry);
+                System.out.printf("size=%d csize=%d available=%d%n",
+                                  zentry.getSize(),
+                                  zentry.getCompressedSize(),
+                                  inputStream.available());
+                byte[] buf = new byte[data.length()];
+                final int count = inputStream.read(buf);
+                if (! new String(buf, "ASCII").equals(data) ||
+                    count != data.length())
+                    throw new Exception("short read?");
+            }
+        } finally {
+            zFile.delete();
         }
-        finally { zFile.delete(); }
     }
 }
--- a/test/java/util/zip/zip.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/java/util/zip/zip.java	Wed Apr 20 04:38:36 2011 +0100
@@ -322,57 +322,57 @@
 
     void create(OutputStream out) throws IOException
     {
-        ZipOutputStream zos = new ZipOutputStream(out, cs);
-        if (flag0) {
-            zos.setMethod(ZipOutputStream.STORED);
+        try (ZipOutputStream zos = new ZipOutputStream(out, cs)) {
+            if (flag0) {
+                zos.setMethod(ZipOutputStream.STORED);
+            }
+            for (File file: entries) {
+                addFile(zos, file);
+            }
         }
-        for (File file: entries) {
-            addFile(zos, file);
-        }
-        zos.close();
     }
 
     boolean update(InputStream in, OutputStream out) throws IOException
     {
-        ZipInputStream zis = new ZipInputStream(in, cs);
-        ZipOutputStream zos = new ZipOutputStream(out, cs);
-        ZipEntry e = null;
-        byte[] buf = new byte[1024];
-        int n = 0;
-        boolean updateOk = true;
+        try (ZipInputStream zis = new ZipInputStream(in, cs);
+             ZipOutputStream zos = new ZipOutputStream(out, cs))
+        {
+            ZipEntry e = null;
+            byte[] buf = new byte[1024];
+            int n = 0;
+            boolean updateOk = true;
 
-        // put the old entries first, replace if necessary
-        while ((e = zis.getNextEntry()) != null) {
-            String name = e.getName();
-            if (!entryMap.containsKey(name)) { // copy the old stuff
-                // do our own compression
-                ZipEntry e2 = new ZipEntry(name);
-                e2.setMethod(e.getMethod());
-                e2.setTime(e.getTime());
-                e2.setComment(e.getComment());
-                e2.setExtra(e.getExtra());
-                if (e.getMethod() == ZipEntry.STORED) {
-                    e2.setSize(e.getSize());
-                    e2.setCrc(e.getCrc());
+            // put the old entries first, replace if necessary
+            while ((e = zis.getNextEntry()) != null) {
+                String name = e.getName();
+                if (!entryMap.containsKey(name)) { // copy the old stuff
+                    // do our own compression
+                    ZipEntry e2 = new ZipEntry(name);
+                    e2.setMethod(e.getMethod());
+                    e2.setTime(e.getTime());
+                    e2.setComment(e.getComment());
+                    e2.setExtra(e.getExtra());
+                    if (e.getMethod() == ZipEntry.STORED) {
+                        e2.setSize(e.getSize());
+                        e2.setCrc(e.getCrc());
+                    }
+                    zos.putNextEntry(e2);
+                    while ((n = zis.read(buf, 0, buf.length)) != -1) {
+                        zos.write(buf, 0, n);
+                    }
+                } else { // replace with the new files
+                    File f = entryMap.get(name);
+                    addFile(zos, f);
+                    entryMap.remove(name);
+                    entries.remove(f);
                 }
-                zos.putNextEntry(e2);
-                while ((n = zis.read(buf, 0, buf.length)) != -1) {
-                    zos.write(buf, 0, n);
-                }
-            } else { // replace with the new files
-                File f = entryMap.get(name);
+            }
+
+            // add the remaining new files
+            for (File f: entries) {
                 addFile(zos, f);
-                entryMap.remove(name);
-                entries.remove(f);
             }
         }
-
-        // add the remaining new files
-        for (File f: entries) {
-            addFile(zos, f);
-        }
-        zis.close();
-        zos.close();
         return updateOk;
     }
 
@@ -517,25 +517,25 @@
     }
 
     void extract(String fname, String files[]) throws IOException {
-        ZipFile zf = new ZipFile(fname, cs);
-        Set<ZipEntry> dirs = newDirSet();
-        Enumeration<? extends ZipEntry> zes = zf.entries();
-        while (zes.hasMoreElements()) {
-            ZipEntry e = zes.nextElement();
-            InputStream is;
-            if (files == null) {
-                dirs.add(extractFile(zf.getInputStream(e), e));
-            } else {
-                String name = e.getName();
-                for (String file : files) {
-                    if (name.startsWith(file)) {
-                        dirs.add(extractFile(zf.getInputStream(e), e));
-                        break;
+        try (ZipFile zf = new ZipFile(fname, cs)) {
+            Set<ZipEntry> dirs = newDirSet();
+            Enumeration<? extends ZipEntry> zes = zf.entries();
+            while (zes.hasMoreElements()) {
+                ZipEntry e = zes.nextElement();
+                InputStream is;
+                if (files == null) {
+                    dirs.add(extractFile(zf.getInputStream(e), e));
+                } else {
+                    String name = e.getName();
+                    for (String file : files) {
+                        if (name.startsWith(file)) {
+                            dirs.add(extractFile(zf.getInputStream(e), e));
+                            break;
+                        }
                     }
                 }
             }
         }
-        zf.close();
         updateLastModifiedTime(dirs);
     }
 
@@ -607,12 +607,12 @@
     }
 
     void list(String fname, String files[]) throws IOException {
-        ZipFile zf = new ZipFile(fname, cs);
-        Enumeration<? extends ZipEntry> zes = zf.entries();
-        while (zes.hasMoreElements()) {
-            printEntry(zes.nextElement(), files);
+        try (ZipFile zf = new ZipFile(fname, cs)) {
+            Enumeration<? extends ZipEntry> zes = zf.entries();
+            while (zes.hasMoreElements()) {
+                printEntry(zes.nextElement(), files);
+            }
         }
-        zf.close();
     }
 
     void printEntry(ZipEntry e, String[] files) throws IOException {
--- a/test/javax/print/attribute/ServiceDialogTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/javax/print/attribute/ServiceDialogTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -71,7 +71,7 @@
                         if (factories.length > 0) {
                                 services[0] = factories[0].getPrintService(fos);
                         } else {
-                                throw new RuntimeException("No StreamPrintService available which would support "+flavor");
+                                throw new RuntimeException("No StreamPrintService available which would support "+flavor);
                         }
 
                         services[2] = new TestPrintService("Test Printer");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/script/GetInterfaceTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2011, 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 6960211
+ * @summary JavaScript engine allows creation of interface although methods not available.
+ */
+
+import javax.script.*;
+
+public class GetInterfaceTest {
+    public static void main(String[] args) throws Exception {
+        ScriptEngineManager manager = new ScriptEngineManager();
+        ScriptEngine engine = manager.getEngineByName("js");
+
+        if (engine == null) {
+            System.out.println("Warning: No engine engine found; test vacuously passes.");
+            return;
+        }
+
+        // don't define any function.
+        engine.eval("");
+
+        Runnable runnable = ((Invocable)engine).getInterface(Runnable.class);
+        if (runnable != null) {
+            throw new RuntimeException("runnable is not null!");
+        }
+
+        // now define "run"
+        engine.eval("function run() { println('this is run function'); }");
+        runnable = ((Invocable)engine).getInterface(Runnable.class);
+        // should not return null now!
+        runnable.run();
+
+        // define only one method of "Foo2"
+        engine.eval("function bar() { println('bar function'); }");
+        Foo2 foo2 = ((Invocable)engine).getInterface(Foo2.class);
+        if (foo2 != null) {
+            throw new RuntimeException("foo2 is not null!");
+        }
+
+        // now define other method of "Foo2"
+        engine.eval("function bar2() { println('bar2 function'); }");
+        foo2 = ((Invocable)engine).getInterface(Foo2.class);
+        foo2.bar();
+        foo2.bar2();
+    }
+
+    interface Foo {
+        public void bar();
+    }
+
+    interface Foo2 extends Foo {
+        public void bar2();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sound/midi/File/SMPTESequence.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,75 @@
+/**
+ * @test
+ * @bug 6835393
+ * @summary Tests that MidiFileReader correctly reads sequences with different division types
+ * @author Alex Menkov
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import javax.sound.midi.InvalidMidiDataException;
+import javax.sound.midi.MidiSystem;
+import javax.sound.midi.Sequence;
+
+public class SMPTESequence {
+
+    static int failed = 0;
+
+    public static void main(String[] args) {
+        test(Sequence.PPQ);
+        test(Sequence.SMPTE_24);
+        test(Sequence.SMPTE_25);
+        test(Sequence.SMPTE_30);
+        test(Sequence.SMPTE_30DROP);
+
+        if (failed > 0) {
+            throw new RuntimeException("" + failed + " tests failed");
+        }
+    }
+
+    static boolean test(float divisionType) {
+        boolean result = false;
+        try {
+            log("Testing divisionType == " + divisionType);
+            Sequence sequence = new Sequence(divisionType, 16, 1);
+            float div1 = sequence.getDivisionType();
+
+            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+            MidiSystem.write(sequence, 1, outStream);
+
+            InputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
+
+            sequence = MidiSystem.getSequence(inStream);
+            float div2 = sequence.getDivisionType();
+
+            log("After write/read got divisionType == " + div2);
+            if (Math.abs(div2 - div1) < 0.001f) {
+                result = true;
+            }
+        } catch (InvalidMidiDataException ex) {
+            log(ex);
+        } catch (IOException ex) {
+            log(ex);
+        } catch (IllegalArgumentException ex) {
+            log(ex);
+        }
+        if (result) {
+            log("OK");
+        } else {
+            log("FAIL");
+            failed++;
+        }
+        return result;
+    }
+
+    static void log(String s) {
+        System.out.println(s);
+    }
+
+    static void log(Exception ex) {
+        log("got exception (" + ex.getClass().getSimpleName() + "): " + ex.getMessage());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sound/midi/Sequencer/SequencerImplicitSynthOpen.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,110 @@
+/**
+ * @test
+ * @bug 6660470
+ * @summary Tests that sequencer correctly opens/closes (implicitly) devices
+ * @author Alex Menkov
+ */
+
+import java.util.List;
+import javax.sound.midi.MidiDevice;
+import javax.sound.midi.MidiDeviceReceiver;
+import javax.sound.midi.MidiSystem;
+import javax.sound.midi.MidiUnavailableException;
+import javax.sound.midi.Receiver;
+import javax.sound.midi.Sequencer;
+import javax.sound.midi.Transmitter;
+
+public class SequencerImplicitSynthOpen {
+
+    static int TEST_COUNT   = 5;
+
+    public static void main(String[] args) {
+        try {
+            log("getting sequencer...");
+            Sequencer sequencer = MidiSystem.getSequencer();
+            log("  - got " + getDeviceStr(sequencer));
+
+            // obtain connected device (usually synthesizer)
+            MidiDevice synth = getConnectedDevice(sequencer);
+            if (synth == null) {
+                log("could not get connected device, returning");
+                return;
+            }
+
+            log("connected device: " + getDeviceStr(synth));
+
+            int success = 0;
+            for (int i=0; i<TEST_COUNT; i++) {
+                if (test(sequencer)) {
+                    success++;
+                }
+            }
+
+            if (success != TEST_COUNT) {
+                throw new RuntimeException("test FAILS");
+            }
+        } catch (MidiUnavailableException ex) {
+            // this is not a failure
+            log("Could not get Sequencer");
+        }
+        log("test PASSED.");
+    }
+
+    static boolean test(Sequencer sequencer) throws MidiUnavailableException {
+        log("");
+        log("opening sequencer...");
+        sequencer.open();   // opens connected synthesizer implicitly
+        MidiDevice synth = getConnectedDevice(sequencer);
+        log("  connected device: " + getDeviceStr(synth));
+
+        log("closing sequencer...");
+        sequencer.close();  // closes the synth implicitly
+        log("  synth is " + getDeviceStr(synth));
+        MidiDevice synth2 = getConnectedDevice(sequencer);
+        log("  currently connected device: " + getDeviceStr(synth2));
+
+        if (synth != null && synth.isOpen()) {
+            log("FAIL.");
+            return false;
+        }
+        log("OK.");
+        return true;
+    }
+
+    static MidiDevice getConnectedDevice(Sequencer sequencer) {
+        List<Transmitter> trans = sequencer.getTransmitters();
+        log("  sequencer has " + trans.size() + " opened transmitters:");
+        for (Transmitter tr: trans) {
+            Receiver r = tr.getReceiver();
+            log("    " + getClassStr(tr) + " connected to " + getClassStr(r));
+            if (r instanceof MidiDeviceReceiver) {
+                MidiDeviceReceiver recv = (MidiDeviceReceiver)r;
+                MidiDevice dev = recv.getMidiDevice();
+                log("      - receiver of " + getClassStr(dev));
+                return dev;
+            } else {
+                log("      - does NOT implement MidiDeviceReceiver");
+            }
+        }
+        return null;
+    }
+
+    static String getClassStr(Object o) {
+        if (o == null) {
+            return "<null>";
+        }
+        return o.getClass().getName();
+    }
+
+    static String getDeviceStr(MidiDevice dev) {
+        if (dev == null) {
+            return "NULL";
+        }
+        return getClassStr(dev) + ", " + (dev.isOpen() ? "OPENED" : "CLOSED");
+    }
+
+    static void log(String s) {
+        System.out.println(s);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sound/sampled/Clip/ClipSetPos.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2011, 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 6801206
+ * @summary Tests that Clip sets frame position
+ * @author Alex Menkov
+ */
+
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.Clip;
+import javax.sound.sampled.LineUnavailableException;
+
+public class ClipSetPos {
+
+    final static AudioFormat audioFormat = new AudioFormat(44100f, 16, 2, true, true);
+    final static int frameLength = 44100 * 2; // 2 seconds
+    final static byte[] dataBuffer
+            = new byte[frameLength * (audioFormat.getSampleSizeInBits()/8)
+                       * audioFormat.getChannels()];
+    final static int MAX_FRAME_DELTA = 20;
+
+    public static void main(String[] args) {
+        boolean testPassed = true;
+        Clip clip = null;
+        try {
+            clip = AudioSystem.getClip();
+            clip.open(audioFormat, dataBuffer, 0, dataBuffer.length);
+        } catch (LineUnavailableException ex) {
+            log(ex);
+            log("Cannot test (this is not failure)");
+            return;
+        }
+
+        log("clip: " + clip.getClass().getName());
+
+        int len = clip.getFrameLength();
+        for (int pos=0; pos < len; pos += (len /100)) {
+            clip.setFramePosition(pos);
+            int curPos = clip.getFramePosition();
+            if (Math.abs(pos - curPos) > MAX_FRAME_DELTA) {
+                log("Tried to set pos to " + pos + ", but got back " + curPos);
+                testPassed = false;
+            } else {
+                log("Sucessfully set pos to " + pos);
+            }
+        }
+        clip.close();
+
+        if (testPassed) {
+            log("Test PASSED.");
+        } else {
+            log("Test FAILED.");
+            throw new RuntimeException("Test FAILED (see log)");
+        }
+    }
+
+    static void log(String s) {
+        System.out.println(s);
+    }
+
+    static void log(Exception ex) {
+        ex.printStackTrace(System.out);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sound/sampled/FileWriter/AlawEncoderSync.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,113 @@
+/**
+ * @test
+ * @bug 6938426
+ * @summary Tests that Alaw encoder works properly in multithreaded environment
+ * @author Alex Menkov
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.Arrays;
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.AudioSystem;
+
+public class AlawEncoderSync {
+
+    static final int THREAD_COUNT   = 20;
+
+    static final AudioFormat pcmFormat = new AudioFormat(8000f, 16, 2, true, false);
+    static final int STREAM_LENGTH = 10;    // in seconds
+    static byte[] pcmBuffer;
+    static final AudioFormat alawFormat
+            = new AudioFormat(AudioFormat.Encoding.ALAW, 8000f, 8, 2, 2, 8000f, false);
+
+    static final ConversionThread[] threads = new ConversionThread[THREAD_COUNT];
+
+    public static void main(String[] args) {
+        preparePCMBuffer();
+        log("pcmStream size: " + pcmBuffer.length);
+
+        for (int i=0; i<THREAD_COUNT; i++) {
+            threads[i] = new ConversionThread(i);
+            threads[i].start();
+        }
+
+        for (int i=1; i<THREAD_COUNT; i++) {
+            try {
+                threads[i].join();
+            } catch (InterruptedException ex) {
+                log("Main thread was interrupted, exiting.");
+                return;
+            }
+        }
+
+        int failed = 0;
+        log("comparing result arrays...");
+        for (int i=1; i<THREAD_COUNT; i++) {
+            if (!Arrays.equals(threads[0].resultArray, threads[i].resultArray)) {
+                failed++;
+                log("NOT equals: 0 and " + i);
+            }
+        }
+        if (failed > 0) {
+            throw new RuntimeException("test FAILED");
+        }
+        log("test PASSED.");
+    }
+
+
+    static void preparePCMBuffer() {
+        pcmBuffer = new byte[STREAM_LENGTH * (int)pcmFormat.getSampleRate()
+                * (pcmFormat.getSampleSizeInBits() / 8) * pcmFormat.getChannels()];
+        for (int i=0; i<pcmBuffer.length; i++) {
+            pcmBuffer[i] = (byte)(Math.random() * 256.0 - 128.0);
+        }
+    }
+
+    static AudioInputStream createPCMStream() {
+        InputStream byteStream = new ByteArrayInputStream(pcmBuffer);
+        return new AudioInputStream(byteStream, pcmFormat, AudioSystem.NOT_SPECIFIED);
+    }
+
+    static class ConversionThread extends Thread {
+        public final int num;
+        public byte[] resultArray = null;
+        public ConversionThread(int num) {
+            this.num = num;
+        }
+        @Override
+        public void run() {
+            log("ConversionThread[" + num + "] started.");
+            try {
+                InputStream inStream = new ByteArrayInputStream(pcmBuffer);
+
+                AudioInputStream pcmStream = new AudioInputStream(
+                        inStream, pcmFormat, AudioSystem.NOT_SPECIFIED);
+                AudioInputStream alawStream = AudioSystem.getAudioInputStream(alawFormat, pcmStream);
+
+                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+                int read = 0;
+                byte[] data = new byte[4096];
+                while((read = alawStream.read(data)) != -1) {
+                    outStream.write(data, 0, read);
+               }
+               alawStream.close();
+               resultArray = outStream.toByteArray();
+            } catch (Exception ex) {
+                log("ConversionThread[" + num + "] exception:");
+                log(ex);
+            }
+            log("ConversionThread[" + num + "] completed.");
+        }
+    }
+
+    static void log(String s) {
+        System.out.println(s);
+    }
+
+    static void log(Exception ex) {
+        ex.printStackTrace(System.out);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sound/sampled/FileWriter/WriterCloseInput.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,127 @@
+/**
+ * @test
+ * @bug 7013521
+ * @summary AIFF/AU/WAVE writers close input audio stream
+ * @author Alex Menkov
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import javax.sound.sampled.AudioFileFormat;
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.AudioSystem;
+
+
+public class WriterCloseInput {
+
+    final static AudioFormat audioFormat = new AudioFormat(44100f, 16, 2, true, true);
+    //final static AudioFormat audioFormat = new AudioFormat(AudioFormat.Encoding.ULAW, 44100f, 8, 2, 2, 44100f, true);
+    final static int frameLength = 44100 * 2; // 2 seconds
+    final static byte[] dataBuffer
+            = new byte[frameLength * (audioFormat.getSampleSizeInBits()/8)
+                       * audioFormat.getChannels()];
+
+    static int testTotal = 0;
+    static int testFailed = 0;
+
+    public static void main(String[] args) throws Exception {
+        test(AudioFileFormat.Type.AIFF);
+        test(AudioFileFormat.Type.AU);
+        test(AudioFileFormat.Type.WAVE);
+
+        if (testFailed == 0) {
+            out("All tests passed.");
+        } else {
+            out("" + testFailed + " of " + testTotal + " tests FAILED.");
+            System.out.flush();
+            throw new RuntimeException("Test FAILED.");
+        }
+    }
+
+    static void test(AudioFileFormat.Type fileType) {
+        test(fileType, frameLength);
+        test(fileType, AudioSystem.NOT_SPECIFIED);
+    }
+
+    static void test(AudioFileFormat.Type fileType, int length) {
+        test(fileType, length, false);
+        test(fileType, length, true);
+    }
+
+    static void test(AudioFileFormat.Type fileType, int length, boolean isFile) {
+        testTotal++;
+        out("Testing fileType: " + fileType
+                + ", frameLength: " + (length >= 0 ? length : "unspecified")
+                + ", output: " + (isFile ? "File" : "OutputStream"));
+        AudioInputStream inStream = new ThrowAfterCloseStream(
+                new ByteArrayInputStream(dataBuffer), audioFormat, length);
+
+        AudioSystem.isFileTypeSupported(fileType, inStream);
+
+        try {
+            if (isFile) {
+                File f = File.createTempFile("WriterCloseInput" + testTotal, "tmp");
+                AudioSystem.write(inStream, fileType, f);
+                f.delete();
+            } else {
+                OutputStream outStream = new NullOutputStream();
+                AudioSystem.write(inStream, fileType, outStream);
+            }
+        } catch (Exception ex) {
+            // this is not failure
+            out("SKIPPED (AudioSystem.write exception): " + ex.getMessage());
+            //out(ex);
+            inStream = null;
+        }
+
+        if (inStream != null) {
+            try {
+                // test if the stream is closed
+                inStream.available();
+                out("PASSED");
+            } catch (IOException ex) {
+                testFailed++;
+                out("FAILED: " + ex.getMessage());
+                //out(ex);
+            }
+        }
+        out("");
+    }
+
+    static class ThrowAfterCloseStream extends AudioInputStream {
+        private boolean closed = false;
+        public ThrowAfterCloseStream(InputStream in, AudioFormat format, long length) {
+            super(in, format, length);
+        }
+        @Override
+        public void close() {
+            closed = true;
+        }
+        @Override
+        public int available() throws IOException {
+            if (closed) {
+                throw new IOException("The stream has been closed");
+            }
+            return 1;
+        }
+    }
+
+    static class NullOutputStream extends OutputStream {
+        @Override
+        public void write(int b) throws IOException {
+            // nop
+        }
+    }
+
+    static void out(String s) {
+        System.out.println(s);
+    }
+
+    static void out(Exception ex) {
+        ex.printStackTrace(System.out);
+    }
+}
--- a/test/javax/swing/JComponent/6989617/bug6989617.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/javax/swing/JComponent/6989617/bug6989617.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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,76 +28,107 @@
    @run main bug6989617
 */
 
+import sun.awt.SunToolkit;
+
 import javax.swing.*;
 import java.awt.*;
 
 public class bug6989617 {
-
-    private boolean isPaintingOrigin;
-    private boolean innerPanelRepainted, outerPanelRepainted;
-
-    public bug6989617() {
+    private static MyPanel panel;
+    private static JButton button;
 
-        final JButton button = new JButton("button");
+    public static void main(String... args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JFrame frame = new JFrame();
+                frame. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                panel = new MyPanel();
 
-        JPanel innerPanel = new JPanel() {
-            protected boolean isPaintingOrigin() {
-                return isPaintingOrigin;
-            }
+                button = new JButton("Hello");
+                panel.add(button);
+                frame.add(panel);
 
-            public void repaint(long tm, int x, int y, int width, int height) {
-                if (button.getParent() != null) {
-                    innerPanelRepainted = true;
-                    if (!button.getSize().equals(new Dimension(width, height))) {
-                        throw new RuntimeException("Wrong size of the dirty area");
-                    }
-                    if (!button.getLocation().equals(new Point(x, y))) {
-                        throw new RuntimeException("Wrong location of the dirty area");
-                    }
+                frame.setSize(200, 300);
+                frame.setVisible(true);
+            }
+        });
+        // Testing the panel as a painting origin,
+        // the panel.paintImmediately() must be triggered
+        // when button.repaint() is called
+        toolkit.realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                if (panel.getPaintRectangle() != null) {
+                    throw new RuntimeException("paint rectangle is not null");
                 }
-                super.repaint(tm, x, y, width, height);
+                button.repaint();
             }
-        };
-
-        JPanel outerPanel = new JPanel() {
-            protected boolean isPaintingOrigin() {
-                return isPaintingOrigin;
+        });
+        toolkit.realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                Rectangle pr = panel.getPaintRectangle();
+                if (!pr.getSize().equals(button.getSize())) {
+                    throw new RuntimeException("wrong size of the dirty area");
+                }
+                if (!pr.getLocation().equals(button.getLocation())) {
+                    throw new RuntimeException("wrong location of the dirty area");
+                }
             }
-
-            public void repaint(long tm, int x, int y, int width, int height) {
-                if (button.getParent() != null) {
-                    outerPanelRepainted = true;
-                    if (!button.getSize().equals(new Dimension(width, height))) {
-                        throw new RuntimeException("Wrong size of the dirty area");
-                    }
+        });
+        // Testing the panel as NOT a painting origin
+        // the panel.paintImmediately() must NOT be triggered
+        // when button.repaint() is called
+        toolkit.realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                panel.resetPaintRectangle();
+                panel.setPaintingOrigin(false);
+                if (panel.getPaintRectangle() != null) {
+                    throw new RuntimeException("paint rectangle is not null");
                 }
-                super.repaint(tm, x, y, width, height);
+                button.repaint();
             }
-        };
-
-
-        outerPanel.add(innerPanel);
-        innerPanel.add(button);
+        });
+        toolkit.realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                if(panel.getPaintRectangle() != null) {
+                    throw new RuntimeException("paint rectangle is not null");
+                }
+                System.out.println("Test passed...");
+            }
+        });
+    }
 
-        outerPanel.setSize(100, 100);
-        innerPanel.setBounds(10, 10, 50, 50);
-        button.setBounds(10, 10, 20, 20);
+    static class MyPanel extends JPanel {
+        private boolean isPaintingOrigin = true;
+        private Rectangle paintRectangle;
 
-        if (innerPanelRepainted || outerPanelRepainted) {
-            throw new RuntimeException("Repainted flag is unexpectedly on");
+        {
+            setLayout(new GridBagLayout());
+        }
+
+        public boolean isPaintingOrigin() {
+            return isPaintingOrigin;
         }
-        button.repaint();
-        if (innerPanelRepainted || outerPanelRepainted) {
-            throw new RuntimeException("Repainted flag is unexpectedly on");
+
+        public void setPaintingOrigin(boolean paintingOrigin) {
+            isPaintingOrigin = paintingOrigin;
         }
-        isPaintingOrigin = true;
-        button.repaint();
-        if (!innerPanelRepainted || !outerPanelRepainted) {
-            throw new RuntimeException("Repainted flag is unexpectedly off");
+
+        public void paintImmediately(int x, int y, int w, int h) {
+            super.paintImmediately(x, y, w, h);
+            paintRectangle = new Rectangle(x, y, w, h);
+        }
+
+        public Rectangle getPaintRectangle() {
+            return paintRectangle == null? null: new Rectangle(paintRectangle);
+        }
+
+        public void resetPaintRectangle() {
+            this.paintRectangle = null;
         }
     }
-
-    public static void main(String... args) throws Exception {
-        new bug6989617();
-    }
 }
--- a/test/javax/swing/JFileChooser/6798062/bug6798062.html	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/javax/swing/JFileChooser/6798062/bug6798062.html	Wed Apr 20 04:38:36 2011 +0100
@@ -1,6 +1,8 @@
 <html>
 <body>
 <applet  code="bug6798062.class" width=400 height=300></applet>
+The test is suitable only for Windows
+
 1. Create a link
 2. Copy path to the link into TextField
 3. Run the Windows Task Manager. Select the Processes tab and find the java process
--- a/test/javax/swing/JFileChooser/6798062/bug6798062.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/javax/swing/JFileChooser/6798062/bug6798062.java	Wed Apr 20 04:38:36 2011 +0100
@@ -28,6 +28,7 @@
    @run applet/manual=done bug6798062.html
 */
 
+import sun.awt.OSInfo;
 import sun.awt.shell.ShellFolder;
 
 import javax.swing.*;
@@ -68,13 +69,23 @@
         add(initialize());
     }
 
-    private JPanel initialize() {
-        File file = new File("c:/");
+    private JComponent initialize() {
+        if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+            return new JLabel("The test is suitable only for Windows");
+        }
+
+        String tempDir = System.getProperty("java.io.tmpdir");
+
+        if (tempDir.length() == 0) { // 'java.io.tmpdir' isn't guaranteed to be defined
+            tempDir = System.getProperty("user.home");
+        }
+
+        System.out.println("Temp directory: " + tempDir);
 
         try {
-            folder = ShellFolder.getShellFolder(file);
+            folder = ShellFolder.getShellFolder(new File(tempDir));
         } catch (FileNotFoundException e) {
-            fail("Directory " + file.getPath() + " not found");
+            fail("Directory " + tempDir + " not found");
         }
 
         slider.setMajorTickSpacing(10);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JOptionPane/6464022/bug6464022.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2011, 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 6464022
+ * @summary Memory leak in JOptionPane.createDialog
+ * @author Pavel Porvatov
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug6464022
+ */
+
+import javax.swing.*;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.List;
+
+public class bug6464022 {
+    private static JOptionPane pane;
+
+    public static void main(String[] args) throws Exception {
+        final List<WeakReference<JDialog>> references = new ArrayList<WeakReference<JDialog>>();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                pane = new JOptionPane(null, JOptionPane.UNDEFINED_CONDITION);
+
+                for (int i = 0; i < 10; i++) {
+                    JDialog dialog = pane.createDialog(null, "Test " + i);
+
+                    references.add(new WeakReference<JDialog>(dialog));
+
+                    dialog.dispose();
+
+                    System.out.println("Disposing Dialog:" + dialog.hashCode());
+                }
+            }
+        });
+
+        Util.generateOOME();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                int allocatedCount = 0;
+
+                for (WeakReference<JDialog> ref : references) {
+                    if (ref.get() != null) {
+                        allocatedCount++;
+
+                        System.out.println(ref.get().hashCode() + " is still allocated");
+                    }
+                }
+
+                if (allocatedCount > 0) {
+                    throw new RuntimeException("Some dialogs still exist in memory. Test failed");
+                } else {
+                    System.out.println("All dialogs were GCed. Test passed.");
+                }
+            }
+        });
+    }
+}
--- a/test/javax/swing/JScrollBar/6542335/bug6542335.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/javax/swing/JScrollBar/6542335/bug6542335.java	Wed Apr 20 04:38:36 2011 +0100
@@ -69,8 +69,6 @@
 
                 frame.setSize(200, 100);
                 frame.setVisible(true);
-
-                thumbBounds[0] = new Rectangle(ui.getThumbBounds());
             }
         });
 
@@ -78,6 +76,8 @@
 
         SwingUtilities.invokeAndWait(new Runnable() {
             public void run() {
+                thumbBounds[0] = new Rectangle(ui.getThumbBounds());
+
                 Point l = sb.getLocationOnScreen();
 
                 robot.mouseMove(l.x + (int) (0.75 * sb.getWidth()), l.y + sb.getHeight() / 2);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/LookAndFeel/6474153/bug6474153.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2011, 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 6474153
+ * @summary LookAndFeel.makeKeyBindings(...) doesn't ignore last element in keyBindingList with odd size
+ * @author Alexander Potochkin
+ */
+
+import javax.swing.KeyStroke;
+import javax.swing.LookAndFeel;
+import javax.swing.text.DefaultEditorKit;
+import javax.swing.text.JTextComponent;
+
+public class bug6474153 {
+
+    public static void main(String... args) throws Exception {
+        checkArray(LookAndFeel.makeKeyBindings(new Object[] {"UP", DefaultEditorKit.upAction} ));
+        checkArray(LookAndFeel.makeKeyBindings(new Object[] {"UP", DefaultEditorKit.upAction, "PAGE_UP"} ));
+    }
+
+    private static void checkArray(JTextComponent.KeyBinding[] keyActionArray) {
+        if (keyActionArray.length != 1) {
+            throw new RuntimeException("Wrong array lenght!");
+        }
+        if (!DefaultEditorKit.upAction.equals(keyActionArray[0].actionName)) {
+            throw new RuntimeException("Wrong action name!");
+        }
+        if (!KeyStroke.getKeyStroke("UP").equals(keyActionArray[0].key)) {
+            throw new RuntimeException("Wrong keystroke!");
+        }
+    }
+}
--- a/test/javax/swing/UIDefaults/6795356/bug6795356.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/javax/swing/UIDefaults/6795356/bug6795356.java	Wed Apr 20 04:38:36 2011 +0100
@@ -26,6 +26,8 @@
  * @bug 6795356
  * @summary Leak caused by javax.swing.UIDefaults.ProxyLazyValue.acc
  * @author Alexander Potochkin
+ * @library ../../regtesthelpers
+ * @build Util
  * @run main bug6795356
  */
 
@@ -58,43 +60,11 @@
         weakRef = new WeakReference<ProtectionDomain>(domain);
         domain = null;
 
-        // Generate OutOfMemory and check the weak ref
-        generateOOME();
+        Util.generateOOME();
 
         if (weakRef.get() != null) {
             throw new RuntimeException("Memory leak found!");
         }
         System.out.println("Test passed");
     }
-
-    static void generateOOME() {
-        List<Object> bigLeak = new LinkedList<Object>();
-        boolean oome = false;
-        System.out.print("Filling the heap");
-        try {
-            for(int i = 0; true ; i++) {
-                // Now, use up all RAM
-                bigLeak.add(new byte[1024 * 1024]);
-                System.out.print(".");
-
-                // Give the GC a change at that weakref
-                if (i % 10 == 0) {
-                    System.gc();
-                    try {
-                        Thread.sleep(100);
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-        } catch (OutOfMemoryError e) {
-            bigLeak = null;
-            oome = true;
-        }
-        System.out.println("");
-        if (!oome) {
-            throw new RuntimeException("Problem with test case - never got OOME");
-        }
-        System.out.println("Got OOME");
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/regtesthelpers/Util.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2011, 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 javax.swing.*;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * <p>This class contains utilities useful for regression testing.
+ * <p>When using jtreg you would include this class via something like:
+ * <pre>
+ *
+ * @library ../../regtesthelpers
+ * @build Util
+ * </pre>
+ */
+
+public class Util {
+    /**
+     * Convert a rectangle from coordinate system of Component c to
+     * screen coordinate system.
+     *
+     * @param r a non-null Rectangle
+     * @param c a Component whose coordinate system is used for conversion
+     */
+    public static void convertRectToScreen(Rectangle r, Component c) {
+        Point p = new Point(r.x, r.y);
+        SwingUtilities.convertPointToScreen(p, c);
+        r.x = p.x;
+        r.y = p.y;
+    }
+
+    /**
+     * Compares two bufferedImages pixel-by-pixel.
+     * return true if all pixels in the two areas are identical
+     */
+    public static boolean compareBufferedImages(BufferedImage bufferedImage0, BufferedImage bufferedImage1) {
+        int width = bufferedImage0.getWidth();
+        int height = bufferedImage0.getHeight();
+
+        if (width != bufferedImage1.getWidth() || height != bufferedImage1.getHeight()) {
+            return false;
+        }
+
+        for (int y = 0; y < height; y++) {
+            for (int x = 0; x < width; x++) {
+                if (bufferedImage0.getRGB(x, y) != bufferedImage1.getRGB(x, y)) {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Fills the heap until OutOfMemoryError occurs. This method is useful for
+     * WeakReferences removing.
+     */
+    public static void generateOOME() {
+        List<Object> bigLeak = new LinkedList<Object>();
+
+        boolean oome = false;
+
+        System.out.print("Filling the heap");
+
+        try {
+            for(int i = 0; true ; i++) {
+                // Now, use up all RAM
+                bigLeak.add(new byte[1024 * 1024]);
+
+                System.out.print(".");
+
+                // Give the GC a change at that weakref
+                if (i % 10 == 0) {
+                    System.gc();
+                    try {
+                        Thread.sleep(100);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        } catch (OutOfMemoryError e) {
+            bigLeak = null;
+            oome = true;
+        }
+
+        System.out.println("");
+
+        if (!oome) {
+            throw new RuntimeException("Problem with test case - never got OOME");
+        }
+
+        System.out.println("Got OOME");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/CSSBorder/6796710/bug6796710.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2011, 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 6796710
+ * @summary Html content in JEditorPane is overlapping on swing components while resizing the application.
+ * @library ../../../regtesthelpers
+ * @build Util
+ * @author Pavel Porvatov
+   @run main bug6796710
+ */
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+public class bug6796710 {
+    // The page is inlined because we want to be sure that the JEditorPane filled synchronously
+    public static final String TEXT = "<html>" +
+            "<body>" +
+            "<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\">" +
+            "    <tbody>" +
+            "        <tr>" +
+            "            <td>Col1</td>" +
+            "            <td>Col2</td>" +
+            "            <td>Col3</td>" +
+            "        </tr>" +
+            "        <tr>" +
+            "            <td>1. It's a regression from CR 4419748. The problem is in the CSSBorder#paintBorder, which ignores clip area while painting.</td>" +
+            "            <td>2. It's a regression from CR 4419748. The problem is in the CSSBorder#paintBorder, which ignores clip area while painting.</td>" +
+            "            <td>3. It's a regression from CR 4419748. The problem is in the CSSBorder#paintBorder, which ignores clip area while painting.</td>" +
+            "        </tr>" +
+            "    </tbody>" +
+            "</table>" +
+            "</body>" +
+            "</html>";
+
+    private static Robot robot;
+
+    private static JFrame frame;
+
+    private static JPanel pnBottom;
+
+    public static void main(String[] args) throws Exception {
+        robot = new Robot();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame = new JFrame();
+
+                pnBottom = new JPanel();
+                pnBottom.add(new JLabel("Some label"));
+                pnBottom.add(new JButton("A button"));
+
+                JEditorPane editorPane = new JEditorPane();
+
+                editorPane.setContentType("text/html");
+                editorPane.setText(TEXT);
+                editorPane.setEditable(false);
+
+                JPanel pnContent = new JPanel(new BorderLayout());
+
+                pnContent.add(new JScrollPane(editorPane), BorderLayout.CENTER);
+                pnContent.add(pnBottom, BorderLayout.SOUTH);
+
+                frame.setContentPane(pnContent);
+                frame.setSize(400, 600);
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.setVisible(true);
+            }
+        });
+
+        robot.waitForIdle();
+
+        BufferedImage bufferedImage = getPnBottomImage();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame.setSize(400, 150);
+            }
+        });
+
+        robot.waitForIdle();
+
+        if (!Util.compareBufferedImages(bufferedImage, getPnBottomImage())) {
+            throw new RuntimeException("The test failed");
+        }
+
+        System.out.println("The test bug6796710 passed.");
+    }
+
+    private static BufferedImage getPnBottomImage() {
+        Rectangle rect = pnBottom.getBounds();
+
+        Util.convertRectToScreen(rect, pnBottom.getParent());
+
+        return robot.createScreenCapture(rect);
+    }
+}
--- a/test/sun/java2d/pipe/RegionOps.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/java2d/pipe/RegionOps.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,3 +1,26 @@
+/*
+ * Copyright (c) 2009, 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 %W% %E%
  * @bug 6504874
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/java2d/pipe/Test7027667.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2011, 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     7027667, 7023591
+ *
+ * @summary Verifies that aa clipped rectangles are drawn, not filled.
+ *
+ * @run     main Test7027667
+ */
+
+import java.awt.*;
+import java.awt.geom.*;
+import java.awt.image.*;
+import static java.awt.RenderingHints.*;
+
+public class Test7027667 {
+    public static void main(String[] args) throws Exception {
+        BufferedImage bImg = new BufferedImage(512, 512, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g2d = (Graphics2D) bImg.getGraphics();
+        g2d.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON);
+        g2d.setClip(new Ellipse2D.Double(0, 0, 100, 100));
+        g2d.drawRect(10, 10, 100, 100);
+        if (new Color(bImg.getRGB(50, 50)).equals(Color.white)) {
+            throw new Exception("Rectangle should be drawn, not filled");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/java2d/pisces/Renderer/Test7019861.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2011, 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     7019861
+ *
+ * @summary Verifies that the last scanline isn't skipped when doing
+ *          antialiased rendering.
+ *
+ * @run     main Test7019861
+ */
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Path2D;
+import java.awt.image.BufferedImage;
+import java.util.Arrays;
+
+import static java.awt.RenderingHints.*;
+
+public class Test7019861 {
+
+    public static void main(String[] argv) throws Exception {
+        BufferedImage im = getWhiteImage(30, 30);
+        Graphics2D g2 = (Graphics2D)im.getGraphics();
+        g2.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON);
+        g2.setRenderingHint(KEY_STROKE_CONTROL, VALUE_STROKE_PURE);
+        g2.setStroke(new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
+        g2.setBackground(Color.white);
+        g2.setColor(Color.black);
+
+        Path2D p = getPath(0, 0, 20);
+        g2.draw(p);
+
+        if (!(new Color(im.getRGB(20, 19))).equals(Color.black)) {
+            throw new Exception("This pixel should be black");
+        }
+    }
+
+    private static Path2D getPath(int x, int y, int len) {
+        Path2D p = new Path2D.Double();
+        p.moveTo(x, y);
+        p.quadTo(x + len, y, x + len, y + len);
+        return p;
+    }
+
+    private static BufferedImage getWhiteImage(int w, int h) {
+        BufferedImage ret = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+        final int[] white = new int[w * h];
+        Arrays.fill(white, 0xffffff);
+        ret.setRGB(0, 0, w, h, white, 0, w);
+        return ret;
+    }
+}
--- a/test/sun/misc/BootClassLoaderHook/TestHook.java	Mon Nov 01 11:32:50 2010 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 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.File;
-import java.util.TreeSet;
-import java.util.Set;
-import java.net.URLStreamHandlerFactory;
-import sun.misc.BootClassLoaderHook;
-import sun.misc.URLClassPath;
-
-
-/* @test
- * @bug     6888802
- * @summary Sanity test of BootClassLoaderHook interface
- *
- * @build TestHook
- * @run main TestHook
- */
-
-public class TestHook extends BootClassLoaderHook {
-
-    private static final TestHook hook = new TestHook();
-    private static Set<String> names = new TreeSet<String>();
-    private static final String LOGRECORD_CLASS =
-        "java.util.logging.LogRecord";
-    private static final String NONEXIST_RESOURCE =
-        "non.exist.resource";
-    private static final String LIBHELLO = "hello";
-
-    public static void main(String[] args) throws Exception {
-        BootClassLoaderHook.setHook(hook);
-        if (BootClassLoaderHook.getHook() == null) {
-           throw new RuntimeException("Null boot classloader hook ");
-        }
-
-        testHook();
-
-        if (!names.contains(LOGRECORD_CLASS)) {
-           throw new RuntimeException("loadBootstrapClass for " + LOGRECORD_CLASS + " not called");
-        }
-
-        if (!names.contains(NONEXIST_RESOURCE)) {
-           throw new RuntimeException("getBootstrapResource for " + NONEXIST_RESOURCE + " not called");
-        }
-        if (!names.contains(LIBHELLO)) {
-           throw new RuntimeException("loadLibrary for " + LIBHELLO + " not called");
-        }
-
-        Set<String> copy = new TreeSet<String>();
-        copy.addAll(names);
-        for (String s : copy) {
-            System.out.println("  Loaded " + s);
-        }
-    }
-
-    private static void testHook() throws Exception {
-        Class.forName(LOGRECORD_CLASS);
-        ClassLoader.getSystemResource(NONEXIST_RESOURCE);
-        try {
-          System.loadLibrary(LIBHELLO);
-        } catch (UnsatisfiedLinkError e) {
-        }
-    }
-
-    public String loadBootstrapClass(String className) {
-        names.add(className);
-        return null;
-    }
-
-    public String getBootstrapResource(String resourceName) {
-        names.add(resourceName);
-        return null;
-    }
-
-    public boolean loadLibrary(String libname) {
-        names.add(libname);
-        return false;
-    }
-
-    public URLClassPath getBootstrapClassPath(URLClassPath bcp,
-            URLStreamHandlerFactory factory) {
-        return bcp;
-    }
-
-    public boolean isCurrentThreadPrefetching() {
-        return false;
-    }
-
-    public boolean prefetchFile(String name) {
-        return false;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/TestIBM1364.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2011, 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 6803681
+   @summary Test IBM1364
+ */
+
+import java.util.Arrays;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class TestIBM1364 {
+    private static String c2bNRStr = "\u00AD\u00B7\u2015\u223C\u2299\uFF5E";
+    private static byte[] c2bNRBytes = new byte[] {
+        (byte)0x0e,
+        (byte)0x41, (byte)0x48,
+        (byte)0x41, (byte)0x43,
+        (byte)0x41, (byte)0x49,
+        (byte)0x42, (byte)0xa1,
+        (byte)0x49, (byte)0x6f,
+        (byte)0x49, (byte)0x54,
+        (byte)0x0f };
+
+    // end at SO
+    private static String mixedStr = "\u008d\u008e\u0020\u3000\u3001\u71ba\u3164\u0088\ue757";
+    private static byte[] mixedBytes = new byte[] {
+         (byte)0x09,
+         (byte)0x0a,
+         (byte)0x40,
+         (byte)0x0e,
+         (byte)0x40, (byte)0x40,
+         (byte)0x41, (byte)0x41,
+         (byte)0x6c, (byte)0x45,
+         (byte)0x84, (byte)0x41,
+         (byte)0x0f,
+         (byte)0x28,
+         (byte)0x0e,
+         (byte)0xdd, (byte)0xfd,
+         (byte)0x0f };
+
+    // end at SI
+    private static String mixedStr2 = "\u008d\u008e\u0020\u3000\u3001\u71ba\u3164\u0088";
+    private static byte[] mixedBytes2 = new byte[] {
+         (byte)0x09,
+         (byte)0x0a,
+         (byte)0x40,
+         (byte)0x0e,
+         (byte)0x40, (byte)0x40,
+         (byte)0x41, (byte)0x41,
+         (byte)0x6c, (byte)0x45,
+         (byte)0x84, (byte)0x41,
+         (byte)0x0f,
+         (byte)0x28 };
+
+    private static byte[][] malformedBytes = {
+        { (byte)0x0e,
+          (byte)0x039, (byte)0x40,
+          (byte)0x0f
+        },
+        { (byte)0x0e,
+          (byte)0x039, (byte)0x42,
+          (byte)0x0f
+        },
+        { (byte)0x0e,
+          (byte)0x040, (byte)0x41,
+          (byte)0x0f
+        },
+        { (byte)0x0e,
+          (byte)0x040, (byte)0xee,
+          (byte)0x0f
+        },
+        { (byte)0x0e,
+          (byte)0x0ef, (byte)0x30,
+          (byte)0x0f
+        },
+        { (byte)0x0e,
+          (byte)0x0ff, (byte)0x41,
+          (byte)0x0f
+        }
+    };
+
+    private static byte[][] unmappedBytes = {
+        { (byte)0x0e,
+          (byte)0x06c, (byte)0x46,
+          (byte)0x0f,
+        },
+        { (byte)0x0e,
+          (byte)0x078, (byte)0x46,
+          (byte)0x0f,
+        },
+        { (byte)0x0e,
+          (byte)0x083, (byte)0xfe,
+          (byte)0x0f,
+        },
+        { (byte)0xfa },
+        { (byte)0xfe },
+    };
+
+    public static void main(String[] args) throws Exception {
+        if (!(Arrays.equals(mixedStr.getBytes("cp1364"), mixedBytes)) ||
+            !mixedStr.equals(new String(mixedBytes, "cp1364")))
+            throw new RuntimeException("cp1364 failed on mixed!");
+
+        if (!(Arrays.equals(mixedStr2.getBytes("cp1364"), mixedBytes2)) ||
+            !mixedStr2.equals(new String(mixedBytes2, "cp1364")))
+            throw new RuntimeException("cp1364 failed on mixed!");
+
+        if (!(Arrays.equals(c2bNRStr.getBytes("cp1364"), c2bNRBytes)) ||
+            c2bNRStr.equals(new String(c2bNRBytes, "cp1364")))
+            throw new RuntimeException("cp1364 failed on c2bNR!");
+
+        ByteBuffer bb = ByteBuffer.allocateDirect(mixedBytes.length);
+        bb.put(mixedBytes).flip();
+        CharBuffer cb = Charset.forName("ibm1364").decode(bb);
+        if (!mixedStr.equals(new String(cb.toString())))
+            throw new RuntimeException("cp1364 failed on direct decod()!");
+
+        bb = ByteBuffer.allocateDirect(mixedBytes2.length);
+        bb.put(mixedBytes2).flip();
+        cb = Charset.forName("ibm1364").decode(bb);
+        if (!mixedStr2.equals(new String(cb.toString())))
+            throw new RuntimeException("cp1364 failed on direct decod()!");
+
+        cb = ByteBuffer.allocateDirect(mixedStr.length() * 2).asCharBuffer();
+        cb.put(mixedStr.toCharArray()).flip();
+        bb = Charset.forName("x-ibm1364").encode(cb);
+        if (!(Arrays.equals(Arrays.copyOf(bb.array(), bb.limit()), mixedBytes)))
+            throw new RuntimeException("cp1364 failed on direct encode()!");
+
+        cb = ByteBuffer.allocateDirect(mixedStr2.length() * 2).asCharBuffer();
+        cb.put(mixedStr2.toCharArray()).flip();
+        bb = Charset.forName("x-ibm1364").encode(cb);
+        if (!(Arrays.equals(Arrays.copyOf(bb.array(), bb.limit()), mixedBytes2)))
+            throw new RuntimeException("cp1364 failed on direct encode()!");
+
+        // malformed
+        cb = CharBuffer.allocate(1024);
+        CharBuffer cbd = ByteBuffer.allocateDirect(1024).asCharBuffer();
+        CharsetDecoder dec = Charset.forName("x-ibm1364").newDecoder();
+        for (byte[] ba:malformedBytes) {
+            cb.clear();
+            dec.reset();
+            if (!dec.reset().decode(ByteBuffer.wrap(ba), cb, true).isMalformed() ||
+                !dec.reset().decode(ByteBuffer.wrap(ba), cbd, true).isMalformed())
+                throw new RuntimeException("cp1364 failed on decode()/malformed!");
+        }
+
+        //unmappable
+        for (byte[] ba:unmappedBytes) {
+            cb.clear();
+            dec.reset();
+            if (!dec.reset().decode(ByteBuffer.wrap(ba), cb, true).isUnmappable() ||
+                !dec.reset().decode(ByteBuffer.wrap(ba), cbd, true).isUnmappable())
+                throw new RuntimeException("cp1364 failed on decode()/unmappable!");
+        }
+
+        //overflow
+        cb.limit(mixedStr.length() - 1);
+        cbd.limit(mixedStr.length() - 1);
+        if (!dec.reset().decode(ByteBuffer.wrap(mixedBytes), cb, true).isOverflow() ||
+            !dec.reset().decode(ByteBuffer.wrap(mixedBytes), cbd, true).isOverflow())
+            throw new RuntimeException("cp1364 failed on decode()/overflow!");
+
+        CharsetEncoder enc = Charset.forName("x-ibm1364").newEncoder();
+        // last "0x0f" is from flush()
+        bb = ByteBuffer.allocate(mixedBytes.length - 2);
+        ByteBuffer bbd = ByteBuffer.allocateDirect(mixedBytes.length - 2);
+        if (!enc.reset()
+                .encode(CharBuffer.wrap(mixedStr.toCharArray()), bb, true)
+                .isOverflow() ||
+            !enc.reset()
+                .encode(CharBuffer.wrap(mixedStr.toCharArray()), bbd, true)
+                .isOverflow())
+            throw new RuntimeException("cp1364 failed on encode()/overflow!");
+
+        // flush() overflow
+        bb = ByteBuffer.allocate(mixedBytes.length - 1);
+        bbd = ByteBuffer.allocateDirect(mixedBytes.length - 1);
+
+        enc.reset().encode(CharBuffer.wrap(mixedStr.toCharArray()), bb, true);
+        enc.reset().encode(CharBuffer.wrap(mixedStr.toCharArray()), bbd, true);
+
+        if (!enc.flush(bb).isOverflow() ||
+            !enc.flush(bbd).isOverflow())
+            throw new RuntimeException("cp1364 failed on encode()/flush()/overflow!");
+    }
+}
--- a/test/sun/security/krb5/auto/BadKdc1.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/BadKdc1.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,7 +24,7 @@
 /*
  * @test
  * @bug 6843127
- * @run main/timeout=300 BadKdc1
+ * @run main/othervm/timeout=300 BadKdc1
  * @summary krb5 should not try to access unavailable kdc too often
  */
 
--- a/test/sun/security/krb5/auto/BadKdc2.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/BadKdc2.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,7 +24,7 @@
 /*
  * @test
  * @bug 6843127
- * @run main/timeout=300 BadKdc2
+ * @run main/othervm/timeout=300 BadKdc2
  * @summary krb5 should not try to access unavailable kdc too often
  */
 
--- a/test/sun/security/krb5/auto/BadKdc3.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/BadKdc3.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,7 +24,7 @@
 /*
  * @test
  * @bug 6843127
- * @run main/timeout=300 BadKdc3
+ * @run main/othervm/timeout=300 BadKdc3
  * @summary krb5 should not try to access unavailable kdc too often
  */
 
--- a/test/sun/security/krb5/auto/BadKdc4.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/BadKdc4.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,7 +24,7 @@
 /*
  * @test
  * @bug 6843127
- * @run main/timeout=300 BadKdc4
+ * @run main/othervm/timeout=300 BadKdc4
  * @summary krb5 should not try to access unavailable kdc too often
  */
 
--- a/test/sun/security/krb5/auto/CleanState.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/CleanState.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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 @@
 /*
  * @test
  * @bug 6716534
+ * @run main/othervm CleanState
  * @summary Krb5LoginModule has not cleaned temp info between authentication attempts
  */
 import com.sun.security.auth.module.Krb5LoginModule;
--- a/test/sun/security/krb5/auto/CrossRealm.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/CrossRealm.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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 @@
 /*
  * @test
  * @bug 6706974
+ * @run main/othervm CrossRealm
  * @summary Add krb5 test infrastructure
  */
 import java.io.File;
--- a/test/sun/security/krb5/auto/HttpNegotiateServer.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/HttpNegotiateServer.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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 @@
 /*
  * @test
  * @bug 6578647 6829283
+ * @run main/othervm HttpNegotiateServer
  * @summary Undefined requesting URL in java.net.Authenticator.getPasswordAuthentication()
  * @summary HTTP/Negotiate: Authenticator triggered again when user cancels the first one
  */
--- a/test/sun/security/krb5/auto/IgnoreChannelBinding.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/IgnoreChannelBinding.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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 @@
 /*
  * @test
  * @bug 6851973
+ * @run main/othervm IgnoreChannelBinding
  * @summary ignore incoming channel binding if acceptor does not set one
  */
 
--- a/test/sun/security/krb5/auto/KerberosHashEqualsTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/KerberosHashEqualsTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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 @@
 /*
  * @test
  * @bug 4641821
+ * @run main/othervm KerberosHashEqualsTest
  * @summary hashCode() and equals() for KerberosKey and KerberosTicket
  */
 
--- a/test/sun/security/krb5/auto/LifeTimeInSeconds.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/LifeTimeInSeconds.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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 @@
 /*
  * @test
  * @bug 6857802
+ * @run main/othervm LifeTimeInSeconds
  * @summary GSS getRemainingInitLifetime method returns milliseconds not seconds
  */
 import org.ietf.jgss.GSSCredential;
--- a/test/sun/security/krb5/auto/LoginModuleOptions.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/LoginModuleOptions.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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 @@
 /*
  * @test
  * @bug 6765491
+ * @run main/othervm LoginModuleOptions
  * @summary Krb5LoginModule a little too restrictive, and the doc is not clear.
  */
 import com.sun.security.auth.module.Krb5LoginModule;
--- a/test/sun/security/krb5/auto/MaxRetries.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/MaxRetries.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, 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,7 +24,7 @@
 /*
  * @test
  * @bug 6844193
- * @run main/timeout=300 MaxRetries
+ * @run main/othervm/timeout=300 MaxRetries
  * @summary support max_retries in krb5.conf
  */
 
--- a/test/sun/security/krb5/auto/MoreKvno.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/MoreKvno.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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 @@
  * @test
  * @bug 6893158
  * @bug 6907425
+ * @run main/othervm MoreKvno
  * @summary AP_REQ check should use key version number
  */
 
--- a/test/sun/security/krb5/auto/NewSalt.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/NewSalt.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, 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,7 @@
  * @test
  * @bug 6960894
  * @summary Better AS-REQ creation and processing
- * @run main NewSalt
+ * @run main/othervm NewSalt
  * @run main/othervm -Dnopreauth NewSalt
  * @run main/othervm -Donlyonepreauth NewSalt
  */
--- a/test/sun/security/krb5/auto/NonMutualSpnego.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/NonMutualSpnego.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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 @@
 /*
  * @test
  * @bug 6733095
+ * @run main/othervm NonMutualSpnego
  * @summary Failure when SPNEGO request non-Mutual
  */
 
--- a/test/sun/security/krb5/auto/SSL.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/SSL.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,16 +25,16 @@
  * @test
  * @bug 6894643 6913636
  * @summary Test JSSE Kerberos ciphersuite
- * @run main SSL TLS_KRB5_WITH_RC4_128_SHA
- * @run main SSL TLS_KRB5_WITH_RC4_128_MD5
- * @run main SSL TLS_KRB5_WITH_3DES_EDE_CBC_SHA
- * @run main SSL TLS_KRB5_WITH_3DES_EDE_CBC_MD5
- * @run main SSL TLS_KRB5_WITH_DES_CBC_SHA
- * @run main SSL TLS_KRB5_WITH_DES_CBC_MD5
- * @run main SSL TLS_KRB5_EXPORT_WITH_RC4_40_SHA
- * @run main SSL TLS_KRB5_EXPORT_WITH_RC4_40_MD5
- * @run main SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
- * @run main SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
+ * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA
+ * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_MD5
+ * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_SHA
+ * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_MD5
+ * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_SHA
+ * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_MD5
+ * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_RC4_40_SHA
+ * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_RC4_40_MD5
+ * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
+ * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
  */
 import java.io.*;
 import java.net.InetAddress;
--- a/test/sun/security/krb5/auto/SpnegoReqFlags.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/SpnegoReqFlags.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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 @@
 /*
  * @test
  * @bug 6815182
+ * @run main/othervm SpnegoReqFlags
  * @summary GSSAPI/SPNEGO does not work with server using MIT Kerberos library
  */
 
--- a/test/sun/security/krb5/auto/Test5653.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/krb5/auto/Test5653.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, 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 @@
 /*
  * @test
  * @bug 6895424
+ * @run main/othervm Test5653
  * @summary RFC 5653
  */
 
--- a/test/sun/security/mscapi/access.policy	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/mscapi/access.policy	Wed Apr 20 04:38:36 2011 +0100
@@ -3,7 +3,7 @@
     permission java.lang.RuntimePermission 
 			"accessClassInPackage.sun.*";
 
-    permission java.lang.RuntimePermission "loadLibrary.sunmscapi";
+    permission java.lang.RuntimePermission "loadLibrary.*";
 
     permission java.util.PropertyPermission "os.arch", "read";
 
--- a/test/sun/security/mscapi/noaccess.policy	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/mscapi/noaccess.policy	Wed Apr 20 04:38:36 2011 +0100
@@ -3,7 +3,7 @@
     permission java.lang.RuntimePermission 
 			"accessClassInPackage.sun.*";
 
-    permission java.lang.RuntimePermission "loadLibrary.sunmscapi";
+    permission java.lang.RuntimePermission "loadLibrary.*";
 
     permission java.util.PropertyPermission "os.arch", "read";
 
--- a/test/sun/security/pkcs11/Cipher/TestRSACipher.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/pkcs11/Cipher/TestRSACipher.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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 4898468
+ * @bug 4898468 6994008
  * @summary basic test for RSA cipher
  * @author Andreas Sterbenz
  * @library ..
@@ -38,9 +38,12 @@
 
 public class TestRSACipher extends PKCS11Test {
 
+    private static final String[] RSA_ALGOS =
+        { "RSA/ECB/PKCS1Padding", "RSA" };
+
     public void main(Provider p) throws Exception {
         try {
-            Cipher.getInstance("RSA/ECB/PKCS1Padding", p);
+            Cipher.getInstance(RSA_ALGOS[0], p);
         } catch (GeneralSecurityException e) {
             System.out.println("Not supported by provider, skipping");
             return;
@@ -55,57 +58,58 @@
         b = new byte[16];
         random.nextBytes(b);
 
-        Cipher c1 = Cipher.getInstance("RSA/ECB/PKCS1Padding", p);
-        Cipher c2 = Cipher.getInstance("RSA/ECB/PKCS1Padding", "SunJCE");
+        for (String rsaAlgo: RSA_ALGOS) {
+            Cipher c1 = Cipher.getInstance(rsaAlgo, p);
+            Cipher c2 = Cipher.getInstance(rsaAlgo, "SunJCE");
 
-        c1.init(Cipher.ENCRYPT_MODE, publicKey);
-        e = c1.doFinal(b);
-        c1.init(Cipher.DECRYPT_MODE, privateKey);
-        d = c1.doFinal(e);
-        match(b, d);
-        c2.init(Cipher.DECRYPT_MODE, privateKey);
-        d = c2.doFinal(e);
-        match(b, d);
+            c1.init(Cipher.ENCRYPT_MODE, publicKey);
+            e = c1.doFinal(b);
+            c1.init(Cipher.DECRYPT_MODE, privateKey);
+            d = c1.doFinal(e);
+            match(b, d);
+            c2.init(Cipher.DECRYPT_MODE, privateKey);
+            d = c2.doFinal(e);
+            match(b, d);
 
-        // invalid data
-        c1.init(Cipher.DECRYPT_MODE, publicKey);
-        try {
-            d = c1.doFinal(e);
-            throw new Exception("completed call");
-        } catch (BadPaddingException ee) {
-            ee.printStackTrace();
-        }
+            // invalid data
+            c1.init(Cipher.DECRYPT_MODE, publicKey);
+            try {
+                d = c1.doFinal(e);
+                throw new Exception("completed call");
+            } catch (BadPaddingException ee) {
+                ee.printStackTrace();
+            }
 
-        c1.init(Cipher.ENCRYPT_MODE, privateKey);
-        e = c1.doFinal(b);
-        c1.init(Cipher.DECRYPT_MODE, publicKey);
-        d = c1.doFinal(e);
-        match(b, d);
-        c2.init(Cipher.DECRYPT_MODE, publicKey);
-        d = c2.doFinal(e);
-        match(b, d);
+            c1.init(Cipher.ENCRYPT_MODE, privateKey);
+            e = c1.doFinal(b);
+            c1.init(Cipher.DECRYPT_MODE, publicKey);
+            d = c1.doFinal(e);
+            match(b, d);
+            c2.init(Cipher.DECRYPT_MODE, publicKey);
+            d = c2.doFinal(e);
+            match(b, d);
 
-        // reinit tests
-        c1.init(Cipher.ENCRYPT_MODE, privateKey);
-        c1.init(Cipher.ENCRYPT_MODE, privateKey);
-        e = c1.doFinal(b);
-        e = c1.doFinal(b);
-        c1.update(b);
-        c1.update(b);
-        c1.init(Cipher.ENCRYPT_MODE, privateKey);
-        e = c1.doFinal();
-        e = c1.doFinal();
-        c1.update(b);
-        e = c1.doFinal();
+            // reinit tests
+            c1.init(Cipher.ENCRYPT_MODE, privateKey);
+            c1.init(Cipher.ENCRYPT_MODE, privateKey);
+            e = c1.doFinal(b);
+            e = c1.doFinal(b);
+            c1.update(b);
+            c1.update(b);
+            c1.init(Cipher.ENCRYPT_MODE, privateKey);
+            e = c1.doFinal();
+            e = c1.doFinal();
+            c1.update(b);
+            e = c1.doFinal();
 
-        c1.update(new byte[256]);
-        try {
-            e = c1.doFinal();
-            throw new Exception("completed call");
-        } catch (IllegalBlockSizeException ee) {
-            System.out.println(ee);
+            c1.update(new byte[256]);
+            try {
+                e = c1.doFinal();
+                throw new Exception("completed call");
+            } catch (IllegalBlockSizeException ee) {
+                System.out.println(ee);
+            }
         }
-
     }
 
     private static void match(byte[] b1, byte[] b2) throws Exception {
--- a/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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 6572331
+ * @bug 6572331 6994008
  * @summary basic test for RSA cipher key wrapping functionality
  * @author Valerie Peng
  * @library ..
@@ -38,47 +38,48 @@
 
 public class TestRSACipherWrap extends PKCS11Test {
 
-    private static final String RSA_ALGO = "RSA/ECB/PKCS1Padding";
+    private static final String[] RSA_ALGOS =
+        { "RSA/ECB/PKCS1Padding", "RSA" };
 
     public void main(Provider p) throws Exception {
         try {
-            Cipher.getInstance(RSA_ALGO, p);
+            Cipher.getInstance(RSA_ALGOS[0], p);
         } catch (GeneralSecurityException e) {
-            System.out.println("Not supported by provider, skipping");
+            System.out.println(RSA_ALGOS[0] + " unsupported, skipping");
             return;
         }
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p);
         kpg.initialize(1024);
         KeyPair kp = kpg.generateKeyPair();
-        PublicKey publicKey = kp.getPublic();
-        PrivateKey privateKey = kp.getPrivate();
 
-        Cipher cipherPKCS11 = Cipher.getInstance(RSA_ALGO, p);
-        Cipher cipherJce = Cipher.getInstance(RSA_ALGO, "SunJCE");
+        for (String rsaAlgo: RSA_ALGOS) {
+            Cipher cipherPKCS11 = Cipher.getInstance(rsaAlgo, p);
+            Cipher cipherJce = Cipher.getInstance(rsaAlgo, "SunJCE");
 
-        String algos[] = {"AES", "RC2", "Blowfish"};
-        int keySizes[] = {128, 256};
+            String algos[] = {"AES", "RC2", "Blowfish"};
+            int keySizes[] = {128, 256};
 
-        for (int j = 0; j < algos.length; j++) {
-            String algorithm = algos[j];
-            KeyGenerator keygen =
+            for (int j = 0; j < algos.length; j++) {
+                String algorithm = algos[j];
+                KeyGenerator keygen =
                     KeyGenerator.getInstance(algorithm);
 
-            for (int i = 0; i < keySizes.length; i++) {
-                SecretKey secretKey = null;
-                System.out.print("Generate " + keySizes[i] + "-bit " +
+                for (int i = 0; i < keySizes.length; i++) {
+                    SecretKey secretKey = null;
+                    System.out.print("Generate " + keySizes[i] + "-bit " +
                         algorithm + " key using ");
-                try {
-                    keygen.init(keySizes[i]);
-                    secretKey = keygen.generateKey();
-                    System.out.println(keygen.getProvider().getName());
-                } catch (InvalidParameterException ipe) {
-                    secretKey = new SecretKeySpec(new byte[32], algorithm);
-                    System.out.println("SecretKeySpec class");
+                    try {
+                        keygen.init(keySizes[i]);
+                        secretKey = keygen.generateKey();
+                        System.out.println(keygen.getProvider().getName());
+                    } catch (InvalidParameterException ipe) {
+                        secretKey = new SecretKeySpec(new byte[32], algorithm);
+                        System.out.println("SecretKeySpec class");
+                    }
+                    test(kp, secretKey, cipherPKCS11, cipherJce);
+                    test(kp, secretKey, cipherPKCS11, cipherPKCS11);
+                    test(kp, secretKey, cipherJce, cipherPKCS11);
                 }
-                test(kp, secretKey, cipherPKCS11, cipherJce);
-                test(kp, secretKey, cipherPKCS11, cipherPKCS11);
-                test(kp, secretKey, cipherJce, cipherPKCS11);
             }
         }
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java	Wed Apr 20 04:38:36 2011 +0100
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2011, 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 6994008
+ * @summary basic test for RSA/ECB/NoPadding cipher
+ * @author Valerie Peng
+ * @library ..
+ */
+
+import javax.crypto.*;
+import java.io.*;
+import javax.crypto.spec.SecretKeySpec;
+import java.security.*;
+import java.util.*;
+
+public class TestRawRSACipher extends PKCS11Test {
+
+    public void main(Provider p) throws Exception {
+        try {
+            Cipher.getInstance("RSA/ECB/NoPadding", p);
+        } catch (GeneralSecurityException e) {
+            System.out.println("Not supported by provider, skipping");
+            return;
+        }
+
+        final int KEY_LEN = 1024;
+        KeyPairGenerator kpGen = KeyPairGenerator.getInstance("RSA", p);
+        kpGen.initialize(KEY_LEN);
+        KeyPair kp = kpGen.generateKeyPair();
+        Random random = new Random();
+        byte[] plainText, cipherText, recoveredText;
+        plainText = new byte[KEY_LEN/8];
+        random.nextBytes(plainText);
+        plainText[0] = 0; // to ensure that it's less than modulus
+
+        Cipher c1 = Cipher.getInstance("RSA/ECB/NoPadding", p);
+        Cipher c2 = Cipher.getInstance("RSA/ECB/NoPadding", "SunJCE");
+
+        c1.init(Cipher.ENCRYPT_MODE, kp.getPublic());
+        c2.init(Cipher.DECRYPT_MODE, kp.getPrivate());
+
+        cipherText = c1.doFinal(plainText);
+        recoveredText = c2.doFinal(cipherText);
+        if (!Arrays.equals(plainText, recoveredText)) {
+            throw new RuntimeException("E/D Test against SunJCE Failed!");
+        }
+
+        c2.init(Cipher.ENCRYPT_MODE, kp.getPublic());
+        c1.init(Cipher.DECRYPT_MODE, kp.getPrivate());
+        cipherText = c2.doFinal(plainText);
+        recoveredText = c1.doFinal(cipherText);
+        if (!Arrays.equals(plainText, recoveredText)) {
+            throw new RuntimeException("D/E Test against SunJCE Failed!");
+        }
+
+        System.out.println("Test Passed");
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new TestRawRSACipher());
+    }
+}
--- a/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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 %I% %E%
- * @bug 4898461
+ * @bug 4898461 6604496
  * @summary basic test for symmetric ciphers with padding
  * @author Valerie Peng
  * @library ..
@@ -70,9 +70,13 @@
         new CI("DES/ECB/PKCS5Padding", "DES", 6400),
         new CI("DESede/ECB/PKCS5Padding", "DESede", 400),
         new CI("AES/ECB/PKCS5Padding", "AES", 64),
+
         new CI("DES", "DES", 6400),
         new CI("DESede", "DESede", 408),
-        new CI("AES", "AES", 128)
+        new CI("AES", "AES", 128),
+
+        new CI("AES/CTR/NoPadding", "AES", 3200)
+
     };
     private static StringBuffer debugBuf = new StringBuffer();
 
--- a/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2011, 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 4898484
+ * @bug 4898484 6604496
  * @summary basic test for symmetric ciphers with no padding
  * @author Valerie Peng
  * @library ..
@@ -59,7 +59,8 @@
         new CI("DES/CBC/NoPadding", "DES", 400),
         new CI("DESede/CBC/NoPadding", "DESede", 160),
         new CI("AES/CBC/NoPadding", "AES", 4800),
-        new CI("Blowfish/CBC/NoPadding", "Blowfish", 24)
+        new CI("Blowfish/CBC/NoPadding", "Blowfish", 24),
+        new CI("AES/CTR/NoPadding", "AES", 1600)
     };
 
     private static StringBuffer debugBuf;
--- a/test/sun/security/ssl/javax/net/ssl/GetInstance.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/ssl/javax/net/ssl/GetInstance.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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,8 +23,9 @@
 
 /*
  * @test
- * @bug 4898428
+ * @bug 4898428 7022855
  * @summary verify getInstance() works using Provider.getService()
+ *          Export "PKIX" as the standard algorithm name of KeyManagerFactory
  * @author Andreas Sterbenz
  */
 
@@ -61,6 +62,20 @@
         kmf = KeyManagerFactory.getInstance("SunX509", p);
         same(p, kmf.getProvider());
 
+        kmf = KeyManagerFactory.getInstance("NewSunX509");
+        same(p, kmf.getProvider());
+        kmf = KeyManagerFactory.getInstance("NewSunX509", "SunJSSE");
+        same(p, kmf.getProvider());
+        kmf = KeyManagerFactory.getInstance("NewSunX509", p);
+        same(p, kmf.getProvider());
+
+        kmf = KeyManagerFactory.getInstance("PKIX");
+        same(p, kmf.getProvider());
+        kmf = KeyManagerFactory.getInstance("PKIX", "SunJSSE");
+        same(p, kmf.getProvider());
+        kmf = KeyManagerFactory.getInstance("PKIX", p);
+        same(p, kmf.getProvider());
+
         TrustManagerFactory tmf;
         tmf = TrustManagerFactory.getInstance("SunX509");
         same(p, tmf.getProvider());
@@ -69,6 +84,34 @@
         tmf = TrustManagerFactory.getInstance("SunX509", p);
         same(p, tmf.getProvider());
 
+        tmf = TrustManagerFactory.getInstance("PKIX");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("PKIX", "SunJSSE");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("PKIX", p);
+        same(p, tmf.getProvider());
+
+        tmf = TrustManagerFactory.getInstance("SunPKIX");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("SunPKIX", "SunJSSE");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("SunPKIX", p);
+        same(p, tmf.getProvider());
+
+        tmf = TrustManagerFactory.getInstance("X509");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("X509", "SunJSSE");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("X509", p);
+        same(p, tmf.getProvider());
+
+        tmf = TrustManagerFactory.getInstance("X.509");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("X.509", "SunJSSE");
+        same(p, tmf.getProvider());
+        tmf = TrustManagerFactory.getInstance("X.509", p);
+        same(p, tmf.getProvider());
+
         testComSun();
 
         long stop = System.currentTimeMillis();
--- a/test/sun/security/tools/jarsigner/crl.sh	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/tools/jarsigner/crl.sh	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, 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,9 +32,6 @@
 fi
 
 # set platform-dependent variables
-# PF: platform name, say, solaris-sparc
-
-PF=""
 
 OS=`uname -s`
 case "$OS" in
@@ -47,54 +44,28 @@
 esac
 
 KS=crl.jks
-JFILE=crl.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS"
-JAR=$TESTJAVA${FS}bin${FS}jar
-JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
 
-rm $KS $JFILE 2> /dev/null
+rm $KS 2> /dev/null
 
-# Generates some crl files, each containing two entries
+# Test keytool -gencrl
 
 $KT -alias a -dname CN=a -keyalg rsa -genkey -validity 300
-$KT -alias a -gencrl -id 1:1 -id 2:2 -file crl1
-$KT -alias a -gencrl -id 3:3 -id 4:4 -file crl2
-$KT -alias b -dname CN=b -keyalg rsa -genkey -validity 300
-$KT -alias b -gencrl -id 5:1 -id 6:2 -file crl3
+$KT -alias a -gencrl -id 1:1 -id 2:2 -file crl1 || exit 1
+$KT -alias a -gencrl -id 3:3 -id 4:4 -file crl2 || exit 2
+$KT -alias a -gencrl -id 5:1 -id 6:2 -file crl3 || exit 4
 
-cat > ToURI.java <<EOF
-class ToURI {
-    public static void main(String[] args) throws Exception {
-        System.out.println(new java.io.File("crl1").toURI());
-    }
-}
-EOF
-$TESTJAVA${FS}bin${FS}javac ToURI.java
-$TESTJAVA${FS}bin${FS}java ToURI > uri
-$KT -alias c -dname CN=c -keyalg rsa -genkey -validity 300 \
-    -ext crl=uri:`cat uri`
-
-echo A > A
+# Test keytool -printcrl
 
-# Test -crl:auto, cRLDistributionPoints is a local file
+$KT -printcrl -file crl1 || exit 5
+$KT -printcrl -file crl2 || exit 6
+$KT -printcrl -file crl3 || exit 7
 
-$JAR cvf $JFILE A
-$JARSIGNER -keystore $KS -storepass changeit $JFILE c \
-        -crl:auto || exit 1
-$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 6
-$KT -printcert -jarfile $JFILE | grep CRLs || exit 7
-
-# Test -crl <file>
 
-$JAR cvf $JFILE A
-$JARSIGNER -keystore $KS -storepass changeit $JFILE a \
-        -crl crl1 -crl crl2 || exit 2
-$JARSIGNER -keystore $KS -storepass changeit $JFILE b \
-        -crl crl3 -crl crl2 || exit 3
-$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 3
-$KT -printcert -jarfile $JFILE | grep CRLs || exit 4
-CRLCOUNT=`$KT -printcert -jarfile $JFILE | grep SerialNumber | wc -l`
-if [ $CRLCOUNT != 8 ]; then exit 5; fi
+# Test keytool -ext crl
+
+$KT -alias b -dname CN=c -keyalg rsa -genkey -validity 300 \
+    -ext crl=uri:http://www.example.com/crl || exit 10
 
 exit 0
--- a/test/sun/security/tools/keytool/NewSize7.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/security/tools/keytool/NewSize7.java	Wed Apr 20 04:38:36 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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,6 +29,8 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.security.KeyStore;
 import java.security.cert.X509Certificate;
 import java.security.interfaces.RSAPublicKey;
@@ -42,8 +44,10 @@
                 " -alias a -dname cn=c -storepass changeit" +
                 " -keypass changeit -keyalg rsa").split(" "));
         KeyStore ks = KeyStore.getInstance("JKS");
-        ks.load(new FileInputStream(FILE), null);
-        new File(FILE).delete();
+        try (FileInputStream fin = new FileInputStream(FILE)) {
+            ks.load(fin, null);
+        }
+        Files.delete(Paths.get(FILE));
         RSAPublicKey r = (RSAPublicKey)ks.getCertificate("a").getPublicKey();
         if (r.getModulus().bitLength() != 2048) {
             throw new Exception("Bad keysize");
--- a/test/sun/text/resources/LocaleData	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/text/resources/LocaleData	Wed Apr 20 04:38:36 2011 +0100
@@ -6101,3 +6101,348 @@
 
 # bug 6919624
 CalendarData/hu/minimalDaysInFirstWeek=4
+
+# bug 6998391
+CalendarData/sr-Latn/firstDayOfWeek=2
+CalendarData/sr-Latn-BA/firstDayOfWeek=2
+CalendarData/sr-Latn-ME/firstDayOfWeek=2
+CalendarData/sr-Latn-RS/firstDayOfWeek=2
+#
+CalendarData/sr-Latn/minimalDaysInFirstWeek=1
+CalendarData/sr-Latn-BA/minimalDaysInFirstWeek=4
+CalendarData/sr-Latn-ME/minimalDaysInFirstWeek=4
+CalendarData/sr-Latn-RS/minimalDaysInFirstWeek=4
+#
+LocaleNames/sr-Latn/SR=Surinam
+LocaleNames/sr-Latn-BA/SR=Surinam
+LocaleNames/sr-Latn-ME/SR=Surinam
+LocaleNames/sr-Latn-RS/SR=Surinam
+#
+FormatData/sr-Latn/MonthNames/2=mart
+FormatData/sr-Latn-BA/MonthNames/4=maj
+FormatData/sr-Latn-ME/MonthNames/7=avgust
+FormatData/sr-Latn-RS/MonthNames/8=septembar
+#
+FormatData/sr-Latn/DayNames/1=ponedeljak
+FormatData/sr-Latn-BA/DayNames/2=utorak
+FormatData/sr-Latn-ME/DayNames/3=sreda
+FormatData/sr-Latn-RS/DayNames/4=\u010detvrtak
+#
+FormatData/sr-Latn/DayAbbreviations/1=pon
+FormatData/sr-Latn-BA/DayAbbreviations/2=uto
+FormatData/sr-Latn-ME/DayAbbreviations/3=sre
+FormatData/sr-Latn-RS/DayAbbreviations/4=\u010det
+#
+CurrencyNames/sr-Latn/EUR=EUR
+CurrencyNames/sr-Latn-BA/EUR=\u20ac
+CurrencyNames/sr-Latn-BA/BAM=KM
+CurrencyNames/sr-Latn-ME/EUR=\u20ac
+CurrencyNames/sr-Latn-RS/EUR=EUR
+#
+FormatData/sr-Latn/DateTimePatterns/1=HH.mm.ss z
+FormatData/sr-Latn-BA/DateTimePatterns/2=HH.mm.ss
+FormatData/sr-Latn-ME/DateTimePatterns/5=d.MM.yyyy.
+FormatData/sr-Latn-RS/DateTimePatterns/5=dd. MMMM y.
+
+# bug 7019267
+CurrencyNames/pt/adp=Peseta de Andorra
+CurrencyNames/pt/aed=Dir\u00e9m dos Emirados \u00c1rabes Unidos
+CurrencyNames/pt/afa=Afegane (1927-2002)
+CurrencyNames/pt/afn=Afegane
+CurrencyNames/pt/all=Lek Alban\u00eas
+CurrencyNames/pt/amd=Dram arm\u00eanio
+CurrencyNames/pt/ang=Guilder das Antilhas Holandesas
+CurrencyNames/pt/aoa=Cuanza angolano
+CurrencyNames/pt/ars=Peso argentino
+CurrencyNames/pt/ats=Xelim austr\u00edaco
+CurrencyNames/pt/aud=D\u00f3lar australiano
+CurrencyNames/pt/awg=Guilder de Aruba
+CurrencyNames/pt/azm=Manat azerbaijano
+CurrencyNames/pt/azn=Manat do Azerbaij\u00e3o
+CurrencyNames/pt/bam=Marco b\u00f3snio-herzegovino convers\u00edvel
+CurrencyNames/pt/bbd=D\u00f3lar de Barbados
+CurrencyNames/pt/bdt=Taka de Bangladesh
+CurrencyNames/pt/bef=Franco belga
+CurrencyNames/pt/bgl=Lev forte b\u00falgaro
+CurrencyNames/pt/bgn=Lev novo b\u00falgaro
+CurrencyNames/pt/bhd=Dinar bareinita
+CurrencyNames/pt/bif=Franco do Burundi
+CurrencyNames/pt/bmd=D\u00f3lar das Bermudas
+CurrencyNames/pt/bnd=D\u00f3lar do Brunei
+CurrencyNames/pt/bov=Mvdol boliviano
+CurrencyNames/pt/brl=Real brasileiro
+CurrencyNames/pt/bsd=D\u00f3lar das Bahamas
+CurrencyNames/pt/btn=Ngultrum do But\u00e3o
+CurrencyNames/pt/bwp=Pula botsuanesa
+CurrencyNames/pt/byb=Rublo novo bielo-russo (1994-1999)
+CurrencyNames/pt/byr=Rublo bielo-russo
+CurrencyNames/pt/bzd=D\u00f3lar do Belize
+CurrencyNames/pt/cad=D\u00f3lar canadense
+CurrencyNames/pt/cdf=Franco congol\u00eas
+CurrencyNames/pt/chf=Franco su\u00ed\u00e7o
+CurrencyNames/pt/clf=Unidades de Fomento chilenas
+CurrencyNames/pt/clp=Peso chileno
+CurrencyNames/pt/cny=Yuan Renminbi chin\u00eas
+CurrencyNames/pt/cop=Peso colombiano
+CurrencyNames/pt/crc=Colon da Costa Rica
+CurrencyNames/pt/csd=Dinar s\u00e9rvio antigo
+CurrencyNames/pt/cup=Peso cubano
+CurrencyNames/pt/cve=Escudo cabo-verdiano
+CurrencyNames/pt/cyp=Libra cipriota
+CurrencyNames/pt/czk=Coroa checa
+CurrencyNames/pt/dem=Marco alem\u00e3o
+CurrencyNames/pt/djf=Franco do Djibuti
+CurrencyNames/pt/dkk=Coroa dinamarquesa
+CurrencyNames/pt/dop=Peso dominicano
+CurrencyNames/pt/dzd=Dinar argelino
+CurrencyNames/pt/eek=Coroa estoniana
+CurrencyNames/pt/egp=Libra eg\u00edpcia
+CurrencyNames/pt/ern=Nakfa da Eritreia
+CurrencyNames/pt/esp=Peseta espanhola
+CurrencyNames/pt/etb=Birr et\u00edope
+CurrencyNames/pt/fim=Marca finlandesa
+CurrencyNames/pt/fjd=D\u00f3lar de Fiji
+CurrencyNames/pt/fkp=Libra das Malvinas
+CurrencyNames/pt/frf=Franco franc\u00eas
+CurrencyNames/pt/gbp=Libra esterlina brit\u00e2nica
+CurrencyNames/pt/gel=Lari georgiano
+CurrencyNames/pt/ghc=Cedi de Gana (1979-2007)
+CurrencyNames/pt/ghs=Cedi gan\u00eas
+CurrencyNames/pt/gip=Libra de Gibraltar
+CurrencyNames/pt/gmd=Dalasi de G\u00e2mbia
+CurrencyNames/pt/gnf=Franco de Guin\u00e9
+CurrencyNames/pt/grd=Dracma grego
+CurrencyNames/pt/gtq=Quet\u00e7al da Guatemala
+CurrencyNames/pt/gwp=Peso da Guin\u00e9-Bissau
+CurrencyNames/pt/gyd=D\u00f3lar da Guiana
+CurrencyNames/pt/hkd=D\u00f3lar de Hong Kong
+CurrencyNames/pt/hnl=Lempira de Honduras
+CurrencyNames/pt/hrk=Kuna croata
+CurrencyNames/pt/htg=Gurde do Haiti
+CurrencyNames/pt/huf=Forinte h\u00fangaro
+CurrencyNames/pt/idr=Rupia indon\u00e9sia
+CurrencyNames/pt/iep=Libra irlandesa
+CurrencyNames/pt/ils=Sheqel Novo israelita
+CurrencyNames/pt/inr=R\u00fapia indiana
+CurrencyNames/pt/iqd=Dinar iraquiano
+CurrencyNames/pt/irr=Rial iraniano
+CurrencyNames/pt/isk=Coroa islandesa
+CurrencyNames/pt/itl=Lira italiana
+CurrencyNames/pt/jmd=D\u00f3lar jamaicano
+CurrencyNames/pt/jod=Dinar jordaniano
+CurrencyNames/pt/jpy=Iene japon\u00eas
+CurrencyNames/pt/kes=Xelim queniano
+CurrencyNames/pt/kgs=Som quirguiz
+CurrencyNames/pt/khr=Riel cambojano
+CurrencyNames/pt/kmf=Franco de Comores
+CurrencyNames/pt/kpw=Won norte-coreano
+CurrencyNames/pt/krw=Won sul-coreano
+CurrencyNames/pt/kwd=Dinar coveitiano
+CurrencyNames/pt/kyd=D\u00f3lar das Ilhas Caiman
+CurrencyNames/pt/kzt=Tenge do Cazaquist\u00e3o
+CurrencyNames/pt/lak=Kip de Laos
+CurrencyNames/pt/lbp=Libra libanesa
+CurrencyNames/pt/lkr=Rupia do Sri Lanka
+CurrencyNames/pt/lrd=D\u00f3lar liberiano
+CurrencyNames/pt/lsl=Loti do Lesoto
+CurrencyNames/pt/ltl=Lita lituano
+CurrencyNames/pt/luf=Franco luxemburgu\u00eas
+CurrencyNames/pt/lvl=Lats let\u00e3o
+CurrencyNames/pt/lyd=Dinar l\u00edbio
+CurrencyNames/pt/mad=Dir\u00e9m marroquino
+CurrencyNames/pt/mdl=Leu mold\u00e1vio
+CurrencyNames/pt/mga=Ariary de Madagascar
+CurrencyNames/pt/mgf=Franco de Madagascar
+CurrencyNames/pt/mkd=Dinar maced\u00f4nio
+CurrencyNames/pt/mmk=Kyat de Mianmar
+CurrencyNames/pt/mnt=Tugrik mongol
+CurrencyNames/pt/mop=Pataca macaense
+CurrencyNames/pt/mro=Ouguiya da Maurit\u00e2nia
+CurrencyNames/pt/mtl=Lira maltesa
+CurrencyNames/pt/mur=Rupia de Maur\u00edcio
+CurrencyNames/pt/mvr=Rupias das Ilhas Maldivas
+CurrencyNames/pt/mwk=Cuacha do Mal\u00e1ui
+CurrencyNames/pt/mxn=Peso mexicano
+CurrencyNames/pt/mxv=Unidade Mexicana de Investimento (UDI)
+CurrencyNames/pt/myr=Ringgit malaio
+CurrencyNames/pt/mzm=Metical antigo de Mo\u00e7ambique
+CurrencyNames/pt/mzn=Metical do Mo\u00e7ambique
+CurrencyNames/pt/nad=D\u00f3lar da Nam\u00edbia
+CurrencyNames/pt/ngn=Naira nigeriana
+CurrencyNames/pt/nio=C\u00f3rdoba Ouro nicaraguense
+CurrencyNames/pt/nlg=Florim holand\u00eas
+CurrencyNames/pt/nok=Coroa norueguesa
+CurrencyNames/pt/npr=Rupia nepalesa
+CurrencyNames/pt/nzd=D\u00f3lar da Nova Zel\u00e2ndia
+CurrencyNames/pt/omr=Rial de Om\u00e3
+CurrencyNames/pt/pab=Balboa panamenho
+CurrencyNames/pt/pen=Sol Novo peruano
+CurrencyNames/pt/pgk=Kina da Papua-Nova Guin\u00e9
+CurrencyNames/pt/php=Peso filipino
+CurrencyNames/pt/pkr=Rupia paquistanesa
+CurrencyNames/pt/pln=Zloti polon\u00eas
+CurrencyNames/pt/pte=Escudo portugu\u00eas
+CurrencyNames/pt/pyg=Guarani paraguaio
+CurrencyNames/pt/qar=Rial catariano
+CurrencyNames/pt/rol=Leu romeno antigo
+CurrencyNames/pt/ron=Leu romeno
+CurrencyNames/pt/rsd=Dinar s\u00e9rvio
+CurrencyNames/pt/rub=Rublo russo
+CurrencyNames/pt/rur=Rublo russo (1991-1998)
+CurrencyNames/pt/rwf=Franco ruand\u00eas
+CurrencyNames/pt/sar=Rial saudita
+CurrencyNames/pt/sbd=D\u00f3lar das Ilhas Salom\u00e3o
+CurrencyNames/pt/scr=Rupia das Seychelles
+CurrencyNames/pt/sdd=Dinar sudan\u00eas
+CurrencyNames/pt/sdg=Libra sudanesa
+CurrencyNames/pt/sek=Coroa sueca
+CurrencyNames/pt/sgd=D\u00f3lar de Cingapura
+CurrencyNames/pt/shp=Libra de Santa Helena
+CurrencyNames/pt/sit=Tolar Bons esloveno
+CurrencyNames/pt/skk=Coroa eslovaca
+CurrencyNames/pt/sll=Leone de Serra Leoa
+CurrencyNames/pt/sos=Xelim somali
+CurrencyNames/pt/srd=D\u00f3lar do Suriname
+CurrencyNames/pt/srg=Florim do Suriname
+CurrencyNames/pt/std=Dobra de S\u00e3o Tom\u00e9 e Pr\u00edncipe
+CurrencyNames/pt/svc=Colom salvadorenho
+CurrencyNames/pt/syp=Libra s\u00edria
+CurrencyNames/pt/szl=Lilangeni da Suazil\u00e2ndia
+CurrencyNames/pt/thb=Baht tailand\u00eas
+CurrencyNames/pt/tjs=Somoni tadjique
+CurrencyNames/pt/tmm=Manat do Turcomenist\u00e3o
+CurrencyNames/pt/tnd=Dinar tunisiano
+CurrencyNames/pt/top=Pa\u02bbanga de Tonga
+CurrencyNames/pt/tpe=Escudo timorense
+CurrencyNames/pt/trl=Lira turca antiga
+CurrencyNames/pt/try=Lira turca
+CurrencyNames/pt/ttd=D\u00f3lar de Trinidad e Tobago
+CurrencyNames/pt/twd=D\u00f3lar Novo de Taiwan
+CurrencyNames/pt/tzs=Xelim da Tanz\u00e2nia
+CurrencyNames/pt/uah=Hryvnia ucraniano
+CurrencyNames/pt/ugx=Xelim ugandense
+CurrencyNames/pt/usd=D\u00f3lar norte-americano
+CurrencyNames/pt/usn=D\u00f3lar norte-americano (Dia seguinte)
+CurrencyNames/pt/uss=D\u00f3lar norte-americano (Mesmo dia)
+CurrencyNames/pt/uyu=Peso uruguaio
+CurrencyNames/pt/uzs=Sum do Usbequist\u00e3o
+CurrencyNames/pt/veb=Bol\u00edvar venezuelano
+CurrencyNames/pt/vef=Bol\u00edvar v enezuelano forte
+CurrencyNames/pt/vnd=Dong vietnamita
+CurrencyNames/pt/vuv=Vatu de Vanuatu
+CurrencyNames/pt/wst=Tala samoano
+CurrencyNames/pt/xaf=Franco CFA BEAC
+CurrencyNames/pt/xag=Prata
+CurrencyNames/pt/xau=Ouro
+CurrencyNames/pt/xba=Unidade Composta Europeia
+CurrencyNames/pt/xbb=Unidade Monet\u00e1ria Europeia
+CurrencyNames/pt/xbc=Unidade de Conta Europeia (XBC)
+CurrencyNames/pt/xbd=Unidade de Conta Europeia (XBD)
+CurrencyNames/pt/xcd=D\u00f3lar do Caribe Oriental
+CurrencyNames/pt/xdr=Direitos Especiais de Giro
+CurrencyNames/pt/xfo=Franco-ouro franc\u00eas
+CurrencyNames/pt/xfu=Franco UIC franc\u00eas
+CurrencyNames/pt/xof=Franco CFA BCEAO
+CurrencyNames/pt/xpd=Pal\u00e1dio
+CurrencyNames/pt/xpf=Franco CFP
+CurrencyNames/pt/xpt=Platina
+CurrencyNames/pt/xts=C\u00f3digo de Moeda de Teste
+CurrencyNames/pt/xxx=Moeda Desconhecida ou Inv\u00e1lida
+CurrencyNames/pt/yer=Rial iemenita
+CurrencyNames/pt/yum=Dinar noviy iugoslavo
+CurrencyNames/pt/zar=Rand sul-africano
+CurrencyNames/pt/zmk=Cuacha zambiano
+CurrencyNames/pt/zwd=D\u00f3lar do Zimb\u00e1bue
+
+# bug 7020960
+CurrencyNames/sr_RS/RSD=\u0434\u0438\u043d.
+
+# bug 7025837
+CurrencyNames/sr-Latn-BA/bam=Bosansko-Hercegova\u010dka konvertibilna marka
+CurrencyNames/sr-Latn-BA/eur=Evro
+CurrencyNames/sr-Latn-ME/eur=Evro
+CurrencyNames/sr-Latn-RS/rsd=Srpski dinar
+
+CurrencyNames//afa=Afghan Afghani (1927-2002)
+CurrencyNames//afn=Afghan Afghani
+CurrencyNames//ang=Netherlands Antillean Guilder
+CurrencyNames//awg=Aruban Florin
+CurrencyNames//azm=Azerbaijani Manat (1993-2006)
+CurrencyNames//azn=Azerbaijani Manat
+CurrencyNames//bbd=Barbadian Dollar
+CurrencyNames//bdt=Bangladeshi Taka
+CurrencyNames//bgn=Bulgarian Lev
+CurrencyNames//bif=Burundian Franc
+CurrencyNames//bob=Bolivian Boliviano
+CurrencyNames//btn=Bhutanese Ngultrum
+CurrencyNames//byb=Belarusian New Ruble (1994-1999)
+CurrencyNames//byr=Belarusian Ruble
+CurrencyNames//cdf=Congolese Franc
+CurrencyNames//clf=Chilean Unit of Account (UF)
+CurrencyNames//cny=Chinese Yuan
+CurrencyNames//crc=Costa Rican Col\u00f3n
+CurrencyNames//csd=Serbian Dinar (2002-2006)
+CurrencyNames//cve=Cape Verdean Escudo
+CurrencyNames//cyp=Cypriot Pound
+CurrencyNames//dem=German Mark
+CurrencyNames//djf=Djiboutian Franc
+CurrencyNames//fjd=Fijian Dollar
+CurrencyNames//ghc=Ghanaian Cedi (1979-2007)
+CurrencyNames//ghs=Ghanaian Cedi
+CurrencyNames//gmd=Gambian Dalasi
+CurrencyNames//gnf=Guinean Franc
+CurrencyNames//gtq=Guatemalan Quetzal
+CurrencyNames//gyd=Guyanaese Dollar
+CurrencyNames//hnl=Honduran Lempira
+CurrencyNames//isk=Icelandic Kr\u00f3na
+CurrencyNames//kgs=Kyrgystani Som
+CurrencyNames//kmf=Comorian Franc
+CurrencyNames//kzt=Kazakhstani Tenge
+CurrencyNames//lkr=Sri Lankan Rupee
+CurrencyNames//ltl=Lithuanian Litas
+CurrencyNames//luf=Luxembourgian Franc
+CurrencyNames//mga=Malagasy Ariary
+CurrencyNames//mgf=Malagasy Franc
+CurrencyNames//mmk=Myanma Kyat
+CurrencyNames//mop=Macanese Pataca
+CurrencyNames//mro=Mauritanian Ouguiya
+CurrencyNames//mur=Mauritian Rupee
+CurrencyNames//mvr=Maldivian Rufiyaa
+CurrencyNames//mwk=Malawian Kwacha
+CurrencyNames//mxv=Mexican Investment Unit
+CurrencyNames//mzm=Mozambican Metical (1980-2006)
+CurrencyNames//mzn=Mozambican Metical
+CurrencyNames//nad=Namibian Dollar
+CurrencyNames//nio=Nicaraguan C\u00f3rdoba
+CurrencyNames//nlg=Dutch Guilder
+CurrencyNames//omr=Omani Rial
+CurrencyNames//pen=Peruvian Nuevo Sol
+CurrencyNames//pgk=Papua New Guinean Kina
+CurrencyNames//pkr=Pakistani Rupee
+CurrencyNames//pyg=Paraguayan Guarani
+CurrencyNames//rol=Romanian Leu (1952-2006)
+CurrencyNames//rsd=Serbian Dinar
+CurrencyNames//scr=Seychellois Rupee
+CurrencyNames//sdd=Sudanese Dinar (1992-2007)
+CurrencyNames//sit=Slovenian Tolar
+CurrencyNames//sll=Sierra Leonean Leone
+CurrencyNames//srd=Surinamese Dollar
+CurrencyNames//srg=Surinamese Guilder
+CurrencyNames//std=S\u00e3o Tom\u00e9 and Pr\u00edncipe Dobra
+CurrencyNames//svc=Salvadoran Col\u00f3n
+CurrencyNames//szl=Swazi Lilangeni
+CurrencyNames//tjs=Tajikistani Somoni
+CurrencyNames//tmm=Turkmenistani Manat (1993-2009)
+CurrencyNames//top=Tongan Pa\u02bbanga
+CurrencyNames//tpe=Timorese Escudo
+CurrencyNames//trl=Turkish Lira (1922-2005)
+CurrencyNames//try=Turkish Lira
+CurrencyNames//twd=New Taiwan Dollar
+CurrencyNames//uyu=Uruguayan Peso
+CurrencyNames//uzs=Uzbekistan Som
+CurrencyNames//veb=Venezuelan Bol\u00edvar (1871-2008)
+CurrencyNames//vef=Venezuelan Bol\u00edvar
+CurrencyNames//wst=Samoan Tala
+CurrencyNames//xxx=Unknown Currency
+CurrencyNames//yum=Yugoslavian New Dinar (1994-2002)
+CurrencyNames//zwd=Zimbabwean Dollar (1980-2008)
--- a/test/sun/text/resources/LocaleDataTest.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/text/resources/LocaleDataTest.java	Wed Apr 20 04:38:36 2011 +0100
@@ -33,7 +33,7 @@
  *      6379214 6485516 6486607 4225362 4494727 6533691 6531591 6531593 6570259
  *      6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611
  *      6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
- *      6919624
+ *      6919624 6998391 7019267 7020960 7025837
  * @summary Verify locale data
  *
  */
@@ -91,6 +91,10 @@
  *        LocaleNames/fr_FR/US=\u00c9tats-Unis
  *        LocaleNames/fr_FR/FR=France</pre>
  *
+ *    You can use language tag with '-' in locale field like this:<pre>
+ *        LocaleNames/sr-Latn/SR=Surinam
+ *        FormatData/sr-Latn-BA/DayNames/2=utorak</pre>
+ *
  *    The command-line syntax of this test is
  *        <tt>java LocaleDataTest [-w] [{ -s | <filename> }]</tt>
  *
@@ -242,7 +246,9 @@
         if (index == -1 || index + 1 == key.length())
             throw new Exception("Malformed input file: \"" + key + "\" is missing locale name");
         localeName = key.substring(oldIndex, index);
-        if (localeName.length() > 0) {
+        boolean use_tag = localeName.indexOf("-") != -1;
+
+        if (use_tag == false && localeName.length() > 0) {
             language = localeName.substring(0, 2);
             if (localeName.length() > 3) {
                 country = localeName.substring(3, 5);
@@ -283,8 +289,14 @@
             } else {
                 fullName = "sun.text.resources." + rbName;
             }
+            Locale locale;
+            if (use_tag) {
+                locale = Locale.forLanguageTag(localeName);
+            } else {
+                locale = new Locale(language, country, variant);
+            }
             ResourceBundle bundle = ResourceBundle.getBundle(fullName,
-                           new Locale(language, country, variant),
+                           locale,
                            ResourceBundle.Control.getNoFallbackControl(Control.FORMAT_DEFAULT));
             resource = bundle.getObject(resTag);
         }
--- a/test/sun/tools/native2ascii/Native2AsciiTests.sh	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/sun/tools/native2ascii/Native2AsciiTests.sh	Wed Apr 20 04:38:36 2011 +0100
@@ -24,7 +24,7 @@
 #
 
 # @test
-# @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817
+# @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817 7021987
 # @summary Tests miscellaneous native2ascii bugfixes and regressions
 
 
@@ -100,6 +100,15 @@
 $N2A -reverse -encoding MS932 $TESTSRC/A2N_4701617 x.out
 check 4701617 $TESTSRC/A2N_4701617.expected x.out
 
+# Check that the inputfile appears in the error message when not found
+
+badin="DoesNotExist"
+$N2A $badin x.out | grep "$badin" > /dev/null
+if [ $? != 0 ]; then
+    echo "\"$badin\" expected to appear in error message"
+    exit 1
+fi
+
 # for win32 only ensure when output file pre-exists that
 # native2ascii tool will simply overwrite with the expected
 # output file (fixed bugID 4710890)
--- a/test/tools/launcher/MiscTests.java	Mon Nov 01 11:32:50 2010 -0400
+++ b/test/tools/launcher/MiscTests.java	Wed Apr 20 04:38:36 2011 +0100
@@ -23,8 +23,8 @@
 
 /*
  * @test
- * @bug 6856415 6981001
- * @summary Miscellaneous tests, Exceptions, EnsureJRE etc.
+ * @bug 6856415
+ * @summary Miscellaneous tests, Exceptions
  * @compile -XDignore.symbol.file MiscTests.java TestHelper.java
  * @run main MiscTests
  */
@@ -32,9 +32,6 @@
 
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.util.HashMap;
-import java.util.Map;
-
 
 public class MiscTests {
 
@@ -67,22 +64,9 @@
             System.out.println(tr.status);
         }
     }
-    // 6981001 : Check EnsureJreInstallation is ok, note we cannot
-    // thoroughly test this function, we simply do our best.
-    static void test6981001() {
-        if (TestHelper.is64Bit || !TestHelper.isWindows) {
-            return;
-        }
-        Map<String, String> env = new HashMap<String, String>();
-        env.put("_JAVA_LAUNCHER_DEBUG", "true");
-        TestHelper.TestResult tr = TestHelper.doExec(env, TestHelper.javaCmd);
-        if (!tr.contains(TestHelper.JAVAHOME + "\\lib\\bundles")) {
-            System.out.println(tr.status);
-        }
-    }
+
     public static void main(String... args) {
         test6856415();
-        test6981001();
         if (TestHelper.testExitValue != 0) {
             throw new Error(TestHelper.testExitValue + " tests failed");
     }