comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigVerifier.java @ 23392:b3a816d3b844

Backed out changeset: a920338dd4d4
author Doug Simon <doug.simon@oracle.com>
date Thu, 12 May 2016 11:06:49 +0200
parents a920338dd4d4
children
comparison
equal deleted inserted replaced
23391:dd9f3badc978 23392:b3a816d3b844
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;
37 import jdk.internal.org.objectweb.asm.ClassReader; 38 import jdk.internal.org.objectweb.asm.ClassReader;
38 import jdk.internal.org.objectweb.asm.ClassVisitor; 39 import jdk.internal.org.objectweb.asm.ClassVisitor;
39 import jdk.internal.org.objectweb.asm.Label; 40 import jdk.internal.org.objectweb.asm.Label;
40 import jdk.internal.org.objectweb.asm.MethodVisitor; 41 import jdk.internal.org.objectweb.asm.MethodVisitor;
41 import jdk.internal.org.objectweb.asm.Opcodes; 42 import jdk.internal.org.objectweb.asm.Opcodes;
65 * When running with a security manager and +UseJVMCIClassLoader the ASM classes might 66 * When running with a security manager and +UseJVMCIClassLoader the ASM classes might
66 * not be accessible. 67 * not be accessible.
67 */ 68 */
68 return true; 69 return true;
69 } catch (IOException e) { 70 } catch (IOException e) {
70 throw new InternalError(e); 71 throw new JVMCIError(e);
71 } 72 }
72 } 73 }
73 74
74 private static Class<?> resolve(String name) { 75 private static Class<?> resolve(String name) {
75 try { 76 try {
76 return Class.forName(name.replace('/', '.')); 77 return Class.forName(name.replace('/', '.'));
77 } catch (ClassNotFoundException e) { 78 } catch (ClassNotFoundException e) {
78 throw new InternalError(e); 79 throw new JVMCIError(e);
79 } 80 }
80 } 81 }
81 82
82 private static class Verifier extends ClassVisitor { 83 private static class Verifier extends ClassVisitor {
83 84
107 } 108 }
108 109
109 void error(String message) { 110 void error(String message) {
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", 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",
111 sourceFile, lineNo, message, HotSpotVMConfig.class.getSimpleName()); 112 sourceFile, lineNo, message, HotSpotVMConfig.class.getSimpleName());
112 throw new InternalError(errorMessage); 113 throw new JVMCIError(errorMessage);
113 114
114 } 115 }
115 116
116 @Override 117 @Override
117 public MethodVisitor visitMethod(int access, String name, String d, String signature, String[] exceptions) { 118 public MethodVisitor visitMethod(int access, String name, String d, String signature, String[] exceptions) {