changeset 49309:1903c35f59dc condy-folding

Remove SymbolicRef, ConstantRef.{OfSelf,WithTypeDDescriptor}; make {Class,MethodType,MethodHandle}Ref into interfaces; create concrete classes for Constant{Class,MethodType,MethodHandle}Ref; add support for method handle combinators
author briangoetz
date Thu, 01 Mar 2018 14:25:00 -0500
parents e51a71b90343
children 677168216389
files src/java.base/share/classes/java/lang/Class.java src/java.base/share/classes/java/lang/Double.java src/java.base/share/classes/java/lang/Enum.java src/java.base/share/classes/java/lang/Float.java src/java.base/share/classes/java/lang/Integer.java src/java.base/share/classes/java/lang/Long.java src/java.base/share/classes/java/lang/String.java src/java.base/share/classes/java/lang/invoke/BootstrapMethodInvoker.java src/java.base/share/classes/java/lang/invoke/MethodHandle.java src/java.base/share/classes/java/lang/invoke/MethodType.java src/java.base/share/classes/java/lang/invoke/VarHandle.java src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template src/java.base/share/classes/java/lang/sym/AsTypeMethodHandleRef.java src/java.base/share/classes/java/lang/sym/ClassRef.java src/java.base/share/classes/java/lang/sym/Constable.java src/java.base/share/classes/java/lang/sym/ConstantClassRef.java src/java.base/share/classes/java/lang/sym/ConstantMethodHandleRef.java src/java.base/share/classes/java/lang/sym/ConstantMethodTypeRef.java src/java.base/share/classes/java/lang/sym/ConstantRef.java src/java.base/share/classes/java/lang/sym/ConstantRefs.java src/java.base/share/classes/java/lang/sym/DynamicCallSiteRef.java src/java.base/share/classes/java/lang/sym/DynamicConstantRef.java src/java.base/share/classes/java/lang/sym/EnumRef.java src/java.base/share/classes/java/lang/sym/MethodHandleRef.java src/java.base/share/classes/java/lang/sym/MethodTypeRef.java src/java.base/share/classes/java/lang/sym/PrimitiveClassRef.java src/java.base/share/classes/java/lang/sym/SymbolicRef.java src/java.base/share/classes/java/lang/sym/SymbolicRefs.java src/java.base/share/classes/java/lang/sym/VarHandleRef.java src/java.base/share/classes/java/lang/sym/package-info.java src/jdk.compiler/share/classes/com/sun/tools/javac/util/Constables.java test/jdk/java/lang/invoke/ConstantRefBootstrapsTest.java test/jdk/java/lang/sym/ClassRefTest.java test/jdk/java/lang/sym/CondyRefTest.java test/jdk/java/lang/sym/IntrinsifiedRefTest.java test/jdk/java/lang/sym/MethodHandleRefTest.java test/jdk/java/lang/sym/MethodTypeRefTest.java test/jdk/java/lang/sym/SymbolicRefTest.java test/langtools/tools/javac/condy/CheckForCondyDuplicatesTest.java test/langtools/tools/javac/specialConstantFolding/CheckForCorrectMRefTest.java test/langtools/tools/javac/specialConstantFolding/CondyCodeGenerationTest.java test/langtools/tools/javac/specialConstantFolding/DontCompileIfSymbolCantBeFoundTest.java test/langtools/tools/javac/specialConstantFolding/EffectivelyFinalTestNeg.java test/langtools/tools/javac/specialConstantFolding/IndyCodeGenerationTest.java test/langtools/tools/javac/specialConstantFolding/IndyCrashTest.java test/langtools/tools/javac/specialConstantFolding/IndyLinkageErrorTest.java test/langtools/tools/javac/specialConstantFolding/IndyNegativeTest01.java test/langtools/tools/javac/specialConstantFolding/IndyPositiveTest01.java test/langtools/tools/javac/specialConstantFolding/IntrinsicsTest.java test/langtools/tools/javac/specialConstantFolding/LDCNegativeTest.java test/langtools/tools/javac/specialConstantFolding/MultipleBSMEntriesTest.java test/langtools/tools/javac/specialConstantFolding/ReportIncorrectMHForIndyTest.java test/langtools/tools/javac/specialConstantFolding/TwoVisitsAreNeededCauseOfForwardRefTest.java test/langtools/tools/javac/specialConstantFolding/checkMethodTypeShape/MethodTypeNegTest.java test/langtools/tools/javac/specialConstantFolding/checkMethodTypeShape/MethodTypeNegTest.out test/langtools/tools/javac/specialConstantFolding/harness/tests/ConstantDefinitions.java test/langtools/tools/javac/specialConstantFolding/harness/tests/ConstantFoldingOfMethodTypeDiffContextsTest.java test/langtools/tools/javac/specialConstantFolding/harness/tests/FindConstructorTest.java test/langtools/tools/javac/specialConstantFolding/harness/tests/FindMethodWithGenericArgumentsTest.java test/langtools/tools/javac/specialConstantFolding/harness/tests/FindSetterTest.java test/langtools/tools/javac/specialConstantFolding/harness/tests/FindStaticGetterTest.java test/langtools/tools/javac/specialConstantFolding/harness/tests/FindStaticSetterTest.java test/langtools/tools/javac/specialConstantFolding/harness/tests/FindVirtualTest01.java test/langtools/tools/javac/specialConstantFolding/warningNotFoundOrIncorrect/WarningIfClassOrMemberNotFound3.java test/langtools/tools/javac/specialConstantFolding/warningNotFoundOrIncorrect/WarningIfMemberIncorrect.java
diffstat 64 files changed, 1932 insertions(+), 1416 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Class.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Class.java	Thu Mar 01 14:25:00 2018 -0500
@@ -3854,7 +3854,7 @@
     }
 
     @Override
