public final class RVMArray extends RVMType
This description is not read from a ".class" file, but rather is manufactured by the VM as execution proceeds.
RVMType,
RVMClass,
Primitive,
UnboxedType| Modifier and Type | Field and Description |
|---|---|
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.
|
AddressArrayType, AddressType, BooleanType, ByteType, CharType, CodeArrayType, CodeType, depth, dimension, doesImplement, DoubleType, emptyVMClass, emptyVMField, emptyVMMethod, ExtentArrayType, ExtentType, FloatType, FunctionTableType, id, IMTType, IntType, ITableArrayType, ITableType, JavaIoSerializableType, JavaLangClassType, JavaLangCloneableType, JavaLangObjectArrayType, JavaLangObjectType, JavaLangRefReferenceReferenceField, JavaLangRefReferenceType, JavaLangStringType, JavaLangThrowableType, LinkageTripletTableType, LongType, MagicType, NOREFS_OFFSET_ARRAY, ObjectReferenceArrayType, ObjectReferenceType, OffsetArrayType, OffsetType, REFARRAY_OFFSET_ARRAY, referenceOffsets, ShortType, superclassIds, tibOffset, TIBType, typeRef, VoidType, WordArrayType, WordTypedeclaredAnnotationDatas| Constructor and Description |
|---|
RVMArray(TypeReference typeRef,
RVMType elementType) |
| Modifier and Type | Method and Description |
|---|---|
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
|
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() |
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
0 java.lang.Object, Primitive, and Classes that are interfaces
1 for RVMArrays and classes that extend Object directly
|
TIB |
getTypeInformationBlock()
Runtime type information for this array type.
|
RVMMethod[] |
getVirtualMethods()
Virtually dispatched methods of this array type.
|
boolean |
hasFinalizer() |
void |
initialize()
Initialization is a no-op (arrays have no
<clinit> method). |
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()
Is this an instance of RVMArray?
|
boolean |
isClassType()
Is 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()
Is this a primitive type?
|
boolean |
isReferenceType()
Is this a reference type?
|
boolean |
isResolved()
Resolution status.
|
boolean |
isUnboxedType()
Is this an unboxed type?
|
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;"
|
asArray, asClass, asPrimitive, asUnboxedType, createClassForType, findVirtualMethod, getArrayTypeForElementType, getClassForType, getClassLoader, getDescriptor, getDesiredAssertionStatus, getDoesImplement, getId, getMMAllocator, getReferenceOffsets, getResolvedClassForType, getSuperclassIds, getTIBMethodAtSlot, getTibOffset, getType, getTypeRef, hashCode, isAssignableFrom, isBooleanType, isByteType, isCharType, isDoubleType, isFloatType, isIntLikeType, isIntType, isJavaLangObjectType, isJavaLangStringType, isJavaLangThrowableType, isLongType, isNonMoving, isShortType, isVoidType, numTypes, setMMAllocator, setSpecializedMethod, updateArrayMethodsgetAnnotation, getAnnotations, getAnnotationsInternal, getDeclaredAnnotations, getDeclaredAnnotationsInternal, hasAnnotations, hasBaselineNoRegistersAnnotation, hasBaselineSaveLSRegistersAnnotation, hasInlineAnnotation, hasInterruptibleAnnotation, hasLogicallyUninterruptibleAnnotation, hasNoBoundsCheckAnnotation, hasNoCheckStoreAnnotation, hasNoEscapesAnnotation, hasNoInlineAnnotation, hasNonMovingAllocationAnnotation, hasNonMovingAnnotation, hasNoNullCheckAnnotation, hasNoOptCompileAnnotation, hasPreemptibleAnnotation, hasPureAnnotation, hasRuntimeFinalAnnotation, hasRuntimePureAnnotation, hasUninterruptibleAnnotation, hasUninterruptibleNoWarnAnnotation, hasUnpreemptibleAnnotation, hasUnpreemptibleNoWarnAnnotation, hasUntracedAnnotation, isAnnotationDeclared, isAnnotationPresent, readAnnotations, toAnnotationsclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByTypepublic static final RVMArray BooleanArray
public static final RVMArray ShortArray
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
RVMArray(TypeReference typeRef, RVMType elementType)
public int getStackWords()
RVMTypegetStackWords 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 instancepublic 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()
RVMTypegetTypeDepth in class RVMTypepublic boolean isAcyclicReference()
RVMTypeisAcyclicReference in class RVMTypetrue if the reference is acyclicpublic int getDimensionality()
getDimensionality in class RVMTypepublic boolean isResolved()
RVMTypeIf the class/array has been "resolved", then size and offset information is available by which the compiler can generate code to access this class/array's fields/methods via direct loads/stores/calls (rather than generating code to access fields/methods symbolically, via dynamic linking stubs).
Primitives are always treated as "resolved".
isResolved in class RVMTypetrue when the class has been resolvedpublic boolean isInstantiated()
RVMTypeIf the class/array has been "instantiated", then all its methods have been compiled and its type information block has been placed in the JTOC.
Primitives are always treated as "instantiated".
isInstantiated in class RVMTypetrue when the class has been instantiatedpublic boolean isInitialized()
RVMType
If the class has been "initialized",
then its <clinit> method has been executed.
Arrays have no <clinit> methods so they become
"initialized" immediately upon "instantiation".
Primitives are always treated as "initialized".
isInitialized in class RVMTypetrue when the class has been initializedpublic void markAsBootImageClass()
RVMTypemarkAsBootImageClass in class RVMTypepublic boolean isInBootImage()
RVMTypeisInBootImage in class RVMTypetrue if the class is in the bootimagepublic Offset getThinLockOffset()
getThinLockOffset in class RVMTypepublic boolean isClassType()
RVMTypeisClassType in class RVMTypefalsepublic boolean isArrayType()
RVMTypeisArrayType in class RVMTypetruepublic boolean isPrimitiveType()
RVMTypeisPrimitiveType in class RVMTypefalsepublic boolean isReferenceType()
RVMTypeisReferenceType in class RVMTypetruepublic boolean isUnboxedType()
RVMTypeisUnboxedType in class RVMTypefalsepublic void resolve()
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
bootimage types but before RVMType.instantiate() has been called
on any bootimage 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()
<clinit> method).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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedpublic 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 copiedprivate 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 copiedprivate static void arraycopyPiecemealNoCheckcast(Object[] src, Object[] dst, int len, Offset srcOffset, Offset dstOffset, int bytes)
src - The source arraydst - The destination arraylen - The number of array elements to be copiedsrcOffset - The starting offset in the source arraydstOffset - The starting offset in the destination array.bytes - the number of bytes to copyprivate 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()