Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java @ 23989:115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 26 Jan 2017 13:02:37 +0100 |
parents | 33421fb951da |
children | 4913d70f630b |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Wed Jan 25 16:39:01 2017 +0100 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Thu Jan 26 13:02:37 2017 +0100 @@ -524,8 +524,8 @@ return result; } - synchronized HotSpotResolvedJavaField createField(String fieldName, JavaType type, long offset, int rawFlags) { - return new HotSpotResolvedJavaFieldImpl(this, fieldName, type, offset, rawFlags); + synchronized HotSpotResolvedJavaField createField(JavaType type, long offset, int rawFlags, int index) { + return new HotSpotResolvedJavaFieldImpl(this, type, offset, rawFlags, index); } @Override @@ -591,10 +591,6 @@ return readFieldSlot(config().fieldInfoAccessFlagsOffset); } - private int getNameIndex() { - return readFieldSlot(config().fieldInfoNameIndexOffset); - } - private int getSignatureIndex() { return readFieldSlot(config().fieldInfoSignatureIndexOffset); } @@ -617,15 +613,6 @@ } /** - * Returns the name of this field as a {@link String}. If the field is an internal field the - * name index is pointing into the vmSymbols table. - */ - public String getName() { - final int nameIndex = getNameIndex(); - return isInternal() ? config().symbolAt(nameIndex) : getConstantPool().lookupUtf8(nameIndex); - } - - /** * Returns the signature of this field as {@link String}. If the field is an internal field * the signature index is pointing into the vmSymbols table. */ @@ -691,11 +678,10 @@ } /** - * Returns the actual field count of this class's internal {@code InstanceKlass::_fields} array - * by walking the array and discounting the generic signature slots at the end of the array. + * Gets the instance or static fields of this class. * - * <p> - * See {@code FieldStreamBase::init_generic_signature_start_slot} + * @param retrieveStaticFields specifies whether to return instance or static fields + * @param prepend an array to be prepended to the returned result */ private HotSpotResolvedJavaField[] getFields(boolean retrieveStaticFields, HotSpotResolvedJavaField[] prepend) { HotSpotVMConfig config = config(); @@ -731,7 +717,7 @@ FieldInfo field = new FieldInfo(i); if (field.isStatic() == retrieveStaticFields) { int offset = field.getOffset(); - HotSpotResolvedJavaField resolvedJavaField = createField(field.getName(), field.getType(), offset, field.getAccessFlags()); + HotSpotResolvedJavaField resolvedJavaField = createField(field.getType(), offset, field.getAccessFlags(), i); // Make sure the result is sorted by offset. int j;