-    public Optional<ClassRef> toSymbolicRef(MethodHandles.Lookup lookup) {
+    public Optional<ClassRef> toConstantRef(MethodHandles.Lookup lookup) {
         try {
             return Optional.of(ClassRef.ofDescriptor(lookup.accessClass(this).toDescriptorString()));
         }
--- a/src/java.base/share/classes/java/lang/Double.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Double.java	Thu Mar 01 14:25:00 2018 -0500
@@ -25,7 +25,10 @@
 
 package java.lang;
 
+import java.lang.invoke.MethodHandles;
+import java.lang.sym.Constable;
 import java.lang.sym.ConstantRef;
+import java.util.Optional;
 
 import jdk.internal.math.FloatingDecimal;
 import jdk.internal.math.DoubleConsts;
@@ -48,7 +51,8 @@
  * @author  Joseph D. Darcy
  * @since 1.0
  */
-public final class Double extends Number implements Comparable<Double>, ConstantRef.OfSelf<Double> {
+public final class Double extends Number
+        implements Comparable<Double>, ConstantRef<Double>, Constable<Double> {
     /**
      * A constant holding the positive infinity of type
      * {@code double}. It is equal to the value returned by
@@ -1072,6 +1076,30 @@
         return Math.min(a, b);
     }
 
+    /**
+     * Returns a symbolic constant reference for this instance, which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Double} instance
+     */
+    @Override
+    public Optional<ConstantRef<Double>> toConstantRef(MethodHandles.Lookup lookup) {
+        return Optional.of(this);
+    }
+
+    /**
+     * Resolve this instance as a {@link ConstantRef}, the result of which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Double} instance
+     */
+    @Override
+    public Double resolveConstantRef(MethodHandles.Lookup lookup) {
+        return this;
+    }
+
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
     private static final long serialVersionUID = -9172774392245257468L;
 }
--- a/src/java.base/share/classes/java/lang/Enum.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Enum.java	Thu Mar 01 14:25:00 2018 -0500
@@ -207,9 +207,9 @@
     }
 
     @Override
-    public Optional<EnumRef<E>> toSymbolicRef(MethodHandles.Lookup lookup) {
+    public Optional<EnumRef<E>> toConstantRef(MethodHandles.Lookup lookup) {
         return getDeclaringClass()
-                .toSymbolicRef(lookup)
+                .toConstantRef(lookup)
                 .map(c -> EnumRef.of(c, name));
     }
 
--- a/src/java.base/share/classes/java/lang/Float.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Float.java	Thu Mar 01 14:25:00 2018 -0500
@@ -25,7 +25,10 @@
 
 package java.lang;
 
+import java.lang.invoke.MethodHandles;
+import java.lang.sym.Constable;
 import java.lang.sym.ConstantRef;
+import java.util.Optional;
 
 import jdk.internal.math.FloatingDecimal;
 import jdk.internal.HotSpotIntrinsicCandidate;
@@ -47,7 +50,8 @@
  * @author  Joseph D. Darcy
  * @since 1.0
  */
-public final class Float extends Number implements Comparable<Float>, ConstantRef.OfSelf<Float> {
+public final class Float extends Number
+        implements Comparable<Float>, ConstantRef<Float>, Constable<Float> {
     /**
      * A constant holding the positive infinity of type
      * {@code float}. It is equal to the value returned by
@@ -984,6 +988,30 @@
         return Math.min(a, b);
     }
 
+    /**
+     * Returns a symbolic constant reference for this instance, which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Float} instance
+     */
+    @Override
+    public Optional<ConstantRef<Float>> toConstantRef(MethodHandles.Lookup lookup) {
+        return Optional.of(this);
+    }
+
+    /**
+     * Resolve this instance as a {@link ConstantRef}, the result of which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Float} instance
+     */
+    @Override
+    public Float resolveConstantRef(MethodHandles.Lookup lookup) {
+        return this;
+    }
+
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
     private static final long serialVersionUID = -2671257302660747028L;
 }
--- a/src/java.base/share/classes/java/lang/Integer.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Integer.java	Thu Mar 01 14:25:00 2018 -0500
@@ -26,8 +26,12 @@
 package java.lang;
 
 import java.lang.annotation.Native;
+import java.lang.invoke.MethodHandles;
+import java.lang.sym.Constable;
 import java.lang.sym.ConstantRef;
 import java.util.Objects;
+import java.util.Optional;
+
 import jdk.internal.HotSpotIntrinsicCandidate;
 import jdk.internal.misc.VM;
 
@@ -57,7 +61,8 @@
  * @author  Joseph D. Darcy
  * @since 1.0
  */
-public final class Integer extends Number implements Comparable<Integer>, ConstantRef.OfSelf<Integer> {
+public final class Integer extends Number
+        implements Comparable<Integer>, ConstantRef<Integer>, Constable<Integer> {
     /**
      * A constant holding the minimum value an {@code int} can
      * have, -2<sup>31</sup>.
@@ -1824,6 +1829,30 @@
         return Math.min(a, b);
     }
 
+    /**
+     * Returns a symbolic constant reference for this instance, which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Integer} instance
+     */
+    @Override
+    public Optional<ConstantRef<Integer>> toConstantRef(MethodHandles.Lookup lookup) {
+        return Optional.of(this);
+    }
+
+    /**
+     * Resolve this instance as a {@link ConstantRef}, the result of which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Integer} instance
+     */
+    @Override
+    public Integer resolveConstantRef(MethodHandles.Lookup lookup) {
+        return this;
+    }
+
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
     @Native private static final long serialVersionUID = 1360826667806852920L;
 }
--- a/src/java.base/share/classes/java/lang/Long.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Long.java	Thu Mar 01 14:25:00 2018 -0500
@@ -26,9 +26,13 @@
 package java.lang;
 
 import java.lang.annotation.Native;
+import java.lang.invoke.MethodHandles;
+import java.lang.sym.Constable;
 import java.lang.sym.ConstantRef;
 import java.math.*;
 import java.util.Objects;
+import java.util.Optional;
+
 import jdk.internal.HotSpotIntrinsicCandidate;
 
 import static java.lang.String.COMPACT_STRINGS;
@@ -57,7 +61,8 @@
  * @author  Joseph D. Darcy
  * @since   1.0
  */
-public final class Long extends Number implements Comparable<Long>, ConstantRef.OfSelf<Long> {
+public final class Long extends Number
+        implements Comparable<Long>, ConstantRef<Long>, Constable<Long> {
     /**
      * A constant holding the minimum value a {@code long} can
      * have, -2<sup>63</sup>.
@@ -1973,6 +1978,30 @@
         return Math.min(a, b);
     }
 
+    /**
+     * Returns a symbolic constant reference for this instance, which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Long} instance
+     */
+    @Override
+    public Optional<ConstantRef<Long>> toConstantRef(MethodHandles.Lookup lookup) {
+        return Optional.of(this);
+    }
+
+    /**
+     * Resolve this instance as a {@link ConstantRef}, the result of which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain Long} instance
+     */
+    @Override
+    public Long resolveConstantRef(MethodHandles.Lookup lookup) {
+        return this;
+    }
+
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
     @Native private static final long serialVersionUID = 4290774380558885855L;
 }
--- a/src/java.base/share/classes/java/lang/String.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/String.java	Thu Mar 01 14:25:00 2018 -0500
@@ -28,6 +28,8 @@
 import java.io.ObjectStreamField;
 import java.io.UnsupportedEncodingException;
 import java.lang.annotation.Native;
+import java.lang.invoke.MethodHandles;
+import java.lang.sym.Constable;
 import java.lang.sym.ConstantRef;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
@@ -36,6 +38,7 @@
 import java.util.Formatter;
 import java.util.Locale;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.Spliterator;
 import java.util.StringJoiner;
 import java.util.regex.Pattern;
@@ -122,7 +125,8 @@
  */
 
 public final class String
-    implements java.io.Serializable, Comparable<String>, CharSequence, ConstantRef.OfSelf<String> {
+    implements java.io.Serializable, Comparable<String>, CharSequence,
+               ConstantRef<String>, Constable<String> {
 
     /**
      * The value is used for character storage.
@@ -3108,4 +3112,29 @@
                 "begin " + begin + ", end " + end + ", length " + length);
         }
     }
+
+    /**
+     * Returns a symbolic constant reference for this instance, which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain String} instance
+     */
+    @Override
+    public Optional<ConstantRef<String>> toConstantRef(MethodHandles.Lookup lookup) {
+        return Optional.of(this);
+    }
+
+    /**
+     * Resolve this instance as a {@link ConstantRef}, the result of which is
+     * the instance itself.
+     *
+     * @param lookup ignored
+     * @return the {@linkplain String} instance
+     */
+    @Override
+    public String resolveConstantRef(MethodHandles.Lookup lookup) {
+        return this;
+    }
+
 }
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Thu Mar 01 14:25:00 2018 -0500
@@ -1515,15 +1515,15 @@
     }
 
     @Override
-    public Optional<MethodHandleRef> toSymbolicRef(MethodHandles.Lookup lookup) {
+    public Optional<MethodHandleRef> toConstantRef(MethodHandles.Lookup lookup) {
         MethodHandleInfo info;
         ClassRef owner;
         String name;
         MethodTypeRef type;
         try {
             info = lookup.revealDirect(this);
-            owner = info.getDeclaringClass().toSymbolicRef(lookup).orElseThrow();
-            type = info.getMethodType().toSymbolicRef(lookup).orElseThrow();
+            owner = info.getDeclaringClass().toConstantRef(lookup).orElseThrow();
+            type = info.getMethodType().toConstantRef(lookup).orElseThrow();
             name = info.getName();
         }
         catch (Exception e) {
--- a/src/java.base/share/classes/java/lang/invoke/MethodType.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/invoke/MethodType.java	Thu Mar 01 14:25:00 2018 -0500
@@ -1171,11 +1171,11 @@
     }
 
     @Override
-    public Optional<MethodTypeRef> toSymbolicRef(MethodHandles.Lookup lookup) {
+    public Optional<MethodTypeRef> toConstantRef(MethodHandles.Lookup lookup) {
         try {
-            return Optional.of(MethodTypeRef.of(returnType().toSymbolicRef(lookup).orElseThrow(),
+            return Optional.of(MethodTypeRef.of(returnType().toConstantRef(lookup).orElseThrow(),
                                                 Stream.of(parameterArray())
-                                                      .map(p -> p.toSymbolicRef(lookup).orElseThrow())
+                                                      .map(p -> p.toConstantRef(lookup).orElseThrow())
                                                       .toArray(ClassRef[]::new)));
         }
         catch (NoSuchElementException e) {
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Thu Mar 01 14:25:00 2018 -0500
@@ -1984,7 +1984,7 @@
     }
 
     @Override
-    public Optional<VarHandleRef> toSymbolicRef(MethodHandles.Lookup lookup) {
+    public Optional<VarHandleRef> toConstantRef(MethodHandles.Lookup lookup) {
         // partial function for field and array only
         return Optional.empty();
     }
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Thu Mar 01 14:25:00 2018 -0500
@@ -75,9 +75,9 @@
         }
 
         @Override
-        public Optional<VarHandleRef> toSymbolicRef(MethodHandles.Lookup lookup) {
-            var receiverTypeRef = receiverType.toSymbolicRef(lookup);
-            var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.toSymbolicRef(lookup);
+        public Optional<VarHandleRef> toConstantRef(MethodHandles.Lookup lookup) {
+            var receiverTypeRef = receiverType.toConstantRef(lookup);
+            var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.toConstantRef(lookup);
             if (!receiverTypeRef.isPresent() || !fieldTypeRef.isPresent())
                 return Optional.empty();
 
@@ -360,14 +360,14 @@
         }
 
         @Override
-        public Optional<VarHandleRef> toSymbolicRef(MethodHandles.Lookup lookup) {
-            var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.toSymbolicRef(lookup);
+        public Optional<VarHandleRef> toConstantRef(MethodHandles.Lookup lookup) {
+            var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.toConstantRef(lookup);
             if (!fieldTypeRef.isPresent())
                 return Optional.empty();
 
             var staticField = VarHandles.getStaticFieldFromBaseAndOffset(
                 base, fieldOffset, {#if[Object]?fieldType:$type$.class});
-            var receiverTypeRef = staticField.getDeclaringClass().toSymbolicRef(lookup);
+            var receiverTypeRef = staticField.getDeclaringClass().toConstantRef(lookup);
             if (!receiverTypeRef.isPresent())
                 return Optional.empty();
             return Optional.of(VarHandleRef.ofStaticField(receiverTypeRef.get(), staticField.getName(), fieldTypeRef.get()));
@@ -638,8 +638,8 @@
         }
 
         @Override
-        public Optional<VarHandleRef> toSymbolicRef(MethodHandles.Lookup lookup) {
-            var arrayTypeRef = {#if[Object]?arrayType:$type$[].class}.toSymbolicRef(lookup);
+        public Optional<VarHandleRef> toConstantRef(MethodHandles.Lookup lookup) {
+            var arrayTypeRef = {#if[Object]?arrayType:$type$[].class}.toConstantRef(lookup);
             if (!arrayTypeRef.isPresent())
                 return Optional.empty();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/sym/AsTypeMethodHandleRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.sym;
+
+import java.lang.annotation.Foldable;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.util.Optional;
+
+import static java.lang.sym.ConstantRefs.BSM_INVOKE;
+import static java.lang.sym.ConstantRefs.CR_MethodHandle;
+import static java.util.Objects.requireNonNull;
+
+/**
+ * AsTypeMethodHandleRef
+ *
+ * @author Brian Goetz
+ */
+final class AsTypeMethodHandleRef extends DynamicConstantRef<MethodHandle>
+        implements MethodHandleRef {
+
+    private final MethodHandleRef underlying;
+    private final MethodTypeRef type;
+
+    AsTypeMethodHandleRef(MethodHandleRef underlying, MethodTypeRef type) {
+        super(BSM_INVOKE, "_", CR_MethodHandle,
+              ConstantRefs.MHR_METHODHANDLE_ASTYPE, underlying, type);
+        // Any type checking we can do?
+        this.underlying = requireNonNull(underlying);
+        this.type = requireNonNull(type);
+    }
+
+    @Override
+    @Foldable
+    public MethodTypeRef methodType() {
+        return type;
+    }
+
+    @Override
+    public MethodHandle resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
+        MethodHandle handle = underlying.resolveConstantRef(lookup);
+        MethodType methodType = type.resolveConstantRef(lookup);
+        return handle.asType(methodType);
+    }
+
+    @Override
+    public Optional<? extends ConstantRef<? super ConstantRef<MethodHandle>>> toConstantRef(MethodHandles.Lookup lookup) {
+        return DynamicConstantRef.symbolizeHelper(lookup, ConstantRefs.MHR_METHODHANDLEREF_ASTYPE, ConstantRefs.CR_MethodHandleRef,
+                                                  underlying, type);
+    }
+
+    @Override
+    public String toString() {
+        return underlying.toString() + String.format(".asType%s", type.simpleDescriptor());
+    }
+
+    // @@@ canonical?
+}
--- a/src/java.base/share/classes/java/lang/sym/ClassRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/ClassRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -25,11 +25,6 @@
 package java.lang.sym;
 
 import java.lang.annotation.Foldable;
-import java.lang.invoke.MethodHandles;
-import java.lang.reflect.Array;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.regex.Pattern;
 import java.util.stream.Stream;
 
 import sun.invoke.util.Wrapper;
@@ -40,29 +35,7 @@
 /**
  * A symbolic reference for a {@link Class}.
  */
-public class ClassRef implements ConstantRef.WithTypeDescriptor<Class<?>>, Constable<ConstantRef<Class<?>>> {
-    private static final Pattern TYPE_DESC = Pattern.compile("(\\[*)(V|I|J|S|B|C|F|D|Z|L[^/.\\[;][^.\\[;]*;)");
-
-    private final String descriptor;
-
-    /**
-     * Create a {@linkplain ClassRef} from a descriptor string for a class
-     *
-     * @param descriptor the descriptor string
-     * @throws IllegalArgumentException if the descriptor string does not
-     * describe a valid class name
-     */
-    private ClassRef(String descriptor) {
-        // @@@ Replace validation with a lower-overhead mechanism than regex
-        // Follow the trail from MethodType.fromMethodDescriptorString to
-        // parsing code in sun/invoke/util/BytecodeDescriptor.java which could
-        // be extracted and/or shared
-        if (descriptor == null
-            || !TYPE_DESC.matcher(descriptor).matches())
-            throw new IllegalArgumentException(String.format("%s is not a valid type descriptor", descriptor));
-        this.descriptor = descriptor;
-    }
-
+public interface ClassRef extends ConstantRef<Class<?>>, Constable<ConstantRef<Class<?>>> {
     /**
      * Create a {@linkplain ClassRef} from a fully-qualified, dot-separated
      * class name
@@ -73,7 +46,7 @@
      * describe a valid class name
      */
     @Foldable
-    public static ClassRef of(String name) {
+    static ClassRef of(String name) {
         return ClassRef.ofDescriptor("L" + name.replace('.', '/') + ";");
     }
 
@@ -88,7 +61,7 @@
      * not in the correct format
      */
     @Foldable
-    public static ClassRef of(String packageName, String className) {
+    static ClassRef of(String packageName, String className) {
         if (className.contains("."))
             throw new IllegalArgumentException(className);
         return ofDescriptor("L" + packageName.replace('.', '/')
@@ -106,8 +79,11 @@
      * a valid class descriptor
      */
     @Foldable
-    public static ClassRef ofDescriptor(String descriptor) {
-        return new ClassRef(requireNonNull(descriptor));
+    static ClassRef ofDescriptor(String descriptor) {
+        requireNonNull(descriptor);
+        return (descriptor.length() == 1)
+               ? new PrimitiveClassRef(descriptor)
+               : new ConstantClassRef(descriptor);
     }
 
     /**
@@ -117,8 +93,8 @@
      * @return a {@linkplain ClassRef} describing the array type
      */
     @Foldable
-    public ClassRef array() {
-        return ClassRef.ofDescriptor("[" + descriptor);
+    default ClassRef array() {
+        return ClassRef.ofDescriptor("[" + descriptorString());
     }
 
     /**
@@ -128,10 +104,10 @@
      * @return a {@linkplain ClassRef} describing the inner class
      */
     @Foldable
-    public ClassRef inner(String innerName) {
-        if (!descriptor.startsWith("L"))
+    default ClassRef inner(String innerName) {
+        if (!descriptorString().startsWith("L"))
             throw new IllegalStateException("Outer class is not a non-array reference type");
-        return ClassRef.ofDescriptor(descriptor.substring(0, descriptor.length() - 1) + "$" + innerName + ";");
+        return ClassRef.ofDescriptor(descriptorString().substring(0, descriptorString().length() - 1) + "$" + innerName + ";");
     }
 
     /**
@@ -143,12 +119,12 @@
      * @return a {@linkplain ClassRef} describing the inner class
      */
     @Foldable
-    public ClassRef inner(String firstInnerName, String... moreInnerNames) {
-        if (!descriptor.startsWith("L"))
+    default ClassRef inner(String firstInnerName, String... moreInnerNames) {
+        if (!descriptorString().startsWith("L"))
             throw new IllegalStateException("Outer class is not a non-array reference type");
         return moreInnerNames.length == 0
                ? inner(firstInnerName)
-               : ClassRef.ofDescriptor(descriptor.substring(0, descriptor.length() - 1) + "$" + firstInnerName
+               : ClassRef.ofDescriptor(descriptorString().substring(0, descriptorString().length() - 1) + "$" + firstInnerName
                                        + Stream.of(moreInnerNames).collect(joining("$", "$", "")) + ";");
     }
 
@@ -157,8 +133,8 @@
      *
      * @return whether this {@linkplain ClassRef} describes an array type
      */
-    public boolean isArray() {
-        return descriptor.startsWith("[");
+    default boolean isArray() {
+        return descriptorString().startsWith("[");
     }
 
     /**
@@ -166,8 +142,8 @@
      *
      * @return whether this {@linkplain ClassRef} describes a primitive type
      */
-    public boolean isPrimitive() {
-        return descriptor.length() == 1;
+    default boolean isPrimitive() {
+        return descriptorString().length() == 1;
     }
 
     /**
@@ -179,28 +155,30 @@
      * describe an array type
      */
     @Foldable
-    public ClassRef componentType() {
+    default ClassRef componentType() {
         if (!isArray())
             throw new IllegalStateException();
-        return ClassRef.ofDescriptor(descriptor.substring(1));
+        return ClassRef.ofDescriptor(descriptorString().substring(1));
     }
 
     /**
-     * Returns the canonical name of the type described by this descriptor
+     * Returns a human-readable name for the type described by this descriptor
      *
-     * @return the canonical name of the type described by this descriptor
+     * @return a human-readable name for the type described by this descriptor
      */
-    public String canonicalName() {
-        if (descriptor.length() == 1)
-            return Wrapper.forBasicType(descriptor.charAt(0)).primitiveSimpleName();
-        else if (descriptor.startsWith("L"))
-            return descriptor.substring(1, descriptor.length() - 1).replace('/', '.');
-        else if (descriptor.startsWith(("["))) {
+    default String simpleName() {
+        if (descriptorString().length() == 1)
+            return Wrapper.forBasicType(descriptorString().charAt(0)).primitiveSimpleName();
+        else if (descriptorString().startsWith("L")) {
+            return descriptorString().substring(Math.max(1, descriptorString().lastIndexOf('/') + 1),
+                                                descriptorString().length() - 1);
+        }
+        else if (descriptorString().startsWith(("["))) {
             int depth=arrayDepth();
             ClassRef c = this;
             for (int i=0; i<depth; i++)
                 c = c.componentType();
-            String name = c.canonicalName();
+            String name = c.simpleName();
             StringBuilder sb = new StringBuilder(name.length() + 2*depth);
             sb.append(name);
             for (int i=0; i<depth; i++)
@@ -208,66 +186,20 @@
             return sb.toString();
         }
         else
-            throw new IllegalStateException(descriptor);
+            throw new IllegalStateException(descriptorString());
     }
 
     private int arrayDepth() {
         int depth = 0;
-        while (descriptor.charAt(depth) == '[')
+        while (descriptorString().charAt(depth) == '[')
             depth++;
         return depth;
     }
 
-    @Override
-    public Class<?> resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
-        if (isPrimitive()) {
-            return Wrapper.forBasicType(descriptor.charAt(0)).primitiveType();
-        }
-        else {
-            ClassRef c = this;
-            int depth = arrayDepth();
-            for (int i=0; i<depth; i++)
-                c = c.componentType();
-
-            if (c.descriptor.length() == 1)
-                return Class.forName(descriptor, true, lookup.lookupClass().getClassLoader());
-            else {
-                Class<?> clazz = Class.forName(c.descriptor.substring(1, c.descriptor.length() - 1).replace('/', '.'), true, lookup.lookupClass().getClassLoader());
-                for (int i = 0; i < depth; i++)
-                    clazz = Array.newInstance(clazz, 0).getClass();
-                return clazz;
-            }
-        }
-    }
-
-    @Override
+    /**
+     * Return the type descriptor string
+     * @return the type descriptor string
+     */
     @Foldable
-    public String descriptorString() {
-        return descriptor;
-    }
-
-    @Override
-    public Optional<ConstantRef<ConstantRef<Class<?>>>> toSymbolicRef(MethodHandles.Lookup lookup) {
-        return Optional.of(DynamicConstantRef.<ConstantRef<Class<?>>>of(SymbolicRefs.BSM_INVOKE, SymbolicRefs.CR_ClassRef)
-                                   .withArgs(SymbolicRefs.MHR_CLASSREF_FACTORY, descriptor));
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        ClassRef constant = (ClassRef) o;
-        return Objects.equals(descriptor, constant.descriptor);
-    }
-
-    @Override
-    public int hashCode() {
-        return descriptor != null ? descriptor.hashCode() : 0;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("ClassRef[%s]", canonicalName());
-    }
+    String descriptorString();
 }
--- a/src/java.base/share/classes/java/lang/sym/Constable.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/Constable.java	Thu Mar 01 14:25:00 2018 -0500
@@ -31,20 +31,26 @@
 import java.util.Optional;
 
 /**
- * A type whose instances can describe themselves as a {@link ConstantRef}.
- * {@linkplain Constable} types include those types which have native
- * representation in the constant pool ({@link String}, {@link Integer},
- * {@link Long}, {@link Float}, {@link Double}, {@link Class}, {@link MethodType},
- * and {@link MethodHandle}), runtime support classes such as {@link VarHandle},
- * and types corresponding to core language features ({@link Enum}).
+ * Represents a <em>constable</em> type, whch is one whose values can be
+ * represented in the constant pool of a Java classfile.  Instances of constable
+ * types can describe themselves in symbolic form as a {@link ConstantRef}.
+ * The base constable types are those that have a native representation in
+ * the constant pool: ({@link String}, {@link Integer}, {@link Long}, {@link Float},
+ * {@link Double}, {@link Class}, {@link MethodType}, and {@link MethodHandle}).
+ * An arbitrary reference type can be constable as long as its instances can
+ * describe themselves as symbolic references to dynamically-computed constants
+ * of that type.  Examples in the Java SE Platform API are types that support
+ * Java language features, such as {@link Enum}, and runtime support classes,
+ * such as {@link VarHandle}.
  *
- * <p>The symbolic description is obtained via {@link #toSymbolicRef(MethodHandles.Lookup)}.
- * A {@linkplain Constable} need not be able to render all instances in the form
- * of a {@link ConstantRef}; this method returns {@link Optional} to indicate
- * whether such a description could be created for a particular instance.
- * (For example, {@link MethodHandle} will produce symbolic descriptions for
- * direct methods handles, but not necessarily for method handles resulting from
- * method handle combinators such as {@link MethodHandle#asType(MethodType)}.)
+ * <p>The nominal form is obtained via {@link #toConstantRef(MethodHandles.Lookup)}.
+ * A {@linkplain Constable} need not be able to (or may not choose to) render
+ * all instances in the form of a {@link ConstantRef}; consequently this method
+ * returns an {@link Optional} to indicate whether such a description could be
+ * created for a particular instance. (For example, {@link MethodHandle} will
+ * produce symbolic descriptions for direct methods handles, but not necessarily
+ * for method handles resulting from method handle combinators such as
+ * {@link MethodHandle#asType(MethodType)}.)
  *
  * @param <T> the type of the class implementing {@linkplain Constable}
  */
@@ -53,14 +59,14 @@
      * Return a symbolic constant reference for this instance, if one can be
      * constructed.
      *
-     * @implSpec This method behaves as if {@link #toSymbolicRef(MethodHandles.Lookup)}
+     * @implSpec This method behaves as if {@link #toConstantRef(MethodHandles.Lookup)}
      * were called with a lookup parameter of {@code MethodHandles.publicLookup()}.
      *
      * @return An {@link Optional} describing the resulting symbolic reference,
      * or an empty {@link Optional} if one cannot be constructed
      */
-    default Optional<? extends ConstantRef<? super T>> toSymbolicRef() {
-        return toSymbolicRef(MethodHandles.publicLookup());
+    default Optional<? extends ConstantRef<? super T>> toConstantRef() {
+        return toConstantRef(MethodHandles.publicLookup());
     }
 
     /**
@@ -75,5 +81,5 @@
      * or an empty {@link Optional} if one cannot be constructed or this object
      * is not accessible from {@code lookup}
      */
-    Optional<? extends ConstantRef<? super T>> toSymbolicRef(MethodHandles.Lookup lookup);
+    Optional<? extends ConstantRef<? super T>> toConstantRef(MethodHandles.Lookup lookup);
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/sym/ConstantClassRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.sym;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.Array;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.regex.Pattern;
+
+import static java.lang.sym.ConstantRefs.CR_ClassRef;
+
+/**
+ * ConstantClassRef
+ *
+ * @author Brian Goetz
+ */
+public class ConstantClassRef implements ClassRef {
+    private static final Pattern TYPE_DESC = Pattern.compile("(\\[*)(V|I|J|S|B|C|F|D|Z|L[^/.\\[;][^.\\[;]*;)");
+
+    private final String descriptor;
+
+    /**
+     * Create a {@linkplain ClassRef} from a descriptor string for a reference
+     * type
+     *
+     * @param descriptor the descriptor string
+     * @throws IllegalArgumentException if the descriptor string does not
+     * describe a valid reference type name
+     */
+    ConstantClassRef(String descriptor) {
+        // @@@ Replace validation with a lower-overhead mechanism than regex
+        // Follow the trail from MethodType.fromMethodDescriptorString to
+        // parsing code in sun/invoke/util/BytecodeDescriptor.java which could
+        // be extracted and/or shared
+        if (descriptor == null
+            || !TYPE_DESC.matcher(descriptor).matches())
+            throw new IllegalArgumentException(String.format("%s is not a valid type descriptor", descriptor));
+        this.descriptor = descriptor;
+    }
+
+    @Override
+    public String descriptorString() {
+        return descriptor;
+    }
+
+    private int arrayDepth() {
+        int depth = 0;
+        while (descriptorString().charAt(depth) == '[')
+            depth++;
+        return depth;
+    }
+
+    @Override
+    public Class<?> resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
+        ClassRef c = this;
+        int depth = arrayDepth();
+        for (int i=0; i<depth; i++)
+            c = c.componentType();
+
+        if (c.descriptorString().length() == 1)
+            return Class.forName(descriptorString(), true, lookup.lookupClass().getClassLoader());
+        else {
+            Class<?> clazz = Class.forName(c.descriptorString().substring(1, c.descriptorString().length() - 1)
+                                            .replace('/', '.'), true, lookup.lookupClass().getClassLoader());
+            for (int i = 0; i < depth; i++)
+                clazz = Array.newInstance(clazz, 0).getClass();
+            return clazz;
+        }
+    }
+
+    @Override
+    public Optional<? extends ConstantRef<? super ConstantRef<Class<?>>>> toConstantRef(MethodHandles.Lookup lookup) {
+        return DynamicConstantRef.symbolizeHelper(lookup, ConstantRefs.MHR_CLASSREF_FACTORY,
+                                                  CR_ClassRef, descriptorString());
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        ClassRef constant = (ClassRef) o;
+        return Objects.equals(descriptor, constant.descriptorString());
+    }
+
+    @Override
+    public int hashCode() {
+        return descriptor != null ? descriptor.hashCode() : 0;
+    }
+
+    @Override
+    public String toString() {
+        return String.format("ClassRef[%s]", simpleName());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/sym/ConstantMethodHandleRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.sym;
+
+import java.lang.annotation.Foldable;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandleInfo;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.util.Objects;
+import java.util.Optional;
+
+import static java.lang.sym.MethodHandleRef.Kind.CONSTRUCTOR;
+import static java.lang.sym.ConstantRefs.CR_MethodHandleRef;
+import static java.util.Objects.requireNonNull;
+
+/**
+ * DirectMethodHandleRef
+ *
+ * @author Brian Goetz
+ */
+public class ConstantMethodHandleRef implements MethodHandleRef {
+
+    private final Kind kind;
+    private final ClassRef owner;
+    private final String name;
+    private final MethodTypeRef type;
+
+    /**
+     * Construct a {@linkplain ConstantMethodHandleRef} from a kind, owner, name, and type
+     * @param kind the kind of the method handle
+     * @param owner the declaring class for the method
+     * @param name the name of the method (ignored if {@code kind} is {@code CONSTRUCTOR})
+     * @param type the type of the method
+     * @throws NullPointerException if any non-ignored argument is null
+     * @throws IllegalArgumentException if {@code kind} describes a field accessor,
+     * and {@code type} is not consistent with that kind of field accessor
+     */
+    ConstantMethodHandleRef(Kind kind, ClassRef owner, String name, MethodTypeRef type) {
+        super();
+        if (kind == CONSTRUCTOR)
+            name = "<init>";
+
+        requireNonNull(kind);
+        requireNonNull(owner);
+        requireNonNull(name);
+        requireNonNull(type);
+
+        switch (kind) {
+            case CONSTRUCTOR: validateConstructor(type); break;
+            case GETTER: validateFieldType(type, false, true); break;
+            case SETTER: validateFieldType(type, true, true); break;
+            case STATIC_GETTER: validateFieldType(type, false, false); break;
+            case STATIC_SETTER: validateFieldType(type, true, false); break;
+        }
+
+        this.kind = kind;
+        this.owner = owner;
+        this.name = name;
+        this.type = type;
+    }
+
+    private static void validateFieldType(MethodTypeRef type, boolean isSetter, boolean isVirtual) {
+        boolean isVoid = type.returnType().descriptorString().equals("V");
+        int expectedParams = (isSetter ? 1 : 0) + (isVirtual ? 1 : 0);
+        if (isVoid != isSetter
+            || type.parameterCount() != expectedParams
+            || (isVirtual && type.parameterType(0).isPrimitive())) {
+            String expectedType = String.format("(%s%s)%s", (isVirtual ? "R" : ""),
+                                                (isSetter ? "T" : ""), (isSetter ? "V" : "T"));
+            throw new IllegalArgumentException(String.format("Expected type of %s for getter, found %s", expectedType, type));
+        }
+    }
+
+    private static void validateConstructor(MethodTypeRef type) {
+        if (!type.returnType().descriptorString().equals("V")) {
+            throw new IllegalArgumentException(String.format("Expected type of (T)V for constructor, found %s", type));
+        }
+    }
+
+    /**
+     * Return the {@code refKind} of the method handle described by this symbolic reference,
+     * as defined by {@link MethodHandleInfo}
+     * @return the reference kind
+     */
+    @Foldable
+    public int refKind() { return kind.refKind; }
+
+    /**
+     * Return the {@code kind} of the method handle described by this symbolic reference
+     * @return the {@link Kind}
+     */
+    @Foldable
+    public Kind kind() { return kind; }
+
+    /**
+     * Return the class which declares the method or field described by
+     * this symbolic reference
+     *
+     * @return the class in which the method or field is declared
+     */
+    @Foldable
+    public ClassRef owner() {
+        return owner;
+    }
+
+    /**
+     * Return the name of the method described by this symbolic reference
+     *
+     * @return the name of the method
+     */
+    @Foldable
+    public String methodName() {
+        return name;
+    }
+
+    /**
+     * Return the type of the method described by this symbolic reference
+     * @return the method type
+     */
+    @Foldable
+    public MethodTypeRef methodType() {
+        return type;
+    }
+
+    public MethodHandle resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
+        Class<?> resolvedOwner = owner.resolveConstantRef(lookup);
+        MethodType resolvedType = this.type.resolveConstantRef(lookup);
+        switch (kind) {
+            case STATIC:
+                return lookup.findStatic(resolvedOwner, name, resolvedType);
+            case INTERFACE_VIRTUAL:
+            case VIRTUAL:
+                return lookup.findVirtual(resolvedOwner, name, resolvedType);
+            case SPECIAL:
+                return lookup.findSpecial(resolvedOwner, name, resolvedType, lookup.lookupClass());
+            case CONSTRUCTOR:
+                return lookup.findConstructor(resolvedOwner, resolvedType);
+            case GETTER:
+                return lookup.findGetter(resolvedOwner, name, resolvedType.returnType());
+            case STATIC_GETTER:
+                return lookup.findStaticGetter(resolvedOwner, name, resolvedType.returnType());
+            case SETTER:
+                return lookup.findSetter(resolvedOwner, name, resolvedType.parameterType(1));
+            case STATIC_SETTER:
+                return lookup.findStaticSetter(resolvedOwner, name, resolvedType.parameterType(0));
+            default:
+                throw new IllegalStateException(kind.name());
+        }
+    }
+
+    @Override
+    public Optional<? extends ConstantRef<? super ConstantRef<MethodHandle>>> toConstantRef(MethodHandles.Lookup lookup) {
+        return DynamicConstantRef.symbolizeHelper(lookup, ConstantRefs.MHR_METHODHANDLEREF_FACTORY, CR_MethodHandleRef,
+                                                  kind, owner, name, type);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        ConstantMethodHandleRef ref = (ConstantMethodHandleRef) o;
+        return kind == ref.kind &&
+               Objects.equals(owner, ref.owner) &&
+               Objects.equals(name, ref.name) &&
+               Objects.equals(type, ref.type);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(kind, owner, name, type);
+    }
+
+    @Override
+    public String toString() {
+        return String.format("MethodHandleRef[%s/%s::%s%s]", kind, owner.simpleName(), name, type.simpleDescriptor());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/sym/ConstantMethodTypeRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.sym;
+
+import java.lang.annotation.Foldable;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static java.lang.sym.ConstantRefs.CR_MethodTypeRef;
+import static java.util.Objects.requireNonNull;
+
+/**
+ * ConstantMethodTypeRef
+ *
+ * @author Brian Goetz
+ */
+public final class ConstantMethodTypeRef implements MethodTypeRef {
+
+    private static final Pattern TYPE_DESC = Pattern.compile("(\\[*)(V|I|J|S|B|C|F|D|Z|L[^/.\\[;][^.\\[;]*;)");
+    private static final Pattern pattern = Pattern.compile("\\((.*)\\)(.*)");
+
+    private final ClassRef returnType;
+    private final ClassRef[] argTypes;
+
+    /**
+     * Construct a {@linkplain MethodTypeRef} with the specified return type
+     * and parameter types
+     *
+     * @param returnType a {@link ClassRef} describing the return type
+     * @param argTypes {@link ClassRef}s describing the parameter types
+     */
+    ConstantMethodTypeRef(ClassRef returnType, ClassRef[] argTypes) {
+        this.returnType = requireNonNull(returnType);
+        this.argTypes = requireNonNull(argTypes);
+
+        for (ClassRef cr : argTypes)
+            if (cr.isPrimitive() && cr.descriptorString().equals("V"))
+                throw new IllegalArgumentException("Void parameters not permitted");
+    }
+
+    /**
+     * Create a {@linkplain ConstantMethodTypeRef} from a method descriptor string
+     *
+     * @param descriptor the method descriptor string
+     * @return a {@linkplain ConstantMethodTypeRef} describing the desired method type
+     * @throws IllegalArgumentException if the descriptor string is not a valid
+     * method descriptor
+     */
+    @Foldable
+    static MethodTypeRef ofDescriptor(String descriptor) {
+        // @@@ Replace validation with a lower-overhead mechanism than regex
+        // Follow the trail from MethodType.fromMethodDescriptorString to
+        // parsing code in sun/invoke/util/BytecodeDescriptor.java which could
+        // be extracted and/or shared
+        Matcher matcher = pattern.matcher(descriptor);
+        if (!matcher.matches())
+            throw new IllegalArgumentException(String.format("%s is not a valid method descriptor", descriptor));
+        String paramTypes = matcher.group(1);
+        String returnType = matcher.group(2);
+        if (!TYPE_DESC.matcher(returnType).matches())
+            throw new IllegalArgumentException(String.format("Invalid return type %s", returnType));
+        List<String> params = new ArrayList<>();
+        matcher = TYPE_DESC.matcher(paramTypes);
+        while (matcher.regionStart() < paramTypes.length()) {
+            if (matcher.lookingAt()) {
+                params.add(matcher.group());
+                matcher.region(matcher.end(), matcher.regionEnd());
+            }
+            else
+                throw new IllegalArgumentException(String.format("Invalid parameter type: %s", paramTypes.substring(matcher.regionStart(), matcher.regionEnd())));
+        }
+        return new ConstantMethodTypeRef(ClassRef.ofDescriptor(returnType), params.stream().map(ClassRef::ofDescriptor).toArray(ClassRef[]::new));
+    }
+
+    @Foldable
+    @Override
+    public ClassRef returnType() {
+        return returnType;
+    }
+
+    @Foldable
+    @Override
+    public int parameterCount() {
+        return argTypes.length;
+    }
+
+    @Foldable
+    @Override
+    public ClassRef parameterType(int index) {
+        return argTypes[index];
+    }
+
+    @Override
+    public List<ClassRef> parameterList() {
+        return List.of(argTypes);
+    }
+
+    @Override
+    public ClassRef[] parameterArray() {
+        return argTypes.clone();
+    }
+
+    @Foldable
+    @Override
+    public MethodTypeRef changeReturnType(ClassRef returnType) {
+        return MethodTypeRef.of(returnType, argTypes);
+    }
+
+    @Foldable
+    @Override
+    public MethodTypeRef changeParameterType(int index, ClassRef paramType) {
+        ClassRef[] newArgs = argTypes.clone();
+        newArgs[index] = paramType;
+        return MethodTypeRef.of(returnType, newArgs);
+    }
+
+    @Foldable
+    @Override
+    public MethodTypeRef dropParameterTypes(int start, int end) {
+        if (start < 0 || start >= argTypes.length || end < 0 || end > argTypes.length)
+            throw new IndexOutOfBoundsException();
+        else if (start > end)
+            throw new IllegalArgumentException(String.format("Range (%d, %d) not valid for size %d", start, end, argTypes.length));
+        ClassRef[] newArgs = new ClassRef[argTypes.length - (end - start)];
+        System.arraycopy(argTypes, 0, newArgs, 0, start);
+        System.arraycopy(argTypes, end, newArgs, start, argTypes.length - end);
+        return MethodTypeRef.of(returnType, newArgs);
+    }
+
+    @Foldable
+    @Override
+    public MethodTypeRef insertParameterTypes(int pos, ClassRef... paramTypes) {
+        if (pos < 0 || pos > argTypes.length)
+            throw new IndexOutOfBoundsException(pos);
+        ClassRef[] newArgs = new ClassRef[argTypes.length + paramTypes.length];
+        System.arraycopy(argTypes, 0, newArgs, 0, pos);
+        System.arraycopy(paramTypes, 0, newArgs, pos, paramTypes.length);
+        System.arraycopy(argTypes, pos, newArgs, pos+paramTypes.length, argTypes.length - pos);
+        return MethodTypeRef.of(returnType, newArgs);
+    }
+
+    @Override
+    public MethodType resolveConstantRef(MethodHandles.Lookup lookup) {
+        return MethodType.fromMethodDescriptorString(descriptorString(), lookup.lookupClass().getClassLoader());
+    }
+
+    @Override
+    public Optional<? extends ConstantRef<? super ConstantRef<MethodType>>> toConstantRef(MethodHandles.Lookup lookup) {
+        return DynamicConstantRef.symbolizeHelper(lookup, ConstantRefs.MHR_METHODTYPEREF_FACTORY, CR_MethodTypeRef, descriptorString());
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        ConstantMethodTypeRef constant = (ConstantMethodTypeRef) o;
+
+        return returnType.equals(constant.returnType)
+               && Arrays.equals(argTypes, constant.argTypes);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = returnType.hashCode();
+        result = 31 * result + Arrays.hashCode(argTypes);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return String.format("MethodTypeRef[%s]", simpleDescriptor());
+    }
+}
--- a/src/java.base/share/classes/java/lang/sym/ConstantRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/ConstantRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -24,41 +24,41 @@
  */
 package java.lang.sym;
 
-import java.lang.annotation.Foldable;
 import java.lang.invoke.Intrinsics;
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
-import java.util.Optional;
 
 /**
- * A {@link SymbolicRef} for an object expressible in a classfile constant pool.
+ * A symbolic reference to a loadable constant value, as defined in JVMS 4.4.
+ * Such a symbolic reference can be stored in the constant pool of a classfile
+ * and resolved to yield the constant value itself.
  *
- * <p>Static constants that can appear natively in the constant pool ({@link String},
+ * <p>Static constants that are expressible natively in the constant pool ({@link String},
  * {@link Integer}, {@link Long}, {@link Float}, and {@link Double}) implement
- * {@link ConstantRef}, serving as symbolic references for themselves.
- * Native linkable constant types ({@link Class}, {@link MethodType}, and
+ * {@link ConstantRef}, serve as symbolic references for themselves.
+ * Native linkable constants ({@link Class}, {@link MethodType}, and
  * {@link MethodHandle}) have counterpart {@linkplain ConstantRef} types:
- * ({@link ClassRef}, {@link MethodTypeRef}, and {@link MethodHandleRef}.)
- * Dynamic constants are represented by {@link DynamicConstantRef}.
- *
- * <p>APIs that perform generation or parsing of bytecode are encouraged to use
- * {@linkplain ConstantRef} to describe the operand of an {@code ldc} instruction
- * (including dynamic constants), the static bootstrap arguments of
- * dynamic constants and {@code invokedynamic} instructions, and any other
- * bytecodes or classfile structures that make use of the constant pool.
- *
- * <p>The {@linkplain ConstantRef} types are also used by {@link Intrinsics}
- * to express {@code ldc} instructions.
+ * {@link ClassRef}, {@link MethodTypeRef}, and {@link MethodHandleRef}.
+ * Other constants are represented by subtypes of {@link DynamicConstantRef}.
  *
  * <p>Non-platform classes should not implement {@linkplain ConstantRef} directly.
  * Instead, they should extend {@link DynamicConstantRef} (as {@link EnumRef}
  * and {@link VarHandleRef} do.)
  *
- * <p>Constants can be reflectively resolved via {@link ConstantRef#resolveRef(MethodHandles.Lookup)}.
+ * <p>Constants can be reflectively resolved via {@link ConstantRef#resolveConstantRef(MethodHandles.Lookup)}.
  *
  * <p>Constants describing various useful symbolic references (such as {@link ClassRef}
- * constants for platform classes) can be found in {@link SymbolicRefs}.
+ * instances for platform classes) can be found in {@link ConstantRefs}.
+ *
+ * <p>APIs that perform generation or parsing of bytecode are encouraged to use
+ * {@linkplain ConstantRef} to describe the operand of an {@code ldc} instruction
+ * (including dynamic constants), the static bootstrap arguments of
+ * dynamic constants and {@code invokedynamic} instructions, and other
+ * bytecodes or classfile structures that make use of the constant pool.
+ *
+ * <p>The {@linkplain ConstantRef} types are also used by {@link Intrinsics}
+ * to express {@code ldc} instructions.
  *
  * <p>Implementations of {@linkplain ConstantRef} must be
  * <a href="../doc-files/ValueBased.html">value-based</a> classes.
@@ -66,15 +66,17 @@
  * @apiNote In the future, if the Java language permits, {@linkplain ConstantRef}
  * may become a {@code sealed} interface, which would prohibit subclassing except by
  * explicitly permitted types.  Bytecode libraries can assume that the following
- * is an exhaustive set of subtypes: {@link String}, {@link Integer}, {@link Long},
- * {@link Float}, {@link Double}, {@link ClassRef}, {@link MethodTypeRef},
- * {@link MethodHandleRef}, and {@link DynamicConstantRef}.
+ * is an exhaustive set of direct subtypes: {@link String}, {@link Integer},
+ * {@link Long}, {@link Float}, {@link Double}, {@link ClassRef},
+ * {@link MethodTypeRef}, {@link MethodHandleRef}, and {@link DynamicConstantRef}.
+ *
  * @see Constable
  * @see ConstantRef
  * @see Intrinsics
- * @see SymbolicRefs
+ * @see ConstantRefs
+ *
  */
-public interface ConstantRef<T> extends SymbolicRef {
+public interface ConstantRef<T> {
     /**
      * Resolve this reference reflectively, using a {@link MethodHandles.Lookup}
      * to resolve any type names into classes.
@@ -85,60 +87,5 @@
      * (directly or indirectly) to a class, method, or field that cannot be
      * resolved
      */
-    T resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException;
-
-    /**
-     * A {@linkplain ConstantRef} which is associated with a type descriptor
-     * string that would be the target of a {@code NameAndType} constant.
-     *
-     * @param <T> The type of the object which this {@linkplain ConstantRef}
-     * describes
-     */
-    interface WithTypeDescriptor<T> extends ConstantRef<T> {
-        /**
-         * Return the descriptor string associated with the object described
-         * by this symbolic reference
-         *
-         * @return the descriptor string
-         */
-        @Foldable
-        String descriptorString();
-    }
-
-    /**
-     * An object that serves as its own symbolic reference.  Only the classes
-     * {@link String}, {@link Integer}, {@link Long}, {@link Float}, and
-     * {@link Double} should implement this interface.
-     *
-     * @param <T> The type of the object which this {@linkplain ConstantRef}
-     * describes
-     */
-    interface OfSelf<T extends ConstantRef.OfSelf<T>>
-            extends ConstantRef<T>, Constable<T> {
-        /**
-         * {@inheritDoc}
-         *
-         * @param lookup ignored
-         * @return the symbolic reference
-         * @implSpec This implementation returns its receiver
-         */
-        @Override
-        @SuppressWarnings("unchecked")
-        default Optional<T> toSymbolicRef(MethodHandles.Lookup lookup) {
-            return Optional.of((T) this);
-        }
-
-        /**
-         * {@inheritDoc}
-         *
-         * @param lookup ignored
-         * @return the symbolic reference
-         * @implSpec This implementation returns its receiver
-         */
-        @Override
-        @SuppressWarnings("unchecked")
-        default T resolveRef(MethodHandles.Lookup lookup) {
-            return (T) this;
-        }
-    }
+    T resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/sym/ConstantRefs.java	Thu Mar 01 14:25:00 2018 -0500
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.sym;
+
+import java.lang.annotation.Foldable;
+import java.lang.invoke.CallSite;
+import java.lang.invoke.ConstantBootstraps;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.invoke.MethodType;
+import java.lang.invoke.VarHandle;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Predefined constants for common symbolic references.  Includes class references
+ * for primitive types and common platform types, and method handle references
+ * for standard bootstrap methods.
+ *
+ * @see ConstantRef
+ */
+public final class ConstantRefs {
+    // No instances
+    private ConstantRefs() { }
+
+    // Don't change the order of these declarations!
+
+    /** {@link ClassRef} representing {@link Object} */
+    @Foldable
+    public static final ClassRef CR_Object = ClassRef.of("java.lang.Object");
+
+    /** {@link ClassRef} representing {@link String} */
+    @Foldable
+    public static final ClassRef CR_String = ClassRef.of("java.lang.String");
+
+    /** {@link ClassRef} representing {@link Class} */
+    @Foldable
+    public static final ClassRef CR_Class = ClassRef.of("java.lang.Class");
+
+    /** {@link ClassRef} representing {@link Number} */
+    @Foldable
+    public static final ClassRef CR_Number = ClassRef.of("java.lang.Number");
+
+    /** {@link ClassRef} representing {@link Integer} */
+    @Foldable
+    public static final ClassRef CR_Integer = ClassRef.of("java.lang.Integer");
+
+    /** {@link ClassRef} representing {@link Long} */
+    @Foldable
+    public static final ClassRef CR_Long = ClassRef.of("java.lang.Long");
+
+    /** {@link ClassRef} representing {@link Float} */
+    @Foldable
+    public static final ClassRef CR_Float = ClassRef.of("java.lang.Float");
+
+    /** {@link ClassRef} representing {@link Double} */
+    @Foldable
+    public static final ClassRef CR_Double = ClassRef.of("java.lang.Double");
+
+    /** {@link ClassRef} representing {@link Short} */
+    @Foldable
+    public static final ClassRef CR_Short = ClassRef.of("java.lang.Short");
+
+    /** {@link ClassRef} representing {@link Byte} */
+    @Foldable
+    public static final ClassRef CR_Byte = ClassRef.of("java.lang.Byte");
+
+    /** {@link ClassRef} representing {@link Character} */
+    @Foldable
+    public static final ClassRef CR_Character = ClassRef.of("java.lang.Character");
+
+    /** {@link ClassRef} representing {@link Boolean} */
+    @Foldable
+    public static final ClassRef CR_Boolean = ClassRef.of("java.lang.Boolean");
+
+    /** {@link ClassRef} representing {@link Void} */
+    @Foldable
+    public static final ClassRef CR_Void = ClassRef.of("java.lang.Void");
+
+    /** {@link ClassRef} representing {@link Throwable} */
+    @Foldable
+    public static final ClassRef CR_Throwable = ClassRef.of("java.lang.Throwable");
+
+    /** {@link ClassRef} representing {@link Exception} */
+    @Foldable
+    public static final ClassRef CR_Exception = ClassRef.of("java.lang.Exception");
+
+    /** {@link ClassRef} representing {@link Enum} */
+    @Foldable
+    public static final ClassRef CR_Enum = ClassRef.of("java.lang.Enum");
+
+    /** {@link ClassRef} representing {@link VarHandle} */
+    @Foldable
+    public static final ClassRef CR_VarHandle = ClassRef.of("java.lang.invoke.VarHandle");
+
+    /** {@link ClassRef} representing {@link MethodHandles} */
+    @Foldable
+    public static final ClassRef CR_MethodHandles = ClassRef.of("java.lang.invoke.MethodHandles");
+
+    /** {@link ClassRef} representing {@link MethodHandles.Lookup} */
+    @Foldable
+    public static final ClassRef CR_MethodHandles_Lookup = CR_MethodHandles.inner("Lookup");
+
+    /** {@link ClassRef} representing {@link MethodHandle} */
+    @Foldable
+    public static final ClassRef CR_MethodHandle = ClassRef.of("java.lang.invoke.MethodHandle");
+
+    /** {@link ClassRef} representing {@link MethodType} */
+    @Foldable
+    public static final ClassRef CR_MethodType = ClassRef.of("java.lang.invoke.MethodType");
+
+    /** {@link ClassRef} representing {@link CallSite} */
+    @Foldable
+    public static final ClassRef CR_CallSite = ClassRef.of("java.lang.invoke.CallSite");
+
+    /** {@link ClassRef} representing {@link Collection} */
+    @Foldable
+    public static final ClassRef CR_Collection = ClassRef.of("java.util.Collection");
+
+    /** {@link ClassRef} representing {@link List} */
+    @Foldable
+    public static final ClassRef CR_List = ClassRef.of("java.util.List");
+
+    /** {@link ClassRef} representing {@link Set} */
+    @Foldable
+    public static final ClassRef CR_Set = ClassRef.of("java.util.Set");
+
+    /** {@link ClassRef} representing {@link Map} */
+    @Foldable
+    public static final ClassRef CR_Map = ClassRef.of("java.util.Map");
+
+    /** {@link ClassRef} representing {@link ConstantRef} */
+    @Foldable
+    static final ClassRef CR_ConstantRef = ClassRef.of("java.lang.sym.ConstantRef");
+
+    /** {@link ClassRef} representing {@link ClassRef} */
+    @Foldable
+    static final ClassRef CR_ClassRef = ClassRef.of("java.lang.sym.ClassRef");
+
+    /** {@link ClassRef} representing {@link EnumRef} */
+    @Foldable
+    static final ClassRef CR_EnumRef = ClassRef.of("java.lang.sym.EnumRef");
+
+    /** {@link ClassRef} representing {@link MethodTypeRef} */
+    @Foldable
+    static final ClassRef CR_MethodTypeRef = ClassRef.of("java.lang.sym.MethodTypeRef");
+
+    /** {@link ClassRef} representing {@link MethodHandleRef} */
+    @Foldable
+    static final ClassRef CR_MethodHandleRef = ClassRef.of("java.lang.sym.MethodHandleRef");
+
+    /** {@link ClassRef} representing {@link VarHandleRef} */
+    @Foldable
+    static final ClassRef CR_VarHandleRef = ClassRef.of("java.lang.sym.VarHandleRef");
+
+    /** {@link ClassRef} representing {@link MethodHandleRef.Kind} */
+    @Foldable
+    static final ClassRef CR_MethodHandleRef_Kind = CR_MethodHandleRef.inner("Kind");
+
+    /** {@link ClassRef} representing {@link DynamicConstantRef} */
+    @Foldable
+    static final ClassRef CR_DynamicConstantRef = ClassRef.of("java.lang.sym.DynamicConstantRef");
+
+    /** {@link ClassRef} representing {@link DynamicCallSiteRef} */
+    @Foldable
+    static final ClassRef CR_DynamicCallSiteRef = ClassRef.of("java.lang.sym.DynamicCallSiteRef");
+
+    /** {@link ClassRef} representing {@link ConstantBootstraps} */
+    @Foldable
+    static final ClassRef CR_ConstantBootstraps = ClassRef.of("java.lang.invoke.ConstantBootstraps");
+
+    // Used by MethodHandleRef, but initialized here before reference to
+    // MethodHandleRef to avoid static initalization circularities
+    static final ClassRef[] INDY_BOOTSTRAP_ARGS = {
+            ConstantRefs.CR_MethodHandles_Lookup,
+            ConstantRefs.CR_String,
+            ConstantRefs.CR_MethodType };
+
+    static final ClassRef[] CONDY_BOOTSTRAP_ARGS = {
+            ConstantRefs.CR_MethodHandles_Lookup,
+            ConstantRefs.CR_String,
+            ConstantRefs.CR_Class };
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#primitiveClass(Lookup, String, Class)} */
+    @Foldable
+    public static final MethodHandleRef BSM_PRIMITIVE_CLASS
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "primitiveClass", CR_Class);
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#enumConstant(Lookup, String, Class)} */
+    @Foldable
+    public static final MethodHandleRef BSM_ENUM_CONSTANT
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "enumConstant", CR_Enum);
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#nullConstant(Lookup, String, Class)} */
+    @Foldable
+    public static final MethodHandleRef BSM_NULL_CONSTANT
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "nullConstant", ConstantRefs.CR_Object);
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#fieldVarHandle(Lookup, String, Class, Class, Class)} */
+    @Foldable
+    public static final MethodHandleRef BSM_VARHANDLE_FIELD
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "fieldVarHandle", CR_VarHandle, CR_Class, CR_Class);
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#staticFieldVarHandle(Lookup, String, Class, Class, Class)} */
+    @Foldable
+    public static final MethodHandleRef BSM_VARHANDLE_STATIC_FIELD
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "staticFieldVarHandle", CR_VarHandle, CR_Class, CR_Class);
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#arrayVarHandle(Lookup, String, Class, Class)} */
+    @Foldable
+    public static final MethodHandleRef BSM_VARHANDLE_ARRAY
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "arrayVarHandle", CR_VarHandle, CR_Class);
+
+    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#invoke(Lookup, String, Class, MethodHandle, Object...)} */
+    @Foldable
+    public static final MethodHandleRef BSM_INVOKE
+            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "invoke", CR_Object, CR_MethodHandle, CR_Object.array());
+
+    /** {@link ClassRef} representing the primitive type {@code int} */
+    @Foldable
+    public static final ClassRef CR_int = ClassRef.ofDescriptor("I");
+
+    /** {@link ClassRef} representing the primitive type {@code long} */
+    @Foldable
+    public static final ClassRef CR_long = ClassRef.ofDescriptor("J");
+
+    /** {@link ClassRef} representing the primitive type {@code float} */
+    @Foldable
+    public static final ClassRef CR_float = ClassRef.ofDescriptor("F");
+
+    /** {@link ClassRef} representing the primitive type {@code double} */
+    @Foldable
+    public static final ClassRef CR_double = ClassRef.ofDescriptor("D");
+
+    /** {@link ClassRef} representing the primitive type {@code short} */
+    @Foldable
+    public static final ClassRef CR_short = ClassRef.ofDescriptor("S");
+
+    /** {@link ClassRef} representing the primitive type {@code byte} */
+    @Foldable
+    public static final ClassRef CR_byte = ClassRef.ofDescriptor("B");
+
+    /** {@link ClassRef} representing the primitive type {@code char} */
+    @Foldable
+    public static final ClassRef CR_char = ClassRef.ofDescriptor("C");
+
+    /** {@link ClassRef} representing the primitive type {@code boolean} */
+    @Foldable
+    public static final ClassRef CR_boolean = ClassRef.ofDescriptor("Z");
+
+    /** {@link ClassRef} representing the primitive type {@code void} */
+    @Foldable
+    public static final ClassRef CR_void = ClassRef.ofDescriptor("V");
+
+    /** Symbolic reference representing the constant {@code null} */
+    @Foldable
+    public static final ConstantRef<?> NULL = DynamicConstantRef.of(ConstantRefs.BSM_NULL_CONSTANT, ConstantRefs.CR_Object);
+
+    // Used by XxxRef classes, but need to be hear to avoid bootstrap cycles
+    static final MethodHandleRef MHR_METHODTYPEREF_FACTORY
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_MethodTypeRef, "ofDescriptor", CR_MethodTypeRef, CR_String);
+
+    static final MethodHandleRef MHR_CLASSREF_FACTORY
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_ClassRef, "ofDescriptor", CR_ClassRef, CR_String);
+
+    static final MethodHandleRef MHR_METHODHANDLEREF_FACTORY
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_MethodHandleRef, "of",
+                                 CR_MethodHandleRef, CR_MethodHandleRef_Kind, CR_ClassRef, CR_String, CR_MethodTypeRef);
+
+    static final MethodHandleRef MHR_METHODHANDLE_ASTYPE
+            = MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, CR_MethodHandle, "asType", CR_MethodHandle, CR_MethodType);
+
+    static final MethodHandleRef MHR_METHODHANDLEREF_ASTYPE
+            = MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, CR_MethodHandleRef, "asType", CR_MethodHandleRef, CR_MethodTypeRef);
+
+    static final MethodHandleRef MHR_DYNAMICCONSTANTREF_FACTORY_VARARGS
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_DynamicConstantRef, "of",
+                                 CR_DynamicConstantRef, CR_MethodHandleRef, CR_String, CR_ClassRef, CR_ConstantRef.array());
+
+    static final MethodHandleRef MHR_DYNAMICCONSTANTREF_FACTORY
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_DynamicConstantRef, "of",
+                                 CR_DynamicConstantRef, CR_MethodHandleRef, CR_String, CR_ClassRef);
+
+    static final MethodHandleRef MHR_DYNAMICCONSTANTREF_WITHARGS
+            = MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, CR_DynamicConstantRef, "withArgs",
+                                 CR_DynamicConstantRef, CR_ConstantRef.array());
+
+    static final MethodHandleRef MHR_ENUMREF_FACTORY
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_EnumRef, "of", CR_EnumRef, CR_ClassRef, CR_String);
+
+    static final MethodHandleRef MHR_VARHANDLEREF_OFFIELD
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_VarHandleRef, "ofField",
+                                 CR_VarHandleRef, CR_ClassRef, CR_String, CR_ClassRef);
+
+    static final MethodHandleRef MHR_VARHANDLEREF_OFSTATIC
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_VarHandleRef, "ofStaticField",
+                                 CR_VarHandleRef, CR_ClassRef, CR_String, CR_ClassRef);
+
+    static final MethodHandleRef MHR_VARHANDLEREF_OFARRAY
+            = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_VarHandleRef, "ofArray",
+                                 CR_VarHandleRef, CR_ClassRef);
+}
--- a/src/java.base/share/classes/java/lang/sym/DynamicCallSiteRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/DynamicCallSiteRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -30,15 +30,14 @@
 import java.lang.invoke.MethodHandles;
 import java.util.Arrays;
 import java.util.Objects;
-import java.util.Optional;
 
-import static java.lang.sym.SymbolicRefs.CR_String;
+import static java.lang.sym.ConstantRefs.CR_String;
 
 /**
  * A symbolic reference for an {@code invokedynamic} call site.
  */
 @SuppressWarnings("rawtypes")
-public final class DynamicCallSiteRef implements SymbolicRef, Constable<DynamicCallSiteRef> {
+public final class DynamicCallSiteRef {
     private static final ConstantRef<?>[] EMPTY_ARGS = new ConstantRef<?>[0];
 
     private final MethodHandleRef bootstrapMethod;
@@ -221,29 +220,18 @@
      * @see CallSite#dynamicInvoker()
      */
     public MethodHandle dynamicInvoker(MethodHandles.Lookup lookup) throws Throwable {
-        assert bootstrapMethod.type().parameterType(1).equals(CR_String);
-        MethodHandle bsm = bootstrapMethod.resolveRef(lookup);
+        assert bootstrapMethod.methodType().parameterType(1).equals(CR_String);
+        MethodHandle bsm = bootstrapMethod.resolveConstantRef(lookup);
         Object[] args = new Object[bootstrapArgs.length + 3];
         args[0] = lookup;
         args[1] = name;
-        args[2] = type.resolveRef(lookup);
+        args[2] = type.resolveConstantRef(lookup);
         System.arraycopy(bootstrapArgs, 0, args, 3, bootstrapArgs.length);
         CallSite callSite = (CallSite) bsm.invokeWithArguments(args);
         return callSite.dynamicInvoker();
     }
 
     @Override
-    public Optional<? extends ConstantRef<DynamicCallSiteRef>> toSymbolicRef(MethodHandles.Lookup lookup) {
-        ConstantRef<?>[] args = new ConstantRef<?>[bootstrapArgs.length + 4];
-        args[0] = SymbolicRefs.MHR_DYNAMICCONSTANTREF_FACTORY;
-        args[1] = bootstrapMethod;
-        args[2] = name;
-        args[3] = type;
-        System.arraycopy(bootstrapArgs, 0, args, 4, bootstrapArgs.length);
-        return Optional.of(DynamicConstantRef.of(SymbolicRefs.BSM_INVOKE, name, SymbolicRefs.CR_DynamicConstantRef, args));
-    }
-
-    @Override
     public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
--- a/src/java.base/share/classes/java/lang/sym/DynamicConstantRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/DynamicConstantRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -26,26 +26,32 @@
 
 import java.lang.annotation.Foldable;
 import java.lang.invoke.ConstantBootstraps;
-import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.util.Arrays;
 import java.util.Map;
+import java.util.NoSuchElementException;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.function.Function;
 import java.util.stream.Stream;
 
+import static java.lang.sym.ConstantRefs.CR_ClassRef;
+import static java.lang.sym.ConstantRefs.CR_ConstantRef;
+import static java.lang.sym.ConstantRefs.CR_DynamicConstantRef;
+import static java.lang.sym.ConstantRefs.CR_MethodHandleRef;
+import static java.lang.sym.ConstantRefs.CR_String;
 import static java.util.Objects.requireNonNull;
 
 /**
  * A symbolic reference for a dynamic constant (one described in the constant
  * pool with {@code Constant_Dynamic_info}.)
  *
+ * <p>Concrete subtypes of {@linkplain DynamicConstantRef} must be
+ * <a href="../doc-files/ValueBased.html">value-based</a>.
+ *
  * @param <T> the type of the dynamic constant
  */
-public class DynamicConstantRef<T> implements ConstantRef<T>, Constable<ConstantRef<T>> {
-    private static final ConstantRef<?>[] EMPTY_ARGS = new ConstantRef<?>[0];
-
+public abstract class DynamicConstantRef<T> implements ConstantRef<T>, Constable<ConstantRef<T>> {
     private final MethodHandleRef bootstrapMethod;
     private final ConstantRef<?>[] bootstrapArgs;
     private final String name;
@@ -53,18 +59,18 @@
 
     @SuppressWarnings("rawtypes")
     private static final Map<MethodHandleRef, Function<DynamicConstantRef, ConstantRef<?>>> canonicalMap
-            = Map.ofEntries(Map.entry(SymbolicRefs.BSM_PRIMITIVE_CLASS, d -> ClassRef.ofDescriptor(d.name)),
-                            Map.entry(SymbolicRefs.BSM_ENUM_CONSTANT, d -> EnumRef.of(d.type, d.name)),
-                            Map.entry(SymbolicRefs.BSM_NULL_CONSTANT, d -> SymbolicRefs.NULL),
-                            Map.entry(SymbolicRefs.BSM_VARHANDLE_STATIC_FIELD,
+            = Map.ofEntries(Map.entry(ConstantRefs.BSM_PRIMITIVE_CLASS, d -> ClassRef.ofDescriptor(d.name)),
+                            Map.entry(ConstantRefs.BSM_ENUM_CONSTANT, d -> EnumRef.of(d.type, d.name)),
+                            Map.entry(ConstantRefs.BSM_NULL_CONSTANT, d -> ConstantRefs.NULL),
+                            Map.entry(ConstantRefs.BSM_VARHANDLE_STATIC_FIELD,
                                       d -> VarHandleRef.ofStaticField((ClassRef) d.bootstrapArgs[0],
                                                                       (String) d.bootstrapArgs[1],
                                                                       (ClassRef) d.bootstrapArgs[2])),
-                            Map.entry(SymbolicRefs.BSM_VARHANDLE_FIELD,
+                            Map.entry(ConstantRefs.BSM_VARHANDLE_FIELD,
                                       d -> VarHandleRef.ofField((ClassRef) d.bootstrapArgs[0],
                                                                 (String) d.bootstrapArgs[1],
                                                                 (ClassRef) d.bootstrapArgs[2])),
-                            Map.entry(SymbolicRefs.BSM_VARHANDLE_ARRAY,
+                            Map.entry(ConstantRefs.BSM_VARHANDLE_ARRAY,
                                       d -> VarHandleRef.ofArray((ClassRef) d.bootstrapArgs[0]))
     );
 
@@ -81,7 +87,7 @@
      * @throws NullPointerException if any argument is null
      * @throws IllegalArgumentException if {@code name.length()} is zero
      */
-    protected DynamicConstantRef(MethodHandleRef bootstrapMethod, String name, ClassRef type, ConstantRef<?>[] bootstrapArgs) {
+    protected DynamicConstantRef(MethodHandleRef bootstrapMethod, String name, ClassRef type, ConstantRef<?>... bootstrapArgs) {
         this.bootstrapMethod = requireNonNull(bootstrapMethod);
         this.name = requireNonNull(name);
         this.type = requireNonNull(type);
@@ -92,22 +98,6 @@
     }
 
     /**
-     * Construct a symbolic reference for a dynamic constant, whose bootstrap
-     * takes no static arguments
-     *
-     * @param bootstrapMethod The bootstrap method for the constant
-     * @param name The name that would appear in the {@code NameAndType} operand
-     *             of the {@code LDC} for this constant
-     * @param type The type that would appear in the {@code NameAndType} operand
-     *             of the {@code LDC} for this constant
-     * @throws NullPointerException if any argument is null
-     * @throws IllegalArgumentException if {@code name.length()} is zero
-     */
-    protected DynamicConstantRef(MethodHandleRef bootstrapMethod, String name, ClassRef type) {
-        this(bootstrapMethod, name, type, EMPTY_ARGS);
-    }
-
-    /**
      * Return a symbolic reference for a dynamic constant whose bootstrap, invocation
      * name, and invocation type are the same as this one, but with the specified
      * bootstrap arguments
@@ -118,7 +108,7 @@
      */
     @Foldable
     public DynamicConstantRef<T> withArgs(ConstantRef<?>... bootstrapArgs) {
-        return new DynamicConstantRef<>(bootstrapMethod, name, type, bootstrapArgs);
+        return new DynamicConstantRefImpl<>(bootstrapMethod, name, type, bootstrapArgs);
     }
 
     /**
@@ -141,7 +131,7 @@
      */
     @Foldable
     public static<T> ConstantRef<T> ofCanonical(MethodHandleRef bootstrapMethod, String name, ClassRef type, ConstantRef<?>[] bootstrapArgs) {
-        DynamicConstantRef<T> dcr = new DynamicConstantRef<>(bootstrapMethod, name, type, bootstrapArgs);
+        DynamicConstantRef<T> dcr = new DynamicConstantRefImpl<>(bootstrapMethod, name, type, bootstrapArgs);
         return dcr.canonicalize();
     }
 
@@ -174,7 +164,7 @@
      */
     @Foldable
     public static<T> DynamicConstantRef<T> of(MethodHandleRef bootstrapMethod, String name, ClassRef type, ConstantRef<?>[] bootstrapArgs) {
-        return new DynamicConstantRef<>(bootstrapMethod, name, type, bootstrapArgs);
+        return new DynamicConstantRefImpl<>(bootstrapMethod, name, type, bootstrapArgs);
     }
 
     /**
@@ -193,7 +183,7 @@
      */
     @Foldable
     public static<T> DynamicConstantRef<T> of(MethodHandleRef bootstrapMethod, String name, ClassRef type) {
-        return new DynamicConstantRef<>(bootstrapMethod, name, type);
+        return new DynamicConstantRefImpl<>(bootstrapMethod, name, type);
     }
 
     /**
@@ -228,7 +218,7 @@
      */
     @Foldable
     public static<T> DynamicConstantRef<T> of(MethodHandleRef bootstrapMethod, String name) {
-        return of(bootstrapMethod, name, bootstrapMethod.type().returnType());
+        return of(bootstrapMethod, name, bootstrapMethod.methodType().returnType());
     }
 
     /**
@@ -253,7 +243,7 @@
      * @return the name
      */
     @Foldable
-    public String name() {
+    public String constantName() {
         return name;
     }
 
@@ -263,7 +253,7 @@
      * @return the type
      */
     @Foldable
-    public ClassRef type() {
+    public ClassRef constantType() {
         return type;
     }
 
@@ -286,7 +276,7 @@
             return Stream.of(args)
                     .map(arg -> {
                         try {
-                            return arg.resolveRef(lookup);
+                            return arg.resolveConstantRef(lookup);
                         }
                         catch (ReflectiveOperationException e) {
                             throw new RuntimeException(e);
@@ -305,25 +295,77 @@
     }
 
     @SuppressWarnings("unchecked")
-    public T resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
-        return (T) ConstantBootstraps.makeConstant(bootstrapMethod.resolveRef(lookup),
+    public T resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
+        return (T) ConstantBootstraps.makeConstant(bootstrapMethod.resolveConstantRef(lookup),
                                                    name,
-                                                   type.resolveRef(lookup),
+                                                   type.resolveConstantRef(lookup),
                                                    resolveArgs(lookup, bootstrapArgs),
                                                    // TODO pass lookup
                                                    lookup.lookupClass());
     }
 
     @Override
-    public Optional<? extends ConstantRef<? super ConstantRef<T>>> toSymbolicRef(MethodHandles.Lookup lookup) {
-        ConstantRef<?>[] args = new ConstantRef<?>[bootstrapArgs.length + 4];
-        args[0] = SymbolicRefs.MHR_DYNAMICCONSTANTREF_FACTORY;
-        args[1] = bootstrapMethod;
-        args[2] = name;
-        args[3] = type;
-        System.arraycopy(bootstrapArgs, 0, args, 4, bootstrapArgs.length);
-        ConstantRef<ConstantRef<T>> ref = DynamicConstantRef.of(SymbolicRefs.BSM_INVOKE, name, SymbolicRefs.CR_DynamicConstantRef, args);
-        return Optional.of(ref);
+    public Optional<? extends ConstantRef<? super ConstantRef<T>>> toConstantRef(MethodHandles.Lookup lookup) {
+        try {
+            ConstantRef<?>[] args = new ConstantRef<?>[bootstrapArgs.length + 1];
+            args[0] = DynamicConstantRef.ofInvoke(ConstantRefs.MHR_DYNAMICCONSTANTREF_FACTORY, CR_DynamicConstantRef,
+                                          bootstrapMethod.toConstantRef().orElseThrow(),
+                                          name, type.toConstantRef().orElseThrow());
+            for (int i=0; i<bootstrapArgs.length; i++)
+                args[i+1] = ((Constable<?>) bootstrapArgs[i]).toConstantRef(lookup).orElseThrow();
+            return Optional.of(DynamicConstantRef.ofInvoke(ConstantRefs.MHR_DYNAMICCONSTANTREF_WITHARGS, CR_DynamicConstantRef, args));
+        }
+        catch (NoSuchElementException e) {
+            return Optional.empty();
+        }
+    }
+
+    /**
+     * Produce a {@linkplain DynamicConstantRef} describing the invocation of
+     * the specified bootstrap with the specified arguments.
+     *
+     * @param bootstrap symbolic reference for the bootstrap method
+     * @param type symbolic reference for the type of the resulting constant
+     * @param args symbolic references for the bootstrap arguments
+     * @param <T> the type of the resulting constant
+     * @return the dynamic constant reference
+     */
+    protected static<T> DynamicConstantRef<T> ofInvoke(MethodHandleRef bootstrap,
+                                                       ClassRef type,
+                                                       ConstantRef<?>... args) {
+        ConstantRef<?>[] quotedArgs = new ConstantRef<?>[args.length + 1];
+        quotedArgs[0] = bootstrap;
+        System.arraycopy(args, 0, quotedArgs, 1, args.length);
+        return DynamicConstantRef.of(ConstantRefs.BSM_INVOKE, "_", type, quotedArgs);
+    }
+
+    /**
+     * Produce an {@code Optional<DynamicConstantRef<T>>} describing the invocation
+     * of the specified bootstrap with the specified arguments.  The arguments will
+     * be converted to symbolic references using the provided lookup.
+     *
+     * @param lookup A {@link MethodHandles.Lookup} to be used to perform
+     *               access control determinations
+     * @param bootstrap symbolic reference for the bootstrap method
+     * @param type symbolic reference for the type of the resulting constant
+     * @param args symbolic references for the bootstrap arguments
+     * @param <T> the type of the resulting constant
+     * @return the dynamic constant reference
+     */
+    static<T> Optional<DynamicConstantRef<T>> symbolizeHelper(MethodHandles.Lookup lookup,
+                                                              MethodHandleRef bootstrap,
+                                                              ClassRef type,
+                                                              Constable<?>... args) {
+        try {
+            ConstantRef<?>[] quotedArgs = new ConstantRef<?>[args.length + 1];
+            quotedArgs[0] = bootstrap;
+            for (int i=0; i<args.length; i++)
+                quotedArgs[i+1] = args[i].toConstantRef(lookup).orElseThrow();
+            return Optional.of(DynamicConstantRef.of(ConstantRefs.BSM_INVOKE, "_", type, quotedArgs));
+        }
+        catch (NoSuchElementException e) {
+            return Optional.empty();
+        }
     }
 
     @Override
@@ -346,7 +388,14 @@
 
     @Override
     public String toString() {
-        return String.format("CondyRef[%s(%s), NameAndType[%s:%s]]",
-                             bootstrapMethod, Arrays.toString(bootstrapArgs), name, type);
+        // @@@ Too verbose.  Prefer something like DynamicRef[Foo::bootstrap(name/static args)type]
+        return String.format("DynamicConstantRef[%s(%s), NameAndType[%s:%s]]",
+                             bootstrapMethod, Arrays.toString(bootstrapArgs), name, type.simpleName());
+    }
+
+    private static final class DynamicConstantRefImpl<T> extends DynamicConstantRef<T> {
+        public DynamicConstantRefImpl(MethodHandleRef bootstrapMethod, String name, ClassRef type, ConstantRef<?>... bootstrapArgs) {
+            super(bootstrapMethod, name, type, bootstrapArgs);
+        }
     }
 }
--- a/src/java.base/share/classes/java/lang/sym/EnumRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/EnumRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -28,6 +28,9 @@
 import java.lang.invoke.MethodHandles;
 import java.util.Optional;
 
+import static java.lang.sym.ConstantRefs.CR_ClassRef;
+import static java.lang.sym.ConstantRefs.CR_EnumRef;
+import static java.lang.sym.ConstantRefs.CR_String;
 import static java.util.Objects.requireNonNull;
 
 /**
@@ -40,12 +43,12 @@
     /**
      * Construct a symbolic reference for the specified enum class and name
      *
-     * @param enumClass the enum class
+     * @param constantType the enum class
      * @param constantName the name of the enum constant
      * @throws NullPointerException if any argument is null
      */
-    private EnumRef(ClassRef enumClass, String constantName) {
-        super(SymbolicRefs.BSM_ENUM_CONSTANT, requireNonNull(constantName), requireNonNull(enumClass));
+    private EnumRef(ClassRef constantType, String constantName) {
+        super(ConstantRefs.BSM_ENUM_CONSTANT, requireNonNull(constantName), requireNonNull(constantType));
     }
 
     /**
@@ -62,41 +65,20 @@
         return new EnumRef<>(enumClass, constantName);
     }
 
-    /**
-     * Return the enum class for this symbolic reference
-     * @return the enum class
-     */
-    @Foldable
-    public ClassRef enumClass() {
-        return type();
-    }
-
-    /**
-     * Return the enum constant name for this symbolic reference
-     * @return the enum constant name
-     */
-    @Foldable
-    public String constantName() {
-        return name();
+    @Override
+    @SuppressWarnings("unchecked")
+    public E resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
+        return Enum.valueOf((Class<E>) constantType().resolveConstantRef(lookup), constantName());
     }
 
     @Override
-    @SuppressWarnings("unchecked")
-    public E resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
-        return Enum.valueOf((Class<E>) enumClass().resolveRef(lookup), constantName());
-    }
-
-    @Override
-    public Optional<ConstantRef<ConstantRef<E>>> toSymbolicRef(MethodHandles.Lookup lookup) {
-        Optional<ConstantRef<ConstantRef<Class<?>>>> classRefRef = enumClass().toSymbolicRef(lookup);
-        if (!classRefRef.isPresent())
-            return Optional.empty();
-        return Optional.of(DynamicConstantRef.of(SymbolicRefs.BSM_INVOKE, name(), SymbolicRefs.CR_EnumRef,
-                                                 new ConstantRef<?>[] { SymbolicRefs.MHR_ENUMREF_FACTORY, classRefRef.get(), constantName() }));
+    public Optional<? extends ConstantRef<? super ConstantRef<E>>> toConstantRef(MethodHandles.Lookup lookup) {
+        return DynamicConstantRef.symbolizeHelper(lookup, ConstantRefs.MHR_ENUMREF_FACTORY, CR_EnumRef,
+                                                  constantType(), constantName());
     }
 
     @Override
     public String toString() {
-        return String.format("EnumRef[%s.%s]", enumClass().canonicalName(), constantName());
+        return String.format("EnumRef[%s.%s]", constantType().simpleName(), constantName());
     }
 }
--- a/src/java.base/share/classes/java/lang/sym/MethodHandleRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/MethodHandleRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -27,10 +27,7 @@
 import java.lang.annotation.Foldable;
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandleInfo;
-import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
-import java.util.Objects;
-import java.util.Optional;
 
 import static java.lang.invoke.MethodHandleInfo.REF_getField;
 import static java.lang.invoke.MethodHandleInfo.REF_getStatic;
@@ -41,19 +38,19 @@
 import static java.lang.invoke.MethodHandleInfo.REF_newInvokeSpecial;
 import static java.lang.invoke.MethodHandleInfo.REF_putField;
 import static java.lang.invoke.MethodHandleInfo.REF_putStatic;
-import static java.lang.sym.MethodHandleRef.Kind.CONSTRUCTOR;
 import static java.lang.sym.MethodHandleRef.Kind.STATIC;
-import static java.lang.sym.SymbolicRefs.CR_void;
+import static java.lang.sym.ConstantRefs.CR_void;
 import static java.util.Objects.requireNonNull;
 
 /**
  * A symbolic reference for a {@link MethodHandle} constant.
  */
-public final class MethodHandleRef implements ConstantRef<MethodHandle>, Constable<ConstantRef<MethodHandle>> {
+public interface MethodHandleRef
+        extends ConstantRef<MethodHandle>, Constable<ConstantRef<MethodHandle>> {
     /**
      * Kinds of method handle refs
      */
-    public enum Kind {
+    enum Kind {
         /** A method handle for a method invoked as with {@code invokestatic} */
         @Foldable STATIC(REF_invokeStatic),
         /** A method handle for a method invoked as with {@code invokevirtual} */
@@ -83,61 +80,6 @@
         }
     }
 
-    private final Kind kind;
-    private final ClassRef owner;
-    private final String name;
-    private final MethodTypeRef type;
-
-    /**
-     * Construct a {@linkplain MethodHandleRef} from a kind, owner, name, and type
-     * @param kind the kind of the method handle
-     * @param owner the declaring class for the method
-     * @param name the name of the method (ignored if {@code kind} is {@code CONSTRUCTOR})
-     * @param type the type of the method
-     * @throws NullPointerException if any non-ignored argument is null
-     * @throws IllegalArgumentException if {@code kind} describes a field accessor,
-     * and {@code type} is not consistent with that kind of field accessor
-     */
-    private MethodHandleRef(Kind kind, ClassRef owner, String name, MethodTypeRef type) {
-        if (kind == CONSTRUCTOR)
-            name = "<init>";
-
-        requireNonNull(kind);
-        requireNonNull(owner);
-        requireNonNull(name);
-        requireNonNull(type);
-
-        switch (kind) {
-            case CONSTRUCTOR: validateConstructor(type); break;
-            case GETTER: validateFieldType(type, false, true); break;
-            case SETTER: validateFieldType(type, true, true); break;
-            case STATIC_GETTER: validateFieldType(type, false, false); break;
-            case STATIC_SETTER: validateFieldType(type, true, false); break;
-        }
-
-        this.kind = kind;
-        this.owner = owner;
-        this.name = name;
-        this.type = type;
-    }
-
-    private static void validateFieldType(MethodTypeRef type, boolean isSetter, boolean isVirtual) {
-        boolean isVoid = type.returnType().descriptorString().equals("V");
-        int expectedParams = (isSetter ? 1 : 0) + (isVirtual ? 1 : 0);
-        if (isVoid != isSetter
-            || type.parameterCount() != expectedParams
-            || (isVirtual && type.parameterType(0).isPrimitive())) {
-            String expectedType = String.format("(%s%s)%s", (isVirtual ? "R" : ""),
-                                                (isSetter ? "T" : ""), (isSetter ? "V" : "T"));
-            throw new IllegalArgumentException(String.format("Expected type of %s for getter, found %s", expectedType, type));
-        }
-    }
-
-    private static void validateConstructor(MethodTypeRef type) {
-        if (!type.returnType().descriptorString().equals("V")) {
-            throw new IllegalArgumentException(String.format("Expected type of (T)V for constructor, found %s", type));
-        }
-    }
 
     /**
      * Return a {@code MethodHandleRef} corresponding to an invocation of a
@@ -151,8 +93,8 @@
      * @throws NullPointerException if any of the non-ignored arguments are null
      */
     @Foldable
-    public static MethodHandleRef of(Kind kind, ClassRef clazz, String name, MethodTypeRef type) {
-        return new MethodHandleRef(kind, clazz, name, type);
+    static MethodHandleRef of(Kind kind, ClassRef clazz, String name, MethodTypeRef type) {
+        return new ConstantMethodHandleRef(kind, clazz, name, type);
     }
 
     /**
@@ -167,7 +109,7 @@
      * @throws NullPointerException if any of the non-ignored arguments are null
      */
     @Foldable
-    public static MethodHandleRef of(Kind kind, ClassRef clazz, String name, String descriptorString) {
+    static MethodHandleRef of(Kind kind, ClassRef clazz, String name, String descriptorString) {
         return of(kind, clazz, name, MethodTypeRef.ofDescriptor(descriptorString));
     }
 
@@ -184,7 +126,7 @@
      * @throws NullPointerException if any of the non-ignored arguments are null
      */
     @Foldable
-    public static MethodHandleRef of(Kind kind, ClassRef clazz, String name, ClassRef returnType, ClassRef... paramTypes) {
+    static MethodHandleRef of(Kind kind, ClassRef clazz, String name, ClassRef returnType, ClassRef... paramTypes) {
         return of(kind, clazz, name, MethodTypeRef.of(returnType, paramTypes));
     }
 
@@ -201,8 +143,8 @@
      * @throws NullPointerException if any of the arguments are null
      */
     @Foldable
-    public static MethodHandleRef ofDynamicCallsite(ClassRef clazz, String name, ClassRef returnType, ClassRef... paramTypes) {
-        return of(STATIC, clazz, name, MethodTypeRef.of(returnType, paramTypes).insertParameterTypes(0, SymbolicRefs.INDY_BOOTSTRAP_ARGS));
+    static MethodHandleRef ofDynamicCallsite(ClassRef clazz, String name, ClassRef returnType, ClassRef... paramTypes) {
+        return of(STATIC, clazz, name, MethodTypeRef.of(returnType, paramTypes).insertParameterTypes(0, ConstantRefs.INDY_BOOTSTRAP_ARGS));
     }
 
     /**
@@ -218,8 +160,8 @@
      * @throws NullPointerException if any of the arguments are null
      */
     @Foldable
-    public static MethodHandleRef ofDynamicConstant(ClassRef clazz, String name, ClassRef returnType, ClassRef... paramTypes) {
-        return of(STATIC, clazz, name, MethodTypeRef.of(returnType, paramTypes).insertParameterTypes(0, SymbolicRefs.CONDY_BOOTSTRAP_ARGS));
+    static MethodHandleRef ofDynamicConstant(ClassRef clazz, String name, ClassRef returnType, ClassRef... paramTypes) {
+        return of(STATIC, clazz, name, MethodTypeRef.of(returnType, paramTypes).insertParameterTypes(0, ConstantRefs.CONDY_BOOTSTRAP_ARGS));
     }
 
     /**
@@ -233,7 +175,7 @@
      * @throws NullPointerException if any of the arguments are null
      */
     @Foldable
-    public static MethodHandleRef ofField(Kind kind, ClassRef clazz, String name, ClassRef type) {
+    static MethodHandleRef ofField(Kind kind, ClassRef clazz, String name, ClassRef type) {
         MethodTypeRef mtr;
         switch (kind) {
             case GETTER: mtr = MethodTypeRef.of(type, clazz); break;
@@ -243,69 +185,7 @@
             default:
                 throw new IllegalArgumentException(kind.toString());
         }
-        return new MethodHandleRef(kind, clazz, name, mtr);
-    }
-
-    public MethodHandle resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
-        Class<?> resolvedOwner = owner.resolveRef(lookup);
-        MethodType resolvedType = this.type.resolveRef(lookup);
-        switch (kind) {
-            case STATIC:
-                return lookup.findStatic(resolvedOwner, name, resolvedType);
-            case INTERFACE_VIRTUAL:
-            case VIRTUAL:
-                return lookup.findVirtual(resolvedOwner, name, resolvedType);
-            case SPECIAL:
-                return lookup.findSpecial(resolvedOwner, name, resolvedType, lookup.lookupClass());
-            case CONSTRUCTOR:
-                return lookup.findConstructor(resolvedOwner, resolvedType);
-            case GETTER:
-                return lookup.findGetter(resolvedOwner, name, resolvedType.returnType());
-            case STATIC_GETTER:
-                return lookup.findStaticGetter(resolvedOwner, name, resolvedType.returnType());
-            case SETTER:
-                return lookup.findSetter(resolvedOwner, name, resolvedType.parameterType(1));
-            case STATIC_SETTER:
-                return lookup.findStaticSetter(resolvedOwner, name, resolvedType.parameterType(0));
-            default:
-                throw new IllegalStateException(kind.name());
-        }
-    }
-
-    /**
-     * Return the {@code refKind} of the method handle described by this symbolic reference,
-     * as defined by {@link MethodHandleInfo}
-     * @return the reference kind
-     */
-    @Foldable
-    public int refKind() { return kind.refKind; }
-
-    /**
-     * Return the {@code kind} of the method handle described by this symbolic reference
-     * @return the {@link Kind}
-     */
-    @Foldable
-    public Kind kind() { return kind; }
-
-    /**
-     * Return the class which declares the method or field described by
-     * this symbolic reference
-     *
-     * @return the class in which the method or field is declared
-     */
-    @Foldable
-    public ClassRef owner() {
-        return owner;
-    }
-
-    /**
-     * Return the name of the method described by this symbolic reference
-     *
-     * @return the name of the method
-     */
-    @Foldable
-    public String name() {
-        return name;
+        return new ConstantMethodHandleRef(kind, clazz, name, mtr);
     }
 
     /**
@@ -313,41 +193,17 @@
      * @return the method type
      */
     @Foldable
-    public MethodTypeRef type() {
-        return type;
-    }
+    MethodTypeRef methodType();
 
-    @Override
-    public Optional<ConstantRef<ConstantRef<MethodHandle>>> toSymbolicRef(MethodHandles.Lookup lookup) {
-        Optional<EnumRef<Kind>> kindRef = kind.toSymbolicRef(lookup);
-        Optional<ConstantRef<ConstantRef<Class<?>>>> classRefRef = owner.toSymbolicRef(lookup);
-        Optional<ConstantRef<ConstantRef<MethodType>>> typeRefRef = type.toSymbolicRef(lookup);
-        if (!kindRef.isPresent() || !classRefRef.isPresent() || !typeRefRef.isPresent())
-            return Optional.empty();
-        ConstantRef<?>[] args = {SymbolicRefs.MHR_METHODHANDLEREF_FACTORY, kindRef.get(),
-                                 classRefRef.get(), name, typeRefRef.get()};
-        return Optional.of(DynamicConstantRef.of(SymbolicRefs.BSM_INVOKE, name,
-                                                 SymbolicRefs.CR_MethodHandleRef, args));
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        MethodHandleRef ref = (MethodHandleRef) o;
-        return kind == ref.kind &&
-               Objects.equals(owner, ref.owner) &&
-               Objects.equals(name, ref.name) &&
-               Objects.equals(type, ref.type);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(kind, owner, name, type);
-    }
-
-    @Override
-    public String toString() {
-        return String.format("MethodHandleRef[%s/%s::%s%s]", kind, owner.canonicalName(), name, type.canonicalDescriptor());
+    /**
+     * Return a {@linkplain MethodHandleRef} that describes this method handle
+     * adapted to a different type, as if by {@link MethodHandle#asType(MethodType)}.
+     *
+     * @param type the new type
+     * @return the adapted method handle reference
+     */
+    @Foldable
+    default MethodHandleRef asType(MethodTypeRef type) {
+        return (methodType().equals(type)) ? this : new AsTypeMethodHandleRef(this, type);
     }
 }
--- a/src/java.base/share/classes/java/lang/sym/MethodTypeRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/MethodTypeRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -41,29 +41,7 @@
 /**
  * A symbolic reference for a {@linkplain MethodType} constant.
  */
-public final class MethodTypeRef implements ConstantRef.WithTypeDescriptor<MethodType>, Constable<ConstantRef<MethodType>> {
-    private static final Pattern TYPE_DESC = Pattern.compile("(\\[*)(V|I|J|S|B|C|F|D|Z|L[^/.\\[;][^.\\[;]*;)");
-    private static Pattern pattern = Pattern.compile("\\((.*)\\)(.*)");
-
-    private final ClassRef returnType;
-    private final ClassRef[] argTypes;
-
-    /**
-     * Construct a {@linkplain MethodTypeRef} with the specified return type
-     * and parameter types
-     *
-     * @param returnType a {@link ClassRef} describing the return type
-     * @param argTypes {@link ClassRef}s describing the parameter types
-     */
-    private MethodTypeRef(ClassRef returnType, ClassRef[] argTypes) {
-        this.returnType = requireNonNull(returnType);
-        this.argTypes = requireNonNull(argTypes);
-
-        for (ClassRef cr : argTypes)
-            if (cr.isPrimitive() && cr.descriptorString().equals("V"))
-                throw new IllegalArgumentException("Void parameters not permitted");
-    }
-
+public interface MethodTypeRef extends ConstantRef<MethodType>, Constable<ConstantRef<MethodType>> {
     /**
      * Create a {@linkplain MethodTypeRef} from a method descriptor string
      *
@@ -73,29 +51,8 @@
      * method descriptor
      */
     @Foldable
-    public static MethodTypeRef ofDescriptor(String descriptor) {
-        // @@@ Replace validation with a lower-overhead mechanism than regex
-        // Follow the trail from MethodType.fromMethodDescriptorString to
-        // parsing code in sun/invoke/util/BytecodeDescriptor.java which could
-        // be extracted and/or shared
-        Matcher matcher = pattern.matcher(descriptor);
-        if (!matcher.matches())
-            throw new IllegalArgumentException(String.format("%s is not a valid method descriptor", descriptor));
-        String paramTypes = matcher.group(1);
-        String returnType = matcher.group(2);
-        if (!TYPE_DESC.matcher(returnType).matches())
-            throw new IllegalArgumentException(String.format("Invalid return type %s", returnType));
-        List<String> params = new ArrayList<>();
-        matcher = TYPE_DESC.matcher(paramTypes);
-        while (matcher.regionStart() < paramTypes.length()) {
-            if (matcher.lookingAt()) {
-                params.add(matcher.group());
-                matcher.region(matcher.end(), matcher.regionEnd());
-            }
-            else
-                throw new IllegalArgumentException(String.format("Invalid parameter type: %s", paramTypes.substring(matcher.regionStart(), matcher.regionEnd())));
-        }
-        return new MethodTypeRef(ClassRef.ofDescriptor(returnType), params.stream().map(ClassRef::ofDescriptor).toArray(ClassRef[]::new));
+    static MethodTypeRef ofDescriptor(String descriptor) {
+        return ConstantMethodTypeRef.ofDescriptor(descriptor);
     }
 
     /**
@@ -107,8 +64,8 @@
      * @return a {@linkplain MethodTypeRef} describing the desired method type
      */
     @Foldable
-    public static MethodTypeRef of(ClassRef returnDescriptor, ClassRef... paramDescriptors) {
-        return new MethodTypeRef(returnDescriptor, paramDescriptors);
+    static MethodTypeRef of(ClassRef returnDescriptor, ClassRef... paramDescriptors) {
+        return new ConstantMethodTypeRef(returnDescriptor, paramDescriptors);
     }
 
     /**
@@ -116,9 +73,7 @@
      * @return the return type
      */
     @Foldable
-    public ClassRef returnType() {
-        return returnType;
-    }
+    ClassRef returnType();
 
     /**
      * Get the number of parameters of the method type described by
@@ -126,9 +81,7 @@
      * @return the number of parameters
      */
     @Foldable
-    public int parameterCount() {
-        return argTypes.length;
-    }
+    int parameterCount();
 
     /**
      * Get the parameter type of the {@code index}'th parameter of the method type
@@ -140,27 +93,21 @@
      * range {[0, parameterCount())}
      */
     @Foldable
-    public ClassRef parameterType(int index) {
-        return argTypes[index];
-    }
+    ClassRef parameterType(int index);
 
     /**
      * Get the parameter types as a {@link List}
      *
      * @return the parameter types
      */
-    public List<ClassRef> parameterList() {
-        return List.of(argTypes);
-    }
+    List<ClassRef> parameterList();
 
     /**
      * Get the parameter types as an array
      *
      * @return the parameter types
      */
-    public ClassRef[] parameterArray() {
-        return argTypes.clone();
-    }
+    ClassRef[] parameterArray();
 
     /**
      * Return a {@linkplain MethodTypeRef} that is identical to
@@ -170,9 +117,7 @@
      * @return the new method type descriptor
      */
     @Foldable
-    public MethodTypeRef changeReturnType(ClassRef returnType) {
-        return of(returnType, argTypes);
-    }
+    MethodTypeRef changeReturnType(ClassRef returnType);
 
     /**
      * Return a {@linkplain MethodTypeRef} that is identical to this one,
@@ -186,11 +131,7 @@
      * range {[0, parameterCount)}
      */
     @Foldable
-    public MethodTypeRef changeParameterType(int index, ClassRef paramType) {
-        ClassRef[] newArgs = argTypes.clone();
-        newArgs[index] = paramType;
-        return of(returnType, newArgs);
-    }
+    MethodTypeRef changeParameterType(int index, ClassRef paramType);
 
     /**
      * Return a {@linkplain MethodTypeRef} that is identical to this one,
@@ -204,16 +145,7 @@
      * {@code [0, parameterCount]}
      */
     @Foldable
-    public MethodTypeRef dropParameterTypes(int start, int end) {
-        if (start < 0 || start >= argTypes.length || end < 0 || end > argTypes.length)
-            throw new IndexOutOfBoundsException();
-        else if (start > end)
-            throw new IllegalArgumentException(String.format("Range (%d, %d) not valid for size %d", start, end, argTypes.length));
-        ClassRef[] newArgs = new ClassRef[argTypes.length - (end - start)];
-        System.arraycopy(argTypes, 0, newArgs, 0, start);
-        System.arraycopy(argTypes, end, newArgs, start, argTypes.length - end);
-        return of(returnType, newArgs);
-    }
+    MethodTypeRef dropParameterTypes(int start, int end);
 
     /**
      * Return a {@linkplain MethodTypeRef} that is identical to this one,
@@ -226,33 +158,18 @@
      * range {[0, parameterCount]}
      */
     @Foldable
-    public MethodTypeRef insertParameterTypes(int pos, ClassRef... paramTypes) {
-        if (pos < 0 || pos > argTypes.length)
-            throw new IndexOutOfBoundsException(pos);
-        ClassRef[] newArgs = new ClassRef[argTypes.length + paramTypes.length];
-        System.arraycopy(argTypes, 0, newArgs, 0, pos);
-        System.arraycopy(paramTypes, 0, newArgs, pos, paramTypes.length);
-        System.arraycopy(argTypes, pos, newArgs, pos+paramTypes.length, argTypes.length - pos);
-        return of(returnType, newArgs);
-    }
+    MethodTypeRef insertParameterTypes(int pos, ClassRef... paramTypes);
 
-    public MethodType resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
-        return MethodType.fromMethodDescriptorString(descriptorString(), lookup.lookupClass().getClassLoader());
-    }
-
-    @Override
-    public Optional<ConstantRef<ConstantRef<MethodType>>> toSymbolicRef(MethodHandles.Lookup lookup) {
-        ConstantRef<?>[] args = new ConstantRef<?>[] { SymbolicRefs.MHR_METHODTYPEREF_FACTORY, descriptorString() };
-        return Optional.of(DynamicConstantRef.of(SymbolicRefs.BSM_INVOKE, "_", SymbolicRefs.CR_MethodTypeRef, args));
-    }
-
-    @Override
-    public String descriptorString() {
+    /**
+     * Return the method type descriptor string
+     * @return the method type descriptor string
+     */
+    default String descriptorString() {
         return String.format("(%s)%s",
-                             Stream.of(argTypes)
+                             Stream.of(parameterArray())
                                    .map(ClassRef::descriptorString)
                                    .collect(Collectors.joining()),
-                             returnType.descriptorString());
+                             returnType().descriptorString());
     }
 
     /**
@@ -260,35 +177,11 @@
      * canonical names for parameter and return types
      * @return the human-readable descriptor for this method type
      */
-    public String canonicalDescriptor() {
+    default String simpleDescriptor() {
         return String.format("(%s)%s",
-                             Stream.of(argTypes)
-                                   .map(ClassRef::canonicalName)
-                                   .collect(Collectors.joining()),
-                             returnType.canonicalName());
-    }
-
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        MethodTypeRef constant = (MethodTypeRef) o;
-
-        return returnType.equals(constant.returnType)
-               && Arrays.equals(argTypes, constant.argTypes);
-    }
-
-    @Override
-    public int hashCode() {
-        int result = returnType.hashCode();
-        result = 31 * result + Arrays.hashCode(argTypes);
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("MethodTypeRef[%s]", canonicalDescriptor());
+                             Stream.of(parameterArray())
+                                   .map(ClassRef::simpleName)
+                                   .collect(Collectors.joining(",")),
+                             returnType().simpleName());
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/sym/PrimitiveClassRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.sym;
+
+import java.lang.invoke.MethodHandles;
+import java.util.Optional;
+
+import sun.invoke.util.Wrapper;
+
+import static java.util.Objects.requireNonNull;
+
+/**
+ * PrimitiveClassRef
+ *
+ * @author Brian Goetz
+ */
+final class PrimitiveClassRef extends DynamicConstantRef<Class<?>> implements ClassRef {
+    private final String descriptor;
+
+    /**
+     * Create a {@linkplain ClassRef} from a descriptor string for a primitive type
+     *
+     * @param descriptor the descriptor string
+     * @throws IllegalArgumentException if the descriptor string does not
+     * describe a valid primitive type
+     */
+    PrimitiveClassRef(String descriptor) {
+        super(ConstantRefs.BSM_PRIMITIVE_CLASS, requireNonNull(descriptor), ConstantRefs.CR_Class);
+        if (descriptor.length() != 1
+            || "VIJCSBFDZ".indexOf(descriptor.charAt(0)) < 0)
+            throw new IllegalArgumentException(String.format("%s is not a valid primitive type descriptor", descriptor));
+        this.descriptor = descriptor;
+    }
+
+    @Override
+    public String descriptorString() {
+        return descriptor;
+    }
+
+    @Override
+    public Class<?> resolveConstantRef(MethodHandles.Lookup lookup) {
+        return Wrapper.forBasicType(descriptorString().charAt(0)).primitiveType();
+    }
+
+    @Override
+    public Optional<? extends ConstantRef<? super ConstantRef<Class<?>>>> toConstantRef(MethodHandles.Lookup lookup) {
+        return DynamicConstantRef.symbolizeHelper(lookup, ConstantRefs.MHR_CLASSREF_FACTORY, ConstantRefs.CR_ClassRef, descriptorString());
+    }
+
+    @Override
+    public String toString() {
+        return String.format("PrimitiveClassRef[%s]", simpleName());
+    }
+}
--- a/src/java.base/share/classes/java/lang/sym/SymbolicRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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.sym;
-
-import java.lang.invoke.Intrinsics;
-
-/**
- * A purely nominal descriptor for an object, runtime entity, or classfile entity
- * such as a constant pool entry or classfile attribute. Like names in the
- * constant pool of a class, names of classes contained in a {@linkplain SymbolicRef}
- * are independent of a class loader.
- *
- * <p>APIs that perform generation or parsing of bytecode are encouraged to use
- * {@linkplain SymbolicRef} to describe classfile structures where appropriate,
- * especially the {@link ConstantRef} types that describe elements to be stored
- * in the constant pool.
- *
- * <p>The {@linkplain SymbolicRef} types are also used by the {@link Intrinsics}
- * API to express {@code ldc} and {@code invokedynamic} instructions.
- *
- * <p>Implementations of {@linkplain SymbolicRef} must be
- * <a href="../doc-files/ValueBased.html">value-based</a> classes.
- *
- * <p>Constants describing various useful symbolic references (such as {@link ClassRef}
- * constants for platform classes) can be found in {@link SymbolicRefs}.
- *
- * @apiNote In the future, if the Java language permits, {@linkplain SymbolicRef}
- * may become a {@code sealed} interface, which would prohibit subclassing except by
- * explicitly permitted types.
- * @see Constable
- * @see ConstantRef
- * @see Intrinsics
- * @see SymbolicRefs
- */
-public interface SymbolicRef {
-
-}
--- a/src/java.base/share/classes/java/lang/sym/SymbolicRefs.java	Wed Feb 28 23:43:06 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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.sym;
-
-import java.lang.annotation.Foldable;
-import java.lang.invoke.CallSite;
-import java.lang.invoke.ConstantBootstraps;
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodHandles;
-import java.lang.invoke.MethodHandles.Lookup;
-import java.lang.invoke.MethodType;
-import java.lang.invoke.VarHandle;
-import java.lang.sym.MethodHandleRef.Kind;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Predefined constants for common symbolic references.  Includes class references
- * for primitive types and common platform types, and method handle references
- * for standard bootstrap methods.
- *
- * @see SymbolicRef
- */
-public final class SymbolicRefs {
-    // No instances
-    private SymbolicRefs() { }
-
-    // Don't change the order of these declarations!
-
-    /** {@link ClassRef} representing {@link Object} */
-    @Foldable
-    public static final ClassRef CR_Object = ClassRef.of("java.lang.Object");
-
-    /** {@link ClassRef} representing {@link String} */
-    @Foldable
-    public static final ClassRef CR_String = ClassRef.of("java.lang.String");
-
-    /** {@link ClassRef} representing {@link Class} */
-    @Foldable
-    public static final ClassRef CR_Class = ClassRef.of("java.lang.Class");
-
-    /** {@link ClassRef} representing {@link Number} */
-    @Foldable
-    public static final ClassRef CR_Number = ClassRef.of("java.lang.Number");
-
-    /** {@link ClassRef} representing {@link Integer} */
-    @Foldable
-    public static final ClassRef CR_Integer = ClassRef.of("java.lang.Integer");
-
-    /** {@link ClassRef} representing {@link Long} */
-    @Foldable
-    public static final ClassRef CR_Long = ClassRef.of("java.lang.Long");
-
-    /** {@link ClassRef} representing {@link Float} */
-    @Foldable
-    public static final ClassRef CR_Float = ClassRef.of("java.lang.Float");
-
-    /** {@link ClassRef} representing {@link Double} */
-    @Foldable
-    public static final ClassRef CR_Double = ClassRef.of("java.lang.Double");
-
-    /** {@link ClassRef} representing {@link Short} */
-    @Foldable
-    public static final ClassRef CR_Short = ClassRef.of("java.lang.Short");
-
-    /** {@link ClassRef} representing {@link Byte} */
-    @Foldable
-    public static final ClassRef CR_Byte = ClassRef.of("java.lang.Byte");
-
-    /** {@link ClassRef} representing {@link Character} */
-    @Foldable
-    public static final ClassRef CR_Character = ClassRef.of("java.lang.Character");
-
-    /** {@link ClassRef} representing {@link Boolean} */
-    @Foldable
-    public static final ClassRef CR_Boolean = ClassRef.of("java.lang.Boolean");
-
-    /** {@link ClassRef} representing {@link Void} */
-    @Foldable
-    public static final ClassRef CR_Void = ClassRef.of("java.lang.Void");
-
-    /** {@link ClassRef} representing {@link Throwable} */
-    @Foldable
-    public static final ClassRef CR_Throwable = ClassRef.of("java.lang.Throwable");
-
-    /** {@link ClassRef} representing {@link Exception} */
-    @Foldable
-    public static final ClassRef CR_Exception = ClassRef.of("java.lang.Exception");
-
-    /** {@link ClassRef} representing {@link Enum} */
-    @Foldable
-    public static final ClassRef CR_Enum = ClassRef.of("java.lang.Enum");
-
-    /** {@link ClassRef} representing {@link VarHandle} */
-    @Foldable
-    public static final ClassRef CR_VarHandle = ClassRef.of("java.lang.invoke.VarHandle");
-
-    /** {@link ClassRef} representing {@link MethodHandles} */
-    @Foldable
-    public static final ClassRef CR_MethodHandles = ClassRef.of("java.lang.invoke.MethodHandles");
-
-    /** {@link ClassRef} representing {@link MethodHandles.Lookup} */
-    @Foldable
-    public static final ClassRef CR_MethodHandles_Lookup = CR_MethodHandles.inner("Lookup");
-
-    /** {@link ClassRef} representing {@link MethodHandle} */
-    @Foldable
-    public static final ClassRef CR_MethodHandle = ClassRef.of("java.lang.invoke.MethodHandle");
-
-    /** {@link ClassRef} representing {@link MethodType} */
-    @Foldable
-    public static final ClassRef CR_MethodType = ClassRef.of("java.lang.invoke.MethodType");
-
-    /** {@link ClassRef} representing {@link CallSite} */
-    @Foldable
-    public static final ClassRef CR_CallSite = ClassRef.of("java.lang.invoke.CallSite");
-
-    /** {@link ClassRef} representing {@link Collection} */
-    @Foldable
-    public static final ClassRef CR_Collection = ClassRef.of("java.util.Collection");
-
-    /** {@link ClassRef} representing {@link List} */
-    @Foldable
-    public static final ClassRef CR_List = ClassRef.of("java.util.List");
-
-    /** {@link ClassRef} representing {@link Set} */
-    @Foldable
-    public static final ClassRef CR_Set = ClassRef.of("java.util.Set");
-
-    /** {@link ClassRef} representing {@link Map} */
-    @Foldable
-    public static final ClassRef CR_Map = ClassRef.of("java.util.Map");
-
-    /** {@link ClassRef} representing {@link SymbolicRef} */
-    @Foldable
-    static final ClassRef CR_SymbolicRef = ClassRef.of("java.lang.sym.SymbolicRef");
-
-    /** {@link ClassRef} representing {@link ClassRef} */
-    @Foldable
-    static final ClassRef CR_ClassRef = ClassRef.of("java.lang.sym.ClassRef");
-
-    /** {@link ClassRef} representing {@link EnumRef} */
-    @Foldable
-    static final ClassRef CR_EnumRef = ClassRef.of("java.lang.sym.EnumRef");
-
-    /** {@link ClassRef} representing {@link MethodTypeRef} */
-    @Foldable
-    static final ClassRef CR_MethodTypeRef = ClassRef.of("java.lang.sym.MethodTypeRef");
-
-    /** {@link ClassRef} representing {@link MethodHandleRef} */
-    @Foldable
-    static final ClassRef CR_MethodHandleRef = ClassRef.of("java.lang.sym.MethodHandleRef");
-
-    /** {@link ClassRef} representing {@link VarHandleRef} */
-    @Foldable
-    static final ClassRef CR_VarHandleRef = ClassRef.of("java.lang.sym.VarHandleRef");
-
-    /** {@link ClassRef} representing {@link MethodHandleRef.Kind} */
-    @Foldable
-    static final ClassRef CR_MethodHandleRef_Kind = CR_MethodHandleRef.inner("Kind");
-
-    /** {@link ClassRef} representing {@link DynamicConstantRef} */
-    @Foldable
-    static final ClassRef CR_DynamicConstantRef = ClassRef.of("java.lang.sym.DynamicConstantRef");
-
-    /** {@link ClassRef} representing {@link DynamicCallSiteRef} */
-    @Foldable
-    static final ClassRef CR_DynamicCallSiteRef = ClassRef.of("java.lang.sym.DynamicCallSiteRef");
-
-    /** {@link ClassRef} representing {@link ConstantBootstraps} */
-    @Foldable
-    static final ClassRef CR_ConstantBootstraps = ClassRef.of("java.lang.invoke.ConstantBootstraps");
-
-    // Used by MethodHandleRef, but initialized here before reference to
-    // MethodHandleRef to avoid static initalization circularities
-    static final ClassRef[] INDY_BOOTSTRAP_ARGS = {
-            SymbolicRefs.CR_MethodHandles_Lookup,
-            SymbolicRefs.CR_String,
-            SymbolicRefs.CR_MethodType };
-    static final ClassRef[] CONDY_BOOTSTRAP_ARGS = {
-            SymbolicRefs.CR_MethodHandles_Lookup,
-            SymbolicRefs.CR_String,
-            SymbolicRefs.CR_Class };
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#primitiveClass(Lookup, String, Class)} */
-    @Foldable
-    public static final MethodHandleRef BSM_PRIMITIVE_CLASS
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "primitiveClass", CR_Class);
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#enumConstant(Lookup, String, Class)} */
-    @Foldable
-    public static final MethodHandleRef BSM_ENUM_CONSTANT
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "enumConstant", CR_Enum);
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#nullConstant(Lookup, String, Class)} */
-    @Foldable
-    public static final MethodHandleRef BSM_NULL_CONSTANT
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "nullConstant", SymbolicRefs.CR_Object);
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#fieldVarHandle(Lookup, String, Class, Class, Class)} */
-    @Foldable
-    public static final MethodHandleRef BSM_VARHANDLE_FIELD
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "fieldVarHandle", CR_VarHandle, CR_Class, CR_Class);
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#staticFieldVarHandle(Lookup, String, Class, Class, Class)} */
-    @Foldable
-    public static final MethodHandleRef BSM_VARHANDLE_STATIC_FIELD
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "staticFieldVarHandle", CR_VarHandle, CR_Class, CR_Class);
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#arrayVarHandle(Lookup, String, Class, Class)} */
-    @Foldable
-    public static final MethodHandleRef BSM_VARHANDLE_ARRAY
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "arrayVarHandle", CR_VarHandle, CR_Class);
-
-    /** {@link MethodHandleRef} representing {@link ConstantBootstraps#invoke(Lookup, String, Class, MethodHandle, Object...)} */
-    @Foldable
-    public static final MethodHandleRef BSM_INVOKE
-            = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "invoke", CR_Object, CR_MethodHandle, CR_Object.array());
-
-    /** {@link ClassRef} representing the primitive type {@code int} */
-    @Foldable
-    public static final ClassRef CR_int = ClassRef.ofDescriptor("I");
-
-    /** {@link ClassRef} representing the primitive type {@code long} */
-    @Foldable
-    public static final ClassRef CR_long = ClassRef.ofDescriptor("J");
-
-    /** {@link ClassRef} representing the primitive type {@code float} */
-    @Foldable
-    public static final ClassRef CR_float = ClassRef.ofDescriptor("F");
-
-    /** {@link ClassRef} representing the primitive type {@code double} */
-    @Foldable
-    public static final ClassRef CR_double = ClassRef.ofDescriptor("D");
-
-    /** {@link ClassRef} representing the primitive type {@code short} */
-    @Foldable
-    public static final ClassRef CR_short = ClassRef.ofDescriptor("S");
-
-    /** {@link ClassRef} representing the primitive type {@code byte} */
-    @Foldable
-    public static final ClassRef CR_byte = ClassRef.ofDescriptor("B");
-
-    /** {@link ClassRef} representing the primitive type {@code char} */
-    @Foldable
-    public static final ClassRef CR_char = ClassRef.ofDescriptor("C");
-
-    /** {@link ClassRef} representing the primitive type {@code boolean} */
-    @Foldable
-    public static final ClassRef CR_boolean = ClassRef.ofDescriptor("Z");
-
-    /** {@link ClassRef} representing the primitive type {@code void} */
-    @Foldable
-    public static final ClassRef CR_void = ClassRef.ofDescriptor("V");
-
-    /** Symbolic reference representing the constant {@code null} */
-    @Foldable
-    public static final ConstantRef<?> NULL = DynamicConstantRef.of(SymbolicRefs.BSM_NULL_CONSTANT, SymbolicRefs.CR_Object);
-
-    /** {@link MethodHandleRef} representing the factory method {@link ClassRef#ofDescriptor(String)} */
-    @Foldable
-    static final MethodHandleRef MHR_CLASSREF_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_ClassRef, "ofDescriptor", CR_ClassRef, CR_String);
-
-    /** {@link MethodHandleRef} representing the factory method {@link EnumRef#of(MethodHandleRef)} */
-    @Foldable
-    static final MethodHandleRef MHR_ENUMREF_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_EnumRef, "of", CR_EnumRef, CR_ClassRef, CR_String);
-
-    /** {@link MethodHandleRef} representing the factory method {@link MethodTypeRef#ofDescriptor(String)} */
-    @Foldable
-    static final MethodHandleRef MHR_METHODTYPEREF_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_MethodTypeRef, "ofDescriptor", CR_MethodTypeRef, CR_String);
-
-    /** {@link MethodHandleRef} representing the factory method {@link MethodHandleRef#of(Kind, ClassRef, String, MethodTypeRef)} */
-    @Foldable
-    static final MethodHandleRef MHR_METHODHANDLEREF_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_MethodHandleRef, "of",
-                                 CR_MethodHandleRef, CR_MethodHandleRef_Kind, CR_ClassRef, CR_String, CR_MethodTypeRef);
-
-    /** {@link MethodHandleRef} representing the factory method {@link VarHandleRef#ofField(ClassRef, String, ClassRef)} */
-    @Foldable
-    static final MethodHandleRef MHR_VARHANDLEREF_FIELD_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_VarHandleRef, "ofField", CR_VarHandleRef, CR_ClassRef, CR_String, CR_ClassRef);
-
-    /** {@link MethodHandleRef} representing the factory method {@link VarHandleRef#ofStaticField(ClassRef, String, ClassRef)} */
-    @Foldable
-    static final MethodHandleRef MHR_VARHANDLEREF_STATIC_FIELD_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_VarHandleRef, "ofStaticField", CR_VarHandleRef, CR_ClassRef, CR_String, CR_ClassRef);
-
-    /** {@link MethodHandleRef} representing the factory method {@link VarHandleRef#ofArray(ClassRef)} */
-    @Foldable
-    static final MethodHandleRef MHR_VARHANDLEREF_ARRAY_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_VarHandleRef, "ofArray", CR_VarHandleRef, CR_ClassRef);
-
-    /** {@link MethodHandleRef} representing the factory method {@link DynamicConstantRef#of(MethodHandleRef, String, ClassRef, ConstantRef[])} */
-    @Foldable
-    static final MethodHandleRef MHR_DYNAMICCONSTANTREF_FACTORY
-            = MethodHandleRef.of(Kind.STATIC, CR_DynamicConstantRef, "of",
-                                 CR_DynamicConstantRef, CR_MethodHandleRef, CR_String, CR_ClassRef, CR_SymbolicRef.array());
-}
--- a/src/java.base/share/classes/java/lang/sym/VarHandleRef.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/VarHandleRef.java	Thu Mar 01 14:25:00 2018 -0500
@@ -33,6 +33,10 @@
 import java.util.Objects;
 import java.util.Optional;
 
+import static java.lang.sym.ConstantRefs.CR_ClassRef;
+import static java.lang.sym.ConstantRefs.CR_String;
+import static java.lang.sym.ConstantRefs.CR_VarHandleRef;
+
 /**
  * A symbolic reference for a {@link VarHandle} constant.
  */
@@ -45,9 +49,12 @@
      * Kinds of variable handle refs
      */
     private enum Kind {
-        @Foldable FIELD(SymbolicRefs.BSM_VARHANDLE_FIELD, SymbolicRefs.MHR_VARHANDLEREF_FIELD_FACTORY),
-        @Foldable STATIC_FIELD(SymbolicRefs.BSM_VARHANDLE_STATIC_FIELD, SymbolicRefs.MHR_VARHANDLEREF_STATIC_FIELD_FACTORY),
-        @Foldable ARRAY(SymbolicRefs.BSM_VARHANDLE_ARRAY, SymbolicRefs.MHR_VARHANDLEREF_ARRAY_FACTORY);
+        @Foldable
+        FIELD(ConstantRefs.BSM_VARHANDLE_FIELD, ConstantRefs.MHR_VARHANDLEREF_OFFIELD),
+        @Foldable
+        STATIC_FIELD(ConstantRefs.BSM_VARHANDLE_STATIC_FIELD, ConstantRefs.MHR_VARHANDLEREF_OFSTATIC),
+        @Foldable
+        ARRAY(ConstantRefs.BSM_VARHANDLE_ARRAY, ConstantRefs.MHR_VARHANDLEREF_OFARRAY);
 
         final MethodHandleRef bootstrapMethod;
         final MethodHandleRef refFactory;
@@ -85,7 +92,7 @@
      */
     private VarHandleRef(Kind kind, String name, ClassRef declaringClass, ClassRef varType) {
         super(kind.bootstrapMethod, name,
-              SymbolicRefs.CR_VarHandle,
+              ConstantRefs.CR_VarHandle,
               kind.toBSMArgs(declaringClass, name, varType).toArray(EMPTY_ARGS));
         this.kind = kind;
         this.declaringClass = declaringClass;
@@ -176,36 +183,34 @@
      */
 
     @Override
-    public VarHandle resolveRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
+    public VarHandle resolveConstantRef(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
         switch (kind) {
             case FIELD:
-                return lookup.findVarHandle(declaringClass.resolveRef(lookup),
-                                            name(),
-                                            varType.resolveRef(lookup));
+                return lookup.findVarHandle(declaringClass.resolveConstantRef(lookup),
+                                            constantName(),
+                                            varType.resolveConstantRef(lookup));
             case STATIC_FIELD:
-                return lookup.findStaticVarHandle(declaringClass.resolveRef(lookup),
-                                                  name(),
-                                                  varType.resolveRef(lookup));
+                return lookup.findStaticVarHandle(declaringClass.resolveConstantRef(lookup),
+                                                  constantName(),
+                                                  varType.resolveConstantRef(lookup));
             case ARRAY:
-                return MethodHandles.arrayElementVarHandle(declaringClass.resolveRef(lookup));
+                return MethodHandles.arrayElementVarHandle(declaringClass.resolveConstantRef(lookup));
             default:
                 throw new InternalError("Cannot reach here");
         }
     }
 
     @Override
-    public Optional<ConstantRef<ConstantRef<VarHandle>>> toSymbolicRef(MethodHandles.Lookup lookup) {
+    public Optional<ConstantRef<ConstantRef<VarHandle>>> toConstantRef(MethodHandles.Lookup lookup) {
         try {
             ArrayList<ConstantRef<?>> args = new ArrayList<>();
-            args.add(kind.refFactory);
-            args.add(declaringClass.toSymbolicRef(lookup).orElseThrow());
+            args.add(declaringClass.toConstantRef(lookup).orElseThrow());
             if (kind != Kind.ARRAY) {
-                args.add(name());
-                args.add(varType.toSymbolicRef(lookup).orElseThrow());
+                args.add(constantName());
+                args.add(varType.toConstantRef(lookup).orElseThrow());
             }
-            return Optional.of(DynamicConstantRef.of(SymbolicRefs.BSM_INVOKE, name(),
-                                                     SymbolicRefs.CR_VarHandleRef,
-                                                     args.toArray(EMPTY_ARGS)));
+            return Optional.of(DynamicConstantRef.ofInvoke(kind.refFactory, CR_VarHandleRef,
+                                                           args.toArray(EMPTY_ARGS)));
         } catch (NoSuchElementException e) {
             return Optional.empty();
         }
@@ -218,9 +223,9 @@
             case STATIC_FIELD:
                 return String.format("VarHandleRef[%s%s.%s:%s]",
                                      (kind == Kind.STATIC_FIELD) ? "static " : "",
-                                     declaringClass.canonicalName(), name(), varType.canonicalName());
+                                     declaringClass.simpleName(), constantName(), varType.simpleName());
             case ARRAY:
-                return String.format("VarHandleRef[%s[]]", declaringClass.canonicalName());
+                return String.format("VarHandleRef[%s[]]", declaringClass.simpleName());
             default:
                 throw new InternalError("Cannot reach here");
         }
--- a/src/java.base/share/classes/java/lang/sym/package-info.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/java.base/share/classes/java/lang/sym/package-info.java	Thu Mar 01 14:25:00 2018 -0500
@@ -24,8 +24,53 @@
  */
 
 /**
- * The {@code java.lang.sym} package provides low-level primitives for
- * symbolically representing classfile and language entities.
+ * Represent <em>symbolic references</em> to run-time entities such as strings,
+ * classes, and method handles, and classfile entities such as constant pool
+ * entries and {@code invokedynamic} call sites.
+ *
+ * <p>The bytecode instructions of a class refer to classes, fields, methods,
+ * and other values <em>symbolically</em>.  Namely, the operands of bytecode
+ * instructions are <em>symbolic references</em> to classes, fields, methods,
+ * and other values. The JVM resolves symbolic references stored in the constant
+ * pool of a classfile them in order to link the class, as per JVMS 5.4.3.
+ *
+ * <p>Symbolic references are purely nominal; like names in the constant pool of
+ * a classfile, names of classes in a symbolic reference are independent of a
+ * class loader.  Symbolic references may be to basic values such as integers
+ * and strings; these values are stored in the constant pool directly. Symbolic
+ * references may also be to entities that denote parts of a program, such as
+ * classes and method handles. Finally, symbolic references may be to constant
+ * values that are computed at run time by user code.  Symbolic references for
+ * loadable constants are represented as subtypes of {@link java.lang.sym.ConstantRef}.
+ * The {@link java.lang.invoke.Intrinsics} API uses symbolic references to express
+ * {@code ldc} and {@code invokedynamic} instructions.  Symbolic reference classes
+ * must be <a href="../doc-files/ValueBased.html">value-based</a>.
+ *
+ * <p>APIs that generate or parse bytecode instructions can use the types in
+ * this package to represent symbolic references, for example, as the operand of
+ * an {@code ldc} instruction (such as a dynamically-computed constant), the
+ * static arguments to the bootstrap of a dynamically-computed constant,
+ * the static arguments to the bootstrap of an {@code invokedynamic} instruction,
+ * or any other bytecode instructions or class file structure that make use of
+ * the constant pool.
+ *
+ * <p>When a bytecode-generating API encounters a symbolic reference which it
+ * wants to write to the constant pool, it can case over the types corresponding
+ * to constant pool forms defined in JVMS 4.4: {@code ConstantClassRef},
+ * {@code ConstantMethodTypeRef}, {@code ConstantMethodHandleRef}, {@code String},
+ * {@code Integer}, {@code Long}, {@code Float}, {@code Double}, and
+ * {@code DynamicConstantRef}, and then call the accessor methods defined on
+ * these types to extract the symbolic information needed to represent these
+ * forms in the constant pool.
+ *
+ * <p>When a bytecode-reading API encounters a constant pool entry, it can
+ * convert it to the appropriate type of symbolic reference.  For dynamic
+ * constants, bytecode-reading APIs may wish to use the factory
+ * {@link java.lang.sym.DynamicConstantRef#ofCanonical(java.lang.sym.MethodHandleRef, java.lang.String, java.lang.sym.ClassRef, java.lang.sym.ConstantRef[])},
+ * which will inspect the bootstrap and, for well-known bootstraps, instantiate
+ * a more specific subtype of {@link java.lang.sym.DynamicConstantRef}, such as
+ * {@link java.lang.sym.EnumRef}.
+ *
  */
+package java.lang.sym;
 
-package java.lang.sym;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Constables.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Constables.java	Thu Mar 01 14:25:00 2018 -0500
@@ -90,16 +90,18 @@
         log = Log.instance(context);
         constablesVisitor = ConstablesVisitor.instance(context);
         try {
-            methodHandleRefClass = Class.forName("java.lang.sym.MethodHandleRef", false, null);
+            directMethodHandleRefClass = Class.forName("java.lang.sym.ConstantMethodHandleRef", false, null);
             methodTypeRefClass = Class.forName("java.lang.sym.MethodTypeRef", false, null);
             classRefClass = Class.forName("java.lang.sym.ClassRef", false, null);
             constantRefClass = Class.forName("java.lang.sym.ConstantRef", false, null);
+            constableClass = Class.forName("java.lang.sym.Constable", false, null);
             dynamicCallsiteRefClass = Class.forName("java.lang.sym.DynamicCallSiteRef", false, null);
             dynamicConstantClass = Class.forName("java.lang.sym.DynamicConstantRef", false, null);
-            symRefs = Class.forName("java.lang.sym.SymbolicRefs", false, null);
+            symRefs = Class.forName("java.lang.sym.ConstantRefs", false, null);
         } catch (ClassNotFoundException ex) {
-            methodHandleRefClass = null;
+            directMethodHandleRefClass = null;
             methodTypeRefClass = null;
+            constableClass = null;
             constantRefClass = null;
             classRefClass = null;
             dynamicCallsiteRefClass = null;
@@ -274,7 +276,7 @@
         if (constant != null) {
             if (!canMakeItToConstantValue(tree.type) &&
                 constantRefClass.isInstance(constant)) {
-                constant = ((Optional<?>)invokeMethodReflectively(constant.getClass(), constant, "toSymbolicRef")).get();
+                constant = ((Optional<?>)invokeMethodReflectively(constant.getClass(), constant, "toConstantRef")).get();
                 // now this should be a condy that the compiler can understand
                 // a Pool.ConstantDynamic
                 Object condyOb = convertConstant(tree, attrEnv, constant, attrEnv.enclClass.sym.packge().modle);
@@ -298,13 +300,13 @@
     }
 
     public Object convertConstant(JCTree tree, Env<AttrContext> attrEnv, Object constant, ModuleSymbol currentModule, boolean bsmArg) {
-        if (methodHandleRefClass.isInstance(constant)) {
-            String name = (String)invokeMethodReflectively(methodHandleRefClass, constant, "name");
-            int refKind = (int)invokeMethodReflectively(methodHandleRefClass, constant, "refKind");
-            Object owner = invokeMethodReflectively(methodHandleRefClass, constant, "owner");
+        if (directMethodHandleRefClass.isInstance(constant)) {
+            String name = (String)invokeMethodReflectively(directMethodHandleRefClass, constant, "methodName");
+            int refKind = (int)invokeMethodReflectively(directMethodHandleRefClass, constant, "refKind");
+            Object owner = invokeMethodReflectively(directMethodHandleRefClass, constant, "owner");
             String ownerDescriptor = (String)invokeMethodReflectively(classRefClass, owner, "descriptorString");
             Type ownerType = descriptorToType(ownerDescriptor, currentModule, false);
-            Object mtConstant = invokeMethodReflectively(methodHandleRefClass, constant, "type");
+            Object mtConstant = invokeMethodReflectively(directMethodHandleRefClass, constant, "methodType");
             String methodTypeDesc = (String)invokeMethodReflectively(methodTypeRefClass, mtConstant, "descriptorString");
             MethodType mType = (MethodType)descriptorToType(methodTypeDesc, currentModule, true);
             // this method generates fake symbols as needed
@@ -353,10 +355,10 @@
             return type.hasTag(ARRAY) ? type : type.tsym;
         } else if (dynamicConstantClass.isInstance(constant)) {
             Object classRef =
-                    invokeMethodReflectively(dynamicConstantClass, constant, "type");
+                    invokeMethodReflectively(dynamicConstantClass, constant, "constantType");
             String descriptor = (String)invokeMethodReflectively(classRefClass, classRef, "descriptorString");
             Type type = descriptorToType(descriptor, attrEnv.enclClass.sym.packge().modle, false);
-            String name = (String)invokeMethodReflectively(dynamicConstantClass, constant, "name");
+            String name = (String)invokeMethodReflectively(dynamicConstantClass, constant, "constantName");
             Object mh = invokeMethodReflectively(dynamicConstantClass, constant, "bootstrapMethod");
             Pool.MethodHandle methodHandle = (Pool.MethodHandle)convertConstant(tree, attrEnv, mh, currentModule);
             Object[] args = (Object[])invokeMethodReflectively(dynamicConstantClass, constant, "bootstrapArgs");
@@ -422,9 +424,10 @@
         return result;
     }
 
-    public Class<?> methodHandleRefClass;
+    public Class<?> directMethodHandleRefClass;
     public Class<?> methodTypeRefClass;
     public Class<?> classRefClass;
+    public Class<?> constableClass;
     public Class<?> constantRefClass;
     public Class<?> dynamicCallsiteRefClass;
     public Class<?> dynamicConstantClass;
--- a/test/jdk/java/lang/invoke/ConstantRefBootstrapsTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/invoke/ConstantRefBootstrapsTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -29,7 +29,7 @@
 import java.lang.invoke.Intrinsics;
 import java.lang.sym.MethodHandleRef;
 import java.lang.invoke.VarHandle;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 import java.util.List;
 
 import org.testng.annotations.Test;
@@ -50,44 +50,44 @@
     static final ClassRef CLASS_CONDY = ClassRef.of("java.lang.invoke.ConstantBootstraps");
 
     static final MethodHandleRef BSM_NULL_CONSTANT
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "nullConstant", SymbolicRefs.CR_Object);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "nullConstant", ConstantRefs.CR_Object);
     static final MethodHandleRef BSM_PRIMITIVE_CLASS
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "primitiveClass", SymbolicRefs.CR_Class);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "primitiveClass", ConstantRefs.CR_Class);
     static final MethodHandleRef BSM_ENUM_CONSTANT
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "enumConstant", SymbolicRefs.CR_Enum);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "enumConstant", ConstantRefs.CR_Enum);
     static final MethodHandleRef BSM_GET_STATIC_FINAL_SELF
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "getStaticFinal", SymbolicRefs.CR_Object);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "getStaticFinal", ConstantRefs.CR_Object);
     static final MethodHandleRef BSM_GET_STATIC_FINAL_DECL
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "getStaticFinal", SymbolicRefs.CR_Object, SymbolicRefs.CR_Class);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "getStaticFinal", ConstantRefs.CR_Object, ConstantRefs.CR_Class);
     static final MethodHandleRef BSM_INVOKE
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "invoke", SymbolicRefs.CR_Object, SymbolicRefs.CR_MethodHandle, SymbolicRefs.CR_Object.array());
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "invoke", ConstantRefs.CR_Object, ConstantRefs.CR_MethodHandle, ConstantRefs.CR_Object.array());
     static final MethodHandleRef BSM_VARHANDLE_FIELD
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "fieldVarHandle", SymbolicRefs.CR_VarHandle, SymbolicRefs.CR_Class, SymbolicRefs.CR_Class);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "fieldVarHandle", ConstantRefs.CR_VarHandle, ConstantRefs.CR_Class, ConstantRefs.CR_Class);
     static final MethodHandleRef BSM_VARHANDLE_STATIC_FIELD
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "staticFieldVarHandle", SymbolicRefs.CR_VarHandle, SymbolicRefs.CR_Class, SymbolicRefs.CR_Class);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "staticFieldVarHandle", ConstantRefs.CR_VarHandle, ConstantRefs.CR_Class, ConstantRefs.CR_Class);
     static final MethodHandleRef BSM_VARHANDLE_ARRAY
-            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "arrayVarHandle", SymbolicRefs.CR_VarHandle, SymbolicRefs.CR_Class);
+            = MethodHandleRef.ofDynamicConstant(CLASS_CONDY, "arrayVarHandle", ConstantRefs.CR_VarHandle, ConstantRefs.CR_Class);
 
 
     public void testNullConstant() {
-        Object supposedlyNull = Intrinsics.ldc(DynamicConstantRef.of(BSM_NULL_CONSTANT, SymbolicRefs.CR_Object));
+        Object supposedlyNull = Intrinsics.ldc(DynamicConstantRef.of(BSM_NULL_CONSTANT, ConstantRefs.CR_Object));
         assertNull(supposedlyNull);
 
-        supposedlyNull = Intrinsics.ldc(DynamicConstantRef.of(BSM_NULL_CONSTANT, SymbolicRefs.CR_MethodType));
+        supposedlyNull = Intrinsics.ldc(DynamicConstantRef.of(BSM_NULL_CONSTANT, ConstantRefs.CR_MethodType));
         assertNull(supposedlyNull);
     }
 
 
     public void testPrimitiveClass() {
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_int.descriptorString())), int.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_long.descriptorString())), long.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_short.descriptorString())), short.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_byte.descriptorString())), byte.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_char.descriptorString())), char.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_float.descriptorString())), float.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_double.descriptorString())), double.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_boolean.descriptorString())), boolean.class);
-        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, SymbolicRefs.CR_void.descriptorString())), void.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_int.descriptorString())), int.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_long.descriptorString())), long.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_short.descriptorString())), short.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_byte.descriptorString())), byte.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_char.descriptorString())), char.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_float.descriptorString())), float.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_double.descriptorString())), double.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_boolean.descriptorString())), boolean.class);
+        assertEquals(ldc(DynamicConstantRef.of(BSM_PRIMITIVE_CLASS, ConstantRefs.CR_void.descriptorString())), void.class);
     }
 
 
