--- old/hotspot/test/runtime/valhalla/valuetypes/MVTCombo.java 2017-09-15 12:05:10.000000000 -0700 +++ new/hotspot/test/runtime/valhalla/valuetypes/MVTCombo.java 2017-09-15 12:05:10.000000000 -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> 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); } }