agent/src/share/classes/sun/jvm/hotspot/oops/Field.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7086585 Cdiff agent/src/share/classes/sun/jvm/hotspot/oops/Field.java

agent/src/share/classes/sun/jvm/hotspot/oops/Field.java

Print this page

        

*** 37,68 **** this.isVMField = isVMField; } /** Constructor for fields that are named in an InstanceKlass's fields array (i.e., named, non-VM fields) */ ! Field(InstanceKlass holder, int fieldArrayIndex) { this.holder = holder; ! this.fieldArrayIndex = fieldArrayIndex; ! ConstantPool cp = holder.getConstants(); ! TypeArray fields = holder.getFields(); ! short access = fields.getShortAt(fieldArrayIndex + InstanceKlass.ACCESS_FLAGS_OFFSET); ! short nameIndex = fields.getShortAt(fieldArrayIndex + InstanceKlass.NAME_INDEX_OFFSET); ! short signatureIndex = fields.getShortAt(fieldArrayIndex + InstanceKlass.SIGNATURE_INDEX_OFFSET); ! offset = VM.getVM().buildIntFromShorts(fields.getShortAt(fieldArrayIndex + InstanceKlass.LOW_OFFSET), ! fields.getShortAt(fieldArrayIndex + InstanceKlass.HIGH_OFFSET)); ! short genericSignatureIndex = fields.getShortAt(fieldArrayIndex + InstanceKlass.GENERIC_SIGNATURE_INDEX_OFFSET); ! Symbol name = cp.getSymbolAt(nameIndex); id = new NamedFieldIdentifier(name.asString()); - signature = cp.getSymbolAt(signatureIndex); - if (genericSignatureIndex != 0) { - genericSignature = cp.getSymbolAt(genericSignatureIndex); - } else { - genericSignature = null; - } fieldType = new FieldType(signature); accessFlags = new AccessFlags(access); } private long offset; private FieldIdentifier id; --- 37,60 ---- this.isVMField = isVMField; } /** Constructor for fields that are named in an InstanceKlass's fields array (i.e., named, non-VM fields) */ ! Field(InstanceKlass holder, int fieldIndex) { this.holder = holder; ! this.fieldIndex = fieldIndex; ! offset = holder.getFieldOffset(fieldIndex); ! genericSignature = holder.getFieldGenericSignature(fieldIndex); ! ! Symbol name = holder.getFieldName(fieldIndex); id = new NamedFieldIdentifier(name.asString()); + signature = holder.getFieldSignature(fieldIndex); fieldType = new FieldType(signature); + + short access = holder.getFieldAccessFlags(fieldIndex); accessFlags = new AccessFlags(access); } private long offset; private FieldIdentifier id;
*** 71,81 **** private InstanceKlass holder; private FieldType fieldType; private Symbol signature; private Symbol genericSignature; private AccessFlags accessFlags; ! private int fieldArrayIndex; /** Returns the byte offset of the field within the object or klass */ public long getOffset() { return offset; } /** Returns the identifier of the field */ --- 63,73 ---- private InstanceKlass holder; private FieldType fieldType; private Symbol signature; private Symbol genericSignature; private AccessFlags accessFlags; ! private int fieldIndex; /** Returns the byte offset of the field within the object or klass */ public long getOffset() { return offset; } /** Returns the identifier of the field */
*** 99,110 **** } /** (Named, non-VM fields only) Returns the index in the fields TypeArray for this field. Equivalent to the "index" in the VM's fieldDescriptors. */ ! public int getFieldArrayIndex() { ! return fieldArrayIndex; } /** (Named, non-VM fields only) Retrieves the access flags. */ public long getAccessFlags() { return accessFlags.getValue(); } public AccessFlags getAccessFlagsObj() { return accessFlags; } --- 91,102 ---- } /** (Named, non-VM fields only) Returns the index in the fields TypeArray for this field. Equivalent to the "index" in the VM's fieldDescriptors. */ ! public int getFieldIndex() { ! return fieldIndex; } /** (Named, non-VM fields only) Retrieves the access flags. */ public long getAccessFlags() { return accessFlags.getValue(); } public AccessFlags getAccessFlagsObj() { return accessFlags; }
agent/src/share/classes/sun/jvm/hotspot/oops/Field.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File