< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java

Print this page




 578             final int lowPacked = readFieldSlot(config.fieldInfoLowPackedOffset);
 579             final int highPacked = readFieldSlot(config.fieldInfoHighPackedOffset);
 580             final int offset = ((highPacked << Short.SIZE) | lowPacked) >> config.fieldInfoTagSize;
 581             return offset;
 582         }
 583 
 584         /**
 585          * Helper method to read an entry (slot) from the field array. Currently field info is laid
 586          * on top an array of Java shorts.
 587          */
 588         private int readFieldSlot(int index) {
 589             return UNSAFE.getChar(metaspaceData + Short.BYTES * index);
 590         }
 591 
 592         /**
 593          * Returns the name of this field as a {@link String}. If the field is an internal field the
 594          * name index is pointing into the vmSymbols table.
 595          */
 596         public String getName() {
 597             final int nameIndex = getNameIndex();
 598             return isInternal() ? HotSpotVmSymbols.symbolAt(nameIndex) : getConstantPool().lookupUtf8(nameIndex);
 599         }
 600 
 601         /**
 602          * Returns the signature of this field as {@link String}. If the field is an internal field
 603          * the signature index is pointing into the vmSymbols table.
 604          */
 605         public String getSignature() {
 606             final int signatureIndex = getSignatureIndex();
 607             return isInternal() ? HotSpotVmSymbols.symbolAt(signatureIndex) : getConstantPool().lookupUtf8(signatureIndex);
 608         }
 609 
 610         public JavaType getType() {
 611             String signature = getSignature();
 612             return runtime().lookupType(signature, HotSpotResolvedObjectTypeImpl.this, false);
 613         }
 614 
 615         private boolean isInternal() {
 616             return (getAccessFlags() & config().jvmAccFieldInternal) != 0;
 617         }
 618 
 619         public boolean isStatic() {
 620             return Modifier.isStatic(getAccessFlags());
 621         }
 622 
 623         public boolean hasGenericSignature() {
 624             return (getAccessFlags() & config().jvmAccFieldHasGenericSignature) != 0;
 625         }
 626     }
 627 




 578             final int lowPacked = readFieldSlot(config.fieldInfoLowPackedOffset);
 579             final int highPacked = readFieldSlot(config.fieldInfoHighPackedOffset);
 580             final int offset = ((highPacked << Short.SIZE) | lowPacked) >> config.fieldInfoTagSize;
 581             return offset;
 582         }
 583 
 584         /**
 585          * Helper method to read an entry (slot) from the field array. Currently field info is laid
 586          * on top an array of Java shorts.
 587          */
 588         private int readFieldSlot(int index) {
 589             return UNSAFE.getChar(metaspaceData + Short.BYTES * index);
 590         }
 591 
 592         /**
 593          * Returns the name of this field as a {@link String}. If the field is an internal field the
 594          * name index is pointing into the vmSymbols table.
 595          */
 596         public String getName() {
 597             final int nameIndex = getNameIndex();
 598             return isInternal() ? HotSpotSymbol.symbolAt(nameIndex) : getConstantPool().lookupUtf8(nameIndex);
 599         }
 600 
 601         /**
 602          * Returns the signature of this field as {@link String}. If the field is an internal field
 603          * the signature index is pointing into the vmSymbols table.
 604          */
 605         public String getSignature() {
 606             final int signatureIndex = getSignatureIndex();
 607             return isInternal() ? HotSpotSymbol.symbolAt(signatureIndex) : getConstantPool().lookupUtf8(signatureIndex);
 608         }
 609 
 610         public JavaType getType() {
 611             String signature = getSignature();
 612             return runtime().lookupType(signature, HotSpotResolvedObjectTypeImpl.this, false);
 613         }
 614 
 615         private boolean isInternal() {
 616             return (getAccessFlags() & config().jvmAccFieldInternal) != 0;
 617         }
 618 
 619         public boolean isStatic() {
 620             return Modifier.isStatic(getAccessFlags());
 621         }
 622 
 623         public boolean hasGenericSignature() {
 624             return (getAccessFlags() & config().jvmAccFieldHasGenericSignature) != 0;
 625         }
 626     }
 627 


< prev index next >