changeset 52923:f2da31f2dc71 condy-folding

manual merge with jep-334
author vromero
date Fri, 26 Oct 2018 14:17:41 -0400
parents b273792ba635 9b2652a213e2
children 7842dfb9712e
files src/java.base/share/classes/java/lang/Enum.java src/java.base/share/classes/java/lang/constant/ClassDesc.java src/java.base/share/classes/java/lang/constant/Constable.java src/java.base/share/classes/java/lang/constant/ConstantDesc.java src/java.base/share/classes/java/lang/constant/ConstantDescs.java src/java.base/share/classes/java/lang/constant/DirectMethodHandleDesc.java src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java src/java.base/share/classes/java/lang/constant/package-info.java src/java.base/share/classes/java/lang/invoke/VarHandle.java src/java.base/share/classes/module-info.java test/jdk/java/lang/constant/TypeDescriptorTest.java
diffstat 29 files changed, 283 insertions(+), 253 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Fri Oct 26 14:17:41 2018 -0400
@@ -552,7 +552,7 @@
                 if (Utils.SORT_MEMBERS_DESCR_MAJOR)
                     // descRef is transmitted as UDELTA5; sort it first?
                     x = this.descRef.compareTo(that.descRef);
-                // Primary key is classRef.
+                // Primary key is classDesc.
                 if (x == 0)
                     x = this.classRef.compareTo(that.classRef);
                 if (x == 0)
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Oct 26 14:17:41 2018 -0400
@@ -2194,7 +2194,7 @@
                         }
                         buf[pc++] = (byte) origBC;
                         int coding = bc_initref.getInt();
-                        // Find the nth overloading of <init> in classRef.
+                        // Find the nth overloading of <init> in classDesc.
                         MemberEntry ref = pkg.cp.getOverloadingForIndex(CONSTANT_Methodref, classRef, "<init>", coding);
                         fixupBuf.addU2(pc, ref);
                         buf[pc+0] = buf[pc+1] = 0;
--- a/src/java.base/share/classes/java/lang/Enum.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/Enum.java	Fri Oct 26 14:17:41 2018 -0400
@@ -281,6 +281,8 @@
      * {@code enum} constant.
      *
      * @param <E> the type of the enum constant
+     *
+     * @since 12
      */
     public static final class EnumDesc<E extends Enum<E>>
             extends DynamicConstantDesc<E> {
--- a/src/java.base/share/classes/java/lang/constant/ClassDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/ClassDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -56,6 +56,8 @@
  * {@linkplain ClassDesc} directly.
  *
  * @see ConstantDescs
+ *
+ * @since 12
  */
 public interface ClassDesc
         extends ConstantDesc<Class<?>>,
--- a/src/java.base/share/classes/java/lang/constant/Constable.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/Constable.java	Fri Oct 26 14:17:41 2018 -0400
@@ -62,6 +62,8 @@
  * @jvms 4.4.10 The CONSTANT_InvokeDynamic_info Structure
  *
  * @param <T> the type of the constant value
+ *
+ * @since 12
  */
 public interface Constable<T> {
     /**
--- a/src/java.base/share/classes/java/lang/constant/ConstantDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/ConstantDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -86,6 +86,8 @@
  * @see ConstantDescs
  *
  * @jvms 4.4 The Constant Pool
+ *
+ * @since 12
  */
 public interface ConstantDesc<T> {
     /**
--- a/src/java.base/share/classes/java/lang/constant/ConstantDescs.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/ConstantDescs.java	Fri Oct 26 14:17:41 2018 -0400
@@ -49,6 +49,8 @@
  * bootstrap methods.
  *
  * @see ConstantDesc
+ *
+ * @since 12
  */
 public final class ConstantDescs {
     // No instances
@@ -213,24 +215,24 @@
     private static final ClassDesc[] INDY_BOOTSTRAP_ARGS = {
             ConstantDescs.CD_MethodHandles_Lookup,
             ConstantDescs.CD_String,
-            ConstantDescs.CD_MethodType };
+            ConstantDescs.CD_MethodType};
 
     private static final ClassDesc[] CONDY_BOOTSTRAP_ARGS = {
             ConstantDescs.CD_MethodHandles_Lookup,
             ConstantDescs.CD_String,
-            ConstantDescs.CD_Class };
+            ConstantDescs.CD_Class};
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#primitiveClass(Lookup, String, Class)} */
     @Foldable
     public static final DirectMethodHandleDesc BSM_PRIMITIVE_CLASS
             = ofConstantBootstrap(CD_ConstantBootstraps, "primitiveClass",
-                                  CD_Class);
+            CD_Class);
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#enumConstant(Lookup, String, Class)} */
     @Foldable
     public static final DirectMethodHandleDesc BSM_ENUM_CONSTANT
             = ofConstantBootstrap(CD_ConstantBootstraps, "enumConstant",
-                                  CD_Enum);
+            CD_Enum);
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#nullConstant(Lookup, String, Class)} */
     @Foldable
@@ -242,25 +244,25 @@
     @Foldable
     public static final DirectMethodHandleDesc BSM_VARHANDLE_FIELD
             = ofConstantBootstrap(CD_ConstantBootstraps, "fieldVarHandle",
-                                  CD_VarHandle, CD_Class, CD_Class);
+            CD_VarHandle, CD_Class, CD_Class);
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#staticFieldVarHandle(Lookup, String, Class, Class, Class)} */
     @Foldable
     public static final DirectMethodHandleDesc BSM_VARHANDLE_STATIC_FIELD
             = ofConstantBootstrap(CD_ConstantBootstraps, "staticFieldVarHandle",
-                                  CD_VarHandle, CD_Class, CD_Class);
+            CD_VarHandle, CD_Class, CD_Class);
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#arrayVarHandle(Lookup, String, Class, Class)} */
     @Foldable
     public static final DirectMethodHandleDesc BSM_VARHANDLE_ARRAY
             = ofConstantBootstrap(CD_ConstantBootstraps, "arrayVarHandle",
-                                  CD_VarHandle, CD_Class);
+            CD_VarHandle, CD_Class);
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#invoke(Lookup, String, Class, MethodHandle, Object...)} */
     @Foldable
     public static final DirectMethodHandleDesc BSM_INVOKE
             = ofConstantBootstrap(CD_ConstantBootstraps, "invoke",
-                                  CD_Object, CD_MethodHandle, CD_Object.arrayType());
+            CD_Object, CD_MethodHandle, CD_Object.arrayType());
 
     /** {@link ClassDesc} representing the primitive type {@code int} */
     @Foldable
--- a/src/java.base/share/classes/java/lang/constant/DirectMethodHandleDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/DirectMethodHandleDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -52,6 +52,8 @@
  * may become a {@code sealed} interface, which would prohibit subclassing except
  * by explicitly permitted types.  Non-platform classes should not implement
  * {@linkplain DirectMethodHandleDesc} directly.