@@ -101,13 +101,13 @@
 
     public void testGetStaticFinalDecl() {
         DynamicConstantRef<Class<Integer>> intClass =
-                DynamicConstantRef.<Class<Integer>>of(BSM_GET_STATIC_FINAL_DECL, "TYPE", SymbolicRefs.CR_Class).withArgs(SymbolicRefs.CR_Integer);
+                DynamicConstantRef.<Class<Integer>>of(BSM_GET_STATIC_FINAL_DECL, "TYPE", ConstantRefs.CR_Class).withArgs(ConstantRefs.CR_Integer);
         Class<Integer> c = Intrinsics.ldc(intClass);
         assertEquals(c, int.class);
     }
 
     public void testGetStaticFinalSelf() {
-        DynamicConstantRef<Integer> integerMaxValue = DynamicConstantRef.of(BSM_GET_STATIC_FINAL_SELF, "MAX_VALUE", SymbolicRefs.CR_int);
+        DynamicConstantRef<Integer> integerMaxValue = DynamicConstantRef.of(BSM_GET_STATIC_FINAL_SELF, "MAX_VALUE", ConstantRefs.CR_int);
         int v = Intrinsics.ldc(integerMaxValue);
         assertEquals(v, Integer.MAX_VALUE);
     }
@@ -115,16 +115,16 @@
 
     public void testInvoke() {
         DynamicConstantRef<List<Integer>> list
-                = DynamicConstantRef.<List<Integer>>of(BSM_INVOKE, SymbolicRefs.CR_List)
-                .withArgs(MethodHandleRef.of(MethodHandleRef.Kind.STATIC, SymbolicRefs.CR_List, "of", SymbolicRefs.CR_List, SymbolicRefs.CR_Object.array()), 1, 2, 3, 4);
+                = DynamicConstantRef.<List<Integer>>of(BSM_INVOKE, ConstantRefs.CR_List)
+                .withArgs(MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ConstantRefs.CR_List, "of", ConstantRefs.CR_List, ConstantRefs.CR_Object.array()), 1, 2, 3, 4);
 
         List<Integer> l = ldc(list);
         assertEquals(l, List.of(1, 2, 3, 4));
     }
 
     public void testInvokeAsType() {
-        DynamicConstantRef<Integer> valueOf = DynamicConstantRef.<Integer>of(BSM_INVOKE, SymbolicRefs.CR_int)
-                .withArgs(MethodHandleRef.of(MethodHandleRef.Kind.STATIC, SymbolicRefs.CR_Integer, "valueOf", SymbolicRefs.CR_Integer, SymbolicRefs.CR_String),
+        DynamicConstantRef<Integer> valueOf = DynamicConstantRef.<Integer>of(BSM_INVOKE, ConstantRefs.CR_int)
+                .withArgs(MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ConstantRefs.CR_Integer, "valueOf", ConstantRefs.CR_Integer, ConstantRefs.CR_String),
                           "42");
 
         int v = ldc(valueOf);
@@ -134,7 +134,7 @@
 
     public void testVarHandleField() {
         VarHandle fh = Intrinsics.ldc(DynamicConstantRef.<VarHandle>of(BSM_VARHANDLE_FIELD, "f")
-                                              .withArgs(ClassRef.of("CondyTestHelper"), SymbolicRefs.CR_String));
+                                              .withArgs(ClassRef.of("CondyTestHelper"), ConstantRefs.CR_String));
 
         CondyTestHelper instance = new CondyTestHelper();
         assertEquals(null, fh.get(instance));
@@ -144,7 +144,7 @@
 
     public void testVarHandleStaticField() {
         VarHandle sfh = Intrinsics.ldc(DynamicConstantRef.<VarHandle>of(BSM_VARHANDLE_STATIC_FIELD, "sf")
-                                       .withArgs(ClassRef.of("CondyTestHelper"), SymbolicRefs.CR_String));
+                                       .withArgs(ClassRef.of("CondyTestHelper"), ConstantRefs.CR_String));
 
         assertEquals(null, sfh.get());
         sfh.set("42");
@@ -152,7 +152,7 @@
     }
 
     public void testVarHandleArray() {
-        VarHandle ah = Intrinsics.ldc(DynamicConstantRef.<VarHandle>of(BSM_VARHANDLE_ARRAY).withArgs(SymbolicRefs.CR_String.array()));
+        VarHandle ah = Intrinsics.ldc(DynamicConstantRef.<VarHandle>of(BSM_VARHANDLE_ARRAY).withArgs(ConstantRefs.CR_String.array()));
 
         String[] sa = { "A" };
         assertEquals("A", ah.get(sa, 0));
--- a/test/jdk/java/lang/sym/ClassRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/sym/ClassRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -28,7 +28,7 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.lang.sym.ClassRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -58,36 +58,36 @@
         if (!r.descriptorString().equals("V")) {
             assertEquals(r, r.array().componentType());
             // Commutativity: array -> resolve -> componentType -> toSymbolic
-            assertEquals(r, r.array().resolveRef(LOOKUP).getComponentType().toSymbolicRef(LOOKUP).orElseThrow());
+            assertEquals(r, r.array().resolveConstantRef(LOOKUP).getComponentType().toConstantRef(LOOKUP).orElseThrow());
             // Commutativity: resolve -> array -> toSymbolic -> component type
-            assertEquals(r, Array.newInstance(r.resolveRef(LOOKUP), 0).getClass().toSymbolicRef(LOOKUP).orElseThrow().componentType());
+            assertEquals(r, Array.newInstance(r.resolveConstantRef(LOOKUP), 0).getClass().toConstantRef(LOOKUP).orElseThrow().componentType());
         }
 
         if (r.isArray()) {
             assertEquals(r, r.componentType().array());
-            assertEquals(r, r.resolveRef(LOOKUP).getComponentType().toSymbolicRef(LOOKUP).orElseThrow().array());
-            assertEquals(r, Array.newInstance(r.componentType().resolveRef(LOOKUP), 0).getClass().toSymbolicRef(LOOKUP).orElseThrow());
+            assertEquals(r, r.resolveConstantRef(LOOKUP).getComponentType().toConstantRef(LOOKUP).orElseThrow().array());
+            assertEquals(r, Array.newInstance(r.componentType().resolveConstantRef(LOOKUP), 0).getClass().toConstantRef(LOOKUP).orElseThrow());
         }
     }
 
     private void testClassRef(ClassRef r, Class<?> c) throws ReflectiveOperationException {
         testClassRef(r);
 
-        assertEquals(r.resolveRef(LOOKUP), c);
-        assertEquals(c.toSymbolicRef(LOOKUP).orElseThrow(), r);
+        assertEquals(r.resolveConstantRef(LOOKUP), c);
+        assertEquals(c.toConstantRef(LOOKUP).orElseThrow(), r);
         assertEquals(ClassRef.ofDescriptor(c.toDescriptorString()), r);
     }
 
     public void testSymbolicRefsConstants() throws ReflectiveOperationException {
         int tested = 0;
-        Field[] fields = SymbolicRefs.class.getDeclaredFields();
+        Field[] fields = ConstantRefs.class.getDeclaredFields();
         for (Field f : fields) {
             try {
                 if (f.getType().equals(ClassRef.class)
                     && ((f.getModifiers() & Modifier.STATIC) != 0)
                     && ((f.getModifiers() & Modifier.PUBLIC) != 0)) {
                     ClassRef cr = (ClassRef) f.get(null);
-                    Class c = cr.resolveRef(MethodHandles.lookup());
+                    Class c = cr.resolveConstantRef(MethodHandles.lookup());
                     testClassRef(cr, c);
                     ++tested;
                 }
@@ -104,16 +104,16 @@
         for (Primitives p : Primitives.values()) {
             List<ClassRef> refs = List.of(ClassRef.ofDescriptor(p.descriptor),
                                           p.classRef,
-                                          (ClassRef) p.clazz.toSymbolicRef().orElseThrow());
+                                          (ClassRef) p.clazz.toConstantRef().orElseThrow());
             for (ClassRef c : refs) {
                 testClassRef(c, p.clazz);
                 assertTrue(c.isPrimitive());
                 assertEquals(p.descriptor, c.descriptorString());
-                assertEquals(p.name, c.canonicalName());
+                assertEquals(p.name, c.simpleName());
                 refs.forEach(cc -> assertEquals(c, cc));
                 if (p != Primitives.VOID) {
                     testClassRef(c.array(), p.arrayClass);
-                    assertEquals(c, ((ClassRef) p.arrayClass.toSymbolicRef().orElseThrow()).componentType());
+                    assertEquals(c, ((ClassRef) p.arrayClass.toConstantRef().orElseThrow()).componentType());
                     assertEquals(c, p.classRef.array().componentType());
                 }
             }
@@ -134,13 +134,13 @@
                                                        ClassRef.of("java.lang", "String"),
                                                        ClassRef.of("java.lang.String"),
                                                        ClassRef.of("java.lang.String").array().componentType(),
-                                                       String.class.toSymbolicRef(LOOKUP).orElseThrow());
+                                                       String.class.toConstantRef(LOOKUP).orElseThrow());
         for (ClassRef r : stringClassRefs) {
             testClassRef(r, String.class);
             assertFalse(r.isPrimitive());
             assertEquals("Ljava/lang/String;", r.descriptorString());
-            assertEquals("java.lang.String", r.canonicalName());
-            assertEquals(r.array().resolveRef(LOOKUP), String[].class);
+            assertEquals("String", r.simpleName());
+            assertEquals(r.array().resolveConstantRef(LOOKUP), String[].class);
             stringClassRefs.forEach(rr -> assertEquals(r, rr));
         }
 
@@ -150,7 +150,7 @@
         ClassRef thisClassRef = ClassRef.ofDescriptor("LClassRefTest;");
         assertEquals(thisClassRef, ClassRef.of("", "ClassRefTest"));
         assertEquals(thisClassRef, ClassRef.of("ClassRefTest"));
-        assertEquals(thisClassRef.canonicalName(), "ClassRefTest");
+        assertEquals(thisClassRef.simpleName(), "ClassRefTest");
         testClassRef(thisClassRef, ClassRefTest.class);
     }
 
