src/java.base/share/classes/jdk/experimental/value/MethodHandleBuilder.java

Print this page

        

@@ -53,18 +53,15 @@
 public class MethodHandleBuilder {
 
     static final Unsafe UNSAFE = Unsafe.getUnsafe();
 
     static final boolean ENABLE_POOL_PATCHES;
-    static final boolean MANGLE_CLASS_INFO;
 
     static {
         Properties props = GetPropertyAction.privilegedGetProperties();
         ENABLE_POOL_PATCHES = Boolean.parseBoolean(
                 props.getProperty("valhalla.enablePoolPatches"));
-        MANGLE_CLASS_INFO = Boolean.parseBoolean(
-                props.getProperty("valhalla.mangleClassInfo"));
     }
 
     public static MethodHandle loadCode(Lookup lookup, String name, MethodType type, Consumer<? super MethodHandleCodeBuilder> builder) {
         return loadCode(lookup, name, type.toMethodDescriptorString(), builder);
     }

@@ -215,12 +212,12 @@
                 boolean isValue = MinimalValueTypes_1_0.isValueType(c);
                 if (c == THIS_CLASS) {
                     //THIS_CLASS cannot be a DVT (by construction) - never mangle
                     name = clazz;
                 } else {
-                    name = (isValue && MANGLE_CLASS_INFO) ?
-                            ";Q" + c.getName() + ";" : //mangle DVT name
+                    name = isValue ?
+                            MinimalValueTypes_1_0.mangleValueClassName(c.getName()) :
                             c.getName();
                 }
                 return name.replaceAll("\\.", "/");
             }