< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstantPoolCache.java

Print this page

        

*** 68,88 **** public ConstantPool getConstants() { return (ConstantPool) constants.getValue(this); } public long getSize() { ! return Oop.alignObjectSize(baseOffset + getLength() * elementSize); } public ConstantPoolCacheEntry getEntryAt(int i) { if (i < 0 || i >= getLength()) throw new IndexOutOfBoundsException(i + " " + getLength()); return new ConstantPoolCacheEntry(this, i); } public int getIntAt(int entry, int fld) { ! //alignObjectSize ? ! long offset = baseOffset + /*alignObjectSize*/entry * elementSize + fld * intSize; return (int) getAddress().getCIntegerAt(offset, intSize, true ); } public void printValueOn(PrintStream tty) { --- 68,87 ---- public ConstantPool getConstants() { return (ConstantPool) constants.getValue(this); } public long getSize() { ! return alignSize(baseOffset + getLength() * elementSize); } public ConstantPoolCacheEntry getEntryAt(int i) { if (i < 0 || i >= getLength()) throw new IndexOutOfBoundsException(i + " " + getLength()); return new ConstantPoolCacheEntry(this, i); } public int getIntAt(int entry, int fld) { ! long offset = baseOffset + entry * elementSize + fld * intSize; return (int) getAddress().getCIntegerAt(offset, intSize, true ); } public void printValueOn(PrintStream tty) {
< prev index next >