@@ -187,9 +187,9 @@
 
             assertEquals(a1, ClassRef.ofDescriptor("[" + d));
             assertEquals(a2, ClassRef.ofDescriptor("[[" + d));
-            assertEquals(classToDescriptor(a0.resolveRef(LOOKUP)), a0.descriptorString());
-            assertEquals(classToDescriptor(a1.resolveRef(LOOKUP)), a1.descriptorString());
-            assertEquals(classToDescriptor(a2.resolveRef(LOOKUP)), a2.descriptorString());
+            assertEquals(classToDescriptor(a0.resolveConstantRef(LOOKUP)), a0.descriptorString());
+            assertEquals(classToDescriptor(a1.resolveConstantRef(LOOKUP)), a1.descriptorString());
+            assertEquals(classToDescriptor(a2.resolveConstantRef(LOOKUP)), a2.descriptorString());
         }
     }
 
--- a/test/jdk/java/lang/sym/CondyRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/sym/CondyRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -30,17 +30,16 @@
 import java.lang.sym.DynamicConstantRef;
 import java.lang.sym.EnumRef;
 import java.lang.sym.MethodHandleRef;
-import java.lang.sym.SymbolicRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 import java.lang.sym.VarHandleRef;
 
 import org.testng.annotations.Test;
 
