comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.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 c9915c22a5a9
children b3a816d3b844
comparison
equal deleted inserted replaced
23386:2625b10989ee 23387:a920338dd4d4
34 import java.lang.reflect.Modifier; 34 import java.lang.reflect.Modifier;
35 import java.lang.reflect.Type; 35 import java.lang.reflect.Type;
36 import java.util.HashMap; 36 import java.util.HashMap;
37 import java.util.Map; 37 import java.util.Map;
38 38
39 import jdk.vm.ci.common.JVMCIError;
40 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option; 39 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
41 import jdk.vm.ci.meta.Constant; 40 import jdk.vm.ci.meta.Constant;
42 import jdk.vm.ci.meta.ConstantPool; 41 import jdk.vm.ci.meta.ConstantPool;
43 import jdk.vm.ci.meta.DefaultProfilingInfo; 42 import jdk.vm.ci.meta.DefaultProfilingInfo;
44 import jdk.vm.ci.meta.ExceptionHandler; 43 import jdk.vm.ci.meta.ExceptionHandler;
613 * 612 *
614 * @return the offset of this method into the v-table 613 * @return the offset of this method into the v-table
615 */ 614 */
616 public int vtableEntryOffset(ResolvedJavaType resolved) { 615 public int vtableEntryOffset(ResolvedJavaType resolved) {
617 if (!isInVirtualMethodTable(resolved)) { 616 if (!isInVirtualMethodTable(resolved)) {
618 throw new JVMCIError("%s does not have a vtable entry in type %s", this, resolved); 617 throw new InternalError(String.format("%s does not have a vtable entry in type %s", this, resolved));
619 } 618 }
620 HotSpotVMConfig config = config(); 619 HotSpotVMConfig config = config();
621 final int vtableIndex = getVtableIndex((HotSpotResolvedObjectTypeImpl) resolved); 620 final int vtableIndex = getVtableIndex((HotSpotResolvedObjectTypeImpl) resolved);
622 return config.instanceKlassVtableStartOffset + vtableIndex * config.vtableEntrySize + config.vtableEntryMethodOffset; 621 return config.instanceKlassVtableStartOffset + vtableIndex * config.vtableEntrySize + config.vtableEntryMethodOffset;
623 } 622 }