< prev index next >

test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypesTest.java

Print this page

        

@@ -49,11 +49,11 @@
  * @summary Test data movement with value types
  * @modules java.base/jdk.experimental.bytecode
  *          java.base/jdk.experimental.value
  * @library /test/lib
  * @compile -XDenableValueTypes TestValue1.java TestValue2.java TestValue3.java TestValue4.java ValueTypesTest.java
- * @run main/othervm -Xint -Xmx128m -XX:+EnableValhalla -XX:-ShowMessageBoxOnError
+ * @run main/othervm -noverify -Xint -Xmx128m -XX:+EnableValhalla -XX:-ShowMessageBoxOnError
  *                   -XX:+ExplicitGCInvokesConcurrent
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *                   -Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=false
  *                   runtime.valhalla.valuetypes.ValueTypesTest
  * @run main/othervm -Xmx128m -XX:+EnableValhalla -XX:-ShowMessageBoxOnError

@@ -92,11 +92,11 @@
     }
 
     static MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
 
     static void testExecutionStackToLocalVariable(Class<?> valueClass) throws Throwable {
-        String sig = "()Q" + valueClass.getName() + ";";
+        String sig = "()L" + valueClass.getName() + ";";
         final String signature = sig.replace('.', '/');
         System.out.println(signature);
         MethodHandle fromExecStackToLocalVar = MethodHandleBuilder.loadCode(
                 LOOKUP,
                 "execStackToLocalVar",

@@ -106,20 +106,20 @@
                     int n = -1;
                     while (n < 1024) {
                         n++;
                         CODE
                                 .invokestatic(valueClass, "getInstance", signature, false)
-                                .vstore(n);
+                                .astore(n);
                         n++;
                         CODE
                                 .invokestatic(valueClass, "getNonBufferedInstance", signature, false)
-                                .vstore(n);
+                                .astore(n);
                     }
                     CODE.invokestatic(System.class, "gc", "()V", false);
                     while (n > 0) {
                         CODE
-                                .vload(n)
+                                .aload(n)
                                 .invokevirtual(valueClass, "verify", "()Z", false)
                                 .iconst_1()
                                 .ifcmp(TypeTag.I, CondKind.NE, "end");
                         n--;
                     }

@@ -135,13 +135,13 @@
         assertTrue(result, "Invariant");
     }
 
     static void testExecutionStackToFields(Class<?> valueClass, Class<?> containerClass) throws Throwable {
         final int ITERATIONS = 512;
-        String sig = "()Q" + valueClass.getName() + ";";
+        String sig = "()L" + valueClass.getName() + ";";
         final String methodSignature = sig.replace('.', '/');
-        final String fieldSignature = "Q" + valueClass.getName().replace('.', '/') + ";";
+        final String fieldSignature = "L" + valueClass.getName().replace('.', '/') + ";";
         System.out.println(methodSignature);
         MethodHandle fromExecStackToFields = MethodHandleBuilder.loadCode(
                 LOOKUP,
                 "execStackToFields",
                 MethodType.methodType(boolean.class),

@@ -204,13 +204,13 @@
         assertTrue(result, "Invariant");
     }
 
     static void testExecutionStackToValueArray(Class<?> valueClass, Class<?> containerClass) throws Throwable {
         final int ITERATIONS = 100;
-        String sig = "()Q" + valueClass.getName() + ";";
+        String sig = "()L" + valueClass.getName() + ";";
         final String signature = sig.replace('.', '/');
-        final String arraySignature = "[Q" + valueClass.getName().replace('.', '/') + ";";
+        final String arraySignature = "[L" + valueClass.getName().replace('.', '/') + ";";
         System.out.println(arraySignature);
         MethodHandle fromExecStackToValueArray = MethodHandleBuilder.loadCode(
                 LOOKUP,
                 "execStackToValueArray",
                 MethodType.methodType(boolean.class),

@@ -235,21 +235,21 @@
                             .ldc(ITERATIONS)
                             .ifcmp(TypeTag.I, CondKind.GE, "end1")
                             .aload_2()
                             .iload_3()
                             .invokestatic(valueClass, "getInstance", signature, false)
-                            .vastore()
+                            .aastore()
                             .iinc(3, 1)
                             .aload_2()
                             .iload_3()
                             .invokestatic(valueClass, "getNonBufferedInstance", signature, false)
-                            .vastore()
+                            .aastore()
                             .iinc(3, 1)
                             .aload_2()
                             .iload_3()
                             .vdefault(valueClass)
-                            .vastore()
+                            .aastore()
                             .iinc(3, 1)
                             .goto_("loop1")
                             .label("end1")
                             .invokestatic(System.class, "gc", "()V", false)
                             .iconst_0()

@@ -258,11 +258,11 @@
                             .iload_3()
                             .ldc(ITERATIONS * 3)
                             .ifcmp(TypeTag.I, CondKind.GE, "end2")
                             .aload_2()
                             .iload_3()
-                            .vaload()
+                            .aaload()
                             .invokevirtual(valueClass, "verify", "()Z", false)
                             .iconst_1()
                             .ifcmp(TypeTag.I, CondKind.NE, "failed")
                             .iinc(3, 1)
                             .goto_("loop2")
< prev index next >