-import static java.lang.sym.SymbolicRefs.CR_MethodHandle;
-import static java.lang.sym.SymbolicRefs.CR_Object;
-import static java.lang.sym.SymbolicRefs.CR_String;
-import static java.lang.sym.SymbolicRefs.CR_VarHandle;
-import static java.lang.sym.SymbolicRefs.CR_int;
+import static java.lang.sym.ConstantRefs.CR_MethodHandle;
+import static java.lang.sym.ConstantRefs.CR_Object;
+import static java.lang.sym.ConstantRefs.CR_String;
+import static java.lang.sym.ConstantRefs.CR_VarHandle;
+import static java.lang.sym.ConstantRefs.CR_int;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotEquals;
@@ -58,27 +57,27 @@
     private final static ClassRef CR_ConstantBootstraps = ClassRef.of("java.lang.invoke.ConstantBootstraps");
 
     private static<T> void testDCR(DynamicConstantRef<T> r, T c) throws ReflectiveOperationException {
-        assertEquals(r, DynamicConstantRef.of(r.bootstrapMethod(), r.name(), r.type(), r.bootstrapArgs()));
-        assertEquals(r.resolveRef(LOOKUP), c);
+        assertEquals(r, DynamicConstantRef.of(r.bootstrapMethod(), r.constantName(), r.constantType(), r.bootstrapArgs()));
+        assertEquals(r.resolveConstantRef(LOOKUP), c);
     }
 
     private void testVarHandleRef(DynamicConstantRef<VarHandle> r, VarHandle vh) throws ReflectiveOperationException  {
         testSymbolicRef(r);
-        assertEquals(r.resolveRef(LOOKUP), vh);
-        assertEquals(vh.toSymbolicRef(LOOKUP).orElseThrow(), r);
+        assertEquals(r.resolveConstantRef(LOOKUP), vh);
+        assertEquals(vh.toConstantRef(LOOKUP).orElseThrow(), r);
     }
 
     private static<E extends Enum<E>> void testEnumRef(EnumRef<E> r, E e) throws ReflectiveOperationException {
         testSymbolicRef(r);
 
-        assertEquals(r, EnumRef.of(r.enumClass(), r.constantName()));
-        assertEquals(r.resolveRef(LOOKUP), e);
+        assertEquals(r, EnumRef.of(r.constantType(), r.constantName()));
+        assertEquals(r.resolveConstantRef(LOOKUP), e);
     }
 
     public void testNullConstant() throws ReflectiveOperationException {
-        DynamicConstantRef<?> r = (DynamicConstantRef<?>) SymbolicRefs.NULL;
-        assertEquals(r, DynamicConstantRef.of(r.bootstrapMethod(), r.name(), r.type(), r.bootstrapArgs()));
-        assertNull(r.resolveRef(LOOKUP));
+        DynamicConstantRef<?> r = (DynamicConstantRef<?>) ConstantRefs.NULL;
+        assertEquals(r, DynamicConstantRef.of(r.bootstrapMethod(), r.constantName(), r.constantType(), r.bootstrapArgs()));
+        assertNull(r.resolveConstantRef(LOOKUP));
     }
 
     static String concatBSM(MethodHandles.Lookup lookup, String name, Class<?> type, String a, String b) {
@@ -96,9 +95,9 @@
         MethodHandleRef invoker = MethodHandleRef.ofDynamicConstant(CR_ConstantBootstraps, "invoke", CR_Object, CR_MethodHandle, CR_Object.array());
         MethodHandleRef format = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_String, "format", CR_String, CR_String, CR_Object.array());
 
