< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigVerifier.java

Print this page

        

@@ -31,18 +31,17 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.Arrays;
 import java.util.Objects;
 
-import jdk.vm.ci.common.JVMCIError;
+import jdk.internal.misc.Unsafe;
 import jdk.internal.org.objectweb.asm.ClassReader;
 import jdk.internal.org.objectweb.asm.ClassVisitor;
 import jdk.internal.org.objectweb.asm.Label;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Opcodes;
 import jdk.internal.org.objectweb.asm.Type;
-import jdk.internal.misc.Unsafe;
 
 /**
  * A {@link ClassVisitor} that verifies {@link HotSpotVMConfig} does not access {@link Unsafe} from
  * any of its non-static, non-constructor methods. This ensures that a deserialized
  * {@link HotSpotVMConfig} object does not perform any unsafe reads on addresses that are only valid

@@ -59,11 +58,11 @@
             ClassReader cr = new ClassReader(Objects.requireNonNull(classfile, "Could not find class file for " + cls.getName()));
             ClassVisitor cv = new HotSpotVMConfigVerifier();
             cr.accept(cv, 0);
             return true;
         } catch (IOException e) {
-            throw new JVMCIError(e);
+            throw new InternalError(e);
         }
     }
 
     /**
      * Source file context for error reporting.

@@ -77,11 +76,11 @@
 
     private static Class<?> resolve(String name) {
         try {
             return Class.forName(name.replace('/', '.'));
         } catch (ClassNotFoundException e) {
-            throw new JVMCIError(e);
+            throw new InternalError(e);
         }
     }
 
     HotSpotVMConfigVerifier() {
         super(Opcodes.ASM5);

@@ -99,11 +98,11 @@
     }
 
     void error(String message) {
         String errorMessage = format("%s:%d: %s is not allowed in the context of compilation replay. The unsafe access should be moved into the %s constructor and the result cached in a field",
                         sourceFile, lineNo, message, HotSpotVMConfig.class.getSimpleName());
-        throw new JVMCIError(errorMessage);
+        throw new InternalError(errorMessage);
 
     }
 
     @Override
     public MethodVisitor visitMethod(int access, String name, String d, String signature, String[] exceptions) {
< prev index next >