Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigVerifier.java @ 23387:a920338dd4d4
remove JVMCIError and UnsafeUtil classes (JDK-8156759)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 11 May 2016 15:54:36 +0200 |
parents | d6cbb275d6ce |
children | b3a816d3b844 |
comparison
equal
deleted
inserted
replaced
23386:2625b10989ee | 23387:a920338dd4d4 |
---|---|
32 import java.lang.reflect.Modifier; | 32 import java.lang.reflect.Modifier; |
33 import java.security.AccessControlException; | 33 import java.security.AccessControlException; |
34 import java.util.Arrays; | 34 import java.util.Arrays; |
35 import java.util.Objects; | 35 import java.util.Objects; |
36 | 36 |
37 import jdk.vm.ci.common.JVMCIError; | |
38 import jdk.internal.org.objectweb.asm.ClassReader; | 37 import jdk.internal.org.objectweb.asm.ClassReader; |
39 import jdk.internal.org.objectweb.asm.ClassVisitor; | 38 import jdk.internal.org.objectweb.asm.ClassVisitor; |
40 import jdk.internal.org.objectweb.asm.Label; | 39 import jdk.internal.org.objectweb.asm.Label; |
41 import jdk.internal.org.objectweb.asm.MethodVisitor; | 40 import jdk.internal.org.objectweb.asm.MethodVisitor; |
42 import jdk.internal.org.objectweb.asm.Opcodes; | 41 import jdk.internal.org.objectweb.asm.Opcodes; |
66 * When running with a security manager and +UseJVMCIClassLoader the ASM classes might | 65 * When running with a security manager and +UseJVMCIClassLoader the ASM classes might |
67 * not be accessible. | 66 * not be accessible. |
68 */ | 67 */ |
69 return true; | 68 return true; |
70 } catch (IOException e) { | 69 } catch (IOException e) { |
71 throw new JVMCIError(e); | 70 throw new InternalError(e); |
72 } | 71 } |
73 } | 72 } |
74 | 73 |
75 private static Class<?> resolve(String name) { | 74 private static Class<?> resolve(String name) { |
76 try { | 75 try { |
77 return Class.forName(name.replace('/', '.')); | 76 return Class.forName(name.replace('/', '.')); |
78 } catch (ClassNotFoundException e) { | 77 } catch (ClassNotFoundException e) { |
79 throw new JVMCIError(e); | 78 throw new InternalError(e); |
80 } | 79 } |
81 } | 80 } |
82 | 81 |
83 private static class Verifier extends ClassVisitor { | 82 private static class Verifier extends ClassVisitor { |
84 | 83 |
108 } | 107 } |
109 | 108 |
110 void error(String message) { | 109 void error(String message) { |
111 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", | 110 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", |
112 sourceFile, lineNo, message, HotSpotVMConfig.class.getSimpleName()); | 111 sourceFile, lineNo, message, HotSpotVMConfig.class.getSimpleName()); |
113 throw new JVMCIError(errorMessage); | 112 throw new InternalError(errorMessage); |
114 | 113 |
115 } | 114 } |
116 | 115 |
117 @Override | 116 @Override |
118 public MethodVisitor visitMethod(int access, String name, String d, String signature, String[] exceptions) { | 117 public MethodVisitor visitMethod(int access, String name, String d, String signature, String[] exceptions) { |