-        String s = (String) invoker.resolveRef(LOOKUP)
+        String s = (String) invoker.resolveConstantRef(LOOKUP)
                                    .invoke(LOOKUP, "", String.class,
-                                           format.resolveRef(LOOKUP), "%s%s", "moo", "cow");
+                                           format.resolveConstantRef(LOOKUP), "%s%s", "moo", "cow");
         assertEquals(s, "moocow");
 
         DynamicConstantRef<String> ref = DynamicConstantRef.<String>of(invoker).withArgs(format, "%s%s", "moo", "cow");
@@ -183,32 +182,32 @@
     }
 
     public void testLifting() {
-        DynamicConstantRef<Object> unliftedNull = DynamicConstantRef.of(SymbolicRefs.BSM_NULL_CONSTANT, "_", CR_Object, EMPTY_ARGS);
-        assertEquals(SymbolicRefs.NULL, unliftedNull);
-        assertTrue(SymbolicRefs.NULL != unliftedNull);
-        assertTrue(SymbolicRefs.NULL == DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_NULL_CONSTANT, "_", CR_Object, EMPTY_ARGS));
-        assertTrue(SymbolicRefs.NULL == DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_NULL_CONSTANT, "_", CR_String, EMPTY_ARGS));
-        assertTrue(SymbolicRefs.NULL == DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_NULL_CONSTANT, "wahoo", CR_Object, EMPTY_ARGS));
+        DynamicConstantRef<Object> unliftedNull = DynamicConstantRef.of(ConstantRefs.BSM_NULL_CONSTANT, "_", CR_Object, EMPTY_ARGS);
+        assertEquals(ConstantRefs.NULL, unliftedNull);
+        assertTrue(ConstantRefs.NULL != unliftedNull);
+        assertTrue(ConstantRefs.NULL == DynamicConstantRef.ofCanonical(ConstantRefs.BSM_NULL_CONSTANT, "_", CR_Object, EMPTY_ARGS));
+        assertTrue(ConstantRefs.NULL == DynamicConstantRef.ofCanonical(ConstantRefs.BSM_NULL_CONSTANT, "_", CR_String, EMPTY_ARGS));
+        assertTrue(ConstantRefs.NULL == DynamicConstantRef.ofCanonical(ConstantRefs.BSM_NULL_CONSTANT, "wahoo", CR_Object, EMPTY_ARGS));
 
         assertLifted(CR_int,
-                     DynamicConstantRef.of(SymbolicRefs.BSM_PRIMITIVE_CLASS, "I", SymbolicRefs.CR_Class, EMPTY_ARGS),
-                     DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_PRIMITIVE_CLASS, "I", SymbolicRefs.CR_Class, EMPTY_ARGS));
+                     DynamicConstantRef.of(ConstantRefs.BSM_PRIMITIVE_CLASS, "I", ConstantRefs.CR_Class, EMPTY_ARGS),
+                     DynamicConstantRef.ofCanonical(ConstantRefs.BSM_PRIMITIVE_CLASS, "I", ConstantRefs.CR_Class, EMPTY_ARGS));
 
         ClassRef enumClass = ClassRef.of("CondyRefTest").inner("MyEnum");
         assertLifted(EnumRef.of(enumClass, "A"),
-                     DynamicConstantRef.of(SymbolicRefs.BSM_ENUM_CONSTANT, "A", enumClass, EMPTY_ARGS),
-                     DynamicConstantRef.<MyEnum>ofCanonical(SymbolicRefs.BSM_ENUM_CONSTANT, "A", enumClass, EMPTY_ARGS));
+                     DynamicConstantRef.of(ConstantRefs.BSM_ENUM_CONSTANT, "A", enumClass, EMPTY_ARGS),
+                     DynamicConstantRef.<MyEnum>ofCanonical(ConstantRefs.BSM_ENUM_CONSTANT, "A", enumClass, EMPTY_ARGS));
 
         ClassRef testClass = ClassRef.of("CondyRefTest").inner("MyClass");
         assertLifted(VarHandleRef.ofStaticField(testClass, "sf", CR_int),
-                     DynamicConstantRef.of(SymbolicRefs.BSM_VARHANDLE_STATIC_FIELD, "sf", CR_VarHandle, new ConstantRef<?>[] {testClass, "sf", CR_int }),
-                     DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_VARHANDLE_STATIC_FIELD, "sf", CR_VarHandle, new ConstantRef<?>[] {testClass, "sf", CR_int }));
+                     DynamicConstantRef.of(ConstantRefs.BSM_VARHANDLE_STATIC_FIELD, "sf", CR_VarHandle, new ConstantRef<?>[] {testClass, "sf", CR_int }),
+                     DynamicConstantRef.ofCanonical(ConstantRefs.BSM_VARHANDLE_STATIC_FIELD, "sf", CR_VarHandle, new ConstantRef<?>[] {testClass, "sf", CR_int }));
         assertLifted(VarHandleRef.ofField(testClass, "f", CR_int),
-                     DynamicConstantRef.of(SymbolicRefs.BSM_VARHANDLE_FIELD, "f", CR_VarHandle, new ConstantRef<?>[] {testClass, "f", CR_int }),
-                     DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_VARHANDLE_FIELD, "f", CR_VarHandle, new ConstantRef<?>[] {testClass, "f", CR_int }));
+                     DynamicConstantRef.of(ConstantRefs.BSM_VARHANDLE_FIELD, "f", CR_VarHandle, new ConstantRef<?>[] {testClass, "f", CR_int }),
+                     DynamicConstantRef.ofCanonical(ConstantRefs.BSM_VARHANDLE_FIELD, "f", CR_VarHandle, new ConstantRef<?>[] {testClass, "f", CR_int }));
         assertLifted(VarHandleRef.ofArray(CR_int.array()),
-                     DynamicConstantRef.of(SymbolicRefs.BSM_VARHANDLE_ARRAY, "_", CR_VarHandle, new ConstantRef<?>[] {CR_int.array() }),
-                     DynamicConstantRef.ofCanonical(SymbolicRefs.BSM_VARHANDLE_ARRAY, "_", CR_VarHandle, new ConstantRef<?>[] {CR_int.array() }));
+                     DynamicConstantRef.of(ConstantRefs.BSM_VARHANDLE_ARRAY, "_", CR_VarHandle, new ConstantRef<?>[] {CR_int.array() }),
+                     DynamicConstantRef.ofCanonical(ConstantRefs.BSM_VARHANDLE_ARRAY, "_", CR_VarHandle, new ConstantRef<?>[] {CR_int.array() }));
     }
 
 }
--- a/test/jdk/java/lang/sym/IntrinsifiedRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/sym/IntrinsifiedRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -31,7 +31,7 @@
 import java.lang.sym.EnumRef;
 import java.lang.sym.MethodHandleRef;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 import java.util.function.Supplier;
 
 import org.testng.annotations.Test;
@@ -74,18 +74,18 @@
     private static final MethodHandleRef MHR_TESTINTF_PSM = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_TESTINTF, "psm", MethodTypeRef.ofDescriptor("(I)I"));
     private static final MethodHandleRef MHR_TESTSUPER_M_SPECIAL = MethodHandleRef.of(MethodHandleRef.Kind.SPECIAL, CR_TESTSUPERCLASS, "m", "(I)I");
     private static final MethodHandleRef MHR_TESTINTF_M_SPECIAL = MethodHandleRef.of(MethodHandleRef.Kind.SPECIAL, CR_TESTINTF, "m", "(I)I");
-    private static final MethodHandleRef MHR_TESTCLASS_SF_SETTER = MethodHandleRef.ofField(STATIC_SETTER, CR_TESTCLASS, "sf", SymbolicRefs.CR_int);
-    private static final MethodHandleRef MHR_TESTCLASS_SF_GETTER = MethodHandleRef.ofField(STATIC_GETTER, CR_TESTCLASS, "sf", SymbolicRefs.CR_int);
-    private static final MethodHandleRef MHR_TESTINTF_SF_GETTER = MethodHandleRef.ofField(STATIC_GETTER, CR_TESTINTF, "sf", SymbolicRefs.CR_int);
-    private static final MethodHandleRef MHR_TESTCLASS_F_SETTER = MethodHandleRef.ofField(SETTER, CR_TESTCLASS, "f", SymbolicRefs.CR_int);
-    private static final MethodHandleRef MHR_TESTCLASS_F_GETTER = MethodHandleRef.ofField(GETTER, CR_TESTCLASS, "f", SymbolicRefs.CR_int);
+    private static final MethodHandleRef MHR_TESTCLASS_SF_SETTER = MethodHandleRef.ofField(STATIC_SETTER, CR_TESTCLASS, "sf", ConstantRefs.CR_int);
+    private static final MethodHandleRef MHR_TESTCLASS_SF_GETTER = MethodHandleRef.ofField(STATIC_GETTER, CR_TESTCLASS, "sf", ConstantRefs.CR_int);
+    private static final MethodHandleRef MHR_TESTINTF_SF_GETTER = MethodHandleRef.ofField(STATIC_GETTER, CR_TESTINTF, "sf", ConstantRefs.CR_int);
+    private static final MethodHandleRef MHR_TESTCLASS_F_SETTER = MethodHandleRef.ofField(SETTER, CR_TESTCLASS, "f", ConstantRefs.CR_int);
+    private static final MethodHandleRef MHR_TESTCLASS_F_GETTER = MethodHandleRef.ofField(GETTER, CR_TESTCLASS, "f", ConstantRefs.CR_int);
 
 
 
     private static <T extends Constable> void assertIntrinsic(ConstantRef<T> ref, T intrinsified, T target) throws ReflectiveOperationException {
         assertEquals(target, intrinsified);
-        assertEquals(ref.resolveRef(LOOKUP), intrinsified);
-        assertEquals(intrinsified.toSymbolicRef(LOOKUP).orElseThrow(), ref);
+        assertEquals(ref.resolveConstantRef(LOOKUP), intrinsified);
+        assertEquals(intrinsified.toConstantRef(LOOKUP).orElseThrow(), ref);
     }
 
     private static<T extends Constable> void assertIntrinsicFail(ConstantRef<T> ref, Supplier<T> supplier, Class<? extends Throwable> exception) {
@@ -120,10 +120,10 @@
 
         ClassRef cr6 = ClassRef.ofDescriptor("I");
         assertIntrinsic(cr6, ldc(cr6), int.class);
-        assertIntrinsic(SymbolicRefs.CR_int, ldc(SymbolicRefs.CR_int), int.class);
+        assertIntrinsic(ConstantRefs.CR_int, ldc(ConstantRefs.CR_int), int.class);
 
         ClassRef cr7 = ClassRef.ofDescriptor("[I");
-        ClassRef cr8 = SymbolicRefs.CR_int.array();
+        ClassRef cr8 = ConstantRefs.CR_int.array();
         assertIntrinsic(cr7, ldc(cr7), int[].class);
         assertIntrinsic(cr8, ldc(cr8), int[].class);
     }
@@ -138,17 +138,17 @@
 
     public void testLdcMethodType() throws ReflectiveOperationException {
         MethodTypeRef mtr1 = MethodTypeRef.ofDescriptor("()V");
-        MethodTypeRef mtr2 = MethodTypeRef.of(SymbolicRefs.CR_void);
+        MethodTypeRef mtr2 = MethodTypeRef.of(ConstantRefs.CR_void);
         assertIntrinsic(mtr1, ldc(mtr1), MethodType.methodType(void.class));
         assertIntrinsic(mtr2, ldc(mtr2), MethodType.methodType(void.class));
 
         MethodTypeRef mtr3 = MethodTypeRef.ofDescriptor("(I)I");
-        MethodTypeRef mtr4 = MethodTypeRef.of(SymbolicRefs.CR_int, SymbolicRefs.CR_int);
+        MethodTypeRef mtr4 = MethodTypeRef.of(ConstantRefs.CR_int, ConstantRefs.CR_int);
         assertIntrinsic(mtr3, ldc(mtr3), MethodType.methodType(int.class, int.class));
         assertIntrinsic(mtr4, ldc(mtr4), MethodType.methodType(int.class, int.class));
 
         MethodTypeRef mtr5 = MethodTypeRef.ofDescriptor("(Ljava/lang/String;)Ljava/lang/String;");
-        MethodTypeRef mtr6 = MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_String);
+        MethodTypeRef mtr6 = MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_String);
         assertIntrinsic(mtr5, ldc(mtr5), MethodType.methodType(String.class, String.class));
         assertIntrinsic(mtr6, ldc(mtr6), MethodType.methodType(String.class, String.class));
 
@@ -246,15 +246,15 @@
         assertIntrinsicFail(staticMethodAsIntf, () -> ldc(staticMethodAsIntf), IncompatibleClassChangeError.class);
 
         // Field kind mismatch -- instance/static
-        MethodHandleRef staticFieldAsInstance = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, CR_TESTCLASS, "sf", SymbolicRefs.CR_int);
-        MethodHandleRef instanceFieldAsStatic = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_GETTER, CR_TESTCLASS, "f", SymbolicRefs.CR_int);
+        MethodHandleRef staticFieldAsInstance = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, CR_TESTCLASS, "sf", ConstantRefs.CR_int);
+        MethodHandleRef instanceFieldAsStatic = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_GETTER, CR_TESTCLASS, "f", ConstantRefs.CR_int);
 
         assertIntrinsicFail(staticFieldAsInstance, () -> ldc(staticFieldAsInstance), IncompatibleClassChangeError.class);
         assertIntrinsicFail(instanceFieldAsStatic, () -> ldc(instanceFieldAsStatic), IncompatibleClassChangeError.class);
 
         // Setter for final field
-        MethodHandleRef finalStaticSetter = MethodHandleRef.ofField(MethodHandleRef.Kind.STATIC_SETTER, CR_TESTCLASS, "sff", SymbolicRefs.CR_int);
-        MethodHandleRef finalSetter = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, CR_TESTCLASS, "ff", SymbolicRefs.CR_int);
+        MethodHandleRef finalStaticSetter = MethodHandleRef.ofField(MethodHandleRef.Kind.STATIC_SETTER, CR_TESTCLASS, "sff", ConstantRefs.CR_int);
+        MethodHandleRef finalSetter = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, CR_TESTCLASS, "ff", ConstantRefs.CR_int);
 
         assertIntrinsicFail(finalStaticSetter, () -> ldc(finalStaticSetter), IllegalAccessError.class);
         assertIntrinsicFail(finalSetter, () -> ldc(finalSetter), IllegalAccessError.class);
@@ -271,10 +271,10 @@
         MethodHandleRef r3 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, CR_TESTCLASS, "nonexistent", "()V");
         MethodHandleRef r4 = MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, CR_TESTCLASS, "nonexistent", "()V");
         MethodHandleRef r5 = MethodHandleRef.of(MethodHandleRef.Kind.CONSTRUCTOR, CR_TESTCLASS, "<ignored>", "(I)V");
-        MethodHandleRef r6 = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, CR_TESTCLASS, "nonexistent", SymbolicRefs.CR_int);
-        MethodHandleRef r7 = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, CR_TESTCLASS, "nonexistent", SymbolicRefs.CR_int);
-        MethodHandleRef r8 = MethodHandleRef.ofField(MethodHandleRef.Kind.STATIC_GETTER, CR_TESTCLASS, "nonexistent", SymbolicRefs.CR_int);
-        MethodHandleRef r9 = MethodHandleRef.ofField(MethodHandleRef.Kind.STATIC_SETTER, CR_TESTCLASS, "nonexistent", SymbolicRefs.CR_int);
+        MethodHandleRef r6 = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, CR_TESTCLASS, "nonexistent", ConstantRefs.CR_int);
+        MethodHandleRef r7 = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, CR_TESTCLASS, "nonexistent", ConstantRefs.CR_int);
+        MethodHandleRef r8 = MethodHandleRef.ofField(MethodHandleRef.Kind.STATIC_GETTER, CR_TESTCLASS, "nonexistent", ConstantRefs.CR_int);
+        MethodHandleRef r9 = MethodHandleRef.ofField(MethodHandleRef.Kind.STATIC_SETTER, CR_TESTCLASS, "nonexistent", ConstantRefs.CR_int);
 
         assertIntrinsicFail(r3, () -> ldc(r3), NoSuchMethodError.class);
         assertIntrinsicFail(r4, () -> ldc(r4), NoSuchMethodError.class);
@@ -286,8 +286,8 @@
     }
 
     public void testLdcDynamicConstants() throws ReflectiveOperationException {
-        assertNull(ldc(SymbolicRefs.NULL));
-        assertIntrinsic(SymbolicRefs.CR_int, ldc(SymbolicRefs.CR_int), int.class);
+        assertNull(ldc(ConstantRefs.NULL));
+        assertIntrinsic(ConstantRefs.CR_int, ldc(ConstantRefs.CR_int), int.class);
         // @@@ VarHandle
         // @@@ invoke (including multiple deep)
     }
--- a/test/jdk/java/lang/sym/MethodHandleRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/sym/MethodHandleRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -27,13 +27,15 @@
 import java.lang.invoke.MethodHandleInfo;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
+import java.lang.invoke.WrongMethodTypeException;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.lang.sym.ClassRef;
+import java.lang.sym.ConstantMethodHandleRef;
 import java.lang.sym.MethodHandleRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.MethodTypeRef;
+import java.lang.sym.ConstantRefs;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.function.Supplier;
 
@@ -43,10 +45,12 @@
 import static java.lang.sym.MethodHandleRef.Kind.SETTER;
 import static java.lang.sym.MethodHandleRef.Kind.STATIC_GETTER;
 import static java.lang.sym.MethodHandleRef.Kind.STATIC_SETTER;
-import static java.lang.sym.SymbolicRefs.CR_List;
-import static java.lang.sym.SymbolicRefs.CR_Object;
-import static java.lang.sym.SymbolicRefs.CR_String;
-import static java.lang.sym.SymbolicRefs.CR_void;
+import static java.lang.sym.ConstantRefs.CR_Integer;
+import static java.lang.sym.ConstantRefs.CR_List;
+import static java.lang.sym.ConstantRefs.CR_Object;
+import static java.lang.sym.ConstantRefs.CR_String;
+import static java.lang.sym.ConstantRefs.CR_int;
+import static java.lang.sym.ConstantRefs.CR_void;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
@@ -74,23 +78,30 @@
     }
 
     private void testMethodHandleRef(MethodHandleRef r) throws ReflectiveOperationException {
-        testSymbolicRef(r);
+        if (r instanceof ConstantMethodHandleRef) {
+            testSymbolicRef(r);
 
-        assertEquals(r, MethodHandleRef.of(r.kind(), r.owner(), r.name(), r.type()));
+            ConstantMethodHandleRef rr = (ConstantMethodHandleRef) r;
+            assertEquals(r, MethodHandleRef.of(rr.kind(), rr.owner(), rr.methodName(), r.methodType()));
+        }
+        else {
+            testSymbolicRefForwardOnly(r);
+        }
     }
 
     private void testMethodHandleRef(MethodHandleRef r, MethodHandle mh) throws ReflectiveOperationException {
         testMethodHandleRef(r);
 
-        assertMHEquals(r.resolveRef(LOOKUP), mh);
-        assertEquals(mh.toSymbolicRef(LOOKUP).orElseThrow(), r);
+        assertMHEquals(r.resolveConstantRef(LOOKUP), mh);
+        assertEquals(mh.toConstantRef(LOOKUP).orElseThrow(), r);
 
         // compare extractable properties: refKind, owner, name, type
         MethodHandleInfo mhi = LOOKUP.revealDirect(mh);
-        assertEquals(mhi.getDeclaringClass().toDescriptorString(), r.owner().descriptorString());
-        assertEquals(mhi.getName(), r.name());
-        assertEquals(mhi.getReferenceKind(), r.kind().refKind);
-        assertEquals(mhi.getMethodType().toMethodDescriptorString(), r.type().descriptorString());
+        ConstantMethodHandleRef rr = (ConstantMethodHandleRef) r;
+        assertEquals(mhi.getDeclaringClass().toDescriptorString(), rr.owner().descriptorString());
+        assertEquals(mhi.getName(), rr.methodName());
+        assertEquals(mhi.getReferenceKind(), rr.kind().refKind);
+        assertEquals(mhi.getMethodType().toMethodDescriptorString(), r.methodType().descriptorString());
     }
 
     public void testSimpleMHs() throws ReflectiveOperationException {
@@ -104,6 +115,37 @@
                             LOOKUP.findConstructor(ArrayList.class, MethodType.methodType(void.class)));
     }
 
+    public void testAsType() throws Throwable {
+        MethodHandleRef mhr = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.of("java.lang.Integer"), "valueOf",
+                                                 MethodTypeRef.of(CR_Integer, CR_int));
+            MethodHandleRef takesInteger = mhr.asType(MethodTypeRef.of(CR_Integer, CR_Integer));
+        testMethodHandleRef(takesInteger);
+        MethodHandle mh1 = takesInteger.resolveConstantRef(LOOKUP);
+        assertEquals((Integer) 3, (Integer) mh1.invokeExact((Integer) 3));
+
+        try {
+            Integer i = (Integer) mh1.invokeExact(3);
+            fail("Expected WMTE");
+        }
+        catch (WrongMethodTypeException ignored) { }
+
+        MethodHandleRef takesInt = takesInteger.asType(MethodTypeRef.of(CR_Integer, CR_int));
+        testMethodHandleRef(takesInt);
+        MethodHandle mh2 = takesInt.resolveConstantRef(LOOKUP);
+        assertEquals((Integer) 3, (Integer) mh2.invokeExact(3));
+
+        try {
+            Integer i = (Integer) mh2.invokeExact((Integer) 3);
+            fail("Expected WMTE");
+        }
+        catch (WrongMethodTypeException ignored) { }
+
+        // @@@ Test short-circuit optimization
+        // @@@ Test varargs adaptation
+        // @@@ Test bad adaptations and assert runtime error on resolution
+        // @@@ Test intrinsification of adapted MH
+    }
+
     public void testMethodHandleRef() throws Throwable {
         MethodHandleRef ctorRef = MethodHandleRef.of(MethodHandleRef.Kind.CONSTRUCTOR, testClass, "<ignored!>", CR_void);
         MethodHandleRef staticMethodRef = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, testClass, "sm", "(I)I");
@@ -120,75 +162,75 @@
         for (MethodHandleRef r : List.of(ctorRef, staticMethodRef, staticIMethodRef, instanceMethodRef, instanceIMethodRef))
             testMethodHandleRef(r);
 
-        TestClass instance = (TestClass) ctorRef.resolveRef(LOOKUP).invokeExact();
-        TestClass instance2 = (TestClass) ctorRef.resolveRef(TestClass.LOOKUP).invokeExact();
+        TestClass instance = (TestClass) ctorRef.resolveConstantRef(LOOKUP).invokeExact();
+        TestClass instance2 = (TestClass) ctorRef.resolveConstantRef(TestClass.LOOKUP).invokeExact();
         TestInterface instanceI = instance;
 
         assertTrue(instance != instance2);
 
-        assertEquals(5, (int) staticMethodRef.resolveRef(LOOKUP).invokeExact(5));
-        assertEquals(5, (int) staticMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(5));
-        assertEquals(0, (int) staticIMethodRef.resolveRef(LOOKUP).invokeExact(5));
-        assertEquals(0, (int) staticIMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(5));
+        assertEquals(5, (int) staticMethodRef.resolveConstantRef(LOOKUP).invokeExact(5));
+        assertEquals(5, (int) staticMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) staticIMethodRef.resolveConstantRef(LOOKUP).invokeExact(5));
+        assertEquals(0, (int) staticIMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(5));
 