+ *
+ * @since 12
  */
 public interface DirectMethodHandleDesc extends MethodHandleDesc {
     /**
@@ -110,18 +112,24 @@
         }
 
         /**
-         * Find the enumeration member with the given {@code refKind} and
-         * {@code isInterface} fields. If {@code isInterface} is true and there
-         * is no such enumeration member, return the member, if any, with the
-         * same {@code refKind} and a false {@code isInterface} field. If
-         * {@code isInterface} is true but there is no such enumeration member,
-         * then the result of {@code valueOf(refKind, false)} is returned.  As
-         * a special case, if {@code refKind} is {@code REF_invokeVirtual} (5) and
-         * {@code isInterface} is true, then the result of
-         * {@code valueOf(REF_invokeInterface, false)} is returned, and if
-         * {@code isInterface} is false and {@code refKind} is {@code REF_invokeInterface},
-         * {@code INTERFACE_VIRTUAL} is returned.
-         *
+         * Find the enumeration member with the given the {@code refKind} and
+         * {@code isInterface} arguments.
+         * For most values of {@code refKind} there is an exact match regardless of the value of {@code isInterface}.
+         * These are:
+         * <UL>
+         *     <LI>{@code REF_invokeVirtual} which matches to {@code VIRTUAL}
+         *     <LI>{@code REF_invokeInterface} which matches to {@code INTERFACE_VIRTUAL}
+         *     <LI>{@code REF_newInvokeSpecial} which matches to {@code CONSTRUCTOR}
+         *     <LI>{@code REF_getField} which matches to {@code GETTER}
+         *     <LI>{@code REF_putField} which matches to {@code SETTER}
+         *     <LI>{@code REF_getStatic} which matches to {@code STATIC_GETTER}
+         *     <LI>{@code REF_putStatic} which matches to {@code STATIC_SETTER}
+         * </UL>
+         * As for the rest, the returned kind will depend on the value (false or true accordingly) of {@code isInterface}:
+         * <UL>
+         *     <LI>{@code REF_invokeStatic} which matches to {@code STATIC} or {@code INTERFACE_STATIC}
+         *     <LI>{@code REF_invokeSpecial} which matches to {@code SPECIAL} or {@code INTERFACE_SPECIAL}
+         * </UL>
          * @param refKind refKind of desired member
          * @param isInterface whether desired member is for interface methods
          * @return the matching enumeration member
@@ -131,16 +139,14 @@
             int i = tableIndex(refKind, isInterface);
             if (i >= 0 && i < TABLE.length) {
                 Kind kind = TABLE[i];
+                if (kind == null) {
+                    throw new IllegalArgumentException(String.format("refKind=%d", refKind));
+                }
                 if (kind.refKind == refKind && kind.isInterface == isInterface) {
                     return kind;
                 }
             }
-            if (isInterface)
-                return valueOf(refKind);
-            else if (refKind == REF_invokeInterface)
-                return INTERFACE_VIRTUAL;
-            else
-                throw new IllegalArgumentException(String.format("refKind=%d", refKind));
+            throw new IllegalArgumentException(String.format("refKind=%d", refKind));
         }
 
         private static int tableIndex(int refKind, boolean isInterface) {
@@ -154,7 +160,7 @@
             // Pack the static table.
             int max = 0;
             for (Kind k : values())
-                max = Math.max(max, tableIndex(k.refKind, k.isInterface));
+                max = Math.max(max, tableIndex(k.refKind, true));
 
             TABLE = new Kind[max+1];
             for (Kind kind : values()) {
--- a/src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -45,6 +45,8 @@
  *
  * <p>Concrete subtypes of {@linkplain DynamicCallSiteDesc} must be
  * <a href="../doc-files/ValueBased.html">value-based</a>.
+ *
+ * @since 12
  */
 public class DynamicCallSiteDesc {
 
--- a/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -60,6 +60,8 @@
  * <a href="../doc-files/ValueBased.html">value-based</a>.
  *
  * @param <T> the type of the dynamic constant
+ *
+ * @since 12
  */
 public abstract class DynamicConstantDesc<T>
         implements ConstantDesc<T>, Constable<ConstantDesc<T>> {
--- a/src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -40,6 +40,8 @@
  * may become a {@code sealed} interface, which would prohibit subclassing except
  * by explicitly permitted types.  Non-platform classes should not implement
  * {@linkplain MethodHandleDesc} directly.
+ *
+ * @since 12
  */
 public interface MethodHandleDesc
         extends ConstantDesc<MethodHandle>, Constable<ConstantDesc<MethodHandle>> {
--- a/src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java	Fri Oct 26 14:17:41 2018 -0400
@@ -43,6 +43,8 @@
  * may become a {@code sealed} interface, which would prohibit subclassing except
  * by explicitly permitted types.  Non-platform classes should not implement
  * {@linkplain MethodTypeDesc} directly.
+ *
+ * @since 12
  */
 public interface MethodTypeDesc
         extends ConstantDesc<MethodType>,
--- a/src/java.base/share/classes/java/lang/constant/package-info.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/constant/package-info.java	Fri Oct 26 14:17:41 2018 -0400
@@ -90,6 +90,7 @@
  * reading and writing APIs.
  *
  * @jvms 4.4 The Constant Pool
+ *
+ * @since 12
  */
 package java.lang.constant;
-
--- a/src/java.base/share/classes/java/lang/invoke/TypeDescriptor.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/invoke/TypeDescriptor.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,3 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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.List;
@@ -6,6 +30,8 @@
  * An entity that has a field or method type descriptor, as per JVMS 4.3.2 or 4.3.3.
  * @jvms 4.3.2 Field Descriptors
  * @jvms 4.3.3 Method Descriptors
+ *
+ * @since 12
  */
 public interface TypeDescriptor {
     /**
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1885,8 +1885,6 @@
 
     @Override
     public final String toString() {
-        // @@@ defer to concrete type for additional description
-        // see https://bugs.openjdk.java.net/browse/JDK-8199149
         return String.format("VarHandle[varType=%s, coord=%s]",
                              varType().getName(),
                              coordinateTypes());
@@ -2127,6 +2125,8 @@
     /**
      * A <a href="package-summary.html#nominal">nominal descriptor</a> for a
      * {@link VarHandle} constant.
+     *
+     * @since 12
      */
     public static final class VarHandleDesc extends DynamicConstantDesc<VarHandle> {
 
@@ -2134,17 +2134,14 @@
          * Kinds of variable handle descs
          */
         private enum Kind {
-            FIELD(ConstantDescs.BSM_VARHANDLE_FIELD, ConstantDescs.MHD_VARHANDLEDESC_OFFIELD),
-            STATIC_FIELD(ConstantDescs.BSM_VARHANDLE_STATIC_FIELD, ConstantDescs.MHD_VARHANDLEDESC_OFSTATIC),
-            ARRAY(ConstantDescs.BSM_VARHANDLE_ARRAY, ConstantDescs.MHD_VARHANDLEDESC_OFARRAY);
+            FIELD(ConstantDescs.BSM_VARHANDLE_FIELD),
+            STATIC_FIELD(ConstantDescs.BSM_VARHANDLE_STATIC_FIELD),
+            ARRAY(ConstantDescs.BSM_VARHANDLE_ARRAY);
 
             final DirectMethodHandleDesc bootstrapMethod;
-            final DirectMethodHandleDesc descFactory;
 
-            Kind(DirectMethodHandleDesc bootstrapMethod,
-                 DirectMethodHandleDesc descFactory) {
+            Kind(DirectMethodHandleDesc bootstrapMethod) {
                 this.bootstrapMethod = bootstrapMethod;
-                this.descFactory = descFactory;
             }
 
             ConstantDesc<?>[] toBSMArgs(ClassDesc declaringClass, String name, ClassDesc varType) {
--- a/src/java.base/share/classes/module-info.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/src/java.base/share/classes/module-info.java	Fri Oct 26 14:17:41 2018 -0400
@@ -79,11 +79,11 @@
     exports java.io;
     exports java.lang;
     exports java.lang.annotation;
+    exports java.lang.constant;
     exports java.lang.invoke;
     exports java.lang.module;
     exports java.lang.ref;
     exports java.lang.reflect;
-    exports java.lang.constant;
     exports java.math;
     exports java.net;
     exports java.net.spi;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003.java	Fri Oct 26 14:17:41 2018 -0400
@@ -219,7 +219,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalue003aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalue003aTestClass : ReferenceType classDesc");
 
             classes   = vm.classesByName(testedClassName);
             classRef  = (ReferenceType) classes.get(0);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001.java	Fri Oct 26 14:17:41 2018 -0400
@@ -205,7 +205,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalues001aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalues001aTestClass : ReferenceType classDesc");
 
             classes      = vm.classesByName(testedClassName);
             testedClass  = (ReferenceType) classes.get(0);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002.java	Fri Oct 26 14:17:41 2018 -0400
@@ -205,7 +205,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalues002aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalues002aTestClass : ReferenceType classDesc");
 
             classes      = vm.classesByName(testedClassName);
             testedClass  = (ReferenceType) classes.get(0);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003.java	Fri Oct 26 14:17:41 2018 -0400
@@ -209,7 +209,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalues003aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalues003aTestClass : ReferenceType classDesc");
 
             classes      = vm.classesByName(testedClass1Name);
             testedClass  = (ReferenceType) classes.get(0);
--- a/test/jdk/java/lang/constant/ClassDescTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/ClassDescTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
@@ -51,7 +49,7 @@
 @Test
 public class ClassDescTest extends SymbolicDescTest {
 
-    private void testClassRef(ClassDesc r) throws ReflectiveOperationException {
+    private void testClassDesc(ClassDesc r) throws ReflectiveOperationException {
         testSymbolicDesc(r);
 
         // Test descriptor accessor, factory, equals
@@ -72,8 +70,8 @@
         }
     }
 
-    private void testClassRef(ClassDesc r, Class<?> c) throws ReflectiveOperationException {
-        testClassRef(r);
+    private void testClassDesc(ClassDesc r, Class<?> c) throws ReflectiveOperationException {
+        testClassDesc(r);
 
         assertEquals(r.resolveConstantDesc(LOOKUP), c);
         assertEquals(c.describeConstable().orElseThrow(), r);
@@ -90,7 +88,7 @@
                     && ((f.getModifiers() & Modifier.PUBLIC) != 0)) {
                     ClassDesc cr = (ClassDesc) f.get(null);
                     Class c = cr.resolveConstantDesc(MethodHandles.lookup());
-                    testClassRef(cr, c);
+                    testClassDesc(cr, c);
                     ++tested;
                 }
             }
@@ -103,58 +101,58 @@
         assertTrue(tested > 0);
     }
 
-    public void testPrimitiveClassRef() throws ReflectiveOperationException {
+    public void testPrimitiveClassDesc() throws ReflectiveOperationException {
         for (Primitives p : Primitives.values()) {
-            List<ClassDesc> refs = List.of(ClassDesc.ofDescriptor(p.descriptor),
-                                           p.classRef,
+            List<ClassDesc> descs = List.of(ClassDesc.ofDescriptor(p.descriptor),
+                                           p.classDesc,
                                            (ClassDesc) p.clazz.describeConstable().orElseThrow());
-            for (ClassDesc c : refs) {
-                testClassRef(c, p.clazz);
+            for (ClassDesc c : descs) {
+                testClassDesc(c, p.clazz);
                 assertTrue(c.isPrimitive());
                 assertEquals(p.descriptor, c.descriptorString());
                 assertEquals(p.name, c.displayName());
-                refs.forEach(cc -> assertEquals(c, cc));
+                descs.forEach(cc -> assertEquals(c, cc));
                 if (p != Primitives.VOID) {
-                    testClassRef(c.arrayType(), p.arrayClass);
+                    testClassDesc(c.arrayType(), p.arrayClass);
                     assertEquals(c, ((ClassDesc) p.arrayClass.describeConstable().orElseThrow()).componentType());
-                    assertEquals(c, p.classRef.arrayType().componentType());
+                    assertEquals(c, p.classDesc.arrayType().componentType());
                 }
             }
 
             for (Primitives other : Primitives.values()) {
                 ClassDesc otherDescr = ClassDesc.ofDescriptor(other.descriptor);
                 if (p != other)
-                    refs.forEach(c -> assertNotEquals(c, otherDescr));
+                    descs.forEach(c -> assertNotEquals(c, otherDescr));
                 else
-                    refs.forEach(c -> assertEquals(c, otherDescr));
+                    descs.forEach(c -> assertEquals(c, otherDescr));
             }
         }
     }
 
-    public void testSimpleClassRef() throws ReflectiveOperationException {
+    public void testSimpleClassDesc() throws ReflectiveOperationException {
 
-        List<ClassDesc> stringClassRefs = Arrays.asList(ClassDesc.ofDescriptor("Ljava/lang/String;"),
+        List<ClassDesc> stringClassDescs = Arrays.asList(ClassDesc.ofDescriptor("Ljava/lang/String;"),
                                                         ClassDesc.of("java.lang", "String"),
                                                         ClassDesc.of("java.lang.String"),
                                                         ClassDesc.of("java.lang.String").arrayType().componentType(),
                                                         String.class.describeConstable().orElseThrow());
-        for (ClassDesc r : stringClassRefs) {
-            testClassRef(r, String.class);
+        for (ClassDesc r : stringClassDescs) {
+            testClassDesc(r, String.class);
             assertFalse(r.isPrimitive());
             assertEquals("Ljava/lang/String;", r.descriptorString());
             assertEquals("String", r.displayName());
             assertEquals(r.arrayType().resolveConstantDesc(LOOKUP), String[].class);
-            stringClassRefs.forEach(rr -> assertEquals(r, rr));
+            stringClassDescs.forEach(rr -> assertEquals(r, rr));
         }
 
-        testClassRef(ClassDesc.of("java.lang.String").arrayType(), String[].class);
-        testClassRef(ClassDesc.of("java.util.Map").inner("Entry"), Map.Entry.class);
+        testClassDesc(ClassDesc.of("java.lang.String").arrayType(), String[].class);
+        testClassDesc(ClassDesc.of("java.util.Map").inner("Entry"), Map.Entry.class);
 
-        ClassDesc thisClassRef = ClassDesc.ofDescriptor("LClassDescTest;");
-        assertEquals(thisClassRef, ClassDesc.of("", "ClassDescTest"));
-        assertEquals(thisClassRef, ClassDesc.of("ClassDescTest"));
-        assertEquals(thisClassRef.displayName(), "ClassDescTest");
-        testClassRef(thisClassRef, ClassDescTest.class);
+        ClassDesc thisClassDesc = ClassDesc.ofDescriptor("LClassDescTest;");
+        assertEquals(thisClassDesc, ClassDesc.of("", "ClassDescTest"));
+        assertEquals(thisClassDesc, ClassDesc.of("ClassDescTest"));
+        assertEquals(thisClassDesc.displayName(), "ClassDescTest");
+        testClassDesc(thisClassDesc, ClassDescTest.class);
     }
 
     private void testBadPackageName(ClassDesc cr) {
@@ -187,15 +185,15 @@
         }
     }
 
-    public void testArrayClassRef() throws ReflectiveOperationException {
+    public void testArrayClassDesc() throws ReflectiveOperationException {
         for (String d : basicDescs) {
             ClassDesc a0 = ClassDesc.ofDescriptor(d);
             ClassDesc a1 = a0.arrayType();
             ClassDesc a2 = a1.arrayType();
 
-            testClassRef(a0);
-            testClassRef(a1);
-            testClassRef(a2);
+            testClassDesc(a0);
+            testClassDesc(a1);
+            testClassDesc(a2);
             assertFalse(a0.isArray());
             assertTrue(a1.isArray());
             assertTrue(a2.isArray());
@@ -224,7 +222,7 @@
         }
     }
 
-    public void testBadClassRefs() {
+    public void testBadClassDescs() {
         List<String> badDescriptors = List.of("II", "I;", "Q", "L",
                                               "java.lang.String", "[]", "Ljava/lang/String",
                                               "Ljava.lang.String;", "java/lang/String");
--- a/test/jdk/java/lang/constant/CondyDescTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/CondyDescTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
@@ -65,13 +63,13 @@
         assertEquals(r.resolveConstantDesc(LOOKUP), c);
     }
 
-    private void testVarHandleRef(DynamicConstantDesc<VarHandle> r, VarHandle vh) throws ReflectiveOperationException  {
+    private void testVarHandleDesc(DynamicConstantDesc<VarHandle> r, VarHandle vh) throws ReflectiveOperationException  {
         testSymbolicDesc(r);
         assertEquals(r.resolveConstantDesc(LOOKUP), vh);
         assertEquals(vh.describeConstable().orElseThrow(), r);
     }
 
-    private static<E extends Enum<E>> void testEnumRef(EnumDesc<E> r, E e) throws ReflectiveOperationException {
+    private static<E extends Enum<E>> void testEnumDesc(EnumDesc<E> r, E e) throws ReflectiveOperationException {
         testSymbolicDesc(r);
 
         assertEquals(r, EnumDesc.of(r.constantType(), r.constantName()));
@@ -89,9 +87,9 @@
     }
 
     public void testDynamicConstant() throws ReflectiveOperationException {
-        DirectMethodHandleDesc bsmRef = ConstantDescs.ofConstantBootstrap(ClassDesc.of("CondyDescTest"), "concatBSM",
+        DirectMethodHandleDesc bsmDesc = ConstantDescs.ofConstantBootstrap(ClassDesc.of("CondyDescTest"), "concatBSM",
                                                                             CD_String, CD_String, CD_String);
-        DynamicConstantDesc<String> r = DynamicConstantDesc.of(bsmRef, "foo", "bar");
+        DynamicConstantDesc<String> r = DynamicConstantDesc.of(bsmDesc, "foo", "bar");
         testDCR(r, "foobar");
     }
 
@@ -104,21 +102,21 @@
                                            format.resolveConstantDesc(LOOKUP), "%s%s", "moo", "cow");
         assertEquals(s, "moocow");
 
-        DynamicConstantDesc<String> ref = DynamicConstantDesc.of(invoker, format, "%s%s", "moo", "cow");
-        testDCR(ref, "moocow");
+        DynamicConstantDesc<String> desc = DynamicConstantDesc.of(invoker, format, "%s%s", "moo", "cow");
+        testDCR(desc, "moocow");
 
-        DynamicConstantDesc<String> ref2 = DynamicConstantDesc.of(invoker, format, "%s%s", ref, "cow");
-        testDCR(ref2, "moocowcow");
+        DynamicConstantDesc<String> desc2 = DynamicConstantDesc.of(invoker, format, "%s%s", desc, "cow");
+        testDCR(desc2, "moocowcow");
     }
 
     enum MyEnum { A, B, C }
 
-    public void testEnumRef() throws ReflectiveOperationException {
+    public void testEnumDesc() throws ReflectiveOperationException {
         ClassDesc enumClass = ClassDesc.of("CondyDescTest").inner("MyEnum");
 
-        testEnumRef(EnumDesc.of(enumClass, "A"), MyEnum.A);
-        testEnumRef(EnumDesc.of(enumClass, "B"), MyEnum.B);
-        testEnumRef(EnumDesc.of(enumClass, "C"), MyEnum.C);
+        testEnumDesc(EnumDesc.of(enumClass, "A"), MyEnum.A);
+        testEnumDesc(EnumDesc.of(enumClass, "B"), MyEnum.B);
+        testEnumDesc(EnumDesc.of(enumClass, "C"), MyEnum.C);
     }
 
     static class MyClass {
@@ -133,7 +131,7 @@
         // static varHandle
         VarHandleDesc vhc = VarHandleDesc.ofStaticField(testClass, "sf", CD_int);
         VarHandle varHandle = LOOKUP.findStaticVarHandle(MyClass.class, "sf", int.class);
-        testVarHandleRef(vhc, varHandle);
+        testVarHandleDesc(vhc, varHandle);
 
         assertEquals(varHandle.varType(), int.class);
         varHandle.set(8);
@@ -143,7 +141,7 @@
         // static varHandle
         vhc = VarHandleDesc.ofField(testClass, "f", CD_int);
         varHandle = LOOKUP.findVarHandle(MyClass.class, "f", int.class);
-        testVarHandleRef(vhc, varHandle);
+        testVarHandleDesc(vhc, varHandle);
 
         assertEquals(varHandle.varType(), int.class);
         varHandle.set(instance, 9);
@@ -152,7 +150,7 @@
 
         vhc = VarHandleDesc.ofArray(CD_int.arrayType());
         varHandle = MethodHandles.arrayElementVarHandle(int[].class);
-        testVarHandleRef(vhc, varHandle);
+        testVarHandleDesc(vhc, varHandle);
 
         int[] ints = new int[3];
         varHandle.set(ints, 0, 1);
--- a/test/jdk/java/lang/constant/IndyDescTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/IndyDescTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -4,9 +4,7 @@
  *
  * 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.
+ * 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
@@ -56,7 +54,7 @@
             return new ConstantCallSite(MethodHandles.constant(String.class, (String) args[0]));
     }
 
-    public void testIndyRef() throws Throwable {
+    public void testIndyDesc() throws Throwable {
         ClassDesc c = ClassDesc.of("IndyDescTest");
         MethodTypeDesc mt = MethodTypeDesc.of(CD_CallSite, CD_MethodHandles_Lookup, CD_String, CD_MethodType, CD_Object.arrayType());
         DirectMethodHandleDesc mh = MethodHandleDesc.of(DirectMethodHandleDesc.Kind.STATIC, c, "bootstrap", mt);
--- a/test/jdk/java/lang/constant/MethodHandleDescTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/MethodHandleDescTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
@@ -81,7 +79,7 @@
         assertEquals(ia.getReferenceKind(), ib.getReferenceKind());
     }
 
-    private void testMethodHandleRef(MethodHandleDesc r) throws ReflectiveOperationException {
+    private void testMethodHandleDesc(MethodHandleDesc r) throws ReflectiveOperationException {
         if (r instanceof DirectMethodHandleDesc) {
             testSymbolicDesc(r);
 
@@ -93,8 +91,8 @@
         }
     }
 
-    private void testMethodHandleRef(MethodHandleDesc r, MethodHandle mh) throws ReflectiveOperationException {
-        testMethodHandleRef(r);
+    private void testMethodHandleDesc(MethodHandleDesc r, MethodHandle mh) throws ReflectiveOperationException {
+        testMethodHandleDesc(r);
 
         assertMHEquals(r.resolveConstantDesc(LOOKUP), mh);
         assertEquals(mh.describeConstable().orElseThrow(), r);
@@ -109,15 +107,15 @@
     }
 
     public void testSimpleMHs() throws ReflectiveOperationException {
-        testMethodHandleRef(MethodHandleDesc.of(Kind.VIRTUAL, CD_String, "isEmpty", "()Z"),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.VIRTUAL, CD_String, "isEmpty", "()Z"),
                             LOOKUP.findVirtual(String.class, "isEmpty", MethodType.fromMethodDescriptorString("()Z", null)));
-        testMethodHandleRef(MethodHandleDesc.of(Kind.STATIC, CD_String, "format", CD_String, CD_String, CD_Object.arrayType()),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.STATIC, CD_String, "format", CD_String, CD_String, CD_Object.arrayType()),
                             LOOKUP.findStatic(String.class, "format", MethodType.methodType(String.class, String.class, Object[].class)));
-        testMethodHandleRef(MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, CD_List, "isEmpty", "()Z"),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, CD_List, "isEmpty", "()Z"),
                             LOOKUP.findVirtual(List.class, "isEmpty", MethodType.fromMethodDescriptorString("()Z", null)));
-        testMethodHandleRef(MethodHandleDesc.of(Kind.CONSTRUCTOR, ClassDesc.of("java.util.ArrayList"), "<init>", CD_void),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.CONSTRUCTOR, ClassDesc.of("java.util.ArrayList"), "<init>", CD_void),
                             LOOKUP.findConstructor(ArrayList.class, MethodType.methodType(void.class)));
-        testMethodHandleRef(MethodHandleDesc.ofConstructor(ClassDesc.of("java.util.ArrayList")),
+        testMethodHandleDesc(MethodHandleDesc.ofConstructor(ClassDesc.of("java.util.ArrayList")),
                             LOOKUP.findConstructor(ArrayList.class, MethodType.methodType(void.class)));
         // bad constructor non void return type
         try {
@@ -132,7 +130,7 @@
         MethodHandleDesc mhr = MethodHandleDesc.of(Kind.STATIC, ClassDesc.of("java.lang.Integer"), "valueOf",
                                                    MethodTypeDesc.of(CD_Integer, CD_int));
         MethodHandleDesc takesInteger = mhr.asType(MethodTypeDesc.of(CD_Integer, CD_Integer));
-        testMethodHandleRef(takesInteger);
+        testMethodHandleDesc(takesInteger);
         MethodHandle mh1 = takesInteger.resolveConstantDesc(LOOKUP);
         assertEquals((Integer) 3, (Integer) mh1.invokeExact((Integer) 3));
         assertEquals(takesInteger.toString(), "MethodHandleDesc[STATIC/Integer::valueOf(int)Integer].asType(Integer)Integer");
@@ -144,7 +142,7 @@
         catch (WrongMethodTypeException ignored) { }
 
         MethodHandleDesc takesInt = takesInteger.asType(MethodTypeDesc.of(CD_Integer, CD_int));
-        testMethodHandleRef(takesInt);
+        testMethodHandleDesc(takesInt);
         MethodHandle mh2 = takesInt.resolveConstantDesc(LOOKUP);
         assertEquals((Integer) 3, (Integer) mh2.invokeExact(3));
 
@@ -160,89 +158,89 @@
         // @@@ Test intrinsification of adapted MH
     }
 
-    public void testMethodHandleRef() throws Throwable {
-        MethodHandleDesc ctorRef = MethodHandleDesc.of(Kind.CONSTRUCTOR, testClass, "<ignored!>", CD_void);
-        MethodHandleDesc staticMethodRef = MethodHandleDesc.of(Kind.STATIC, testClass, "sm", "(I)I");
-        MethodHandleDesc staticIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "sm", "(I)I");
-        MethodHandleDesc instanceMethodRef = MethodHandleDesc.of(Kind.VIRTUAL, testClass, "m", "(I)I");
-        MethodHandleDesc instanceIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, testInterface, "m", "(I)I");
-        MethodHandleDesc superMethodRef = MethodHandleDesc.of(Kind.SPECIAL, testSuperclass, "m", "(I)I");
-        MethodHandleDesc superIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "m", "(I)I");
-        MethodHandleDesc privateMethodRef = MethodHandleDesc.of(Kind.SPECIAL, testClass, "pm", "(I)I");
-        MethodHandleDesc privateIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "pm", "(I)I");
-        MethodHandleDesc privateStaticMethodRef = MethodHandleDesc.of(Kind.STATIC, testClass, "psm", "(I)I");
-        MethodHandleDesc privateStaticIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "psm", "(I)I");
+    public void testMethodHandleDesc() throws Throwable {
+        MethodHandleDesc ctorDesc = MethodHandleDesc.of(Kind.CONSTRUCTOR, testClass, "<ignored!>", CD_void);
+        MethodHandleDesc staticMethodDesc = MethodHandleDesc.of(Kind.STATIC, testClass, "sm", "(I)I");
+        MethodHandleDesc staticIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "sm", "(I)I");
+        MethodHandleDesc instanceMethodDesc = MethodHandleDesc.of(Kind.VIRTUAL, testClass, "m", "(I)I");
+        MethodHandleDesc instanceIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, testInterface, "m", "(I)I");
+        MethodHandleDesc superMethodDesc = MethodHandleDesc.of(Kind.SPECIAL, testSuperclass, "m", "(I)I");
+        MethodHandleDesc superIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "m", "(I)I");
+        MethodHandleDesc privateMethodDesc = MethodHandleDesc.of(Kind.SPECIAL, testClass, "pm", "(I)I");
+        MethodHandleDesc privateIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "pm", "(I)I");
+        MethodHandleDesc privateStaticMethodDesc = MethodHandleDesc.of(Kind.STATIC, testClass, "psm", "(I)I");
+        MethodHandleDesc privateStaticIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "psm", "(I)I");
 
-        for (MethodHandleDesc r : List.of(ctorRef, staticMethodRef, staticIMethodRef, instanceMethodRef, instanceIMethodRef))
-            testMethodHandleRef(r);
+        for (MethodHandleDesc r : List.of(ctorDesc, staticMethodDesc, staticIMethodDesc, instanceMethodDesc, instanceIMethodDesc))
+            testMethodHandleDesc(r);
 
-        TestHelpers.TestClass instance = (TestHelpers.TestClass) ctorRef.resolveConstantDesc(LOOKUP).invokeExact();
-        TestHelpers.TestClass instance2 = (TestHelpers.TestClass) ctorRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact();
+        TestHelpers.TestClass instance = (TestHelpers.TestClass) ctorDesc.resolveConstantDesc(LOOKUP).invokeExact();
+        TestHelpers.TestClass instance2 = (TestHelpers.TestClass) ctorDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact();
         TestHelpers.TestInterface instanceI = instance;
 
         assertNotSame(instance, instance2);
 
-        assertEquals(5, (int) staticMethodRef.resolveConstantDesc(LOOKUP).invokeExact(5));
-        assertEquals(5, (int) staticMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
-        assertEquals(0, (int) staticIMethodRef.resolveConstantDesc(LOOKUP).invokeExact(5));
-        assertEquals(0, (int) staticIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(5, (int) staticMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(5));
+        assertEquals(5, (int) staticMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) staticIMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(5));
+        assertEquals(0, (int) staticIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
 
-        assertEquals(5, (int) instanceMethodRef.resolveConstantDesc(LOOKUP).invokeExact(instance, 5));
-        assertEquals(5, (int) instanceMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
-        assertEquals(5, (int) instanceIMethodRef.resolveConstantDesc(LOOKUP).invokeExact(instanceI, 5));
-        assertEquals(5, (int) instanceIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(5, (int) instanceMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) instanceMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) instanceIMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(5, (int) instanceIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instanceI, 5));
 
-        try { superMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { superMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(-1, (int) superMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(-1, (int) superMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { superIMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { superIMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) superIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(0, (int) superIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { privateMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(5, (int) privateMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) privateMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { privateIMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateIMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) privateIMethodRef.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(instanceI, 5));
-        assertEquals(0, (int) privateIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invoke(instanceI, 5));
+        assertEquals(0, (int) privateIMethodDesc.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(0, (int) privateIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invoke(instanceI, 5));
 
-        try { privateStaticMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateStaticMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(5, (int) privateStaticMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(5, (int) privateStaticMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
 
-        try { privateStaticIMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateStaticIMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) privateStaticIMethodRef.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(5));
-        assertEquals(0, (int) privateStaticIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) privateStaticIMethodDesc.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) privateStaticIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
 
-        MethodHandleDesc staticSetterRef = MethodHandleDesc.ofField(STATIC_SETTER, testClass, "sf", CD_int);
-        MethodHandleDesc staticGetterRef = MethodHandleDesc.ofField(STATIC_GETTER, testClass, "sf", CD_int);
-        MethodHandleDesc staticGetterIRef = MethodHandleDesc.ofField(STATIC_GETTER, testInterface, "sf", CD_int);
-        MethodHandleDesc setterRef = MethodHandleDesc.ofField(SETTER, testClass, "f", CD_int);
-        MethodHandleDesc getterRef = MethodHandleDesc.ofField(GETTER, testClass, "f", CD_int);
+        MethodHandleDesc staticSetterDesc = MethodHandleDesc.ofField(STATIC_SETTER, testClass, "sf", CD_int);
+        MethodHandleDesc staticGetterDesc = MethodHandleDesc.ofField(STATIC_GETTER, testClass, "sf", CD_int);
+        MethodHandleDesc staticGetterIDesc = MethodHandleDesc.ofField(STATIC_GETTER, testInterface, "sf", CD_int);
+        MethodHandleDesc setterDesc = MethodHandleDesc.ofField(SETTER, testClass, "f", CD_int);
+        MethodHandleDesc getterDesc = MethodHandleDesc.ofField(GETTER, testClass, "f", CD_int);
 
-        for (MethodHandleDesc r : List.of(staticSetterRef, staticGetterRef, staticGetterIRef, setterRef, getterRef))
-            testMethodHandleRef(r);
+        for (MethodHandleDesc r : List.of(staticSetterDesc, staticGetterDesc, staticGetterIDesc, setterDesc, getterDesc))
+            testMethodHandleDesc(r);
 
-        staticSetterRef.resolveConstantDesc(LOOKUP).invokeExact(6); assertEquals(TestHelpers.TestClass.sf, 6);
-        assertEquals(6, (int) staticGetterRef.resolveConstantDesc(LOOKUP).invokeExact());
-        assertEquals(6, (int) staticGetterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
-        staticSetterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(7); assertEquals(TestHelpers.TestClass.sf, 7);
-        assertEquals(7, (int) staticGetterRef.resolveConstantDesc(LOOKUP).invokeExact());
-        assertEquals(7, (int) staticGetterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
+        staticSetterDesc.resolveConstantDesc(LOOKUP).invokeExact(6); assertEquals(TestHelpers.TestClass.sf, 6);
+        assertEquals(6, (int) staticGetterDesc.resolveConstantDesc(LOOKUP).invokeExact());
+        assertEquals(6, (int) staticGetterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
+        staticSetterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(7); assertEquals(TestHelpers.TestClass.sf, 7);
+        assertEquals(7, (int) staticGetterDesc.resolveConstantDesc(LOOKUP).invokeExact());
+        assertEquals(7, (int) staticGetterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
 
-        assertEquals(3, (int) staticGetterIRef.resolveConstantDesc(LOOKUP).invokeExact());
-        assertEquals(3, (int) staticGetterIRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
+        assertEquals(3, (int) staticGetterIDesc.resolveConstantDesc(LOOKUP).invokeExact());
+        assertEquals(3, (int) staticGetterIDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
 
-        setterRef.resolveConstantDesc(LOOKUP).invokeExact(instance, 6); assertEquals(instance.f, 6);
-        assertEquals(6, (int) getterRef.resolveConstantDesc(LOOKUP).invokeExact(instance));
-        assertEquals(6, (int) getterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
-        setterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 7); assertEquals(instance.f, 7);
-        assertEquals(7, (int) getterRef.resolveConstantDesc(LOOKUP).invokeExact(instance));
-        assertEquals(7, (int) getterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
+        setterDesc.resolveConstantDesc(LOOKUP).invokeExact(instance, 6); assertEquals(instance.f, 6);
+        assertEquals(6, (int) getterDesc.resolveConstantDesc(LOOKUP).invokeExact(instance));
+        assertEquals(6, (int) getterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
+        setterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 7); assertEquals(instance.f, 7);
+        assertEquals(7, (int) getterDesc.resolveConstantDesc(LOOKUP).invokeExact(instance));
+        assertEquals(7, (int) getterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
     }
 
     private void assertBadArgs(Supplier<MethodHandleDesc> supplier, String s) {
@@ -282,7 +280,7 @@
                     && ((f.getModifiers() & Modifier.PUBLIC) != 0)) {
                     MethodHandleDesc r = (MethodHandleDesc) f.get(null);
                     MethodHandle m = r.resolveConstantDesc(MethodHandles.lookup());
-                    testMethodHandleRef(r, m);
+                    testMethodHandleDesc(r, m);
                     ++tested;
                 }
             }
--- a/test/jdk/java/lang/constant/MethodTypeDescTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/MethodTypeDescTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
@@ -44,12 +42,12 @@
  * @test
  * @compile MethodTypeDescTest.java
  * @run testng MethodTypeDescTest
- * @summary unit tests for java.lang.constant.MethodTypeRef
+ * @summary unit tests for java.lang.constant.MethodTypeDesc
  */
 @Test
 public class MethodTypeDescTest extends SymbolicDescTest {
 
-    private void testMethodTypeRef(MethodTypeDesc r) throws ReflectiveOperationException {
+    private void testMethodTypeDesc(MethodTypeDesc r) throws ReflectiveOperationException {
         testSymbolicDesc(r);
 
         // Tests accessors (rType, pType, pCount, pList, pArray, descriptorString),
@@ -63,46 +61,46 @@
                                                                    .toArray(ClassDesc[]::new)));
     }
 
-    private void testMethodTypeRef(MethodTypeDesc r, MethodType mt) throws ReflectiveOperationException {
-        testMethodTypeRef(r);
+    private void testMethodTypeDesc(MethodTypeDesc r, MethodType mt) throws ReflectiveOperationException {
+        testMethodTypeDesc(r);
 
         assertEquals(r.resolveConstantDesc(LOOKUP), mt);
         assertEquals(mt.describeConstable().get(), r);
 
         assertEquals(r.descriptorString(), mt.toMethodDescriptorString());
         assertEquals(r.parameterCount(), mt.parameterCount());
-        assertEquals(r.parameterList(), mt.parameterList().stream().map(SymbolicDescTest::classToRef).collect(toList()));
-        assertEquals(r.parameterArray(), Stream.of(mt.parameterArray()).map(SymbolicDescTest::classToRef).toArray(ClassDesc[]::new));
+        assertEquals(r.parameterList(), mt.parameterList().stream().map(SymbolicDescTest::classToDesc).collect(toList()));
+        assertEquals(r.parameterArray(), Stream.of(mt.parameterArray()).map(SymbolicDescTest::classToDesc).toArray(ClassDesc[]::new));
         for (int i=0; i<r.parameterCount(); i++)
-            assertEquals(r.parameterType(i), classToRef(mt.parameterType(i)));
-        assertEquals(r.returnType(), classToRef(mt.returnType()));
+            assertEquals(r.parameterType(i), classToDesc(mt.parameterType(i)));
+        assertEquals(r.returnType(), classToDesc(mt.returnType()));
     }
 
     private void assertMethodType(ClassDesc returnType,
                                   ClassDesc... paramTypes) throws ReflectiveOperationException {
         String descriptor = Stream.of(paramTypes).map(ClassDesc::descriptorString).collect(joining("", "(", ")"))
                             + returnType.descriptorString();
-        MethodTypeDesc mtRef = MethodTypeDesc.of(returnType, paramTypes);
+        MethodTypeDesc mtDesc = MethodTypeDesc.of(returnType, paramTypes);
 
-        // MTRef accessors
-        assertEquals(descriptor, mtRef.descriptorString());
-        assertEquals(returnType, mtRef.returnType());
-        assertEquals(paramTypes, mtRef.parameterArray());
-        assertEquals(Arrays.asList(paramTypes), mtRef.parameterList());
-        assertEquals(paramTypes.length, mtRef.parameterCount());
+        // MTDesc accessors
+        assertEquals(descriptor, mtDesc.descriptorString());
+        assertEquals(returnType, mtDesc.returnType());
+        assertEquals(paramTypes, mtDesc.parameterArray());
+        assertEquals(Arrays.asList(paramTypes), mtDesc.parameterList());
+        assertEquals(paramTypes.length, mtDesc.parameterCount());
         for (int i=0; i<paramTypes.length; i++)
-            assertEquals(paramTypes[i], mtRef.parameterType(i));
+            assertEquals(paramTypes[i], mtDesc.parameterType(i));
 
-        // Consistency between MT and MTRef
+        // Consistency between MT and MTDesc
         MethodType mt = MethodType.fromMethodDescriptorString(descriptor, null);
-        testMethodTypeRef(mtRef, mt);
+        testMethodTypeDesc(mtDesc, mt);
 
         // changeReturnType
         for (String r : returnDescs) {
             ClassDesc rc = ClassDesc.ofDescriptor(r);
-            MethodTypeDesc newRef = mtRef.changeReturnType(rc);
-            assertEquals(newRef, MethodTypeDesc.of(rc, paramTypes));
-            testMethodTypeRef(newRef, mt.changeReturnType(rc.resolveConstantDesc(LOOKUP)));
+            MethodTypeDesc newDesc = mtDesc.changeReturnType(rc);
+            assertEquals(newDesc, MethodTypeDesc.of(rc, paramTypes));
+            testMethodTypeDesc(newDesc, mt.changeReturnType(rc.resolveConstantDesc(LOOKUP)));
         }
 
         // changeParamType
@@ -111,9 +109,9 @@
                 ClassDesc pc = ClassDesc.ofDescriptor(p);
                 ClassDesc[] ps = paramTypes.clone();
                 ps[i] = pc;
-                MethodTypeDesc newRef = mtRef.changeParameterType(i, pc);
-                assertEquals(newRef, MethodTypeDesc.of(returnType, ps));
-                testMethodTypeRef(newRef, mt.changeParameterType(i, pc.resolveConstantDesc(LOOKUP)));
+                MethodTypeDesc newDesc = mtDesc.changeParameterType(i, pc);
+                assertEquals(newDesc, MethodTypeDesc.of(returnType, ps));
+                testMethodTypeDesc(newDesc, mt.changeParameterType(i, pc.resolveConstantDesc(LOOKUP)));
             }
         }
 
@@ -124,9 +122,9 @@
                                       .filter(j -> j != k)
                                       .mapToObj(j -> paramTypes[j])
                                       .toArray(ClassDesc[]::new);
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(i, i + 1);
-            assertEquals(newRef, MethodTypeDesc.of(returnType, ps));
-            testMethodTypeRef(newRef, mt.dropParameterTypes(i, i+1));
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(i, i + 1);
+            assertEquals(newDesc, MethodTypeDesc.of(returnType, ps));
+            testMethodTypeDesc(newDesc, mt.dropParameterTypes(i, i+1));
         }
 
         badDropParametersTypes(CD_void, paramDescs);
@@ -138,9 +136,9 @@
                 ClassDesc[] ps = IntStream.range(0, paramTypes.length + 1)
                                           .mapToObj(j -> (j < k) ? paramTypes[j] : (j == k) ? p : paramTypes[j-1])
                                           .toArray(ClassDesc[]::new);
-                MethodTypeDesc newRef = mtRef.insertParameterTypes(i, p);
-                assertEquals(newRef, MethodTypeDesc.of(returnType, ps));
-                testMethodTypeRef(newRef, mt.insertParameterTypes(i, p.resolveConstantDesc(LOOKUP)));
+                MethodTypeDesc newDesc = mtDesc.insertParameterTypes(i, p);
+                assertEquals(newDesc, MethodTypeDesc.of(returnType, ps));
+                testMethodTypeDesc(newDesc, mt.insertParameterTypes(i, p.resolveConstantDesc(LOOKUP)));
             }
         }
 
@@ -151,16 +149,16 @@
         ClassDesc[] paramTypes =
                 IntStream.rangeClosed(0, paramDescTypes.length - 1)
                         .mapToObj(i -> ClassDesc.ofDescriptor(paramDescTypes[i])).toArray(ClassDesc[]::new);
-        MethodTypeDesc mtRef = MethodTypeDesc.of(returnType, paramTypes);
+        MethodTypeDesc mtDesc = MethodTypeDesc.of(returnType, paramTypes);
         try {
-            MethodTypeDesc newRef = mtRef.insertParameterTypes(-1, paramTypes);
+            MethodTypeDesc newDesc = mtDesc.insertParameterTypes(-1, paramTypes);
             fail("pos < 0 should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.insertParameterTypes(paramTypes.length + 1, paramTypes);
+            MethodTypeDesc newDesc = mtDesc.insertParameterTypes(paramTypes.length + 1, paramTypes);
             fail("pos > current arguments length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
@@ -171,44 +169,44 @@
         ClassDesc[] paramTypes =
                 IntStream.rangeClosed(0, paramDescTypes.length - 1)
                         .mapToObj(i -> ClassDesc.ofDescriptor(paramDescTypes[i])).toArray(ClassDesc[]::new);
-        MethodTypeDesc mtRef = MethodTypeDesc.of(returnType, paramTypes);
+        MethodTypeDesc mtDesc = MethodTypeDesc.of(returnType, paramTypes);
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(-1, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(-1, 0);
             fail("start index < 0 should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(paramTypes.length, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(paramTypes.length, 0);
             fail("start index = arguments.length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(paramTypes.length + 1, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(paramTypes.length + 1, 0);
             fail("start index > arguments.length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(0, paramTypes.length + 1);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(0, paramTypes.length + 1);
             fail("end index > arguments.length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(1, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(1, 0);
             fail("start index > end index should have failed");
         } catch (IllegalArgumentException ex) {
             // good
         }
     }
 
-    public void testMethodTypeRef() throws ReflectiveOperationException {
+    public void testMethodTypeDesc() throws ReflectiveOperationException {
         for (String r : returnDescs) {
             assertMethodType(ClassDesc.ofDescriptor(r));
             for (String p1 : paramDescs) {
--- a/test/jdk/java/lang/constant/SymbolicDescTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/SymbolicDescTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
@@ -37,17 +35,17 @@
 import static org.testng.Assert.assertEquals;
 
 /**
- * Base class for XxxRef tests
+ * Base class for XxxDesc tests
  */
 public abstract class SymbolicDescTest {
 
     public static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
 
-    static List<String> someRefs = List.of("Ljava/lang/String;", "Ljava/util/List;");
+    static List<String> someDescs = List.of("Ljava/lang/String;", "Ljava/util/List;");
     static String[] basicDescs = Stream.concat(Stream.of(Primitives.values())
                                                      .filter(p -> p != Primitives.VOID)
                                                      .map(p -> p.descriptor),
-                                               someRefs.stream())
+                                               someDescs.stream())
                                        .toArray(String[]::new);
     static String[] paramDescs = Stream.of(basicDescs)
                                        .flatMap(d -> Stream.of(d, "[" + d))
@@ -69,14 +67,14 @@
         public final String name;
         public final Class<?> clazz;
         public final Class<?> arrayClass;
-        public final ClassDesc classRef;
+        public final ClassDesc classDesc;
 
-        Primitives(String descriptor, String name, Class<?> clazz, Class<?> arrayClass, ClassDesc ref) {
+        Primitives(String descriptor, String name, Class<?> clazz, Class<?> arrayClass, ClassDesc desc) {
             this.descriptor = descriptor;
             this.name = name;
             this.clazz = clazz;
             this.arrayClass = arrayClass;
-            classRef = ref;
+            classDesc = desc;
         }
     }
 
@@ -84,31 +82,31 @@
         return MethodType.methodType(clazz).toMethodDescriptorString().substring(2);
     }
 
-    static ClassDesc classToRef(Class<?> c) {
+    static ClassDesc classToDesc(Class<?> c) {
         return ClassDesc.ofDescriptor(c.descriptorString());
     }
 
-    static<T> void testSymbolicDesc(ConstantDesc<T> ref) throws ReflectiveOperationException {
-        testSymbolicDesc(ref, false);
+    static<T> void testSymbolicDesc(ConstantDesc<T> desc) throws ReflectiveOperationException {
+        testSymbolicDesc(desc, false);
     }
 
-    static<T> void testSymbolicDescForwardOnly(ConstantDesc<T> ref) throws ReflectiveOperationException {
-        testSymbolicDesc(ref, true);
+    static<T> void testSymbolicDescForwardOnly(ConstantDesc<T> desc) throws ReflectiveOperationException {
+        testSymbolicDesc(desc, true);
     }
 
-    private static<T> void testSymbolicDesc(ConstantDesc<T> ref, boolean forwardOnly) throws ReflectiveOperationException {
+    private static<T> void testSymbolicDesc(ConstantDesc<T> desc, boolean forwardOnly) throws ReflectiveOperationException {
         // Round trip sym -> resolve -> toSymbolicDesc
-        Constable<ConstantDesc<T>> constable = (Constable<ConstantDesc<T>>) ref.resolveConstantDesc(LOOKUP);
+        Constable<ConstantDesc<T>> constable = (Constable<ConstantDesc<T>>) desc.resolveConstantDesc(LOOKUP);
         Optional<? extends ConstantDesc<ConstantDesc<T>>> described = constable.describeConstable();
         if (!forwardOnly) {
-            assertEquals(ref, described.orElseThrow());
+            assertEquals(desc, described.orElseThrow());
         }
 
         // Round trip sym -> quoted sym -> resolve
-        if (ref instanceof Constable) {
-            Optional<ConstantDesc<ConstantDesc<T>>> opt = (Optional<ConstantDesc<ConstantDesc<T>>>) ((Constable) ref).describeConstable();
+        if (desc instanceof Constable) {
+            Optional<ConstantDesc<ConstantDesc<T>>> opt = (Optional<ConstantDesc<ConstantDesc<T>>>) ((Constable) desc).describeConstable();
             ConstantDesc<T> sr = opt.orElseThrow().resolveConstantDesc(LOOKUP);
-            assertEquals(sr, ref);
+            assertEquals(sr, desc);
         }
     }
 }
--- a/test/jdk/java/lang/constant/TestHelpers.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/TestHelpers.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
--- a/test/jdk/java/lang/constant/TypeDescriptorTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/TypeDescriptorTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -1,12 +1,10 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * 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.
+ * 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
--- a/test/jdk/java/lang/constant/boottest/java.base/java/lang/constant/ConstantUtilsTest.java	Tue Oct 16 22:50:42 2018 +0200
+++ b/test/jdk/java/lang/constant/boottest/java.base/java/lang/constant/ConstantUtilsTest.java	Fri Oct 26 14:17:41 2018 -0400
@@ -4,9 +4,7 @@
  *
  * 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.
+ * 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
@@ -41,7 +39,7 @@
  */
 @Test
 public class ConstantUtilsTest {
-    private static ClassDesc thisClass = ClassDesc.of("MethodHandleRefTest");
+    private static ClassDesc thisClass = ClassDesc.of("MethodHandleDescTest");
 
     public void testValidateMemberName() {
         try {