org.jikesrvm.osr
Class OSRMapIterator

java.lang.Object
  extended by org.jikesrvm.osr.OSRMapIterator
All Implemented Interfaces:
ClassLoaderConstants, OSRConstants, SizeConstants

public class OSRMapIterator
extends Object
implements OSRConstants

An iterator over an encoded OSR map. It is a bit odd to used now.

     while (it.hasMore()) {
       it.getKind();
       it.getNumber();
       it.getMethodId();
       it.getBcIndex();
       ....

       it.moveToNext();
     }


Field Summary
private  int curidx
           
private  int curmid
           
private  int curmpc
           
private  int[] maps
           
private  boolean moreElemnt
           
private  boolean moreMethId
           
 
Fields inherited from interface org.jikesrvm.osr.OSRConstants
ACONST, BCI_MASK, BCI_SHIFT, CLEANREFS, DOUBLE, FLOAT, GETREFAT, HIGH_64BIT, ICONST, IEI_MASK, IEI_SHIFT, INT, INVALID_BCI, INVALID_IEI, KIND_MASK, KIND_SHIFT, LCONST, LOCAL, LONG, NEXT_BIT, NO_OSR_ENTRY, NUM_MASK, NUM_SHIFT, OFFSET_MASK, OFFSET_SHIFT, OSRI_MASK, OSRI_SHIFT, PHYREG, PSEUDO_CheckCast, PSEUDO_InvokeCompiledMethod, PSEUDO_InvokeStatic, PSEUDO_LoadDoubleConst, PSEUDO_LoadFloatConst, PSEUDO_LoadIntConst, PSEUDO_LoadLongConst, PSEUDO_LoadRetAddrConst, PSEUDO_LoadWordConst, PSEUDO_ParamInitEnd, REF, RET_ADDR, ReturnAddressTypeCode, SPILL, STACK, TCODE_MASK, TCODE_SHIFT, VTYPE_MASK, VTYPE_SHIFT, WORD, WordTypeCode
 
Fields inherited from interface org.jikesrvm.SizeConstants
BITS_IN_ADDRESS, BITS_IN_BOOLEAN, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_DOUBLE, BITS_IN_EXTENT, BITS_IN_FLOAT, BITS_IN_INT, BITS_IN_LONG, BITS_IN_OFFSET, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BOOLEAN, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_DOUBLE, BYTES_IN_EXTENT, BYTES_IN_FLOAT, BYTES_IN_INT, BYTES_IN_LONG, BYTES_IN_OFFSET, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BOOLEAN, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_DOUBLE, LOG_BITS_IN_EXTENT, LOG_BITS_IN_FLOAT, LOG_BITS_IN_INT, LOG_BITS_IN_LONG, LOG_BITS_IN_OFFSET, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_BOOLEAN, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_DOUBLE, LOG_BYTES_IN_EXTENT, LOG_BYTES_IN_FLOAT, LOG_BYTES_IN_INT, LOG_BYTES_IN_LONG, LOG_BYTES_IN_OFFSET, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD
 
Fields inherited from interface org.jikesrvm.classloader.ClassLoaderConstants
ACC_ABSTRACT, ACC_ANNOTATION, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VOLATILE, APPLICABLE_TO_CLASSES, APPLICABLE_TO_FIELDS, APPLICABLE_TO_METHODS, ArrayTypeCode, BooleanTypeCode, BRIDGE, ByteTypeCode, CharTypeCode, CLASS_INITIALIZED, CLASS_INITIALIZER_FAILED, CLASS_INITIALIZING, CLASS_INSTANTIATED, CLASS_LOADED, CLASS_RESOLVED, CLASS_VACANT, ClassTypeCode, CP_CLASS, CP_DOUBLE, CP_FLOAT, CP_INT, CP_LONG, CP_MEMBER, CP_STRING, CP_UTF, DoubleTypeCode, FloatTypeCode, IntTypeCode, LongTypeCode, ShortTypeCode, TAG_DOUBLE, TAG_FIELDREF, TAG_FLOAT, TAG_INT, TAG_INTERFACE_METHODREF, TAG_LONG, TAG_MEMBERNAME_AND_DESCRIPTOR, TAG_METHODREF, TAG_STRING, TAG_TYPEREF, TAG_UNUSED, TAG_UTF, VARARGS, VoidTypeCode
 
Constructor Summary
OSRMapIterator(int[] mapcode, int index)
           
 
Method Summary
 int getBcIndex()
          current pc
 boolean getKind()
          what kind.
 int getMethodId()
          current mid
 char getNumber()
          number
 byte getTypeCode()
          type code.
 int getValue()
          value
 byte getValueType()
          value type
 boolean hasMore()
           
private  boolean hasMoreElements()
          has next element of this method id to iterate?
private  boolean hasMoreMethodId()
          has next method id to iterate?
 void moveToNext()
          Moves the index to the next element, update more first because we use last element's bit to indicate whether this element is available.
private  void moveToNextMethodId()
          after finishing iteration of one method, move to the next, it if is empty, move further.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

curidx

private int curidx

maps

private final int[] maps

curmid

private int curmid

curmpc

private int curmpc

moreMethId

private boolean moreMethId

moreElemnt

private boolean moreElemnt
Constructor Detail

OSRMapIterator

public OSRMapIterator(int[] mapcode,
                      int index)
Method Detail

hasMore

public boolean hasMore()

moveToNextMethodId

private void moveToNextMethodId()
after finishing iteration of one method, move to the next, it if is empty, move further.


hasMoreMethodId

private boolean hasMoreMethodId()
has next method id to iterate?


hasMoreElements

private boolean hasMoreElements()
has next element of this method id to iterate?


moveToNext

public void moveToNext()
Moves the index to the next element, update more first because we use last element's bit to indicate whether this element is available.


getKind

public boolean getKind()
what kind.


getTypeCode

public byte getTypeCode()
type code.


getNumber

public char getNumber()
number


getValueType

public byte getValueType()
value type


getValue

public int getValue()
value


getMethodId

public int getMethodId()
current mid


getBcIndex

public int getBcIndex()
current pc