-        assertEquals(5, (int) instanceMethodRef.resolveRef(LOOKUP).invokeExact(instance, 5));
-        assertEquals(5, (int) instanceMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(instance, 5));
-        assertEquals(5, (int) instanceIMethodRef.resolveRef(LOOKUP).invokeExact(instanceI, 5));
-        assertEquals(5, (int) instanceIMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(5, (int) instanceMethodRef.resolveConstantRef(LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) instanceMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) instanceIMethodRef.resolveConstantRef(LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(5, (int) instanceIMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instanceI, 5));
 
-        try { superMethodRef.resolveRef(LOOKUP); fail(); }
+        try { superMethodRef.resolveConstantRef(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(-1, (int) superMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(-1, (int) superMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { superIMethodRef.resolveRef(LOOKUP); fail(); }
+        try { superIMethodRef.resolveConstantRef(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) superIMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(0, (int) superIMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { privateMethodRef.resolveRef(LOOKUP); fail(); }
+        try { privateMethodRef.resolveConstantRef(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(5, (int) privateMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) privateMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { privateIMethodRef.resolveRef(LOOKUP); fail(); }
+        try { privateIMethodRef.resolveConstantRef(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        try { privateIMethodRef.resolveRef(TestClass.LOOKUP); fail(); }
+        try { privateIMethodRef.resolveConstantRef(TestClass.LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) privateIMethodRef.resolveRef(TestInterface.LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(0, (int) privateIMethodRef.resolveConstantRef(TestInterface.LOOKUP).invokeExact(instanceI, 5));
 
-        try { privateStaticMethodRef.resolveRef(LOOKUP); fail(); }
+        try { privateStaticMethodRef.resolveConstantRef(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(5, (int) privateStaticMethodRef.resolveRef(TestClass.LOOKUP).invokeExact(5));
+        assertEquals(5, (int) privateStaticMethodRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(5));
 
-        try { privateStaticIMethodRef.resolveRef(LOOKUP); fail(); }
+        try { privateStaticIMethodRef.resolveConstantRef(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        try { privateStaticIMethodRef.resolveRef(TestClass.LOOKUP); fail(); }
+        try { privateStaticIMethodRef.resolveConstantRef(TestClass.LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) privateStaticIMethodRef.resolveRef(TestInterface.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) privateStaticIMethodRef.resolveConstantRef(TestInterface.LOOKUP).invokeExact(5));
 
-        MethodHandleRef staticSetterRef = MethodHandleRef.ofField(STATIC_SETTER, testClass, "sf", SymbolicRefs.CR_int);
-        MethodHandleRef staticGetterRef = MethodHandleRef.ofField(STATIC_GETTER, testClass, "sf", SymbolicRefs.CR_int);
-        MethodHandleRef staticGetterIRef = MethodHandleRef.ofField(STATIC_GETTER, testInterface, "sf", SymbolicRefs.CR_int);
-        MethodHandleRef setterRef = MethodHandleRef.ofField(SETTER, testClass, "f", SymbolicRefs.CR_int);
-        MethodHandleRef getterRef = MethodHandleRef.ofField(GETTER, testClass, "f", SymbolicRefs.CR_int);
+        MethodHandleRef staticSetterRef = MethodHandleRef.ofField(STATIC_SETTER, testClass, "sf", CR_int);
+        MethodHandleRef staticGetterRef = MethodHandleRef.ofField(STATIC_GETTER, testClass, "sf", CR_int);
+        MethodHandleRef staticGetterIRef = MethodHandleRef.ofField(STATIC_GETTER, testInterface, "sf", CR_int);
+        MethodHandleRef setterRef = MethodHandleRef.ofField(SETTER, testClass, "f", CR_int);
+        MethodHandleRef getterRef = MethodHandleRef.ofField(GETTER, testClass, "f", CR_int);
 
         for (MethodHandleRef r : List.of(staticSetterRef, staticGetterRef, staticGetterIRef, setterRef, getterRef))
             testMethodHandleRef(r);
 
-        staticSetterRef.resolveRef(LOOKUP).invokeExact(6); assertEquals(TestClass.sf, 6);
-        assertEquals(6, (int) staticGetterRef.resolveRef(LOOKUP).invokeExact());
-        assertEquals(6, (int) staticGetterRef.resolveRef(TestClass.LOOKUP).invokeExact());
-        staticSetterRef.resolveRef(TestClass.LOOKUP).invokeExact(7); assertEquals(TestClass.sf, 7);
-        assertEquals(7, (int) staticGetterRef.resolveRef(LOOKUP).invokeExact());
-        assertEquals(7, (int) staticGetterRef.resolveRef(TestClass.LOOKUP).invokeExact());
+        staticSetterRef.resolveConstantRef(LOOKUP).invokeExact(6); assertEquals(TestClass.sf, 6);
+        assertEquals(6, (int) staticGetterRef.resolveConstantRef(LOOKUP).invokeExact());
+        assertEquals(6, (int) staticGetterRef.resolveConstantRef(TestClass.LOOKUP).invokeExact());
+        staticSetterRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(7); assertEquals(TestClass.sf, 7);
+        assertEquals(7, (int) staticGetterRef.resolveConstantRef(LOOKUP).invokeExact());
+        assertEquals(7, (int) staticGetterRef.resolveConstantRef(TestClass.LOOKUP).invokeExact());
 
-        assertEquals(3, (int) staticGetterIRef.resolveRef(LOOKUP).invokeExact());
-        assertEquals(3, (int) staticGetterIRef.resolveRef(TestClass.LOOKUP).invokeExact());
+        assertEquals(3, (int) staticGetterIRef.resolveConstantRef(LOOKUP).invokeExact());
+        assertEquals(3, (int) staticGetterIRef.resolveConstantRef(TestClass.LOOKUP).invokeExact());
 
-        setterRef.resolveRef(LOOKUP).invokeExact(instance, 6); assertEquals(instance.f, 6);
-        assertEquals(6, (int) getterRef.resolveRef(LOOKUP).invokeExact(instance));
-        assertEquals(6, (int) getterRef.resolveRef(TestClass.LOOKUP).invokeExact(instance));
-        setterRef.resolveRef(TestClass.LOOKUP).invokeExact(instance, 7); assertEquals(instance.f, 7);
-        assertEquals(7, (int) getterRef.resolveRef(LOOKUP).invokeExact(instance));
-        assertEquals(7, (int) getterRef.resolveRef(TestClass.LOOKUP).invokeExact(instance));
+        setterRef.resolveConstantRef(LOOKUP).invokeExact(instance, 6); assertEquals(instance.f, 6);
+        assertEquals(6, (int) getterRef.resolveConstantRef(LOOKUP).invokeExact(instance));
+        assertEquals(6, (int) getterRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance));
+        setterRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance, 7); assertEquals(instance.f, 7);
+        assertEquals(7, (int) getterRef.resolveConstantRef(LOOKUP).invokeExact(instance));
+        assertEquals(7, (int) getterRef.resolveConstantRef(TestClass.LOOKUP).invokeExact(instance));
     }
 
     private void assertBadArgs(Supplier<MethodHandleRef> supplier, String s) {
@@ -215,14 +257,14 @@
 
     public void testSymbolicRefsConstants() throws ReflectiveOperationException {
         int tested = 0;
-        Field[] fields = SymbolicRefs.class.getDeclaredFields();
+        Field[] fields = ConstantRefs.class.getDeclaredFields();
         for (Field f : fields) {
             try {
                 if (f.getType().equals(MethodHandleRef.class)
                     && ((f.getModifiers() & Modifier.STATIC) != 0)
                     && ((f.getModifiers() & Modifier.PUBLIC) != 0)) {
                     MethodHandleRef r = (MethodHandleRef) f.get(null);
-                    MethodHandle m = r.resolveRef(MethodHandles.lookup());
+                    MethodHandle m = r.resolveConstantRef(MethodHandles.lookup());
                     testMethodHandleRef(r, m);
                     ++tested;
                 }
--- a/test/jdk/java/lang/sym/MethodTypeRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/sym/MethodTypeRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -63,8 +63,8 @@
     private void testMethodTypeRef(MethodTypeRef r, MethodType mt) throws ReflectiveOperationException {
         testMethodTypeRef(r);
 
-        assertEquals(r.resolveRef(LOOKUP), mt);
-        assertEquals(mt.toSymbolicRef(LOOKUP).get(), r);
+        assertEquals(r.resolveConstantRef(LOOKUP), mt);
+        assertEquals(mt.toConstantRef(LOOKUP).get(), r);
 
         assertEquals(r.descriptorString(), mt.toMethodDescriptorString());
         assertEquals(r.parameterCount(), mt.parameterCount());
@@ -99,7 +99,7 @@
             ClassRef rc = ClassRef.ofDescriptor(r);
             MethodTypeRef newRef = mtRef.changeReturnType(rc);
             assertEquals(newRef, MethodTypeRef.of(rc, paramTypes));
-            testMethodTypeRef(newRef, mt.changeReturnType(rc.resolveRef(LOOKUP)));
+            testMethodTypeRef(newRef, mt.changeReturnType(rc.resolveConstantRef(LOOKUP)));
         }
 
         // changeParamType
@@ -110,7 +110,7 @@
                 ps[i] = pc;
                 MethodTypeRef newRef = mtRef.changeParameterType(i, pc);
                 assertEquals(newRef, MethodTypeRef.of(returnType, ps));
-                testMethodTypeRef(newRef, mt.changeParameterType(i, pc.resolveRef(LOOKUP)));
+                testMethodTypeRef(newRef, mt.changeParameterType(i, pc.resolveConstantRef(LOOKUP)));
             }
         }
 
@@ -135,7 +135,7 @@
                                          .toArray(ClassRef[]::new);
                 MethodTypeRef newRef = mtRef.insertParameterTypes(i, p);
                 assertEquals(newRef, MethodTypeRef.of(returnType, ps));
-                testMethodTypeRef(newRef, mt.insertParameterTypes(i, p.resolveRef(LOOKUP)));
+                testMethodTypeRef(newRef, mt.insertParameterTypes(i, p.resolveConstantRef(LOOKUP)));
             }
         }
     }
--- a/test/jdk/java/lang/sym/SymbolicRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/jdk/java/lang/sym/SymbolicRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -24,16 +24,12 @@
  */
 
 import java.lang.Class;
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodHandleInfo;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
-import java.lang.reflect.Method;
 import java.lang.sym.ClassRef;
 import java.lang.sym.Constable;
 import java.lang.sym.ConstantRef;
-import java.lang.sym.SymbolicRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Stream;
@@ -59,15 +55,15 @@
     static String[] returnDescs = Stream.concat(Stream.of(paramDescs), Stream.of("V")).toArray(String[]::new);
 
     enum Primitives {
-        INT("I", "int", int.class, int[].class, SymbolicRefs.CR_int),
-        LONG("J", "long", long.class, long[].class, SymbolicRefs.CR_long),
-        SHORT("S", "short", short.class, short[].class, SymbolicRefs.CR_short),
-        BYTE("B", "byte", byte.class, byte[].class, SymbolicRefs.CR_byte),
-        CHAR("C", "char", char.class, char[].class, SymbolicRefs.CR_char),
-        FLOAT("F", "float", float.class, float[].class, SymbolicRefs.CR_float),
-        DOUBLE("D", "double", double.class, double[].class, SymbolicRefs.CR_double),
-        BOOLEAN("Z", "boolean", boolean.class, boolean[].class, SymbolicRefs.CR_boolean),
-        VOID("V", "void", void.class, null, SymbolicRefs.CR_void);
+        INT("I", "int", int.class, int[].class, ConstantRefs.CR_int),
+        LONG("J", "long", long.class, long[].class, ConstantRefs.CR_long),
+        SHORT("S", "short", short.class, short[].class, ConstantRefs.CR_short),
+        BYTE("B", "byte", byte.class, byte[].class, ConstantRefs.CR_byte),
+        CHAR("C", "char", char.class, char[].class, ConstantRefs.CR_char),
+        FLOAT("F", "float", float.class, float[].class, ConstantRefs.CR_float),
+        DOUBLE("D", "double", double.class, double[].class, ConstantRefs.CR_double),
+        BOOLEAN("Z", "boolean", boolean.class, boolean[].class, ConstantRefs.CR_boolean),
+        VOID("V", "void", void.class, null, ConstantRefs.CR_void);
 
         public final String descriptor;
         public final String name;
@@ -93,14 +89,23 @@
     }
 
     static<T> void testSymbolicRef(ConstantRef<T> ref) throws ReflectiveOperationException {
-        // Round trip sym -> resolve -> toSymbolicRef
-        ConstantRef<? super ConstantRef<T>> s = ((Constable<ConstantRef<T>>) ref.resolveRef(LOOKUP)).toSymbolicRef(LOOKUP).orElseThrow();
-        assertEquals(ref, s);
+        testSymbolicRef(ref, false);
+    }
+
+    static<T> void testSymbolicRefForwardOnly(ConstantRef<T> ref) throws ReflectiveOperationException {
+        testSymbolicRef(ref, true);
+    }
+
+    private static<T> void testSymbolicRef(ConstantRef<T> ref, boolean forwardOnly) throws ReflectiveOperationException {
+        if (!forwardOnly) {
+            // Round trip sym -> resolve -> toSymbolicRef
+            ConstantRef<? super ConstantRef<T>> s = ((Constable<ConstantRef<T>>) ref.resolveConstantRef(LOOKUP)).toConstantRef(LOOKUP).orElseThrow();
+            assertEquals(ref, s);
+        }
 
         // Round trip sym -> quoted sym -> resolve
-        Method m = ref.getClass().getMethod("toSymbolicRef", MethodHandles.Lookup.class);
-        Optional<ConstantRef<ConstantRef<T>>> opt = (Optional<ConstantRef<ConstantRef<T>>>) m.invoke(ref, LOOKUP);
-        ConstantRef<T> sr = opt.orElseThrow().resolveRef(LOOKUP);
+        Optional<ConstantRef<ConstantRef<T>>> opt = (Optional<ConstantRef<ConstantRef<T>>>) ((Constable) ref).toConstantRef(LOOKUP);
+        ConstantRef<T> sr = opt.orElseThrow().resolveConstantRef(LOOKUP);
         assertEquals(sr, ref);
     }
 }
--- a/test/langtools/tools/javac/condy/CheckForCondyDuplicatesTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/condy/CheckForCondyDuplicatesTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -36,6 +36,7 @@
 
 import java.io.File;
 import java.nio.file.Paths;
+import java.lang.sym.*;
 
 import com.sun.tools.classfile.ClassFile;
 import com.sun.tools.classfile.ConstantPool.*;
@@ -52,8 +53,8 @@
 
         "public class MultipleEntriesCP {\n" +
         "    void m() {\n" +
-        "        Object o1 = Intrinsics.ldc(SymbolicRefs.NULL);\n" +
-        "        Object o2 = Intrinsics.ldc(SymbolicRefs.NULL);\n" +
+        "        Object o1 = Intrinsics.ldc(ConstantRefs.NULL);\n" +
+        "        Object o2 = Intrinsics.ldc(ConstantRefs.NULL);\n" +
         "    }\n" +
         "}";
 
--- a/test/langtools/tools/javac/specialConstantFolding/CheckForCorrectMRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/CheckForCorrectMRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -76,12 +76,12 @@
             "    }\n" +
 
             "    public void test2() {\n" +
-            "        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, THE_INTERFACE, \"strField\", SymbolicRefs.CR_String);\n" +
+            "        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, THE_INTERFACE, \"strField\", ConstantRefs.CR_String);\n" +
             "        Intrinsics.ldc(negIMethodRef);\n" +
             "    }\n" +
 
             "    public void test3() {\n" +
-            "        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, THE_INTERFACE, \"strField\", SymbolicRefs.CR_String);\n" +
+            "        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, THE_INTERFACE, \"strField\", ConstantRefs.CR_String);\n" +
             "        Intrinsics.ldc(negIMethodRef);\n" +
             "    }\n" +
             "}";
--- a/test/langtools/tools/javac/specialConstantFolding/CondyCodeGenerationTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/CondyCodeGenerationTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -56,7 +56,7 @@
 
     String testNoStaticArgs() throws Throwable {
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_String, SymbolicRefs.CR_MethodHandles_Lookup, SymbolicRefs.CR_String, SymbolicRefs.CR_Class);
+                ConstantRefs.CR_String, ConstantRefs.CR_MethodHandles_Lookup, ConstantRefs.CR_String, ConstantRefs.CR_Class);
         MethodHandleRef mh = MethodHandleRef.of(STATIC, ClassRef.ofDescriptor("LCondyCodeGenerationTest;"),
                                                 "testNoStaticArgsBSM", methodTypeForMethodHandle);
 
@@ -71,22 +71,22 @@
 
     String testWithStaticArgs() throws Throwable {
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Class,
-                SymbolicRefs.CR_int,
-                SymbolicRefs.CR_long,
-                SymbolicRefs.CR_float,
-                SymbolicRefs.CR_double,
-                SymbolicRefs.CR_Class,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_MethodHandle);
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Class,
+                ConstantRefs.CR_int,
+                ConstantRefs.CR_long,
+                ConstantRefs.CR_float,
+                ConstantRefs.CR_double,
+                ConstantRefs.CR_Class,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_MethodHandle);
         MethodHandleRef mh = MethodHandleRef.of(STATIC, ClassRef.ofDescriptor("LCondyCodeGenerationTest;"),
                                                 "testWithStaticArgsBSM", methodTypeForMethodHandle);
         DynamicConstantRef<String> condyDescr = DynamicConstantRef.<String>of(mh, "constant-name").withArgs(1, 2L, 3.0f, 4.0d,
-                                                                                                            SymbolicRefs.CR_Number,
+                                                                                                            ConstantRefs.CR_Number,
                                                                                                             "something",
                                                                                                             MethodTypeRef.ofDescriptor("(IJFD)V"),
                                                                                                             mh);
@@ -113,10 +113,10 @@
 
     String testWithNestedArg() throws Throwable {
         MethodTypeRef c_primitiveClassBSM_MT = MethodTypeRef.of(
-                SymbolicRefs.CR_Class,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Class
+                ConstantRefs.CR_Class,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Class
         );
         MethodHandleRef c_primitiveClassBSM_MH =
                 MethodHandleRef.of(STATIC, ClassRef.ofDescriptor("LCondyCodeGenerationTest;"),
@@ -124,11 +124,11 @@
         DynamicConstantRef<Class> c_primitiveClassBSM_CD = DynamicConstantRef.of(c_primitiveClassBSM_MH, "I");
 
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Class,
-                SymbolicRefs.CR_Class
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Class,
+                ConstantRefs.CR_Class
         );
         MethodHandleRef mh = MethodHandleRef.of(STATIC, ClassRef.ofDescriptor("LCondyCodeGenerationTest;"),
                                                 "testWithNestedArgBSM", methodTypeForMethodHandle);
--- a/test/langtools/tools/javac/specialConstantFolding/DontCompileIfSymbolCantBeFoundTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/DontCompileIfSymbolCantBeFoundTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -9,7 +9,7 @@
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 import static java.lang.sym.MethodHandleRef.Kind.GETTER;
@@ -23,11 +23,11 @@
         final MethodHandle mhStatic = ldc(MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchMethod", "()Ljava/lang/String;"));
         final MethodHandle mhSpecial = ldc(MethodHandleRef.ofSpecial(ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchMethod", MethodTypeRef.ofDescriptor("()Ljava/lang/String;"), ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest")));
 
-        final MethodHandle mhStaticSetter = ldc(MethodHandleRef.ofField(STATIC_SETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", SymbolicRefs.CR_String));
-        final MethodHandle mhSetter = ldc(MethodHandleRef.ofField(SETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", SymbolicRefs.CR_String));
-        final MethodHandle mhGetter = ldc(MethodHandleRef.ofField(GETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", SymbolicRefs.CR_String));
-        final MethodHandle mhStaticGetter = ldc(MethodHandleRef.ofField(STATIC_GETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", SymbolicRefs.CR_String));
+        final MethodHandle mhStaticSetter = ldc(MethodHandleRef.ofField(STATIC_SETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", ConstantRefs.CR_String));
+        final MethodHandle mhSetter = ldc(MethodHandleRef.ofField(SETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", ConstantRefs.CR_String));
+        final MethodHandle mhGetter = ldc(MethodHandleRef.ofField(GETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", ConstantRefs.CR_String));
+        final MethodHandle mhStaticGetter = ldc(MethodHandleRef.ofField(STATIC_GETTER, ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), "noSuchField", ConstantRefs.CR_String));
 
-        final MethodHandle mhNewFindConstructorTest = ldc(MethodHandleRef.ofConstructor(ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), VOID, SymbolicRefs.CR_String));
+        final MethodHandle mhNewFindConstructorTest = ldc(MethodHandleRef.ofConstructor(ClassRef.ofDescriptor("DontCompileIfSymbolCantBeFoundTest"), VOID, ConstantRefs.CR_String));
     }
 }
--- a/test/langtools/tools/javac/specialConstantFolding/EffectivelyFinalTestNeg.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/EffectivelyFinalTestNeg.java	Thu Mar 01 14:25:00 2018 -0500
@@ -15,20 +15,20 @@
     }
 
     void test2() throws Throwable {
-        ClassRef c1 = SymbolicRefs.CR_String;
-        ClassRef c2 = SymbolicRefs.CR_Integer;
+        ClassRef c1 = ConstantRefs.CR_String;
+        ClassRef c2 = ConstantRefs.CR_Integer;
         c1 = null;
         MethodType mt = ldc(MethodTypeRef.of(c1, c2));
     }
 
     void test2_1() throws Throwable {
-        ClassRef i = SymbolicRefs.CR_String;
+        ClassRef i = ConstantRefs.CR_String;
         MethodType mt = ldc(MethodTypeRef.of(i));
         i = null;
     }
 
     void test3(EffectivelyFinalTestNeg f) throws Throwable {
-        ClassRef c = SymbolicRefs.CR_String;
+        ClassRef c = ConstantRefs.CR_String;
         // you can't trust m1 as it depends on c1 which is not effectively final
         MethodTypeRef mt = MethodTypeRef.of(c);
         MethodHandle mh = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, ClassRef.ofDescriptor("LEffectivelyFinalTestNeg;"), "foo", mt));
@@ -36,7 +36,7 @@
     }
 
     void test4(EffectivelyFinalTestNeg f) throws Throwable {
-        ClassRef c = SymbolicRefs.CR_String;
+        ClassRef c = ConstantRefs.CR_String;
         // you can't trust m1 as it depends on c1 which is not effectively final
         MethodTypeRef mt = MethodTypeRef.of(c);
         final MethodHandle mh = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, ClassRef.ofDescriptor("LEffectivelyFinalTestNeg;"), "foo", mt));
@@ -46,7 +46,7 @@
     final ClassRef cField = ClassRef.ofDescriptor("LEffectivelyFinalTestNeg;");
 
     void test5(EffectivelyFinalTestNeg f) throws Throwable {
-        ClassRef c = SymbolicRefs.CR_String;
+        ClassRef c = ConstantRefs.CR_String;
         // you can't trust m1 as it depends on c1 which is not effectively final
         MethodTypeRef mt = MethodTypeRef.of(c);
         MethodHandle mh = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, cField, "foo", mt));
--- a/test/langtools/tools/javac/specialConstantFolding/IndyCodeGenerationTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/IndyCodeGenerationTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -49,29 +49,29 @@
 
     String testWithStaticArgs() throws Throwable {
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_CallSite,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_int,
-                SymbolicRefs.CR_long,
-                SymbolicRefs.CR_float,
-                SymbolicRefs.CR_double,
-                SymbolicRefs.CR_Class,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_MethodHandle
+                ConstantRefs.CR_CallSite,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_int,
+                ConstantRefs.CR_long,
+                ConstantRefs.CR_float,
+                ConstantRefs.CR_double,
+                ConstantRefs.CR_Class,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_MethodHandle
         );
         MethodHandleRef mh = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.ofDescriptor("LIndyCodeGenerationTest;"),
                                                 "testWithStaticArgsBSM", methodTypeForMethodHandle);
         MethodTypeRef methodTypeForIndy = MethodTypeRef.of(
-                SymbolicRefs.CR_String
+                ConstantRefs.CR_String
         );
         DynamicCallSiteRef bs = DynamicCallSiteRef.of(mh,
                                                       "name",
                                                       methodTypeForIndy,
                                                       1, 2L, 3.0f, 4.0d,
-                                                      SymbolicRefs.CR_int,
+                                                      ConstantRefs.CR_int,
                                                       "something",
                                                       MethodTypeRef.ofDescriptor("(IJFD)V"), mh);
         return (String)invokedynamic(bs);
--- a/test/langtools/tools/javac/specialConstantFolding/IndyCrashTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/IndyCrashTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -24,8 +24,8 @@
     public void testSimpleIndy() throws Throwable {
         MethodHandleRef bsmMH = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, HELPER_CLASS, "foo", "()Ljava/lang/invoke/CallSite;");
         MethodTypeRef methodTypeForIndy = MethodTypeRef.of(
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType
         );
         DynamicCallSiteRef bsm = DynamicCallSiteRef.of(bsmMH, "foo", methodTypeForIndy);
         String result = (String)Intrinsics.invokedynamic(bsm, MethodTypeRef.ofDescriptor("()Ljava/lang/String;"));
--- a/test/langtools/tools/javac/specialConstantFolding/IndyLinkageErrorTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/IndyLinkageErrorTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -10,19 +10,19 @@
 public class IndyLinkageErrorTest {
     String test(String x, String y) throws Throwable {
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_CallSite,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Object.array()
+                ConstantRefs.CR_CallSite,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Object.array()
         );
         MethodHandleRef mh = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.ofDescriptor("Ljava/lang/invoke/StringConcatFactory;"),
                                                 "makeConcatWithConstants", methodTypeForMethodHandle);
         MethodTypeRef methodTypeForIndy = MethodTypeRef.of(
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_String
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_String
         );
         final String param = "" + '\u0001' + '\u0001';
         DynamicCallSiteRef indyDescr = DynamicCallSiteRef.of(mh, "", methodTypeForIndy, param);
--- a/test/langtools/tools/javac/specialConstantFolding/IndyNegativeTest01.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/IndyNegativeTest01.java	Thu Mar 01 14:25:00 2018 -0500
@@ -11,19 +11,19 @@
 public class IndyNegativeTest01 {
     void test(String invokeName, String x, String y) throws Throwable {
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_CallSite,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Object.array()
+                ConstantRefs.CR_CallSite,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Object.array()
         );
         MethodHandleRef mh = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.ofDescriptor("Ljava/lang/invoke/StringConcatFactory;"),
                                                 "makeConcatWithConstants", methodTypeForMethodHandle);
         MethodTypeRef methodTypeForIndy = MethodTypeRef.of(
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_String
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_String
         );
         final String param = "" + '\u0001' + '\u0001';
         DynamicCallSiteRef indyDescr = DynamicCallSiteRef.of(mh, invokeName, methodTypeForIndy, param);
--- a/test/langtools/tools/javac/specialConstantFolding/IndyPositiveTest01.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/IndyPositiveTest01.java	Thu Mar 01 14:25:00 2018 -0500
@@ -41,19 +41,19 @@
 
     String test(String x, String y) throws Throwable {
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_CallSite,
-                SymbolicRefs.CR_MethodHandles_Lookup,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Object.array()
+                ConstantRefs.CR_CallSite,
+                ConstantRefs.CR_MethodHandles_Lookup,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Object.array()
         );
         MethodHandleRef mh = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.ofDescriptor("Ljava/lang/invoke/StringConcatFactory;"),
                                                 "makeConcatWithConstants", methodTypeForMethodHandle);
         MethodTypeRef methodTypeForIndy = MethodTypeRef.of(
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_String
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_String
         );
         final String param = "" + '\u0001' + '\u0001';
         DynamicCallSiteRef indyDescr = DynamicCallSiteRef.of(mh, "makeConcatWithConstants", methodTypeForIndy, param);
--- a/test/langtools/tools/javac/specialConstantFolding/IntrinsicsTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/IntrinsicsTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -123,33 +123,33 @@
     }
 
     public void testMethodTypeCombinators() {
-        MethodTypeRef mtc = MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int);
+        MethodTypeRef mtc = MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int);
         assertEquals(String.class, Intrinsics.ldc(mtc.returnType()));
         assertEquals(int.class, Intrinsics.ldc(mtc.parameterType(0)));
         assertEquals(String.class, Intrinsics.ldc(mtc.returnType()));
         assertEquals(MethodType.methodType(long.class, int.class),
-                     Intrinsics.ldc(mtc.changeReturnType(SymbolicRefs.CR_long)));
+                     Intrinsics.ldc(mtc.changeReturnType(ConstantRefs.CR_long)));
     }
 
     public void testMethodHandleCombinators() {
-        MethodHandleRef mhc = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, SymbolicRefs.CR_String, "valueOf",
-                                                 MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_Object));
+        MethodHandleRef mhc = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ConstantRefs.CR_String, "valueOf",
+                                                 MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_Object));
         assertEquals(MethodType.methodType(String.class, Object.class),
-                     Intrinsics.ldc(mhc.type()));
-        assertEquals(String.class, Intrinsics.ldc(mhc.type().returnType()));
-        assertEquals(String.class, Intrinsics.ldc(ClassRef.ofDescriptor(mhc.type().returnType().descriptorString())));
+                     Intrinsics.ldc(mhc.methodType()));
+        assertEquals(String.class, Intrinsics.ldc(mhc.methodType().returnType()));
+        assertEquals(String.class, Intrinsics.ldc(ClassRef.ofDescriptor(mhc.methodType().returnType().descriptorString())));
     }
 
     public void testInterfaceSpecial() throws Throwable {
-        MethodHandleRef mhr = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, SymbolicRefs.CR_List, "of",
-                                                 MethodTypeRef.of(SymbolicRefs.CR_List, SymbolicRefs.CR_Object.array()));
+        MethodHandleRef mhr = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ConstantRefs.CR_List, "of",
+                                                 MethodTypeRef.of(ConstantRefs.CR_List, ConstantRefs.CR_Object.array()));
         MethodHandle mh = Intrinsics.ldc(mhr);
         assertEquals(List.of("a", "b"), (List<String>) mh.invoke("a", "b"));
     }
 
     public void testSimpleIndy() throws Throwable {
-        final MethodTypeRef Str_MT = MethodTypeRef.of(SymbolicRefs.CR_String);
-        MethodHandleRef simpleBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "simpleBSM", SymbolicRefs.CR_CallSite);
+        final MethodTypeRef Str_MT = MethodTypeRef.of(ConstantRefs.CR_String);
+        MethodHandleRef simpleBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "simpleBSM", ConstantRefs.CR_CallSite);
         DynamicCallSiteRef bsm = DynamicCallSiteRef.of(simpleBSM, "foo", Str_MT);
         String result = (String) Intrinsics.invokedynamic(bsm);
         assertEquals("foo", result);
@@ -157,20 +157,20 @@
         DynamicCallSiteRef bsm2 = DynamicCallSiteRef.of(simpleBSM, "bar", Str_MT);
         assertEquals("bar", (String) Intrinsics.invokedynamic(bsm2));
 
-        MethodHandleRef staticArgBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "staticArgBSM", SymbolicRefs.CR_CallSite, SymbolicRefs.CR_String);
+        MethodHandleRef staticArgBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "staticArgBSM", ConstantRefs.CR_CallSite, ConstantRefs.CR_String);
         DynamicCallSiteRef bsm3 = DynamicCallSiteRef.of(staticArgBSM, "ignored", Str_MT, "bark");
         assertEquals("bark", (String) Intrinsics.invokedynamic(bsm3));
 
