< prev index next >

hotspot/test/runtime/valhalla/valuetypes/verifier/VloadTest.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package runtime.valhalla.valuetypes.verifier;
  25 
  26 import java.lang.invoke.*;
  27 import java.lang.ref.*;
  28 import java.util.concurrent.*;
  29 import jdk.experimental.value.*;
  30 import sun.hotspot.WhiteBox;
  31 
  32 /**
  33  * @test VloadTest
  34  * @summary Test vload opcode


  35  * @library /test/lib
  36  * @compile -XDenableValueTypes VloadTest.java
  37  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  38  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  39  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  40  * @run main/othervm -Xint -XX:+UseG1GC -Xmx128m -XX:+EnableMVT
  41  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  42  *                   runtime.valhalla.valuetypes.verifier.VloadTest
  43  */
  44 public class VloadTest {
  45 
  46     public static void main(String[] args) throws Throwable{
  47         testBytecodes();
  48     }
  49 
  50     // Test that vload cannot load an integer.
  51     public static void testBytecodes() throws Throwable {
  52         try {
  53             MethodHandles.Lookup lookup = MethodHandles.lookup();
  54 


   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package runtime.valhalla.valuetypes.verifier;
  25 
  26 import java.lang.invoke.*;
  27 
  28 import jdk.experimental.value.MethodHandleBuilder;

  29 import sun.hotspot.WhiteBox;
  30 
  31 /**
  32  * @test VloadTest
  33  * @summary Test vload opcode
  34  * @modules java.base/jdk.experimental.value
  35  *          jdk.incubator.mvt
  36  * @library /test/lib
  37  * @compile -XDenableValueTypes VloadTest.java
  38  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  39  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  40  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  41  * @run main/othervm -Xint -XX:+UseG1GC -Xmx128m -XX:+EnableMVT
  42  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  43  *                   runtime.valhalla.valuetypes.verifier.VloadTest
  44  */
  45 public class VloadTest {
  46 
  47     public static void main(String[] args) throws Throwable{
  48         testBytecodes();
  49     }
  50 
  51     // Test that vload cannot load an integer.
  52     public static void testBytecodes() throws Throwable {
  53         try {
  54             MethodHandles.Lookup lookup = MethodHandles.lookup();
  55 
< prev index next >