< prev index next >

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

Print this page

        

*** 20,39 **** * or visit www.oracle.com if you need additional information or have any * questions. */ package runtime.valhalla.valuetypes; 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.*; --- 20,39 ---- * 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.internal.org.objectweb.asm.*; import static jdk.internal.org.objectweb.asm.Opcodes.*; import static jdk.test.lib.Asserts.*;
*** 41,51 **** /* * @test DeriveValueTypeCreation * @summary Derive Value Type creation test * @library /test/lib * @compile DeriveValueTypeCreation.java ! * @modules java.base/jdk.internal.org.objectweb.asm * @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 { --- 41,53 ---- /* * @test DeriveValueTypeCreation * @summary Derive Value Type creation test * @library /test/lib * @compile DeriveValueTypeCreation.java ! * @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,106 **** 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"); --- 96,105 ----
*** 177,187 **** 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); } if (fieldType != null) { cw.visitField(fieldAccess, "x", fieldType, null, null); } cw.visitEnd(); --- 176,186 ---- String fieldType, int fieldAccess) { ClassWriter cw = new ClassWriter(0); cw.visit(52, klassAccess, name, null, superKlass, null); if (vccAnnotation ) { ! cw.visitAnnotation("Ljdk/incubator/mvt/ValueCapableClass;", true); } if (fieldType != null) { cw.visitField(fieldAccess, "x", fieldType, null, null); } cw.visitEnd();
< prev index next >