< prev index next >

hotspot/test/runtime/valhalla/valuetypes/DeriveValueTypeCreation.java

Print this page

        

@@ -20,20 +20,20 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 package runtime.valhalla.valuetypes;
 
+import jdk.incubator.mvt.ValueType;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import static java.lang.reflect.Modifier.*;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 
 import jdk.experimental.bytecode.*;
-import jdk.experimental.value.ValueType;
 
 import jdk.internal.org.objectweb.asm.*;
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
 
 import static jdk.test.lib.Asserts.*;

@@ -41,11 +41,13 @@
 /*
  * @test DeriveValueTypeCreation
  * @summary Derive Value Type creation test
  * @library /test/lib
  * @compile DeriveValueTypeCreation.java
- * @modules java.base/jdk.internal.org.objectweb.asm
+ * @modules java.base/jdk.experimental.bytecode
+ *          java.base/jdk.internal.org.objectweb.asm
+ *          jdk.incubator.mvt
  * @build runtime.valhalla.valuetypes.ValueCapableClass
  * @run main/othervm -Xint -XX:+EnableMVT runtime.valhalla.valuetypes.DeriveValueTypeCreation
  * @run main/othervm -Xcomp -XX:+EnableMVT runtime.valhalla.valuetypes.DeriveValueTypeCreation
  */
 public class DeriveValueTypeCreation {

@@ -94,13 +96,10 @@
         System.out.println("ValueType: " + vt);
 
         if (vt.boxClass() != clazz) {
             fail("ValueType.boxClass() failed");
         }
-        if (vt.sourceClass() != clazz) {
-            fail("ValueType.sourceClass() failed");
-        }
 
         // DVT class matches our expectations for the current implementation...
         Class<?> vtClass = vt.valueClass();
         if (!vtClass.getName().equals(clazz.getName() + DVT_SUFFIX)) {
             fail("ValueType.valueClass() failed");

@@ -177,11 +176,11 @@
                                 String fieldType,
                                 int fieldAccess)  {
         ClassWriter cw = new ClassWriter(0);
         cw.visit(52, klassAccess, name, null, superKlass, null);
         if (vccAnnotation ) {
-            cw.visitAnnotation("Ljvm/internal/value/ValueCapableClass;", true);
+            cw.visitAnnotation("Ljdk/incubator/mvt/ValueCapableClass;", true);
         }
         if (fieldType != null) {
             cw.visitField(fieldAccess, "x", fieldType, null, null);
         }
         cw.visitEnd();
< prev index next >