changeset 13580:010b6b654b23 mvt

Move @ValueCapableClass and ValueType API to jdk.incubator.mvt module Reviewed-by: mcimadamore
author mchung
date Fri, 15 Sep 2017 13:49:06 -0700
parents 5e389fdf564c
children c6b48833776d
files src/share/vm/classfile/classFileParser.cpp src/share/vm/classfile/systemDictionary.hpp src/share/vm/classfile/vmSymbols.hpp src/share/vm/runtime/arguments.cpp test/compiler/valhalla/valuetypes/TestBoundValueTypes.java test/compiler/valhalla/valuetypes/TestUnloadedValueTypeArray.java test/compiler/valhalla/valuetypes/ValueCapableClass1.java test/compiler/valhalla/valuetypes/ValueCapableClass2.java test/compiler/valhalla/valuetypes/ValueTypeTestBench.java test/runtime/valhalla/valuetypes/DeriveValueTypeCreation.java test/runtime/valhalla/valuetypes/MVTCombo.java test/runtime/valhalla/valuetypes/MVTComboDebugTier1.java test/runtime/valhalla/valuetypes/MVTComboTier1.java test/runtime/valhalla/valuetypes/PersonVcc.java test/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java test/runtime/valhalla/valuetypes/VDefaultTest.java test/runtime/valhalla/valuetypes/VTBufferTest.java test/runtime/valhalla/valuetypes/VWithFieldTest.java test/runtime/valhalla/valuetypes/ValueCapableClass.java test/runtime/valhalla/valuetypes/ValueOops.java test/runtime/valhalla/valuetypes/VboxUnbox.java test/runtime/valhalla/valuetypes/verifier/ValueCapableClass.java test/runtime/valhalla/valuetypes/verifier/VloadTest.java test/runtime/valhalla/valuetypes/verifier/VunboxErrorIndex.java
diffstat 24 files changed, 67 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Wed Sep 13 11:37:04 2017 +0200
+++ b/src/share/vm/classfile/classFileParser.cpp	Fri Sep 15 13:49:06 2017 -0700
@@ -1046,7 +1046,7 @@
     _jdk_internal_vm_annotation_Contended,
     _field_Stable,
     _jdk_internal_vm_annotation_ReservedStackAccess,
-    _jvm_internal_value_ValueCapableClass,
+    _jdk_incubator_mvt_ValueCapableClass,
     _annotation_LIMIT
   };
   const Location _location;
@@ -1083,7 +1083,7 @@
   void set_stable(bool stable) { set_annotation(_field_Stable); }
   bool is_stable() const { return has_annotation(_field_Stable); }
 
-  bool is_value_capable_class() const { return has_annotation(_jvm_internal_value_ValueCapableClass); }
+  bool is_value_capable_class() const { return has_annotation(_jdk_incubator_mvt_ValueCapableClass); }
 };
 
 // This class also doubles as a holder for metadata cleanup.
@@ -2134,11 +2134,11 @@
       if (RestrictReservedStack && !privileged) break; // honor privileges
       return _jdk_internal_vm_annotation_ReservedStackAccess;
     }
