< prev index next >

test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java

Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd

@@ -32,25 +32,19 @@
 
 import java.io.IOException;
 import java.lang.invoke.CallSite;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
-import java.lang.reflect.*;
+import java.lang.reflect.Method;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
-import java.util.Set;
 
-import jdk.internal.org.objectweb.asm.Attribute;
-import jdk.internal.org.objectweb.asm.ByteVector;
-import jdk.internal.org.objectweb.asm.ClassReader;
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.Handle;
-import jdk.internal.org.objectweb.asm.Label;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Type;
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
 
 public class ValueBootstrapMethods {

@@ -58,11 +52,11 @@
 
     public static void main(String... args) throws Throwable {
         Class<?> test = valueTestClass();
         Value value = Value.make(10, 5.03, "foo", "bar", "goo");
 
-        Class<?> valueClass = Value.class.asValueType();
+        Class<?> valueClass = Value.class.asPrimaryType();
         Method hashCode = test.getMethod("hashCode", valueClass);
         int hash = (int)hashCode.invoke(null, value);
         assertEquals(hash, value.hashCode());
 
         Method toString = test.getMethod("toString", valueClass);

@@ -95,11 +89,11 @@
             v = __WithField(v.l, List.of(items));
             return v;
         }
 
         List<Object> values() {
-            return List.of(Value.class.asValueType(), i, d, s, l);
+            return List.of(Value.class, i, d, s, l);
         }
 
         public int hashCode() {
             return values().hashCode();
         }

@@ -114,11 +108,11 @@
     /*
      * Generate ValueTest class
      */
     private static Class<?> valueTestClass() throws Exception {
         Path path = Paths.get(TEST_CLASSES, "ValueTest.class");
-        generate(Value.class.asValueType(), "ValueTest", path);
+        generate(Value.class, "ValueTest", path);
         return Class.forName("ValueTest");
     }
 
     private static void assertEquals(Object o1, Object expected) {
         if (!Objects.equals(o1, expected)) {
< prev index next >