|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.classloader.AnnotatedElement
org.jikesrvm.classloader.RVMType
org.jikesrvm.classloader.RVMArray
public final class RVMArray
Description of a java "array" type.
This description is not read from a ".class" file, but rather is manufactured by the vm as execution proceeds.
RVMType,
RVMClass,
Primitive,
UnboxedType| Field Summary | |
|---|---|
private boolean |
acyclic
Reference Count GC: is this type acyclic? |
private int |
alignment
The desired alignment for instances of this type. |
static RVMArray |
BooleanArray
|
static RVMArray |
ByteArray
|
static RVMArray |
CharArray
|
static RVMArray |
DoubleArray
|
private RVMType |
elementType
The RVMType object for elements of this array type. |
static RVMArray |
FloatArray
|
private boolean |
inBootImage
Is this array type in the bootimage? |
private RVMType |
innermostElementType
The RVMType object for the innermost element of this array type. |
private int |
innermostElementTypeDimension
The dimension of the innermost element of this array type. |
static RVMArray |
IntArray
|
static RVMArray |
JavaLangObjectArray
|
private int |
logElementSize
The log of the element size for this array type. |
static RVMArray |
LongArray
|
static RVMArray |
ShortArray
|
private byte |
state
current class-loading stage (loaded, resolved or initialized) |
private TIB |
typeInformationBlock
The TIB for this type, created when the array is resolved. |
| Fields inherited from class org.jikesrvm.classloader.AnnotatedElement |
|---|
declaredAnnotationDatas |
| Fields inherited from interface org.jikesrvm.Constants |
|---|
NOT_REACHED, REFLECTION_FPRS_BITS, REFLECTION_FPRS_MASK, REFLECTION_GPRS_BITS, REFLECTION_GPRS_MASK |
| Fields inherited from interface org.jikesrvm.objectmodel.ThinLockConstants |
|---|
TL_DEDICATED_U16_OFFSET, TL_DEDICATED_U16_SHIFT, TL_LOCK_COUNT_MASK, TL_LOCK_COUNT_SHIFT, TL_LOCK_COUNT_UNIT, TL_LOCK_ID_MASK, TL_LOCK_ID_SHIFT, TL_NUM_BITS_RC, TL_NUM_BITS_STAT, TL_NUM_BITS_TID, TL_STAT_BIASABLE, TL_STAT_FAT, TL_STAT_MASK, TL_STAT_SHIFT, TL_STAT_THIN, TL_THREAD_ID_MASK, TL_THREAD_ID_SHIFT, TL_UNLOCK_MASK |
| Fields inherited from interface org.jikesrvm.objectmodel.TIBLayoutConstants |
|---|
IMT_METHOD_SLOTS, NEEDS_DYNAMIC_LINK, TIB_ARRAY_ELEMENT_TIB_INDEX, TIB_DOES_IMPLEMENT_INDEX, TIB_FIRST_SPECIALIZED_METHOD_INDEX, TIB_FIRST_VIRTUAL_METHOD_INDEX, TIB_INTERFACE_DISPATCH_TABLE_INDEX, TIB_SUPERCLASS_IDS_INDEX, TIB_TYPE_INDEX |
| Fields inherited from interface org.jikesrvm.HeapLayoutConstants |
|---|
BAD_MAP_COMPRESSION, BOOT_IMAGE_CODE_END, BOOT_IMAGE_CODE_SIZE, BOOT_IMAGE_CODE_START, BOOT_IMAGE_DATA_END, BOOT_IMAGE_DATA_SIZE, BOOT_IMAGE_DATA_START, BOOT_IMAGE_END, BOOT_IMAGE_RMAP_END, BOOT_IMAGE_RMAP_START, MAX_BOOT_IMAGE_RMAP_SIZE, MAXIMUM_MAPPABLE |
| Constructor Summary | |
|---|---|
RVMArray(TypeReference typeRef,
RVMType elementType)
Constructor |
|
| Method Summary | |
|---|---|
void |
allBootImageTypesResolved()
This method is only called by the bootimage writer. |
static void |
arraycopy(boolean[] src,
int srcIdx,
boolean[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of booleans. |
static void |
arraycopy(byte[] src,
int srcIdx,
byte[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of bytes. |
static void |
arraycopy(char[] src,
int srcIdx,
char[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of chars. |
static void |
arraycopy(double[] src,
int srcIdx,
double[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of doubles. |
static void |
arraycopy(float[] src,
int srcIdx,
float[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of floats. |
static void |
arraycopy(int[] src,
int srcIdx,
int[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of ints. |
static void |
arraycopy(long[] src,
int srcIdx,
long[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of longs. |
static void |
arraycopy(Object[] src,
int srcIdx,
Object[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of objects. |
static void |
arraycopy(short[] src,
int srcIdx,
short[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of shorts. |
private static void |
arraycopyNoCheckcast(Object[] src,
int srcIdx,
Object[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of objects where the possibility of an ArrayStoreException being thrown does not exist. |
private static void |
arraycopyPiecemeal(boolean[] src,
int srcIdx,
boolean[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of booleans. |
private static void |
arraycopyPiecemeal(byte[] src,
int srcIdx,
byte[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of bytes. |
private static void |
arraycopyPiecemeal(char[] src,
int srcIdx,
char[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of chars. |
private static void |
arraycopyPiecemeal(double[] src,
int srcIdx,
double[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of doubles. |
private static void |
arraycopyPiecemeal(float[] src,
int srcIdx,
float[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of floats. |
private static void |
arraycopyPiecemeal(int[] src,
int srcIdx,
int[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of ints. |
private static void |
arraycopyPiecemeal(long[] src,
int srcIdx,
long[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of longs. |
private static void |
arraycopyPiecemeal(Object[] src,
int srcIdx,
Object[] dst,
int dstIdx,
int len)
Perform an array copy for arrays of objects where the possibility of an ArrayStoreException being thrown exists. |
private static void |
arraycopyPiecemeal(short[] src,
int srcIdx,
short[] dst,
int dstIdx,
int len)
Perform element-by-element arraycopy for array of shorts. |
private static void |
arraycopyPiecemealNoCheckcast(Object[] src,
Object[] dst,
int len,
Offset srcOffset,
Offset dstOffset,
int bytes)
Perform element-by-element arraycopy for array of objects without performing checkcast. |
private int |
computeLogElementSize()
Calculate the size, in bytes, of an array element, log base 2. |
private static void |
failWithIndexOutOfBoundsException()
|
int |
getAlignment()
|
int |
getDimensionality()
Number of [ in descriptor for arrays; -1 for primitives; 0 for classes |
RVMType |
getElementType()
|
RVMType |
getInnermostElementType()
|
RVMField[] |
getInstanceFields()
Non-static fields of this array type. |
int |
getInstanceSize(int numelts)
Total size, in bytes, of an instance of this array type (including object header). |
int |
getLogElementSize()
Size, in bytes, of an array element, log base 2. |
int |
getMemoryBytes()
Space required in memory in bytes. |
static RVMArray |
getPrimitiveArrayType(int atype)
Get description of specified primitive array. |
int |
getStackWords()
Space required when this type is stored on the stack (or as a field), in words. |
RVMField[] |
getStaticFields()
Static fields of this array type. |
RVMMethod[] |
getStaticMethods()
Statically dispatched methods of this array type. |
Offset |
getThinLockOffset()
Get the offset in instances of this type assigned to the thin lock word. |
int |
getTypeDepth()
get number of superclasses to Object |
TIB |
getTypeInformationBlock()
Runtime type information for this array type. |
RVMMethod[] |
getVirtualMethods()
Virtually dispatched methods of this array type. |
boolean |
hasFinalizer()
Does this class override java.lang.Object.finalize()? |
void |
initialize()
Initialization is a no-op (arrays have no |
void |
instantiate()
Instantiate an array. |
boolean |
isAcyclicReference()
Reference Count GC: Is a reference of this type contained in another object inherently acyclic (without cycles) ? |
boolean |
isArrayType()
Whether or not this is an instance of RVMArray? |
boolean |
isClassType()
Whether or not this is an instance of RVMClass? |
boolean |
isInBootImage()
Is this class part of the virtual machine's boot image? |
boolean |
isInitialized()
Initialization status. |
boolean |
isInstantiated()
Instantiation status. |
boolean |
isPrimitiveType()
Whether or not this is a primitive type |
boolean |
isReferenceType()
|
boolean |
isResolved()
Resolution status. |
boolean |
isUnboxedType()
|
void |
markAsBootImageClass()
Only intended to be used by the BootImageWriter |
private void |
publishResolved(TIB allocatedTib,
short[] superclassIds,
int[] doesImplement)
Atomically initialize the important parts of the TIB and let the world know this type is resolved. |
void |
resolve()
Resolve an array. |
String |
toString()
Name - something like "[I" or "[Ljava.lang.String;" |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final RVMArray BooleanArray
public static final RVMArray ByteArray
public static final RVMArray CharArray
public static final RVMArray ShortArray
public static final RVMArray IntArray
public static final RVMArray LongArray
public static final RVMArray FloatArray
public static final RVMArray DoubleArray
public static final RVMArray JavaLangObjectArray
private final RVMType elementType
private final int logElementSize
private final RVMType innermostElementType
private final int innermostElementTypeDimension
private final int alignment
private final boolean acyclic
private TIB typeInformationBlock
private byte state
private boolean inBootImage
| Constructor Detail |
|---|
RVMArray(TypeReference typeRef,
RVMType elementType)
typeRef - elementType - | Method Detail |
|---|
public String toString()
toString in class Objectpublic int getStackWords()
RVMType
getStackWords in class RVMTypepublic int getMemoryBytes()
getMemoryBytes in class RVMTypepublic RVMType getElementType()
public RVMType getInnermostElementType()
public int getAlignment()
public int getLogElementSize()
private int computeLogElementSize()
public int getInstanceSize(int numelts)
numelts - number of array elements in the instance
public boolean hasFinalizer()
hasFinalizer in class RVMTypepublic RVMField[] getStaticFields()
getStaticFields in class RVMTypepublic RVMField[] getInstanceFields()
getInstanceFields in class RVMTypepublic RVMMethod[] getStaticMethods()
getStaticMethods in class RVMTypepublic RVMMethod[] getVirtualMethods()
getVirtualMethods in class RVMTypepublic TIB getTypeInformationBlock()
getTypeInformationBlock in class RVMTypepublic int getTypeDepth()
getTypeDepth in class RVMTypepublic boolean isAcyclicReference()
isAcyclicReference in class RVMTypepublic int getDimensionality()
getDimensionality in class RVMTypepublic boolean isResolved()
isResolved in class RVMTypepublic boolean isInstantiated()
isInstantiated in class RVMTypepublic boolean isInitialized()
isInitialized in class RVMTypepublic void markAsBootImageClass()
markAsBootImageClass in class RVMTypepublic boolean isInBootImage()
isInBootImage in class RVMTypepublic Offset getThinLockOffset()
getThinLockOffset in class RVMTypepublic boolean isClassType()
isClassType in class RVMTypepublic boolean isArrayType()
isArrayType in class RVMTypepublic boolean isPrimitiveType()
isPrimitiveType in class RVMTypepublic boolean isReferenceType()
isReferenceType in class RVMTypepublic boolean isUnboxedType()
isUnboxedType in class RVMTypepublic void resolve()
resolve in class RVMType
private void publishResolved(TIB allocatedTib,
short[] superclassIds,
int[] doesImplement)
allocatedTib - The TIB that has been allocated for this typesuperclassIds - The calculated superclass ids arraydoesImplement - The calculated does implement arraypublic void allBootImageTypesResolved()
RVMTypeRVMType.resolve() has been called on all
bootimaage types but before RVMType.instantiate() has been called
on any bootimaage type.
This provides a hook to compute various summaries that cannot be computed before types
are resolved.
allBootImageTypesResolved in class RVMTypepublic void instantiate()
instantiate in class RVMTypepublic void initialize()
initialize in class RVMTypepublic static RVMArray getPrimitiveArrayType(int atype)
atype - array type number (see "newarray" bytecode description in Java VM Specification)
public static void arraycopy(byte[] src,
int srcIdx,
byte[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(byte[] src,
int srcIdx,
byte[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(boolean[] src,
int srcIdx,
boolean[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(boolean[] src,
int srcIdx,
boolean[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(short[] src,
int srcIdx,
short[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(short[] src,
int srcIdx,
short[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(char[] src,
int srcIdx,
char[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(char[] src,
int srcIdx,
char[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(int[] src,
int srcIdx,
int[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(int[] src,
int srcIdx,
int[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(float[] src,
int srcIdx,
float[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(float[] src,
int srcIdx,
float[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(long[] src,
int srcIdx,
long[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(long[] src,
int srcIdx,
long[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(double[] src,
int srcIdx,
double[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(double[] src,
int srcIdx,
double[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
public static void arraycopy(Object[] src,
int srcIdx,
Object[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyNoCheckcast(Object[] src,
int srcIdx,
Object[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting source indexlen - The number of array elements to be copied
private static void arraycopyPiecemealNoCheckcast(Object[] src,
Object[] dst,
int len,
Offset srcOffset,
Offset dstOffset,
int bytes)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copied
private static void arraycopyPiecemeal(Object[] src,
int srcIdx,
Object[] dst,
int dstIdx,
int len)
src - The source arraysrcIdx - The starting source indexdst - The destination arraydstIdx - The starting destination indexlen - The number of array elements to be copiedprivate static void failWithIndexOutOfBoundsException()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||