-    case vmSymbols::VM_SYMBOL_ENUM_NAME(jvm_internal_value_ValueCapableClass_signature) : {
+    case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_incubator_mvt_ValueCapableClass_signature) : {
       if (_location != _in_class) {
         break;
       }
-      return _jvm_internal_value_ValueCapableClass;
+      return _jdk_incubator_mvt_ValueCapableClass;
     }
     default: {
       break;
--- a/src/share/vm/classfile/systemDictionary.hpp	Wed Sep 13 11:37:04 2017 +0200
+++ b/src/share/vm/classfile/systemDictionary.hpp	Fri Sep 15 13:49:06 2017 -0700
@@ -189,7 +189,6 @@
   do_klass(ParseUtil_klass,                             sun_net_www_ParseUtil,                     Pre                 ) \
                                                                                                                          \
   /* support for valhalla "shady" value type bytecode transformer */                                                     \
-  do_klass(ValueCapableClass_klass,                     jvm_internal_value_ValueCapableClass,        MVTClasses          ) \
   do_klass(Valhalla_MVT1_0_klass,                       valhalla_shady_MVT1_0,                     MVTClasses          ) \
                                                                                                                          \
   do_klass(StackTraceElement_klass,                     java_lang_StackTraceElement,               Opt                 ) \
--- a/src/share/vm/classfile/vmSymbols.hpp	Wed Sep 13 11:37:04 2017 +0200
+++ b/src/share/vm/classfile/vmSymbols.hpp	Fri Sep 15 13:49:06 2017 -0700
@@ -320,8 +320,8 @@
   LP64_ONLY( do_alias(intptr_signature,               long_signature) )                           \
                                                                                                   \
  /* support for valhalla "shady" value types */                                                   \
-  template(jvm_internal_value_ValueCapableClass,           "jvm/internal/value/ValueCapableClass")    \
-  template(jvm_internal_value_ValueCapableClass_signature, "Ljvm/internal/value/ValueCapableClass;")  \
+  template(jdk_incubator_mvt_ValueCapableClass,           "jdk/incubator/mvt/ValueCapableClass")    \
+  template(jdk_incubator_mvt_ValueCapableClass_signature, "Ljdk/incubator/mvt/ValueCapableClass;")  \
   template(valhalla_shady_MVT1_0,                        "valhalla/shady/MinimalValueTypes_1_0")  \
   template(valhalla_shady_MVT1_0_createDerivedValueType,           "createDerivedValueType")      \
   template(valhalla_shady_MVT1_0_createDerivedValueType_signature, "(Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;[Ljava/lang/String;[I)Ljava/lang/String;") \
--- a/src/share/vm/runtime/arguments.cpp	Wed Sep 13 11:37:04 2017 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Fri Sep 15 13:49:06 2017 -0700
@@ -3712,6 +3712,11 @@
   UNSUPPORTED_OPTION(TieredCompilation);
 #endif
 
+  if ((EnableMVT || EnableValhalla) &&
+      !create_numbered_property("jdk.module.addmods", "jdk.incubator.mvt", addmods_count++)) {
+    return JNI_ENOMEM;
+  }
+
 #if INCLUDE_JVMCI
   if (EnableJVMCI &&
       !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
--- a/test/compiler/valhalla/valuetypes/TestBoundValueTypes.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/compiler/valhalla/valuetypes/TestBoundValueTypes.java	Fri Sep 15 13:49:06 2017 -0700
@@ -25,12 +25,16 @@
 
 
 import java.lang.invoke.*;
-import jdk.experimental.value.*;
+
+import jdk.experimental.value.MethodHandleBuilder;
+import jdk.incubator.mvt.ValueType;
 
 /**
  * @test
  * @bug 8185339
  * @summary Test correct compilation of MethodHandles with bound value type arguments.
+ * @modules java.base/jdk.experimental.value
+ *          jdk.incubator.mvt
  * @compile -XDenableValueTypes ValueCapableClass2.java TestBoundValueTypes.java
  * @run main/othervm -noverify -XX:+EnableMVT -XX:CompileCommand=compileonly,compiler.valhalla.valuetypes.TestBoundValueTypes::*
  *                   -XX:CompileCommand=compileonly,java.lang.invoke.*::* compiler.valhalla.valuetypes.TestBoundValueTypes
--- a/test/compiler/valhalla/valuetypes/TestUnloadedValueTypeArray.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/compiler/valhalla/valuetypes/TestUnloadedValueTypeArray.java	Fri Sep 15 13:49:06 2017 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8182997
  * @summary Array of unloaded value class should consistently use L signature
+ * @modules jdk.incubator.mvt
  * @compile -XDenableValueTypes TestUnloadedValueTypeArray.java
  * @run main/othervm -XX:+EnableValhalla -noverify -Xcomp -XX:CompileOnly=TestUnloadedValueTypeArray::test TestUnloadedValueTypeArray
  *
--- a/test/compiler/valhalla/valuetypes/ValueCapableClass1.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/compiler/valhalla/valuetypes/ValueCapableClass1.java	Fri Sep 15 13:49:06 2017 -0700
@@ -28,7 +28,7 @@
  */
 package compiler.valhalla.valuetypes;
 
-@jvm.internal.value.ValueCapableClass
+@jdk.incubator.mvt.ValueCapableClass
 public final class ValueCapableClass1 {
     public final long t;
     public final int x;
--- a/test/compiler/valhalla/valuetypes/ValueCapableClass2.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/compiler/valhalla/valuetypes/ValueCapableClass2.java	Fri Sep 15 13:49:06 2017 -0700
@@ -30,9 +30,10 @@
 
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
-import jdk.experimental.value.ValueType;
 
-@jvm.internal.value.ValueCapableClass
+import jdk.incubator.mvt.ValueType;
+
+@jdk.incubator.mvt.ValueCapableClass
 public final class ValueCapableClass2 {
     public final long u;
 
--- a/test/compiler/valhalla/valuetypes/ValueTypeTestBench.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/compiler/valhalla/valuetypes/ValueTypeTestBench.java	Fri Sep 15 13:49:06 2017 -0700
@@ -27,22 +27,24 @@
  * @test
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @requires os.simpleArch == "x64"
- * @modules java.base/jdk.internal.misc:+open
+ * @modules java.base/jdk.experimental.value
+ *          java.base/jdk.internal.misc:+open
+ *          jdk.incubator.mvt
  * @compile -XDenableValueTypes ValueCapableClass1.java ValueCapableClass2.java ValueTypeTestBench.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main ClassFileInstaller jdk.test.lib.Platform
- * @run main/othervm -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
+ * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-TieredCompilation -XX:+VerifyAdapterSharing -XX:+VerifyStack
  *                   -XX:+EnableValhalla -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1
  *                   -Djdk.lang.reflect.DVT=true
  *                   compiler.valhalla.valuetypes.ValueTypeTestBench
- * @run main/othervm -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
+ * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-TieredCompilation -XX:+VerifyStack
  *                   -XX:+EnableValhalla -XX:+EnableMVT -XX:-ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:-ValueArrayFlatten
  *                   -Djdk.lang.reflect.DVT=true
  *                   compiler.valhalla.valuetypes.ValueTypeTestBench
- * @run main/othervm -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
+ * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-TieredCompilation -XX:+AlwaysIncrementalInline
  *                   -XX:+EnableValhalla -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1
@@ -53,7 +55,8 @@
 package compiler.valhalla.valuetypes;
 
 import compiler.whitebox.CompilerWhiteBoxTest;
-import jdk.internal.misc.Unsafe;
+import jdk.experimental.value.MethodHandleBuilder;
+import jdk.incubator.mvt.ValueType;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.management.InputArguments;
 import jdk.test.lib.Platform;
@@ -75,7 +78,6 @@
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import jdk.experimental.value.*;
 
 // Test value types
 __ByValue final class MyValue1 {
--- a/test/runtime/valhalla/valuetypes/DeriveValueTypeCreation.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/DeriveValueTypeCreation.java	Fri Sep 15 13:49:06 2017 -0700
@@ -22,6 +22,7 @@
  */
 package runtime.valhalla.valuetypes;
 
+import jdk.incubator.mvt.ValueType;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -31,7 +32,6 @@
 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.*;
@@ -43,7 +43,9 @@
  * @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
@@ -96,9 +98,6 @@
         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();
@@ -179,7 +178,7 @@
         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);
--- a/test/runtime/valhalla/valuetypes/MVTCombo.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/MVTCombo.java	Fri Sep 15 13:49:06 2017 -0700
@@ -31,13 +31,10 @@
 import jdk.test.lib.combo.ComboTask.Result;
 import jdk.test.lib.combo.ComboTestHelper;
 import jdk.test.lib.combo.ComboTestHelper.ArrayDimensionKind;
-import jdk.experimental.value.ValueType;
+import jdk.incubator.mvt.ValueType;
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
-import java.lang.invoke.MethodType;
 import static java.lang.invoke.MethodType.methodType;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
@@ -197,7 +194,7 @@
     }
 
     public static final String VCC_TEMPLATE =
-        "@jvm.internal.value.ValueCapableClass\n" +
+        "@jdk.incubator.mvt.ValueCapableClass\n" +
         "public final class Test {\n\n" +
         "    // Declare fields...\n" +
         "    #{ARITY.FIELD_DECL}\n" +
@@ -298,6 +295,7 @@
     public void doWork() throws Throwable {
         Result<Iterable<? extends JavaFileObject>> result = newCompilationTask()
                 .withSourceFromTemplate(VCC_TEMPLATE)
+                .withOption("--add-modules=jdk.incubator.mvt")
                 .generate();
         //System.out.println("COMP: " + result.compilationInfo()); // Print the generated source
         if (result.hasErrors()) {
@@ -322,16 +320,12 @@
         }
         ValueType<?> vt = ValueType.forClass(testSubject);
         Class<?> boxClass    = vt.boxClass();
-        Class<?> sourceClass = vt.sourceClass();
         Class<?> vtClass     = vt.valueClass();
         Class<?> arrayClass  = vt.arrayValueClass();
         Class<?> mArrayClass = vt.arrayValueClass(4);
         if (boxClass != testSubject) {
             throw new RuntimeException("Box class != VCC");
         }
-        if (sourceClass != testSubject) {
-            throw new RuntimeException("Source class != VCC");
-        }
         if (vt.toString() == null) {
             throw new RuntimeException("No toString() return");
         }
@@ -367,7 +361,7 @@
                 printFieldValues(MethodHandles.filterReturnValue(vt.defaultValueConstant(), box));
                 System.out.println("VERSUS value from array:");
                 printFieldValues(MethodHandles.filterReturnValue(arrayGetter, box).invoke(array, i));
-                throw new IllegalStateException("Failed equality test for class: " + vt.sourceClass().getName()  + " at index: " + i);
+                throw new IllegalStateException("Failed equality test for class: " + vt.boxClass().getName()  + " at index: " + i);
             }
         }
 
--- a/test/runtime/valhalla/valuetypes/MVTComboDebugTier1.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/MVTComboDebugTier1.java	Fri Sep 15 13:49:06 2017 -0700
@@ -34,6 +34,7 @@
  *          jdk.compiler/com.sun.tools.javac.main
  *          jdk.compiler/com.sun.tools.javac.tree
  *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.incubator.mvt
  * @compile MVTCombo.java
  * @build jdk.test.lib.combo.ComboTestHelper
  * @run main/othervm -Xint -XX:+EnableMVT runtime.valhalla.valuetypes.MVTComboTier1 3
--- a/test/runtime/valhalla/valuetypes/MVTComboTier1.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/MVTComboTier1.java	Fri Sep 15 13:49:06 2017 -0700
@@ -34,6 +34,7 @@
  *          jdk.compiler/com.sun.tools.javac.main
  *          jdk.compiler/com.sun.tools.javac.tree
  *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.incubator.mvt
  * @compile MVTCombo.java
  * @build jdk.test.lib.combo.ComboTestHelper
  * @run main/othervm -Xint -XX:+EnableMVT runtime.valhalla.valuetypes.MVTComboTier1 3
--- a/test/runtime/valhalla/valuetypes/PersonVcc.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/PersonVcc.java	Fri Sep 15 13:49:06 2017 -0700
@@ -23,7 +23,7 @@
 
 package runtime.valhalla.valuetypes;
 
-@jvm.internal.value.ValueCapableClass
+@jdk.incubator.mvt.ValueCapableClass
 public final class PersonVcc {
     final int id;
     final String firstName;
--- a/test/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java	Fri Sep 15 13:49:06 2017 -0700
@@ -5,8 +5,9 @@
 /*
  * @test
  * @summary Uninitialized value fields test
+ * @modules jdk.incubator.mvt
  * @library /test/lib
- * @compile -XDenableValueTypes Point.java UninitializedValueFieldsTest.java
+ * @compile -XDenableValueTypes Point.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.UninitializedValueFieldsTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.UninitializedValueFieldsTest
  */
--- a/test/runtime/valhalla/valuetypes/VDefaultTest.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/VDefaultTest.java	Fri Sep 15 13:49:06 2017 -0700
@@ -29,7 +29,8 @@
  * @test VDefaultTest
  * @summary vdefault bytecode test
  * @library /test/lib
- * @compile -XDenableValueTypes Point.java VDefaultTest.java
+ * @compile -XDenableValueTypes --add-modules jdk.incubator.mvt Point.java
+ * @compile -XDenableValueTypes VDefaultTest.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest
  */
--- a/test/runtime/valhalla/valuetypes/VTBufferTest.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/VTBufferTest.java	Fri Sep 15 13:49:06 2017 -0700
@@ -46,8 +46,6 @@
  *  $ java <VMOptions> VTBufferTest run
  */
 
-import jvm.internal.value.*;
-
 import javax.management.*;
 import javax.tools.JavaCompiler;
 import javax.tools.JavaFileObject;
--- a/test/runtime/valhalla/valuetypes/VWithFieldTest.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/VWithFieldTest.java	Fri Sep 15 13:49:06 2017 -0700
@@ -29,7 +29,8 @@
  * @test VWithFieldTest
  * @summary vwithfield bytecode test
  * @library /test/lib
- * @compile -XDenableValueTypes Point.java VWithFieldTest.java
+ * @compile -XDenableValueTypes --add-modules jdk.incubator.mvt Point.java
+ * @compile -XDenableValueTypes VWithFieldTest.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.VWithFieldTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.VWithFieldTest
  */
--- a/test/runtime/valhalla/valuetypes/ValueCapableClass.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/ValueCapableClass.java	Fri Sep 15 13:49:06 2017 -0700
@@ -22,7 +22,7 @@
  */
 package runtime.valhalla.valuetypes;
 
-@jvm.internal.value.ValueCapableClass
+@jdk.incubator.mvt.ValueCapableClass
 public final class ValueCapableClass {
 
     public static final int DEFAULT_X = 11;
--- a/test/runtime/valhalla/valuetypes/ValueOops.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/ValueOops.java	Fri Sep 15 13:49:06 2017 -0700
@@ -26,7 +26,9 @@
 import java.lang.invoke.*;
 import java.lang.ref.*;
 import java.util.concurrent.*;
-import jdk.experimental.value.*;
+
+import jdk.experimental.value.MethodHandleBuilder;
+import jdk.incubator.mvt.ValueType;
 
 import static jdk.test.lib.Asserts.*;
 import jdk.test.lib.Utils;
@@ -35,6 +37,8 @@
 /**
  * @test ValueOops
  * @summary Test embedding oops into Value types
+ * @modules java.base/jdk.experimental.value
+ *          jdk.incubator.mvt
  * @library /test/lib
  * @compile PersonVcc.java
  * @compile -XDenableValueTypes Person.java
--- a/test/runtime/valhalla/valuetypes/VboxUnbox.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/VboxUnbox.java	Fri Sep 15 13:49:06 2017 -0700
@@ -23,13 +23,17 @@
 package runtime.valhalla.valuetypes;
 
 import java.lang.invoke.*;
-import jdk.experimental.value.*;
+
+import jdk.experimental.value.MethodHandleBuilder;
+import jdk.incubator.mvt.ValueType;
 
 import static jdk.test.lib.Asserts.*;
 
 /*
  * @test VboxUnbox
  * @summary Exercise vbox & vunbox bytecodes
+ * @modules java.base/jdk.experimental.value
+ *          jdk.incubator.mvt
  * @library /test/lib
  * @build runtime.valhalla.valuetypes.ValueCapableClass
  * @run main/othervm -Xint -noverify -XX:+EnableMVT runtime.valhalla.valuetypes.VboxUnbox
--- a/test/runtime/valhalla/valuetypes/verifier/ValueCapableClass.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/verifier/ValueCapableClass.java	Fri Sep 15 13:49:06 2017 -0700
@@ -22,7 +22,7 @@
  */
 package runtime.valhalla.valuetypes.verifier;
 
-@jvm.internal.value.ValueCapableClass
+@jdk.incubator.mvt.ValueCapableClass
 public final class ValueCapableClass {
 
     public static final int DEFAULT_X = 11;
--- a/test/runtime/valhalla/valuetypes/verifier/VloadTest.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/verifier/VloadTest.java	Fri Sep 15 13:49:06 2017 -0700
@@ -24,14 +24,15 @@
 package runtime.valhalla.valuetypes.verifier;
 
 import java.lang.invoke.*;
-import java.lang.ref.*;
-import java.util.concurrent.*;
-import jdk.experimental.value.*;
+
+import jdk.experimental.value.MethodHandleBuilder;
 import sun.hotspot.WhiteBox;
 
 /**
  * @test VloadTest
  * @summary Test vload opcode
+ * @modules java.base/jdk.experimental.value
+ *          jdk.incubator.mvt
  * @library /test/lib
  * @compile -XDenableValueTypes VloadTest.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
--- a/test/runtime/valhalla/valuetypes/verifier/VunboxErrorIndex.java	Wed Sep 13 11:37:04 2017 +0200
+++ b/test/runtime/valhalla/valuetypes/verifier/VunboxErrorIndex.java	Fri Sep 15 13:49:06 2017 -0700
@@ -23,13 +23,16 @@
 package runtime.valhalla.valuetypes.verifier;
 
 import java.lang.invoke.*;
-import jdk.experimental.value.*;
+import jdk.incubator.mvt.ValueType;
+import jdk.experimental.value.MethodHandleBuilder;
 
 import static jdk.test.lib.Asserts.*;
 
 /*
  * @test VunboxErrorIndex
  * @summary Exercise the verifier for vunbox bytecode with a non-value type CP index.
+ * @modules java.base/jdk.experimental.value
+ *          jdk.incubator.mvt
  * @library /test/lib
  * @build runtime.valhalla.valuetypes.verifier.ValueCapableClass
  * @run main/othervm -Xint -verify -XX:+EnableMVT runtime.valhalla.valuetypes.verifier.VunboxErrorIndex