-        final MethodTypeRef Str_Str_MT = MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_String);
-        MethodHandleRef dynArgBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "dynArgBSM", SymbolicRefs.CR_CallSite, SymbolicRefs.CR_String);
+        final MethodTypeRef Str_Str_MT = MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_String);
+        MethodHandleRef dynArgBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "dynArgBSM", ConstantRefs.CR_CallSite, ConstantRefs.CR_String);
         DynamicCallSiteRef bsm4 = DynamicCallSiteRef.of(dynArgBSM, "ignored", Str_Str_MT, "bargle");
         assertEquals("barglefoo", (String) Intrinsics.invokedynamic(bsm4, "foo"));
         assertEquals("barglebar", (String) Intrinsics.invokedynamic(bsm4, "bar"));
     }
 
     public void testStatefulBSM() throws Throwable {
-        final MethodTypeRef Int_MT = MethodTypeRef.of(SymbolicRefs.CR_int);
-        MethodHandleRef statefulBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "statefulBSM", SymbolicRefs.CR_CallSite);
+        final MethodTypeRef Int_MT = MethodTypeRef.of(ConstantRefs.CR_int);
+        MethodHandleRef statefulBSM = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "statefulBSM", ConstantRefs.CR_CallSite);
         DynamicCallSiteRef bsm = DynamicCallSiteRef.of(statefulBSM, "ignored", Int_MT);
         for (int i=0; i<10; i++) {
             assertEquals(i, (int) Intrinsics.invokedynamic(bsm));
@@ -178,18 +178,18 @@
     }
 
     public void testCondyInIndy() throws Throwable {
-        final MethodTypeRef Class_MT = MethodTypeRef.of(SymbolicRefs.CR_Class);
+        final MethodTypeRef Class_MT = MethodTypeRef.of(ConstantRefs.CR_Class);
         MethodHandleRef bsm = MethodHandleRef.ofDynamicCallsite(HELPER_CLASS, "staticArgBSM",
-                                                                SymbolicRefs.CR_CallSite, SymbolicRefs.CR_Class);
-        assertEquals(String.class, (Class) Intrinsics.invokedynamic(DynamicCallSiteRef.of(bsm, "ignored", Class_MT, SymbolicRefs.CR_String)));
-        assertEquals(int.class, (Class) Intrinsics.invokedynamic(DynamicCallSiteRef.of(bsm, "ignored", Class_MT, SymbolicRefs.CR_int)));
+                                                                ConstantRefs.CR_CallSite, ConstantRefs.CR_Class);
+        assertEquals(String.class, (Class) Intrinsics.invokedynamic(DynamicCallSiteRef.of(bsm, "ignored", Class_MT, ConstantRefs.CR_String)));
+        assertEquals(int.class, (Class) Intrinsics.invokedynamic(DynamicCallSiteRef.of(bsm, "ignored", Class_MT, ConstantRefs.CR_int)));
     }
 
     public void testCondyInCondy() throws Throwable {
-        MethodHandleRef bsm = MethodHandleRef.ofDynamicConstant(HELPER_CLASS, "identityCondy", SymbolicRefs.CR_Object, SymbolicRefs.CR_Object);
-        assertEquals(String.class, Intrinsics.ldc(DynamicConstantRef.of(bsm, SymbolicRefs.CR_Class).withArgs(SymbolicRefs.CR_String)));
-        assertEquals(String.class, Intrinsics.ldc(DynamicConstantRef.of(bsm).withArgs(SymbolicRefs.CR_String)));
-        assertEquals(int.class, Intrinsics.ldc(DynamicConstantRef.of(bsm).withArgs(SymbolicRefs.CR_int)));
+        MethodHandleRef bsm = MethodHandleRef.ofDynamicConstant(HELPER_CLASS, "identityCondy", ConstantRefs.CR_Object, ConstantRefs.CR_Object);
+        assertEquals(String.class, Intrinsics.ldc(DynamicConstantRef.of(bsm, ConstantRefs.CR_Class).withArgs(ConstantRefs.CR_String)));
+        assertEquals(String.class, Intrinsics.ldc(DynamicConstantRef.of(bsm).withArgs(ConstantRefs.CR_String)));
+        assertEquals(int.class, Intrinsics.ldc(DynamicConstantRef.of(bsm).withArgs(ConstantRefs.CR_int)));
         assertEquals("foo", Intrinsics.ldc(DynamicConstantRef.of(bsm).withArgs("foo")));
     }
 
--- a/test/langtools/tools/javac/specialConstantFolding/LDCNegativeTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/LDCNegativeTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -13,7 +13,7 @@
 
     public String x() { return ""; }
     public ClassRef c() { return null; }
-    public ClassRef d = SymbolicRefs.CR_int;
+    public ClassRef d = ConstantRefs.CR_int;
 
     void foo() {
         // all these fail
--- a/test/langtools/tools/javac/specialConstantFolding/MultipleBSMEntriesTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/MultipleBSMEntriesTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -44,7 +44,7 @@
 public class MultipleBSMEntriesTest {
     // library code starts
     static class MultiplyCallSite extends MutableCallSite {
-        private static final MethodTypeRef TYPE = MethodTypeRef.of(ClassRef.ofDescriptor("Ljava/math/BigInteger;"), SymbolicRefs.CR_long, SymbolicRefs.CR_long);
+        private static final MethodTypeRef TYPE = MethodTypeRef.of(ClassRef.ofDescriptor("Ljava/math/BigInteger;"), ConstantRefs.CR_long, ConstantRefs.CR_long);
         private static final ClassRef ME = ClassRef.ofDescriptor("LMultipleBSMEntriesTest$MultiplyCallSite;");
 
         private static final MethodHandle FAST = Intrinsics.ldc(
@@ -75,8 +75,8 @@
     public static final ClassRef CR_BigInt = ClassRef.ofDescriptor("Ljava/math/BigInteger;");
     public static final MethodTypeRef methodTypeForIndy = MethodTypeRef.of(
             CR_BigInt,
-            SymbolicRefs.CR_long,
-            SymbolicRefs.CR_long
+            ConstantRefs.CR_long,
+            ConstantRefs.CR_long
     );
 
     public static final DynamicCallSiteRef MULT = DynamicCallSiteRef.of(
@@ -84,10 +84,10 @@
                     MethodHandleRef.Kind.STATIC,
                     ClassRef.ofDescriptor("LMultipleBSMEntriesTest;"),
                     "multiplyFactory",
-                    SymbolicRefs.CR_CallSite,
-                    SymbolicRefs.CR_MethodHandles_Lookup,
-                    SymbolicRefs.CR_String,
-                    SymbolicRefs.CR_MethodType),
+                    ConstantRefs.CR_CallSite,
+                    ConstantRefs.CR_MethodHandles_Lookup,
+                    ConstantRefs.CR_String,
+                    ConstantRefs.CR_MethodType),
             " ",
             methodTypeForIndy
 
--- a/test/langtools/tools/javac/specialConstantFolding/ReportIncorrectMHForIndyTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/ReportIncorrectMHForIndyTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -10,7 +10,7 @@
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 public class ReportIncorrectMHForIndyTest {
 
@@ -23,12 +23,12 @@
     String test(String x, String y) throws Throwable {
         // correct method type
         MethodTypeRef methodTypeForMethodHandle = MethodTypeRef.of(
-                SymbolicRefs.CR_CallSite,
-                SymbolicRefs.CR_String,  // bad argument must be of type MethodHandles.Lookup
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_MethodType,
-                SymbolicRefs.CR_String,
-                SymbolicRefs.CR_Object.array()
+                ConstantRefs.CR_CallSite,
+                ConstantRefs.CR_String,  // bad argument must be of type MethodHandles.Lookup
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_MethodType,
+                ConstantRefs.CR_String,
+                ConstantRefs.CR_Object.array()
         );
         MethodHandleRef mh = MethodHandleRef.of(MethodHandleRef.Kind.STATIC, ClassRef.ofDescriptor("LReportIncorrectMHForIndyTest;"),
                                                 "makeConcatWithConstants", methodTypeForMethodHandle);
--- a/test/langtools/tools/javac/specialConstantFolding/TwoVisitsAreNeededCauseOfForwardRefTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/TwoVisitsAreNeededCauseOfForwardRefTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -35,7 +35,7 @@
 public class TwoVisitsAreNeededCauseOfForwardRefTest {
     static class Inner {
         private static final MethodTypeRef TYPE = MethodTypeRef.of(ClassRef_BigInt,
-                SymbolicRefs.CR_long, SymbolicRefs.CR_long);
+                                                                   ConstantRefs.CR_long, ConstantRefs.CR_long);
         private static final ClassRef ME = ClassRef.ofDescriptor("LTwoVisitsAreNeededCauseOfForwardRefTest$Inner;");
 
         private static final MethodHandle FAST = Intrinsics.ldc(MethodHandleRef.of(
--- a/test/langtools/tools/javac/specialConstantFolding/checkMethodTypeShape/MethodTypeNegTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/checkMethodTypeShape/MethodTypeNegTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -4,38 +4,38 @@
  * @compile/fail/ref=MethodTypeNegTest.out -XDdoConstantFold -Werror -XDrawDiagnostics MethodTypeNegTest.java
  */
 
-import java.lang.invoke.MethodHandle;
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.ldc;
 import static java.lang.sym.MethodHandleRef.Kind.*;
 
+
 public class MethodTypeNegTest {
     private static final ClassRef CR_THIS = ClassRef.of("MethodTypeNegTest");
 
     void test() {
         // for setters result must be void...
-        MethodHandleRef r1 = MethodHandleRef.of(MethodHandleRef.Kind.SETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_int);
-        MethodHandleRef r2 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_SETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_int);
+        MethodHandleRef r1 = MethodHandleRef.of(MethodHandleRef.Kind.SETTER, CR_THIS, "nonexistent", ConstantRefs.CR_int);
+        MethodHandleRef r2 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_SETTER, CR_THIS, "nonexistent", ConstantRefs.CR_int);
 
         // ...and static setters should have only one argument and instance setters two
-        MethodHandleRef r3 = MethodHandleRef.of(MethodHandleRef.Kind.SETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_void, SymbolicRefs.CR_int);
-        MethodHandleRef r4 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_SETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_void, SymbolicRefs.CR_int, SymbolicRefs.CR_int);
+        MethodHandleRef r3 = MethodHandleRef.of(MethodHandleRef.Kind.SETTER, CR_THIS, "nonexistent", ConstantRefs.CR_void, ConstantRefs.CR_int);
+        MethodHandleRef r4 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_SETTER, CR_THIS, "nonexistent", ConstantRefs.CR_void, ConstantRefs.CR_int, ConstantRefs.CR_int);
 
         // for constructors result type must be void
-        MethodHandleRef r5 = MethodHandleRef.of(MethodHandleRef.Kind.CONSTRUCTOR, CR_THIS, "", SymbolicRefs.CR_int);
+        MethodHandleRef r5 = MethodHandleRef.of(MethodHandleRef.Kind.CONSTRUCTOR, CR_THIS, "", ConstantRefs.CR_int);
 
         // for getters result must be different from void...
-        MethodHandleRef r6 = MethodHandleRef.of(MethodHandleRef.Kind.GETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_void);
-        MethodHandleRef r7 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_GETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_void);
+        MethodHandleRef r6 = MethodHandleRef.of(MethodHandleRef.Kind.GETTER, CR_THIS, "nonexistent", ConstantRefs.CR_void);
+        MethodHandleRef r7 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_GETTER, CR_THIS, "nonexistent", ConstantRefs.CR_void);
 
         // ...and instance setters should have only one argument, static ones none
-        MethodHandleRef r8 = MethodHandleRef.of(MethodHandleRef.Kind.GETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_int, SymbolicRefs.CR_int, SymbolicRefs.CR_int);
-        MethodHandleRef r9 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_GETTER, CR_THIS, "nonexistent", SymbolicRefs.CR_int, SymbolicRefs.CR_int, SymbolicRefs.CR_int);
+        MethodHandleRef r8 = MethodHandleRef.of(MethodHandleRef.Kind.GETTER, CR_THIS, "nonexistent", ConstantRefs.CR_int, ConstantRefs.CR_int, ConstantRefs.CR_int);
+        MethodHandleRef r9 = MethodHandleRef.of(MethodHandleRef.Kind.STATIC_GETTER, CR_THIS, "nonexistent", ConstantRefs.CR_int, ConstantRefs.CR_int, ConstantRefs.CR_int);
 
         // no argument can be void
-        MethodHandleRef r10 = MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, CR_THIS, "nonexistent", SymbolicRefs.CR_int, SymbolicRefs.CR_void);
+        MethodHandleRef r10 = MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, CR_THIS, "nonexistent", ConstantRefs.CR_int, ConstantRefs.CR_void);
     }
 }
--- a/test/langtools/tools/javac/specialConstantFolding/checkMethodTypeShape/MethodTypeNegTest.out	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/checkMethodTypeShape/MethodTypeNegTest.out	Thu Mar 01 14:25:00 2018 -0500
@@ -1,11 +1,11 @@
 MethodTypeNegTest.java:20:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (RT)V for getter, found MethodTypeRef[()int]
 MethodTypeNegTest.java:21:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (T)V for getter, found MethodTypeRef[()int]
 MethodTypeNegTest.java:24:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (RT)V for getter, found MethodTypeRef[(int)void]
-MethodTypeNegTest.java:25:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (T)V for getter, found MethodTypeRef[(intint)void]
+MethodTypeNegTest.java:25:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (T)V for getter, found MethodTypeRef[(int,int)void]
 MethodTypeNegTest.java:28:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (T)V for constructor, found MethodTypeRef[()int]
 MethodTypeNegTest.java:31:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (R)T for getter, found MethodTypeRef[()void]
 MethodTypeNegTest.java:32:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of ()T for getter, found MethodTypeRef[()void]
-MethodTypeNegTest.java:35:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (R)T for getter, found MethodTypeRef[(intint)int]
-MethodTypeNegTest.java:36:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of ()T for getter, found MethodTypeRef[(intint)int]
+MethodTypeNegTest.java:35:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of (R)T for getter, found MethodTypeRef[(int,int)int]
+MethodTypeNegTest.java:36:48: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Expected type of ()T for getter, found MethodTypeRef[(int,int)int]
 MethodTypeNegTest.java:39:49: compiler.err.reflective.error: of, java.lang.sym.MethodHandleRef, Void parameters not permitted
 10 errors
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/ConstantDefinitions.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/ConstantDefinitions.java	Thu Mar 01 14:25:00 2018 -0500
@@ -2,12 +2,12 @@
 
 import java.lang.invoke.*;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 
 @IgnoreTest
 public class ConstantDefinitions {
-    public static final MethodType mtStatic = ldc(MethodTypeRef.of(SymbolicRefs.CR_String));
-    public final MethodType mtInstance = ldc(MethodTypeRef.of(SymbolicRefs.CR_String));
+    public static final MethodType mtStatic = ldc(MethodTypeRef.of(ConstantRefs.CR_String));
+    public final MethodType mtInstance = ldc(MethodTypeRef.of(ConstantRefs.CR_String));
 }
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/ConstantFoldingOfMethodTypeDiffContextsTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/ConstantFoldingOfMethodTypeDiffContextsTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -3,7 +3,7 @@
 import java.io.Serializable;
 import java.lang.invoke.*;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 
@@ -24,9 +24,9 @@
 //    @InstructionInfo(bytecodePosition=9, values={"CONSTANT_MethodType_info", "(I)V"})
     @InstructionInfo(bytecodePosition=9, values={"CONSTANT_MethodType_info", "()Ljava/lang/String;"})
     void assignmentContext() {
-        MethodType mt1 = ldc(MethodTypeRef.of(SymbolicRefs.CR_String));
-        MethodType mt2 = ldc(MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int));
-        MethodType mt3 = ldc(MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_String, SymbolicRefs.CR_int));
+        MethodType mt1 = ldc(MethodTypeRef.of(ConstantRefs.CR_String));
+        MethodType mt2 = ldc(MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int));
+        MethodType mt3 = ldc(MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_String, ConstantRefs.CR_int));
 //        MethodType mt4 = ldc(MethodTypeRef.of(VOID, MethodTypeRef.of(ClassRef.of("Ljava/lang/String;"), INT)));
         /*  if last argument of the method below is not null no effort is done to try to constant fold
          *  the method type
@@ -40,9 +40,9 @@
 //    @InstructionInfo(bytecodePosition=28, values={"CONSTANT_MethodType_info", "(I)V"})
     @InstructionInfo(bytecodePosition=19, values={"CONSTANT_MethodType_info", "()Ljava/lang/String;"})
     void invocationContext1() {
-        foo(ldc(MethodTypeRef.of(SymbolicRefs.CR_String)));
-        foo(ldc(MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int)));
-        foo(ldc(MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_String, SymbolicRefs.CR_int)));
+        foo(ldc(MethodTypeRef.of(ConstantRefs.CR_String)));
+        foo(ldc(MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int)));
+        foo(ldc(MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_String, ConstantRefs.CR_int)));
 //        foo(ldc(MethodTypeRef.of(VOID, MethodTypeRef.of(ClassRef.of("Ljava/lang/String;"), INT))));
         /*  if last argument of the method below is not null no effort is done to try to constant fold
          *  the method type
@@ -56,11 +56,11 @@
 //    @InstructionInfo(bytecodePosition=24, values={"CONSTANT_MethodType_info", "(I)V"})
     @InstructionInfo(bytecodePosition=24, values={"CONSTANT_MethodType_info", "()Ljava/lang/String;"})
     void invocationContext2() {
-        MethodType mt1 = ldc(MethodTypeRef.of(SymbolicRefs.CR_String));
+        MethodType mt1 = ldc(MethodTypeRef.of(ConstantRefs.CR_String));
         foo(mt1);
-        MethodType mt2 = ldc(MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int));
+        MethodType mt2 = ldc(MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int));
         foo(mt2);
-        MethodType mt3 = ldc(MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_String, SymbolicRefs.CR_int));
+        MethodType mt3 = ldc(MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_String, ConstantRefs.CR_int));
         foo(mt3);
 //        MethodType mt4 = ldc(MethodTypeRef.of(VOID, MethodTypeRef.of(ClassRef.of("Ljava/lang/String;"), INT)));
 //        foo(mt4);
@@ -77,9 +77,9 @@
 //    @InstructionInfo(bytecodePosition=18, values={"CONSTANT_MethodType_info", "(I)V"})
     @InstructionInfo(bytecodePosition=9, values={"CONSTANT_MethodType_info", "()Ljava/lang/String;"})
     void castContext1() {
-        Serializable s1 = (Serializable)ldc(MethodTypeRef.of(SymbolicRefs.CR_String));
-        Serializable s2 = (Serializable)ldc(MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int));
-        Serializable s3 = (Serializable)ldc(MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_String, SymbolicRefs.CR_int));
+        Serializable s1 = (Serializable)ldc(MethodTypeRef.of(ConstantRefs.CR_String));
+        Serializable s2 = (Serializable)ldc(MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int));
+        Serializable s3 = (Serializable)ldc(MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_String, ConstantRefs.CR_int));
 //        Serializable s4 = (Serializable)ldc(MethodTypeRef.of(VOID, MethodTypeRef.of(ClassRef.of("Ljava/lang/String;"), INT)));
         Serializable s5 = (Serializable)ldc(MethodTypeRef.ofDescriptor("()Ljava/lang/String;"));
     }
@@ -91,11 +91,11 @@
 //    @InstructionInfo(bytecodePosition=19, values={"CONSTANT_MethodType_info", "(I)V"})
     @InstructionInfo(bytecodePosition=19, values={"CONSTANT_MethodType_info", "()Ljava/lang/String;"})
     void castContext2() {
-        MethodType m1 = ldc(MethodTypeRef.of(SymbolicRefs.CR_String));
+        MethodType m1 = ldc(MethodTypeRef.of(ConstantRefs.CR_String));
         Serializable s1 = (Serializable)m1;
-        MethodType m2 = ldc(MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int));
+        MethodType m2 = ldc(MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int));
         Serializable s2 = (Serializable)m2;
-        MethodType m3 = ldc(MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_String, SymbolicRefs.CR_int));
+        MethodType m3 = ldc(MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_String, ConstantRefs.CR_int));
         Serializable s3 = (Serializable)m3;
 //        MethodType m4 = ldc(MethodTypeRef.of(VOID, MethodTypeRef.of(ClassRef.of("Ljava/lang/String;"), INT)));
 //        Serializable s4 = (Serializable)m4;
@@ -109,9 +109,9 @@
 //    @InstructionInfo(bytecodePosition=28, values={"CONSTANT_MethodType_info", "(I)V"})
     @InstructionInfo(bytecodePosition=19, values={"CONSTANT_MethodType_info", "()Ljava/lang/String;"})
     void cast_plus_invocationContext() {
-        foo((MethodType)ldc(MethodTypeRef.of(SymbolicRefs.CR_String)));
-        foo((MethodType)ldc(MethodTypeRef.of(SymbolicRefs.CR_String, SymbolicRefs.CR_int)));
-        foo((MethodType)ldc(MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_String, SymbolicRefs.CR_int)));
+        foo((MethodType)ldc(MethodTypeRef.of(ConstantRefs.CR_String)));
+        foo((MethodType)ldc(MethodTypeRef.of(ConstantRefs.CR_String, ConstantRefs.CR_int)));
+        foo((MethodType)ldc(MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_String, ConstantRefs.CR_int)));
 //        foo((MethodType)ldc(MethodTypeRef.of(VOID, MethodTypeRef.of(ClassRef.of("Ljava/lang/String;"), INT))));
         /*  if last argument of the method below is not null no effort is done to try to constant fold
          *  the method type
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindConstructorTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindConstructorTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -4,7 +4,7 @@
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 
@@ -26,7 +26,7 @@
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_newInvokeSpecial"})
     void test1() throws Throwable {
         final MethodHandle mhNewFindConstructorTest = ldc(MethodHandleRef.of(MethodHandleRef.Kind.CONSTRUCTOR, ClassRef.ofDescriptor("LFindConstructorTest;"), "<init>",
-                                                                             MethodTypeRef.of(SymbolicRefs.CR_void)));
+                                                                             MethodTypeRef.of(ConstantRefs.CR_void)));
         FindConstructorTest foo = (FindConstructorTest) mhNewFindConstructorTest.invokeExact();
         check(foo.toString().equals("invoking FindConstructorTest.toString()"));
     }
@@ -34,7 +34,7 @@
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_newInvokeSpecial"})
     void test2() throws Throwable {
         MethodHandle mhNewFindConstructorTest = ldc(MethodHandleRef.of(MethodHandleRef.Kind.CONSTRUCTOR, ClassRef.ofDescriptor("LFindConstructorTest;"), "<init>",
-                                                                       MethodTypeRef.of(SymbolicRefs.CR_void)));
+                                                                       MethodTypeRef.of(ConstantRefs.CR_void)));
         FindConstructorTest foo = (FindConstructorTest) mhNewFindConstructorTest.invokeExact();
         check(foo.toString().equals("invoking FindConstructorTest.toString()"));
     }
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindMethodWithGenericArgumentsTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindMethodWithGenericArgumentsTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -4,7 +4,7 @@
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 import java.util.List;
 import static java.lang.invoke.Intrinsics.*;
 
@@ -15,6 +15,6 @@
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_invokeVirtual"})
     void test() {
         MethodHandle mh2 = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, ClassRef.ofDescriptor("LFindMethodWithGenericArgumentsTest;"), "bar",
-                                                  MethodTypeRef.of(SymbolicRefs.CR_void, SymbolicRefs.CR_List)));
+                                                  MethodTypeRef.of(ConstantRefs.CR_void, ConstantRefs.CR_List)));
     }
 }
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindSetterTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindSetterTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -3,7 +3,7 @@
 import java.lang.invoke.*;
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 import static java.lang.sym.MethodHandleRef.Kind.SETTER;
@@ -21,7 +21,7 @@
 
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_putField"})
     void test1(FindSetterTest f) throws Throwable {
-        final MethodHandle mhSetter = ldc(MethodHandleRef.ofField(SETTER, ClassRef.ofDescriptor("LFindSetterTest;"), "strField", SymbolicRefs.CR_String));
+        final MethodHandle mhSetter = ldc(MethodHandleRef.ofField(SETTER, ClassRef.ofDescriptor("LFindSetterTest;"), "strField", ConstantRefs.CR_String));
         mhSetter.invoke(f, "new instance field value");
         check(f.strField.equals("new instance field value"));
     }
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindStaticGetterTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindStaticGetterTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -3,7 +3,7 @@
 import java.lang.invoke.*;
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 import static java.lang.sym.MethodHandleRef.Kind.STATIC_GETTER;
@@ -22,13 +22,13 @@
 
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_getStatic"})
     void test1() throws Throwable {
-        final MethodHandle mhStaticGetter = ldc(MethodHandleRef.ofField(STATIC_GETTER, ClassRef.ofDescriptor("LFindStaticGetterTest;"), "staticStrField", SymbolicRefs.CR_String));
+        final MethodHandle mhStaticGetter = ldc(MethodHandleRef.ofField(STATIC_GETTER, ClassRef.ofDescriptor("LFindStaticGetterTest;"), "staticStrField", ConstantRefs.CR_String));
         check(mhStaticGetter.invoke().toString().equals("class field"));
     }
 
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_getStatic"})
     void test2() throws Throwable {
-        MethodHandle mhStaticGetter = ldc(MethodHandleRef.ofField(STATIC_GETTER, ClassRef.ofDescriptor("LFindStaticGetterTest;"), "staticStrField", SymbolicRefs.CR_String));
+        MethodHandle mhStaticGetter = ldc(MethodHandleRef.ofField(STATIC_GETTER, ClassRef.ofDescriptor("LFindStaticGetterTest;"), "staticStrField", ConstantRefs.CR_String));
         check(mhStaticGetter.invoke().toString().equals("class field"));
     }
 }
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindStaticSetterTest.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindStaticSetterTest.java	Thu Mar 01 14:25:00 2018 -0500
@@ -3,7 +3,7 @@
 import java.lang.invoke.*;
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 import static java.lang.sym.MethodHandleRef.Kind.STATIC_SETTER;
@@ -22,14 +22,14 @@
 
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_putStatic"})
     void test1() throws Throwable {
-        final MethodHandle mhStaticSetter = ldc(MethodHandleRef.ofField(STATIC_SETTER, ClassRef.ofDescriptor("LFindStaticSetterTest;"), "staticStrField", SymbolicRefs.CR_String));
+        final MethodHandle mhStaticSetter = ldc(MethodHandleRef.ofField(STATIC_SETTER, ClassRef.ofDescriptor("LFindStaticSetterTest;"), "staticStrField", ConstantRefs.CR_String));
         mhStaticSetter.invoke("new class field value");
         check(FindStaticSetterTest.staticStrField.equals("new class field value"));
     }
 
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_putStatic"})
     void test2() throws Throwable {
-        MethodHandle mhStaticSetter = ldc(MethodHandleRef.ofField(STATIC_SETTER, ClassRef.ofDescriptor("LFindStaticSetterTest;"), "staticStrField", SymbolicRefs.CR_String));
+        MethodHandle mhStaticSetter = ldc(MethodHandleRef.ofField(STATIC_SETTER, ClassRef.ofDescriptor("LFindStaticSetterTest;"), "staticStrField", ConstantRefs.CR_String));
         mhStaticSetter.invoke("new class field value");
         check(FindStaticSetterTest.staticStrField.equals("new class field value"));
     }
--- a/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindVirtualTest01.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/harness/tests/FindVirtualTest01.java	Thu Mar 01 14:25:00 2018 -0500
@@ -4,7 +4,7 @@
 import java.lang.sym.ClassRef;
 import java.lang.sym.MethodHandleRef;
 import java.lang.sym.MethodTypeRef;
-import java.lang.sym.SymbolicRefs;
+import java.lang.sym.ConstantRefs;
 
 import static java.lang.invoke.Intrinsics.*;
 
@@ -72,7 +72,7 @@
     @InstructionInfo(bytecodePosition=0, values={"CONSTANT_MethodHandle_info", "REF_invokeVirtual"})
     void test5(FindVirtualTest01 f) throws Throwable {
         MethodHandle mhBar = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, ClassRef.ofDescriptor("LFindVirtualTest01;"), "bar",
-                                                    MethodTypeRef.of(ClassRef.ofDescriptor("Ljava/lang/String;"), SymbolicRefs.CR_int)));
+                                                    MethodTypeRef.of(ClassRef.ofDescriptor("Ljava/lang/String;"), ConstantRefs.CR_int)));
         check(mhBar.invoke(f, 3).toString().equals("invoking method FindVirtualTest01.bar() with argument 3"));
     }
 }
--- a/test/langtools/tools/javac/specialConstantFolding/warningNotFoundOrIncorrect/WarningIfClassOrMemberNotFound3.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/warningNotFoundOrIncorrect/WarningIfClassOrMemberNotFound3.java	Thu Mar 01 14:25:00 2018 -0500
@@ -19,12 +19,12 @@
     }
 
     public void test2() {
-        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, THE_INTERFACE, "strField", SymbolicRefs.CR_String);
+        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.GETTER, THE_INTERFACE, "strField", ConstantRefs.CR_String);
         Intrinsics.ldc(negIMethodRef);
     }
 
     public void test3() {
-        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, THE_INTERFACE, "strField", SymbolicRefs.CR_String);
+        MethodHandleRef negIMethodRef = MethodHandleRef.ofField(MethodHandleRef.Kind.SETTER, THE_INTERFACE, "strField", ConstantRefs.CR_String);
         Intrinsics.ldc(negIMethodRef);
     }
 }
--- a/test/langtools/tools/javac/specialConstantFolding/warningNotFoundOrIncorrect/WarningIfMemberIncorrect.java	Wed Feb 28 23:43:06 2018 -0500
+++ b/test/langtools/tools/javac/specialConstantFolding/warningNotFoundOrIncorrect/WarningIfMemberIncorrect.java	Thu Mar 01 14:25:00 2018 -0500
@@ -23,7 +23,7 @@
 
         // warn: wrong kind to refer to a constructor
         MethodHandle mhConstructor = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, ClassRef.ofDescriptor("LWarningIfMemberIncorrect;"), "<init>",
-                                                                             MethodTypeRef.of(SymbolicRefs.CR_void)));
+                                                                             MethodTypeRef.of(ConstantRefs.CR_void)));
 
         MethodHandle mh3 = ldc(MethodHandleRef.of(MethodHandleRef.Kind.VIRTUAL, ClassRef.ofDescriptor("LWarningIfMemberIncorrect$I;"), "foo", mtReturnString));
     }