public final class Primitive extends RVMType
This description is not read from a ".class" file, but rather is manufactured by the VM before execution begins.
Note that instances of primitives are not objects:
RVMType,
RVMClass,
RVMArray,
UnboxedType| Modifier and Type | Field and Description |
|---|---|
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 primitive.
|
private int |
stackWords
How many slots in the Java Expression Stack does it take
to hold a value of this primitive type?
|
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| Modifier | Constructor and Description |
|---|---|
private |
Primitive(TypeReference tr,
Class<?> classForType,
Atom name,
int stackWords,
int memoryBytes)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
allBootImageTypesResolved()
This method is only called by the bootimage writer.
|
(package private) static Primitive |
createPrimitive(TypeReference tr)
Creates an instance of a
Primitive. |
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() |
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() |
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() |
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()
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
|
void |
resolve()
Cause resolution to take place.
|
String |
toString()
Name - something like "int".
|
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, getDeclaredAnnotationsByTypeprivate final Atom name
private final int stackWords
private final int memoryBytes
private Primitive(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 primitivestatic Primitive createPrimitive(TypeReference tr)
Primitive.tr - The canonical type reference for this primitivePrimitivepublic int getTypeDepth()
getTypeDepth in class RVMTypepublic boolean isAcyclicReference()
RVMTypeisAcyclicReference in class RVMTypetruepublic 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 because primitives are always considered
"resolved"public 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 because primitives are always considered
"instantiated"public 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 because primitives are always considered
"initialized"public void markAsBootImageClass()
RVMTypemarkAsBootImageClass in class RVMTypepublic boolean isInBootImage()
RVMTypeisInBootImage in class RVMTypetrue because primitives are needed to start
Jikes RVMpublic Offset getThinLockOffset()
getThinLockOffset in class RVMTypepublic boolean isClassType()
RVMTypeisClassType in class RVMTypefalsepublic boolean isArrayType()
RVMTypeisArrayType in class RVMTypefalsepublic boolean isPrimitiveType()
RVMTypeisPrimitiveType in class RVMTypetruepublic boolean isReferenceType()
RVMTypeisReferenceType in class RVMTypefalsepublic boolean isUnboxedType()
RVMTypeisUnboxedType in class RVMTypefalsepublic int getStackWords()
getStackWords in class RVMTypepublic int getMemoryBytes()
getMemoryBytes in class RVMTypepublic void resolve()
resolve in class RVMTypeisResolved()public 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 RVMTypeisInstantiated()public void initialize()
initialize in class RVMTypeisInitialized()public boolean hasFinalizer()
hasFinalizer in class RVMTypefalsepublic 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