Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java @ 14117:2b2f0022900f
removed unnecessary lookupKlassByName method
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 08 Mar 2014 10:04:44 +0100 |
parents | dd783f0ecf17 |
children | 82c3b54d1f08 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java Fri Mar 07 11:44:26 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java Sat Mar 08 10:04:44 2014 +0100 @@ -53,7 +53,7 @@ * * @return holder for this constant pool */ - private HotSpotResolvedJavaType getHolder() { + private HotSpotResolvedObjectType getHolder() { final long metaspaceKlass = unsafe.getAddress(metaspaceConstantPool + runtime().getConfig().constantPoolHolderOffset); return (HotSpotResolvedObjectType) HotSpotResolvedObjectType.fromMetaspaceKlass(metaspaceKlass); } @@ -431,19 +431,7 @@ String name = lookupUtf8(nameIndex); final int typeIndex = getSignatureRefIndexAt(nameAndTypeIndex); String typeName = lookupUtf8(typeIndex); - - Kind kind = Kind.fromTypeString(typeName); - JavaType type; - if (kind.isPrimitive()) { - type = HotSpotResolvedPrimitiveType.fromKind(kind); - } else { - final long metaspaceKlass = runtime().getCompilerToVM().lookupKlassByName(typeName, getHolder().mirror()); - if (metaspaceKlass == 0L) { - type = HotSpotUnresolvedJavaType.create(typeName); - } else { - type = HotSpotResolvedObjectType.fromMetaspaceKlass(metaspaceKlass); - } - } + JavaType type = runtime().lookupType(typeName, getHolder(), false); final int holderIndex = getKlassRefIndexAt(index); JavaType holder = lookupType(holderIndex, opcode);