|
|||||||||||
| 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.UnboxedType
public final class UnboxedType
Description of an Unboxed Magic type. Currently, unboxed types are restricted to be values that can fit in a single machines word.
RVMType,
RVMClass,
RVMArray,
Primitive| Field Summary | |
|---|---|
private int |
memoryBytes
How many bytes in memory does it take to hold a value of this primitive type? |
private Atom |
name
The pretty (external) name for this Unboxed type. |
private int |
stackWords
How many slots in the Java Expression Stack does it take to hold a value of this primitive type? |
| 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 | |
|---|---|
private |
UnboxedType(TypeReference tr,
Class<?> classForType,
Atom name,
int stackWords,
int memoryBytes)
Constructor |
| Method Summary | |
|---|---|
void |
allBootImageTypesResolved()
This method is only called by the bootimage writer. |
(package private) static UnboxedType |
createUnboxedType(TypeReference tr)
Create an instance of a UnboxedType |
int |
getDimensionality()
Number of [ in descriptor for arrays; -1 for primitives; 0 for classes |
RVMField[] |
getInstanceFields()
Non-static fields of this class/array type (composed with supertypes, if any). |
int |
getMemoryBytes()
Space required in memory in bytes. |
int |
getStackWords()
Stack space requirement in words. |
RVMField[] |
getStaticFields()
Static fields of this class/array type. |
RVMMethod[] |
getStaticMethods()
Statically dispatched methods of this class/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 class/array type. |
RVMMethod[] |
getVirtualMethods()
Virtually dispatched methods of this class/array type (composed with supertypes, if any). |
boolean |
hasFinalizer()
Does this type override java.lang.Object.finalize()? |
void |
initialize()
Cause initialization to take place. |
void |
instantiate()
Cause instantiation to take place. |
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 |
void |
resolve()
Cause resolution to take place. |
String |
toString()
Name - something like "int". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final Atom name
private final int stackWords
private final int memoryBytes
| Constructor Detail |
|---|
private UnboxedType(TypeReference tr,
Class<?> classForType,
Atom name,
int stackWords,
int memoryBytes)
tr - The canonical type reference for this primitiveclassForType - The java.lang.Class representationname - The name for this primitivestackWords - The stack slots used by this primitivememoryBytes - The bytes in memory used by this primitive| Method Detail |
|---|
public String toString()
toString in class Objectstatic UnboxedType createUnboxedType(TypeReference tr)
UnboxedType
tr - The canonical type reference for this primitivepublic 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 int getStackWords()
getStackWords in class RVMTypepublic int getMemoryBytes()
getMemoryBytes in class RVMTypepublic void resolve()
resolve in class RVMTypepublic 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 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 RVMType
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||